@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@1,900&display=swap');

@media (max-width: 768px) {
    /* 1. Reset total de la structure nav pour mobile */
    nav {
        all: unset !important; /* Efface les styles précédents qui bloquent */
        
        /* On reconstruit la pilule */
        position: fixed !important;
        top: 24px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        
        display: flex !important;
        align-items: center !important;
        justify-content: center !important; /* Centre les éléments entre eux */
        gap: 15px !important; /* Espace serré entre Logo et CV */
        
        padding: 8px 15px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 100px !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
        
        width: max-content !important; /* LA CLÉ : La barre prend la taille exacte du contenu */
        z-index: 1000 !important;
    }

    /* 2. On cache tout sauf le logo et le bouton CV */
    nav > *:not(.nav-logo-link):not(.flex.items-center.gap-6) {
        display: none !important;
    }
    
    /* On cache aussi le switch de langue à l'intérieur du bloc de droite */
    #lang-switch, 
    nav .h-4.w-\[1px\] {
        display: none !important;
    }

    /* 3. Ajustement tailles pour que ce soit compact */
    .nav-logo {
        width: 25px !important;
        height: 25px !important;
    }

    .nav-brand-name {
        font-size: 14px !important;
        display: block !important; /* Garde le nom à côté du logo */
    }

    .btn-cv-nav {
        width: 60px !important;
        height: 32px !important;
        min-width: 0 !important;
    }
}
.title-phare {
    font-family: 'Inter', sans-serif !important;
    font-weight: 900 !important;      /* Poids "Black" identique à l'index */
    font-style: italic !important;      /* Inclinaison exacte */
    letter-spacing: -3px !important;    /* Lettres très serrées */
    line-height: 1 !important;
    text-transform: none !important;    /* INDISPENSABLE : permet d'avoir des minuscules */
    color: #1a1a1a;
}


/* ANCRES NAVIGATION */
#dev, #projects, #about {
    scroll-margin-top: 150px; /* Ajuste le scroll sous la nav pilule */
}

/* État caché */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); /* Courbe fluide */
    will-change: opacity, transform;
}

/* État visible */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 1. LA BARRE : Pilule fine et centrée */
nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 60px !important;
    padding: 0 30px !important;
    border-radius: 100px !important;
    width: auto !important;
    min-width: 800px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
}

/* 2. ALIGNEMENT Y-DESIGN (LOGO + NOM) */
.nav-logo-link {
    display: flex !important;
    flex-direction: row !important; /* Force l'horizontalité */
    align-items: center !important;
    gap: 10px !important;
}

.nav-logo {
    width: 32px !important;
    height: 32px !important;
}

.nav-brand-name {
    font-size: 15px !important;
    font-weight: 800 !important;
    margin: 0 !important; /* Supprime les décalages */
    line-height: 1 !important; /* Centre verticalement par rapport au logo */
}

/* 3. ALIGNEMENT DES LIENS (Accueil, Services...) */
nav .flex.gap-8 {
    display: flex !important;
    align-items: center !important; /* Centre verticalement dans la barre */
    gap: 25px !important;
}

/* 1. STYLE DE BASE DES LIENS */
.nav-link {
    position: relative !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    padding: 8px 0 !important;
    transition: color 0.3s ease !important;
}

/* 2. CRÉATION DE LA BARRE SOUS LE LIEN */
.nav-link::after {
    content: '' !important;
    position: absolute !important;
    width: 0 !important; /* Invisible au départ */
    height: 2px !important;
    bottom: 0 !important;
    left: 0 !important;
    background-color: #0004ff !important; /* Même bleu que ton CV */
    transition: width 0.3s cubic-bezier(0.65, 0, 0.35, 1) !important; /* Animation fluide */
}

/* 3. EFFET AU SURVOL (HOVER) */
.nav-link:hover {
    color: #0004ff !important; /* Le texte devient bleu */
}

.nav-link:hover::after {
    width: 100% !important; /* La barre se déploie sur toute la largeur */
}

/* 4. ÉTAT ACTIF (La page où tu te trouves) */
.nav-link.active {
    color: #0004ff !important;
}

.nav-link.active::after {
    width: 100% !important;
}

/* --- BOUTON CV STYLE NAV --- */
.btn-cv-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100px !important; /* Largeur fixe pour l'effet de remplissage */
    height: 40px !important; /* Plus fin pour la nav */
    border-radius: 10px !important;
    border: 1px solid #0004ff !important;
    position: relative !important;
    overflow: hidden !important;
    background: white !important;
    cursor: pointer !important;
    z-index: 1 !important;
    text-decoration: none !important;
}

/* Les deux pans qui se rejoignent au survol */
.btn-cv-nav::before, 
.btn-cv-nav::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    width: 0 !important;
    height: 100% !important;
    transform: skew(15deg) !important;
    transition: 0.5s !important;
    z-index: -1 !important;
}

.btn-cv-nav::before {
    left: -10px !important;
    background: #0004ff !important; /* Bleu foncé */
}

.btn-cv-nav::after {
    right: -10px !important;
    background: #0004ff !important; /* Bleu primaire */
}

/* Animation au survol */
.btn-cv-nav:hover::before, 
.btn-cv-nav:hover::after {
    width: 65% !important;
}

.btn-cv-nav:hover span {
    color: #ffffff !important;
}

/* Texte interne */
.btn-cv-nav span {
    color: #0004ff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    transition: 0.3s !important;
    z-index: 2 !important;
}

/* 5. FOOTER NOIR COMPLET */
.footer-final {
    background-color: #000 !important;
    padding: 60px 0 30px 0;
    width: 100%;
    color: white;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-contact-links { display: flex; flex-direction: column; gap: 12px; }

.contact-item {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-item i { color: #0004ff; font-size: 18px; }

.footer-social-right { display: flex; gap: 20px; }

.social-box {
    width: 65px; height: 65px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.3s;
}

.social-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0; height: 100%;
    background: #0004ff;
    z-index: -1;
    transition: width 0.4s ease-in-out;
}

.social-box:hover::before { width: 100%; }
.social-box:hover { transform: scale(1.1); }

.footer-sep { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.15); margin: 20px 0; }

.footer-bottom { display: flex; justify-content: space-between; color: #888; font-size: 14px; }

@media (max-width: 768px) {
    /* Footer : Logos sous les contacts */
    .footer-top {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
    }

    .footer-contact-links {
        order: 1;
    }

    .footer-social-right {
        order: 2;
        justify-content: center !important;
    }

    /* Centrer le contenu principal */
    main {
        text-align: center;
    }

    /* Ajuster les vidéos et images pour qu'elles soient centrées */
    video, img {
        display: block;
        margin: 0 auto;
        max-width: 100%;
        height: auto;
    }

    /* Réduire la taille du texte dans les bulles pour éviter le débordement */
    .bg-\[#1a1a1a\] h3 {
        font-size: 1rem !important;
    }

    .bg-\[#1a1a1a\] p {
        font-size: 0.9rem !important;
    }

    /* Ajuster la grille des métas pour mobile */
    .meta-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .meta-card {
        padding: 12px !important;
    }

    .meta-card p {
        font-size: 0.8rem !important;
    }

    /* Titre principal plus petit */
    h1.title-phare {
        font-size: 2.5rem !important;
    }

    h2.title-phare {
        font-size: 2rem !important;
    }
}

@media screen and (max-width: 1024px) {
    /* On cache la barre */
    nav.fixed {
        display: none !important;
    }

    /* On remonte le contenu principal */
    main, section:first-of-type {
        margin-top: 0 !important;
        padding-top: 0 !important; /* Ajuste selon tes goûts */
    }
}
