/* =========================================
   NAVBAR — FLAT DARK BAR (WhiteFiber-style)
   Flush top · Full-width · Square corners
   ========================================= */

/* ── Override base navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
    z-index: 1000;
    padding: 0;
    /* Hauteur de référence (identique à l'accueil) — définie ici pour que TOUTES les
       pages aient le même header, même celles qui ne chargent pas style.css. */
    height: 90px;
    /* Transparent at top of page — content behind shows through */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    /* Bordure 1px sur TOUS les côtés, transparente au repos — colorée en verre
       quand .scrolled. Largeur constante = aucun saut de mise en page à la
       transition (et trace joliment le contour de la pilule sur mobile). */
    border: 1px solid transparent;
    box-shadow: none;
    transition: background 0.55s ease,
                backdrop-filter 0.55s ease,
                -webkit-backdrop-filter 0.55s ease,
                border-color 0.55s ease,
                opacity 0.6s ease,
                transform 0.6s ease;
}

/* Une fois le hero dépassé (ou sur les sous-pages) : VERRE DÉPOLI foncé,
   même langage que le widget « Actualités » du hero (voile translucide + halo
   cyan + reflet sur l'arête haute), mais TEINTÉ FONCÉ : le logo et les liens
   sont blancs et la barre flotte au-dessus de sections claires une fois
   scrollée — un verre clair les rendrait illisibles. Apparaît au scroll vers
   le haut (la barre se masque au scroll vers le bas via .nav-hidden). */
.navbar.scrolled {
    background:
        linear-gradient(180deg, rgba(18, 26, 40, 0.58) 0%, rgba(11, 16, 25, 0.46) 100%),
        radial-gradient(130% 130% at 50% -25%, rgba(125, 211, 252, 0.12), transparent 60%);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 10px 34px -10px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* Hide on scroll down: smooth fade-out (opacity), no slide */
.navbar.nav-hidden {
    opacity: 0;
    pointer-events: none;
}

/* nav-on-dark theme swap removed — single dark logo is used everywhere now. */

/* Hidden on scroll down */
.navbar.nav-hidden {
    transform: translateY(-100%) !important;
    pointer-events: none;
    opacity: 0 !important;
}
/* (Retiré) ancien bloc « .navbar.scrolled » opaque (rgba(13,18,26,0.98)) qui
   écrasait le voile : le verre dépoli ci-dessus est désormais la seule barre
   scrollée. */

/* Sous-pages : le header est solide + fixed → on pousse le contenu vers le bas
   pour qu'il ne soit pas masqué (hauteur du header = 90px). Ajouté par
   js/site-header.js hors accueil. */
body.gfsf-subpage { padding-top: 90px; }

/* Shrink sur mobile au scroll — cohérent sur toutes les pages (pas seulement
   celles qui chargent style.css). */
@media (max-width: 900px) {
    .navbar.nav-shrink { height: 64px; }
    .navbar.nav-shrink .logo-img { height: 30px; }
    /* le header au repos fait toujours 90px en haut de page → on garde 90px d'offset */
}

/* Container */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;                 /* remplit la hauteur de la barre (centre verticalement) */
    max-width: var(--max-width, 1200px);
    margin: 0 auto;
    padding: 6px 20px;
    gap: 16px;
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 38px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar.scrolled .logo-img {
    height: 38px;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-links a {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 0;
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #ffffff;
    background: transparent;
}

/* Animated underline on hover */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 16px;
    height: 2px;
    background: linear-gradient(90deg, #0077b6, #00b4d8);
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ── Special Nav Links (Nos Outils & Événements) ── */
.nav-special {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    font-weight: 700 !important;
    border-radius: 9999px !important;   /* pill — !important car « .nav-links a » (plus spécifique) force sinon 0 ; cohérent avec le badge « Consultation gratuite » et les boutons MODE EXPRESS / SIMULATEUR */
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(.16,1,.3,1) !important;
    position: relative;
}

.nav-special::after {
    display: none !important;
}

.nav-special i,
.nav-special svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.nav-special:hover i,
.nav-special:hover svg {
    transform: scale(1.15);
}

/* — Nos Outils — Cyan accent on dark */
.nav-special--outils {
    color: #7dd3fc !important;
    background: rgba(0, 180, 216, .10) !important;
    border: 1px solid rgba(0, 180, 216, .22);
}

.nav-special--outils:hover {
    background: rgba(0, 180, 216, .18) !important;
    border-color: rgba(125, 211, 252, .45);
    color: #ffffff !important;
}

.nav-special--outils i,
.nav-special--outils svg {
    color: #7dd3fc;
}

/* — Événements — Warm gold accent on dark */
.nav-special--events {
    color: #fbbf24 !important;
    background: rgba(245, 158, 11, .10) !important;
    border: 1px solid rgba(245, 158, 11, .22);
}

.nav-special--events:hover {
    background: rgba(245, 158, 11, .18) !important;
    border-color: rgba(251, 191, 36, .45);
    color: #ffffff !important;
}

.nav-special--events i,
.nav-special--events svg {
    color: #fbbf24;
}

/* ── Mobile Special Links ── */
.mobile-special {
    border-radius: 14px !important;
    border: 1px solid transparent;
}

.mobile-special--outils {
    color: #0077b6 !important;
    background: rgba(0, 180, 216, .06);
    border-color: rgba(0, 180, 216, .12);
}

.mobile-special--outils i,
.mobile-special--outils svg {
    color: #00b4d8 !important;
}

.mobile-special--events {
    color: #92400e !important;
    background: rgba(245, 158, 11, .06);
    border-color: rgba(245, 158, 11, .12);
}

.mobile-special--events i,
.mobile-special--events svg {
    color: #f59e0b !important;
}

/* ── Outline Button (Nous Joindre) ── */
.btn-nav-outline {
    border: 1px solid rgba(255, 255, 255, .25) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 7px 16px !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    font-size: 0.8rem !important;
}

.btn-nav-outline:hover {
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, .08) !important;
}

.btn-nav-outline::after {
    display: none !important;
}

/* ── CTA Button (Portails) — matches "Prendre Rendez-vous" cyan gradient ── */
.btn-nav {
    background: linear-gradient(135deg, #0077b6, #00a8cc) !important;
    color: #ffffff !important;
    padding: 10px 22px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 119, 182, .28) !important;
    transition: all 0.3s ease !important;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-shadow: none;
    letter-spacing: 0.02em;
    animation: none !important;
}

@keyframes btnShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glossy shine sweep */
.btn-nav::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 70%;
    height: 200%;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .25) 45%, rgba(255, 255, 255, .08) 55%, transparent 70%);
    transition: left 0.6s ease;
    pointer-events: none;
}

