/* --- Variables d'ambiance premium --- */
:root {
    --bg-color: #0d0d12;      /* Noir bleuté très profond */
    --bg-card: rgba(30, 30, 35, 0.6); /* Translucide pour le glassmorphism */
    --text-main: #f0f0f0;     /* Blanc lumineux */
    --text-muted: #9aa0a6;    /* Gris bleuté pour la douceur */
    --accent: #fdbb2d;        /* Ambre électrique */
    --accent-glow: rgba(253, 187, 45, 0.4);
    --nav-bg: rgba(13, 13, 18, 0.85);
    --body-font: 'Inter', sans-serif;
}

/* --- Scrollbar Personnalisée --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- Base --- */
html { scroll-behavior: smooth; }
body {
    font-family: var(--body-font); margin: 0; 
    /* Fond avec un léger dégradé radial pour la profondeur */
    background: radial-gradient(circle at 50% 0%, #1a1a24 0%, var(--bg-color) 60%);
    background-attachment: fixed;
    color: var(--text-main); line-height: 1.6; overflow-x: hidden;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.5px; margin: 0; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

.container { max-width: 900px; margin: 0 auto; padding: 100px 20px; }

/* --- Titres de sections dynamiques --- */
.section-title { margin-bottom: 40px; }
.section-title h2 {
    font-size: 2rem; border-bottom: none; position: relative; display: inline-block; padding-bottom: 10px;
}
/* Soulignement animé sous les titres */
.section-title h2::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 3px;
    width: 50%; background: var(--accent); border-radius: 2px;
    transition: width 0.4s ease;
}
.container:hover .section-title h2::after { width: 100%; box-shadow: 0 0 10px var(--accent-glow); }

/* --- Navbar Glassmorphism --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 5%;
    background-color: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    position: fixed; width: 100%; top: 0; z-index: 1000; box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.05); transition: 0.3s;
}
.logo { font-size: 1.5rem; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.nav-links { list-style: none; display: flex; gap: 20px; align-items: center; padding: 0; margin: 0; transition: 0.3s; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); position: relative; }
.nav-links a:hover { color: var(--text-main); }

/* Bouton Langue */
#lang-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--text-main);
    padding: 6px 15px; border-radius: 20px; cursor: pointer; transition: 0.3s; font-weight: 600; font-family: inherit;
}
#lang-btn:hover { background: var(--accent); color: var(--bg-color); border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

/* --- Hero & Photo Animée --- */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; }
.hero-content { display: flex; flex-direction: column; align-items: center; }
.profile-header { display: flex; align-items: center; justify-content: center; gap: 40px; margin-bottom: 30px; }

/* Animation de flottaison */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.profile-pic-container { animation: float 6s ease-in-out infinite; }
.profile-pic {
    width: 170px; height: 170px; border-radius: 50%; object-fit: cover;
    border: 3px solid rgba(255,255,255,0.1); padding: 5px; /* Effet double bordure */
    background: var(--bg-card); box-shadow: 0 15px 35px rgba(0,0,0,0.6); transition: 0.4s;
}
.profile-pic:hover { border-color: var(--accent); box-shadow: 0 0 30px var(--accent-glow); }

.name-titles { text-align: left; }
.hero h1 { font-size: 3.5rem; margin-bottom: 5px; letter-spacing: -1px; }
.tagline { font-size: 1.3rem; color: var(--accent); font-weight: 400; margin: 0; }
.contact-bar { color: var(--text-muted); font-size: 0.95rem; margin-top: 20px; text-align: center; background: rgba(255,255,255,0.03); padding: 10px 20px; border-radius: 30px; display: inline-block; position: relative;}
.separator { margin: 0 15px; opacity: 0.3; }

/* Icônes Sociaux */
.social-icons { display: flex; gap: 15px; margin-top: 15px; justify-content: center; }
.social-icon { font-size: 1.5rem; color: var(--text-muted); transition: 0.3s; }
.social-icon:hover { color: var(--accent); transform: scale(1.1); text-shadow: 0 0 10px var(--accent-glow); }

/* --- NOUVEAU Bouton CV PDF --- */
.btn-cv {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding: 15px 25px;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}
.btn-cv i { font-size: 1.2rem; transition: 0.3s; }
.btn-cv:hover {
    background: var(--accent);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}
