/* =========================================
   1. VARIABLES & CONFIGURATION GLOBALE
   ========================================= */
:root {
    /* Palette Moderne */
    --primary-color: #0f172a;  /* Bleu très sombre (Slate 900) */
    --accent-color: #3b82f6;   /* Bleu électrique vibrant */
    --accent-hover: #2563eb;   /* Bleu plus foncé au survol */
    --bg-color: #f8fafc;       /* Blanc cassé très léger */
    --text-color: #334155;     /* Gris ardoise pour le texte */
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Important pour le menu mobile */
    width: 100%;
}

h1, h2, h3, .btn {
    font-family: 'Poppins', sans-serif;
}

main {
    flex: 1; /* Pousse le footer vers le bas */
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 20px;
}

.center-text {
    text-align: center;
}

/* =========================================
   2. ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    background-color: var(--primary-color);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100; /* Assure que le menu reste au-dessus */
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li { margin: 0 15px; }

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s;
}

nav a:hover, nav a.active { color: var(--accent-color); }

/* =========================================
   4. HERO SECTION (ACCUEIL)
   ========================================= */
.hero-section {
    height: 100vh; /* Plein écran */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* Dégradé + Image + Effet Parallaxe (fixed) */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9)), url('https://source.unsplash.com/random/1920x1080/?code,tech');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    color: var(--white);
    
    /* Remonte le contenu optiquement */
    padding-bottom: 10vh; 
}

.big-name {
    font-size: 4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.subtitle { font-size: 1.5rem; color: var(--accent-color); }
.tagline { margin-bottom: 2rem; font-style: italic; }

/* Encadré "À propos" chevauchant */
.about-box {
    background-color: var(--white);
    padding: 3rem;
    margin-top: 4rem; 
    margin-bottom: 4rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-left: 5px solid var(--accent-color);
    
    /* Styles communs cartes */
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* =========================================
   5. COMPOSANTS (BOUTONS, TITRES, CARTES)
   ========================================= */
h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    margin-bottom: 1.5rem;
    padding-bottom: 5px;
}

/* Boutons Modernes (Pillule + Gradient) */
.btn, button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: var(--white);
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.btn:hover, button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(59, 130, 246, 0.4);
}

/* Cartes Modernes (Lift Effect) */
.card, .skill-card, .doc-item, .contact-card {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.card:hover, .skill-card:hover, .doc-item:hover, .contact-card:hover, .about-box:hover {
    transform: translateY(-8px); /* Monte vers le haut */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

/* =========================================
   6. PAGES SPÉCIFIQUES (PARCOURS, CONTACT, DOC)
   ========================================= */

/* Parcours & Compétences */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Téléchargement CV */
.cv-download-box {
    background-color: #eaf6ff;
    border: 1px solid #bde0fe;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
.cv-download-box h3 { color: var(--primary-color); margin-bottom: 0.5rem; }
.cv-download-box p { margin-bottom: 1.5rem; color: #555; }

.separator {
    border: 0; height: 1px; background: #ddd; margin: 2rem 0;
}

/* Contact */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* Style pour la ligne Date / Lieu */
.card-meta {
    display: flex;
    justify-content: space-between; /* Sépare les deux éléments aux extrémités */
    color: #64748b; /* Gris discret */
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.contact-card {
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
    width: 300px; /* Largeur fixe pour alignement */
}

/* Login (Doc) */
.login-box {
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
input { padding: 12px; width: 80%; margin: 10px 0; border-radius: 5px; border: 1px solid #ddd; }
.error { color: red; margin-top: 10px; font-size: 0.9rem; }

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 20px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
}

.footer-col h3 {
    border-bottom: 2px solid var(--accent-color);
    font-size: 1.1rem;
    color: var(--white);
    
    /* AJOUTS POUR L'ESPACEMENT */
    display: inline-block; /* La ligne fait la taille du texte */
    padding-bottom: 8px;   /* Espace entre le Titre et la Ligne */
    margin-bottom: 16px;   /* Espace entre la Ligne et le Texte du dessous */
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a, .footer-col a { color: #cbd5e1; text-decoration: none; transition: color 0.3s; }
.footer-links a:hover, .footer-col a:hover { color: var(--accent-color); }

.footer-copy {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* --- OVERLAY CONSTRUCTION --- */

/* --- OVERLAY CONSTRUCTION (Corrigé Mobile) --- */
#construction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;  /* Colle au bord droit */
    bottom: 0; /* Colle au bord bas */
    /* On supprime width et height pour laisser right/bottom gérer la taille */
    
    background-color: rgba(15, 23, 42, 1);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    
    padding: 20px;
    box-sizing: border-box; /* INDISPENSABLE : Empêche le padding d'agrandir la boîte */
    overflow: hidden; /* Sécurité pour empêcher tout défilement */
}

.construction-box {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--accent-color);
    animation: bounceIn 0.6s ease;
}

.construction-box .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.construction-box h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.construction-box p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}

/* =========================================
   8. RESPONSIVE & MOBILE
   ========================================= */
.burger {
    display: none;
    cursor: pointer;
}
.burger div {
    width: 25px; height: 3px; background-color: var(--white); margin: 5px; transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .big-name { font-size: 2.5rem; }
    
    .nav-container { justify-content: space-between; padding: 0 20px; }
    
    .burger { display: block; }

    .nav-links {
        position: absolute;
        right: 0px;
        top: 60px;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-bottom: 20px;
        box-shadow: 0 5px 5px rgba(0,0,0,0.2);
    }

    .nav-links li { margin: 20px 0; opacity: 0; }
    .nav-links.nav-active { transform: translateX(0%); }

    @keyframes navLinkFade {
        from { opacity: 0; transform: translateX(50px); }
        to { opacity: 1; transform: translateX(0); }
    }
    
    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
}