.btn-nav:hover::before {
    left: 130%;
}

.btn-nav:hover {
    background: linear-gradient(135deg, #0086c4, #00b8de) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(0, 180, 216, .40), 0 3px 10px rgba(0, 119, 182, .22) !important;
}

.btn-nav:focus-visible {
    outline: 2px solid #00b4d8 !important;
    outline-offset: 2px;
}

.btn-nav::after {
    display: none !important;
}

.btn-nav i,
.btn-nav svg {
    width: 13px;
    height: 13px;
}

/* ── Nav-link-style dropdown button (Services) ── */
.nav-link-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 0;
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-link-btn:hover {
    color: #ffffff;
    background: transparent;
}

/* ── Dropdown (Portails) ── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-chevron {
    width: 12px !important;
    height: 12px !important;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 119, 182, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 40, 80, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px !important;
    font-size: 0.82rem !important;
    font-weight: 600;
    color: #1a3a52 !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: rgba(0, 119, 182, 0.07) !important;
    color: #0077b6 !important;
}

.nav-dropdown-menu a::after {
    display: none !important;
}

.nav-dropdown-menu a i,
.nav-dropdown-menu a svg {
    width: 15px;
    height: 15px;
    color: #0077b6;
    flex-shrink: 0;
}

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1a3a52;
    cursor: pointer;
    padding: 6px;
    border-radius: 10px;
    transition: all 0.3s;
}

.menu-toggle:hover {
    background: rgba(0, 119, 182, .08);
    color: #0077b6;
}

/* ── Mobile ── */
@media (max-width: 968px) {
    /* La barre de progression de défilement (js/smooth-engine.js) est retirée sur
       mobile : le header y est transparent/flottant, donc cette ligne bleue de 2px
       semblait flotter seule et grandir au scroll. */
    .nav-scroll-progress { display: none !important; }

    /* ─────────── Barre par défaut (SOUS-PAGES) : pilule verre centrée ─────────── */
    .navbar {
        width: calc(100% - 28px);
        margin-inline: auto;   /* centre la pilule (left:0 + right:0 + largeur fixe la collait à gauche, 28px de jeu à droite) */
        /* Petit retrait constant. L'ancien 46px réservait la hauteur du ticker
           « EN DIRECT » mobile, retiré depuis → la pilule semblait décalée vers
           le bas, avec du contenu qui dépassait au-dessus. env() = clear du
           notch quand le site est ajouté à l'écran d'accueil (PWA). */
        top: calc(12px + env(safe-area-inset-top));
        border-radius: 14px;
    }

    .nav-container {
        padding: 10px 16px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .logo-img {
        height: 36px;
    }

    /* ═══════════════════════════════════════════════════════════════════════
       ACCUEIL (mobile) — logo CENTRÉ collé en haut → pastille ☰ VERRE au scroll
       ─────────────────────────────────────────────────────────────────────
       Scopé à l'accueil (body SANS .gfsf-subpage). Les sous-pages gardent leur
       pilule avec le logo (sinon plus de marque ni de retour à l'accueil).
       La bascule est pilotée par la classe .nav-rolled posée par site-header.js
       dès qu'on quitte le tout-haut (≈16px) — « aussitôt qu'on scrolle ».
       ═══════════════════════════════════════════════════════════════════════ */

    /* État repos (tout en haut) : barre transparente pleine largeur, logo centré */
    body:not(.gfsf-subpage) .navbar {
        width: 100%;
        margin-inline: 0;
        top: 0;
        height: auto;
        padding-top: env(safe-area-inset-top);
        border-radius: 0;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        pointer-events: none;          /* la barre transparente ne capte rien… */
    }
    body:not(.gfsf-subpage) .nav-container {
        justify-content: center;       /* …logo centré */
        height: auto;
        padding: 12px 16px;
    }
    body:not(.gfsf-subpage) .logo-img { height: 38px; }
    body:not(.gfsf-subpage) .logo-link {
        pointer-events: auto;          /* …sauf le logo (cliquable au repos) */
        transition: opacity .3s ease;
    }

    /* On neutralise le VERRE « .scrolled » générique (prévu pour desktop) sur
       l'accueil mobile : ici le verre de la barre est piloté par .nav-rolled /
       .nav-hidden (le SENS du scroll), pas par .scrolled. */
    body:not(.gfsf-subpage) .navbar.scrolled {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    /* La pastille ☰ : bouton verre rond, fixe en haut à droite. Masquée au repos,
       révélée par .nav-rolled. Même langage « glass » que le widget Actualités. */
    body:not(.gfsf-subpage) .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: calc(12px + env(safe-area-inset-top));
        right: calc(14px + env(safe-area-inset-right));
        z-index: 1001;
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 999px;
        color: #fff;
        background:
            linear-gradient(180deg, rgba(18, 26, 40, 0.60), rgba(11, 16, 25, 0.48)),
            radial-gradient(130% 130% at 50% -25%, rgba(125, 211, 252, 0.14), transparent 60%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.16);
        box-shadow:
            0 8px 24px -8px rgba(0, 0, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.16);
        opacity: 0;                    /* caché au repos */
        transform: translateY(-6px) scale(0.92);
        pointer-events: none;
        transition: opacity .3s ease, transform .3s ease, background .25s ease,
                    border-color .25s ease, box-shadow .25s ease,
                    -webkit-backdrop-filter .25s ease, backdrop-filter .25s ease;
    }
    body:not(.gfsf-subpage) .menu-toggle:hover,
    body:not(.gfsf-subpage) .menu-toggle:focus-visible {
        color: #fff;
        outline: none;
        background:
            linear-gradient(180deg, rgba(26, 36, 56, 0.68), rgba(14, 20, 31, 0.56)),
            radial-gradient(130% 130% at 50% -25%, rgba(125, 211, 252, 0.22), transparent 60%);
    }
    body:not(.gfsf-subpage) .menu-toggle svg,
    body:not(.gfsf-subpage) .menu-toggle i { width: 22px; height: 22px; }

    /* Révélée dès qu'on a quitté le tout-haut (les DEUX sens de scroll). */
    body:not(.gfsf-subpage) .navbar.nav-rolled .menu-toggle {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    /* ── EN REMONTANT (ou à l'arrêt — pas .nav-hidden) : la BARRE passe en verre
       et le LOGO centré RESTE AFFICHÉ (lisible sur fond clair grâce au verre).
       Sur cette barre, le ☰ redevient une simple icône (évite le double-verre
       « pastille sur barre »). C'est l'état « logo + menu » au scroll vers le haut. ── */
    body:not(.gfsf-subpage) .navbar.nav-rolled:not(.nav-hidden) {
        pointer-events: auto;
        background:
            linear-gradient(180deg, rgba(18, 26, 40, 0.58) 0%, rgba(11, 16, 25, 0.46) 100%),
            radial-gradient(130% 130% at 50% -25%, rgba(125, 211, 252, 0.12), transparent 60%);
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow:
            0 10px 34px -10px rgba(0, 0, 0, 0.42),
            inset 0 1px 0 rgba(255, 255, 255, 0.14);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        backdrop-filter: blur(22px) saturate(180%);
    }
    body:not(.gfsf-subpage) .navbar.nav-rolled:not(.nav-hidden) .menu-toggle {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    /* ── EN DESCENDANT (.nav-hidden) : barre transparente, LOGO masqué → il ne
       reste que la pastille ☰ ronde (état minimal). On annule le glissement/
       masquage hérité de .nav-hidden pour garder la pastille bien en place. ── */
    body:not(.gfsf-subpage) .navbar.nav-rolled.nav-hidden {
        transform: none !important;
        opacity: 1 !important;
        pointer-events: none;
    }
    body:not(.gfsf-subpage) .navbar.nav-rolled.nav-hidden .logo-link {
        opacity: 0;
        pointer-events: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a3a52;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 14px;
    transition: all 0.25s;
}

.mobile-menu a:hover {
    background: rgba(0, 119, 182, .08);
    color: #0077b6;
}

.mobile-menu a i,
.mobile-menu a svg {
    width: 18px;
    height: 18px;
    color: #0077b6;
}

.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 40, 80, .06);
    border: none;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    color: #1a3a52;
    transition: all 0.25s;
}

.menu-close:hover {
    background: rgba(0, 119, 182, .1);
    color: #0077b6;
}