/* Animation icône téléchargement clignotante */
@keyframes download-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.btn-cv:hover i { animation: download-blink 1s infinite; }

/* --- Cards (Glassmorphism & Glow) --- */
.card {
    background: var(--bg-card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 30px; border-radius: 16px; margin: 25px 0;
    border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet de rebond léger */
    position: relative; overflow: hidden;
}
/* Petit liseré en haut de la carte au survol */
.card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0; height: 3px;
    background: var(--accent); transition: width 0.4s ease;
}
.card:hover { transform: translateY(-8px); border-color: rgba(253, 187, 45, 0.3); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.card:hover::before { width: 100%; }

.card h3 { font-size: 1.3rem; color: #fff; margin-bottom: 8px; }
.card .date { color: var(--accent); font-size: 0.9rem; font-weight: 600; margin-bottom: 15px; letter-spacing: 0.5px; }
.card ul { color: var(--text-muted); padding-left: 20px; margin: 0; }
.card li { margin-bottom: 8px; }
.description { color: var(--text-muted); font-size: 1rem; margin-top: 5px; }
.glow-text { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

/* --- Interests Grid & HomeLab --- */
.interests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }
.interest-card { margin: 0; display: flex; flex-direction: column; justify-content: center; }
.interest-card h3 i { margin-right: 10px; color: var(--accent); } /* Icônes dans les titres Homelab */

/* --- Skills --- */
.skills-container { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-tag {
    background: rgba(255,255,255,0.03); padding: 10px 20px; border-radius: 30px;
    font-size: 0.9rem; font-weight: 500; border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease; cursor: default;
}
.skill-tag:hover {
    border-color: var(--accent); color: var(--bg-color); background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow); transform: scale(1.05);
}

/* --- Formulaire --- */
.contact-form { display: flex; flex-direction: column; max-width: 600px; gap: 20px; }
.contact-form input, .contact-form textarea {
    padding: 18px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; color: #fff; font-family: inherit; font-size: 1rem; transition: 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); background: rgba(0,0,0,0.4); box-shadow: 0 0 15px rgba(253, 187, 45, 0.1); }
.btn-submit {
    background: var(--accent); color: #000; padding: 18px; border: none;
    border-radius: 12px; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: 0.3s; display: flex; justify-content: center;
}
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 10px 25px var(--accent-glow); }

/* --- Menu Hamburger (Mobile) --- */
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; z-index: 1001; }
.menu-toggle .bar { width: 25px; height: 3px; background-color: var(--text-main); border-radius: 3px; transition: 0.3s; }

/* --- Animations Révélation (JS Observer) --- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.reveal.active { opacity: 1; transform: translateY(0); }
.lang-en { display: none; }

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    .profile-header { flex-direction: column; text-align: center; gap: 20px; }
    .name-titles { text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .contact-bar { display: flex; flex-direction: column; gap: 10px; background: none; }
    .separator { display: none; }
    
    /* Configuration du menu mobile */
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; height: 100vh; width: 70%;
        background: rgba(13, 13, 18, 0.95); backdrop-filter: blur(15px);
        flex-direction: column; justify-content: center; gap: 40px;
        transition: right 0.4s ease; border-left: 1px solid rgba(255,255,255,0.05);
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; }
    
    /* Animation de la croix du menu */
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

.footer { text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 50px; }
/* --- Animation de fond Réseau (tsParticles) --- */
#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place l'animation tout au fond */
    pointer-events: none; /* Empêche les particules de bloquer la souris (clics, sélection) */
}
/* --- Cartes Interactives (Pour la Pop-up) --- */
.interactive-card {
    cursor: pointer;
}
.card-hint {
    position: absolute; top: 20px; right: 20px;
    color: var(--accent); font-size: 1.5rem; opacity: 0;
    transform: rotate(-90deg); transition: 0.4s ease;
}
.interactive-card:hover .card-hint {
    opacity: 1; transform: rotate(0deg); text-shadow: 0 0 15px var(--accent-glow);
}

/* --- Style de la Pop-up (Modal) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 2000; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: 0.3s ease-in-out;
}
.modal-overlay.active {
    opacity: 1; pointer-events: auto;
}
.modal-content {
    background: var(--bg-card); border: 1px solid var(--accent);
    padding: 40px; border-radius: 16px; width: 90%; max-width: 650px;
    position: relative; transform: translateY(30px) scale(0.95); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px var(--accent-glow);
}
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}
.close-btn {
    position: absolute; top: 15px; right: 20px; font-size: 2rem;
    color: var(--text-muted); cursor: pointer; transition: 0.3s; line-height: 1;
}
.close-btn:hover { color: var(--accent); transform: scale(1.1); }

.modal-title { font-size: 1.8rem; margin-bottom: 15px; color: #fff; }
.modal-text { font-size: 1.05rem; color: var(--text-main); line-height: 1.7; margin-bottom: 25px; }
.modal-skills-title { font-size: 1.1rem; color: var(--accent); margin-bottom: 15px; border-bottom: 1px solid rgba(253, 187, 45, 0.2); display: inline-block; padding-bottom: 5px; }

/* --- Compétences Interactives --- */
.interactive-tag {
    cursor: pointer;
}
/* Style du tag quand il est cliqué */
.interactive-tag.active-skill {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.05);
}

/* Boîte d'explication de la compétence */
.skill-detail-box {
    margin-top: 25px;
    padding: 20px 25px;
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: none; /* Caché par défaut */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

/* Animation d'apparition */
.skill-detail-box.show {
    display: block;
    animation: fadeInSkill 0.4s forwards;
}

@keyframes fadeInSkill {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.skill-detail-box h3 {
    color: var(--accent);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.skill-detail-box p {
    color: var(--text-main);
    font-size: 0.95rem;
    margin: 0;
}

/* --- Certifications --- */
.certs-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}
.cert-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(253, 187, 45, 0.2);
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s;
    min-width: 250px;
}
.cert-badge:hover {
    background: rgba(253, 187, 45, 0.1);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--accent-glow);
}
.cert-icon {
    font-size: 2.5rem;
    color: var(--accent);
}
.cert-info h3 {
    font-size: 1.1rem;
    color: #fff;
    margin: 0;
}
.cert-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* --- Pop-up PDF Géante --- */
.pdf-modal-content {
    width: 90vw;
    max-width: 1000px;
    height: 85vh; /* Très grand pour bien voir le diplôme */
    padding: 40px 20px 20px 20px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .pdf-modal-content {
        width: 95vw;
        height: 90vh;
        padding: 40px 10px 10px 10px;
    }
}

/* --- Easter Egg Terminal --- */
#terminal-toggle {
    position: fixed; bottom: 30px; right: 30px; z-index: 999;
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted);
    width: 50px; height: 50px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
    transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
#terminal-toggle:hover { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

#terminal-window {
    position: fixed; bottom: 90px; right: 30px; width: 400px; max-width: 90vw;
    background: rgba(10, 10, 15, 0.95); border: 1px solid #333; border-radius: 8px;
    z-index: 1000; font-family: 'Courier New', Courier, monospace; overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8); transition: opacity 0.3s, transform 0.3s;
}
#terminal-window.hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }

.terminal-header {
    background: #1e1e1e; padding: 8px 15px; display: flex; justify-content: space-between;
    align-items: center; font-size: 0.85rem; color: #aaa; border-bottom: 1px solid #333;
}
.close-term { background: none; border: none; color: #aaa; font-size: 1.2rem; cursor: pointer; }
.close-term:hover { color: #ff5f56; }

.terminal-body {
    padding: 15px; height: 250px; overflow-y: auto; font-size: 0.9rem; color: #ddd;
}
.terminal-body p { margin: 5px 0; line-height: 1.4; }
.term-green { color: #4af626; }
.term-yellow { color: #fdbb2d; }
.term-red { color: #ff5f56; }

.terminal-input-line {
    display: flex; padding: 10px 15px; background: rgba(0,0,0,0.5);
    border-top: 1px solid #333; font-size: 0.9rem;
}
#terminal-input {
    background: transparent; border: none; color: #fff; font-family: inherit;
    font-size: inherit; margin-left: 10px; width: 100%; outline: none;
}