/* ============================================================
   HEADER - Séverine Lapp
   Top bar avec réseaux sociaux + Header principal
   ============================================================ */

/* ============================================================
   WRAPPER PRINCIPAL
   ============================================================ */

.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* ============================================================
   TOP BAR - Réseaux sociaux avec fond légèrement plus foncé + 50% opacité
   ============================================================ */

.top-bar {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.top-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.top-bar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.75rem 0;
}

/* Réseaux sociaux */
.social-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: #FFFFFF;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a svg {
    width: 1.25rem;
    height: 1.25rem;
}

.social-links a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ============================================================
   MAIN HEADER - Transparent par défaut
   ============================================================ */

.site-header {
    background: transparent;
    transition: all 0.4s ease;
}

/* Header au scroll - Fond text_muted avec effet glass */
.header-wrapper.scrolled .site-header {
    background: rgba(107, 114, 128, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

/* ============================================================
   LOGO - À gauche
   ============================================================ */

.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    text-decoration: none;
    display: block;
}

.site-branding img {
    max-height: 75px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

.brand-name {
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Logo custom WordPress en blanc */
.site-branding .custom-logo-link img {
    filter: brightness(0) invert(1);
}

/* ============================================================
   NAVIGATION - Au milieu, titres en blanc
   ============================================================ */

.site-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a,
.nav-menu a:visited {
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.5rem 0;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu a:focus-visible,
.nav-menu a:active {
    color: #ffd690 !important;
    outline: none;
}

/* Retire le double soulignement du parent (dist/style.css) : deux barres
   (::before en haut, ::after en bas) s'etirent au survol de chaque lien
   .site-navigation a. Design non souhaite chez Severine. */
.site-navigation .nav-menu a::before,
.site-navigation .nav-menu a::after {
    content: none !important;
}

/* "current" appliqué uniquement aux vraies pages (pas aux custom links href="/") */
.nav-menu li.current-menu-item:not(.menu-item-object-custom) > a,
.nav-menu li.current_page_item:not(.menu-item-object-custom) > a {
    color: #ffd690 !important;
}

/* ============================================================
   CTA BUTTON - À droite, fond light, full arrondi
   ============================================================ */

.header-cta {
    flex-shrink: 0;
}

.header-cta-button {
    background-color: var(--color-primary, #00AAAA);
    color: #FFFFFF;
    padding: 0.75rem 1.75rem;
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    border-radius: 9999px; /* Full arrondi */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-cta-button:hover {
    background-color: var(--color-primary);
    filter: brightness(0.85);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   MOBILE MENU TOGGLE (burger → X)
   ============================================================ */

/* Burger epure : cercle discret aux couleurs du site, plus fin et elegant */
.menu-toggle {
    display: none;
    position: relative;
    width: 42px;
    height: 42px;
    background: var(--color-primary, #00AAAA);
    border: 0;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 170, 170, 0.3),
                0 1px 3px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    z-index: 1200;
}

.menu-toggle:hover {
    background: color-mix(in srgb, var(--color-primary, #00AAAA) 90%, #000);
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 170, 170, 0.4),
                0 2px 4px rgba(0, 0, 0, 0.2);
}

.menu-toggle.is-open {
    background: color-mix(in srgb, var(--color-primary, #00AAAA) 85%, #000);
}

.menu-toggle-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    /* Fermeture (burger apparait) : rotation d'abord, PUIS ecartement */
    transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.18s,
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.15s ease 0.15s;
}

.menu-toggle-bar:nth-child(1) { top: calc(50% - 6px); }
.menu-toggle-bar:nth-child(3) { top: calc(50% + 6px); }

/* Ouverture (X apparait) : convergence d'abord, PUIS rotation.
   Le timing inverse donne l'illusion d'un pliage sequentiel. */
.menu-toggle.is-open .menu-toggle-bar {
    transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.18s,
                opacity 0.15s ease;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
    opacity: 0;
    /* Le bar central disparait rapidement au debut */
    transform: translate(-50%, -50%) scaleX(0);
}
.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ============================================================
   MOBILE MENU — Drawer slide-in droite avec glass effect adaptatif
   ============================================================ */

/**
 * Backdrop simple : pas de backdrop-filter, pas d'isolation, pas de visibility.
 * Utilise pointer-events pour bloquer les interactions quand ferme.
 */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 9998;
}

.mobile-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/**
 * Drawer : fond opaque, layer GPU forcee (translate3d + will-change) pour
 * garantir un rendu immediat de la compositor layer meme en haut de page.
 * Le bug initial venait de : visibility:hidden + transform sans layer GPU
 * pre-promue -> le compositor differait le paint du drawer jusqu'au premier
 * scroll (qui force un repaint global).
 *
 * On utilise pointer-events pour "cacher" le drawer sans visibility.
 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(88vw, 360px);
    /* Vert d'eau avec un leger degrade pour eviter la platitude */
    background: linear-gradient(180deg, var(--color-primary, #00AAAA) 0%, color-mix(in srgb, var(--color-primary, #00AAAA) 88%, #000) 100%);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.35);
    /* translate3d + will-change = layer GPU pre-promue au chargement */
    transform: translate3d(100%, 0, 0);
    will-change: transform;
    /* Fermeture : courbe "in" plus rapide (le panel s'echappe) */
    transition: transform 0.35s cubic-bezier(0.5, 0, 0.75, 0),
                background 0.35s ease;
    z-index: 9999;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
}

.mobile-menu.is-open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    /* Ouverture : courbe "out" plus expressive avec un leger overshoot doux */
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.35s ease;
}

/* Etat scrolled : legere assombrissement du vert */
.mobile-menu.header-scrolled {
    background: linear-gradient(180deg, color-mix(in srgb, var(--color-primary, #00AAAA) 92%, #000) 0%, color-mix(in srgb, var(--color-primary, #00AAAA) 80%, #000) 100%);
}

.mobile-menu-backdrop.header-scrolled {
    background: rgba(0, 0, 0, 0.65);
}

/* Bouton fermeture (X) en haut a droite du drawer */
.mobile-menu-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
    transition: background 0.25s ease, border-color 0.25s ease,
                transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.mobile-menu-close svg {
    width: 18px;
    height: 18px;
}

/* Contenu du drawer : explicitement au-dessus du fond (safety net supplementaire) */
.mobile-menu-inner {
    position: relative;
    z-index: 1;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 5.25rem 1.5rem 2rem;
    min-height: 100%;
}

.mobile-menu-nav {
    flex: 1;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mobile-nav-menu li {
    margin: 0;
}

/* Animation staggered UNIQUEMENT quand le drawer s'ouvre — via keyframes,
   pas d'etat "invisible par defaut" pour eviter que les items restent caches
   si la classe .is-open ne se propage pas correctement.
   Delais decoles apres l'entree du panel (0.18s) pour un effet en cascade. */
@keyframes mobileMenuItemIn {
    0% {
        opacity: 0;
        transform: translateX(28px);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-menu.is-open .mobile-nav-menu > li {
    animation: mobileMenuItemIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mobile-menu.is-open .mobile-nav-menu > li:nth-child(1) { animation-delay: 0.20s; }
.mobile-menu.is-open .mobile-nav-menu > li:nth-child(2) { animation-delay: 0.26s; }
.mobile-menu.is-open .mobile-nav-menu > li:nth-child(3) { animation-delay: 0.32s; }
.mobile-menu.is-open .mobile-nav-menu > li:nth-child(4) { animation-delay: 0.38s; }
.mobile-menu.is-open .mobile-nav-menu > li:nth-child(5) { animation-delay: 0.44s; }
.mobile-menu.is-open .mobile-nav-menu > li:nth-child(6) { animation-delay: 0.50s; }
.mobile-menu.is-open .mobile-nav-menu > li:nth-child(7) { animation-delay: 0.56s; }
.mobile-menu.is-open .mobile-nav-menu > li:nth-child(8) { animation-delay: 0.62s; }

/* Item = row flex : lien à gauche, chevron à droite si sous-menu */
.mobile-nav-menu > li > .mobile-menu-item-row {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    border-radius: 12px;
    transition: background 0.25s ease;
}

.mobile-nav-menu > li > .mobile-menu-item-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.mobile-nav-menu a,
.mobile-nav-menu a:visited {
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.94);
    text-decoration: none;
    padding: 0.95rem 1rem;
    display: block;
    flex: 1;
    border-radius: 12px;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.25s ease, background 0.25s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus,
.mobile-nav-menu a:focus-visible,
.mobile-nav-menu a:active {
    color: #ffd690 !important;
    background: rgba(255, 214, 144, 0.08);
    outline: none;
}

.mobile-nav-menu li.current-menu-item:not(.menu-item-object-custom) > a,
.mobile-nav-menu li.current_page_item:not(.menu-item-object-custom) > a,
.mobile-nav-menu li.current-menu-item:not(.menu-item-object-custom) > .mobile-menu-item-row > a,
.mobile-nav-menu li.current_page_item:not(.menu-item-object-custom) > .mobile-menu-item-row > a {
    color: #ffd690 !important;
    background: rgba(255, 214, 144, 0.08);
}

/* Bouton chevron pour toggler l'accordéon des sous-menus */
.mobile-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    flex-shrink: 0;
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.mobile-submenu-toggle:hover {
    color: #ffd690;
    background: rgba(255, 214, 144, 0.08);
}

.mobile-submenu-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-menu li.is-open > .mobile-menu-item-row > .mobile-submenu-toggle svg {
    transform: rotate(180deg);
}

.mobile-nav-menu li.is-open > .mobile-menu-item-row > .mobile-submenu-toggle {
    color: #ffd690;
}

/* Sous-menus : accordéon fermé par défaut, max-height animée */
.mobile-nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s ease;
    border-left: 2px solid rgba(255, 214, 144, 0.15);
    margin-left: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mobile-nav-menu li.is-open > .sub-menu {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    border-left-color: rgba(255, 214, 144, 0.4);
    /* max-height fixé via JS pour animation naturelle */
}

.mobile-nav-menu .sub-menu a,
.mobile-nav-menu .sub-menu a:visited {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78);
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
}

.mobile-nav-menu .sub-menu a:hover,
.mobile-nav-menu .sub-menu a:focus {
    color: #ffd690 !important;
    background: rgba(255, 214, 144, 0.06);
}

/* CTA dans le drawer : inverse (fond blanc, texte primary) pour trancher sur le vert d'eau */
.header-cta-button.mobile {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background-color: #FFFFFF !important;
    color: var(--color-primary, #00AAAA) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.header-cta-button.mobile:hover {
    background-color: #FFFFFF !important;
    color: color-mix(in srgb, var(--color-primary, #00AAAA) 80%, #000) !important;
    filter: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

/* Socials en bas du drawer */
.mobile-menu-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding-top: 1.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Fade-in retarde UNIQUEMENT quand le drawer s'ouvre (pas d'etat cache par defaut).
   Le CTA + socials apparaissent en dernier, une fois les items du menu deroules. */
@keyframes mobileMenuSocialsIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu.is-open .header-cta-button.mobile {
    animation: mobileMenuSocialsIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.mobile-menu.is-open .mobile-menu-socials {
    animation: mobileMenuSocialsIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

.mobile-menu-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    transition: color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

/* Sur fond vert d'eau : hover en blanc pur avec pastille blanche translucide */
.mobile-menu-socials a:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

/* Bloquer scroll body quand menu ouvert */
body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu-backdrop,
    .mobile-nav-menu li,
    .mobile-menu-socials,
    .mobile-nav-menu .sub-menu,
    .mobile-submenu-toggle svg {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================
   RESPONSIVE - TABLETTE
   ============================================================ */

@media (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }

    .top-bar-container {
        padding: 0 1.5rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .nav-menu a {
        font-size: 0.95rem;
    }

    .header-cta-button {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-links a svg {
        width: 1.1rem;
        height: 1.1rem;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .top-bar-container {
        padding: 0 1rem;
    }

    .header-inner {
        height: 4rem;
    }

    .site-branding img {
        max-height: 48px;
    }

    .brand-name {
        font-size: 1.25rem;
    }

    /* Masquer navigation desktop et CTA */
    .site-navigation,
    .header-cta {
        display: none;
    }

    /* Afficher le toggle mobile */
    .menu-toggle {
        display: block;
    }

    /* Réduire les icônes sociales */
    .social-links {
        gap: 0.75rem;
    }

    .social-links a svg {
        width: 1rem;
        height: 1rem;
    }

    .top-bar-content {
        padding: 0.5rem 0;
    }
}

/* ============================================================
   RESPONSIVE - PETIT MOBILE
   ============================================================ */

@media (max-width: 480px) {
    .header-inner {
        height: 3.5rem;
    }

    .site-branding img {
        max-height: 40px;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .social-links {
        gap: 0.5rem;
    }

    .social-links a svg {
        width: 0.875rem;
        height: 0.875rem;
    }
}

/* ============================================================
   SOUS-MENUS (dropdowns desktop + accordéons mobile)
   ============================================================ */

/* Empeche tout wrap dans le nav (defensif contre le CSS parent
   qui met .site-navigation a en display:inline-block). */
.nav-menu,
.site-navigation .nav-menu {
    flex-wrap: nowrap;
}
.nav-menu li,
.nav-menu a,
.site-navigation .nav-menu li,
.site-navigation .nav-menu a {
    white-space: nowrap;
}

.nav-menu .menu-item-has-children,
.site-navigation .nav-menu .menu-item-has-children {
    position: relative;
}

/* Lien parent : inline-flex pour garder le chevron sur la meme ligne,
   aligne a droite du texte. On surcharge le CSS parent avec un selecteur
   plus specifique (.site-navigation en amont). */
.site-navigation .nav-menu .menu-item-has-children > a,
.nav-menu .menu-item-has-children > a {
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
}

/* Reset les ::before/::after decoratifs du parent (underlines hover)
   sur les liens parents, car on utilise ::after pour dessiner le chevron. */
.site-navigation .nav-menu .menu-item-has-children > a::before {
    content: none !important;
}

.site-navigation .nav-menu .menu-item-has-children > a::after,
.nav-menu .menu-item-has-children > a::after {
    content: "" !important;
    position: static !important;
    display: inline-block !important;
    flex-shrink: 0;
    margin-left: 0.45rem;
    width: 0.4rem;
    height: 0.4rem;
    background: transparent !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.nav-menu .menu-item-has-children:hover > a::after,
.nav-menu .menu-item-has-children:focus-within > a::after,
.site-navigation .nav-menu .menu-item-has-children:hover > a::after {
    transform: rotate(225deg);
    /* On surcharge width:100% du hover parent qui elargirait le chevron */
    width: 0.4rem !important;
    height: 0.4rem !important;
}

.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    padding: 0.5rem;
    min-width: 380px;
    border-radius: 18px;
    border: 1px solid rgba(50, 45, 100, 0.08);
    box-shadow: 0 24px 64px rgba(10, 26, 31, 0.18),
                0 4px 12px rgba(50, 45, 100, 0.06);
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
}

/* Petit triangle pointant vers le parent (même fond que dropdown) */
.nav-menu .sub-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(50, 45, 100, 0.08);
    border-top: 1px solid rgba(50, 45, 100, 0.08);
}

.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-menu .sub-menu li {
    margin: 0;
}

/* === SUB-MENU "RICH" — items avec thumbnail + titre + description === */

/* Le parent affiche .sub-menu en display:flex sans flex-direction (donc
   row par defaut) -> les items du dropdown "riche" se retrouvaient cote
   a cote au lieu d'empiles verticalement comme avant. On force la colonne
   ici, cote child. Le parent impose aussi align-items:center (pense pour
   le menu principal horizontal) : sur un dropdown en colonne, ca centre
   chaque item et lui laisse la largeur de son propre contenu -> items
   desalignes et de largeurs differentes. On force align-items:stretch
   pour que chaque item occupe toute la largeur du dropdown, aligne a
   gauche. */
.nav-menu .sub-menu.sub-menu-rich {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}

.nav-menu .sub-menu-rich-link,
.nav-menu .sub-menu-rich-link:visited {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: 'Lexend Deca', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nav-menu .sub-menu-rich-link:hover,
.nav-menu .sub-menu-rich-link:focus {
    background: rgba(50, 45, 100, 0.05);
    color: inherit !important;
}

.nav-menu .sub-menu-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background-size: cover;
    background-position: center center;
    background-color: #322D64;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(50, 45, 100, 0.18);
}

.nav-menu .sub-menu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nav-menu .sub-menu-title {
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2937;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-menu .sub-menu-desc {
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: #6B7280;
    line-height: 1.4;
    white-space: normal;
}

.nav-menu .sub-menu-arrow {
    flex-shrink: 0;
    color: #9CA3AF;
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-menu .sub-menu-rich-link:hover .sub-menu-arrow,
.nav-menu .sub-menu-rich-link:focus .sub-menu-arrow {
    transform: translateX(4px);
    color: #322D64;
}

/* Item courant : léger highlight */
.nav-menu .sub-menu li.current-menu-item:not(.menu-item-object-custom) > .sub-menu-rich-link,
.nav-menu .sub-menu li.current_page_item:not(.menu-item-object-custom) > .sub-menu-rich-link {
    background: rgba(50, 45, 100, 0.06);
}

.nav-menu .sub-menu li.current-menu-item:not(.menu-item-object-custom) > .sub-menu-rich-link .sub-menu-title,
.nav-menu .sub-menu li.current_page_item:not(.menu-item-object-custom) > .sub-menu-rich-link .sub-menu-title {
    color: #322D64;
}

/* Fallback : items sub-menu sans markup riche (ex: custom links) */
.nav-menu .sub-menu a:not(.sub-menu-rich-link),
.nav-menu .sub-menu a:not(.sub-menu-rich-link):visited {
    display: block;
    padding: 0.75rem 1rem;
    font-family: 'Lexend Deca', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1F2937;
    text-align: left;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu .sub-menu a:not(.sub-menu-rich-link):hover,
.nav-menu .sub-menu a:not(.sub-menu-rich-link):focus {
    background: rgba(50, 45, 100, 0.05);
    color: #322D64 !important;
}

/* (Regles sub-menu mobile deplacees plus haut dans la section MOBILE MENU
   pour gerer l'accordeon avec animations et max-height dynamique via JS.) */

/* ============================================================
   WORKAROUND BUG PARENT #5 — voir docs/parent-workarounds.md
   Le parent compense le header fixe avec un padding-top statique sur
   #main-content pour toutes les pages sauf .home (assets/css/header.css
   L349-351 du parent, bundle dans dist/style.css). Chez Severine le header
   reste transparent et flottant sur TOUTES les pages (cf. .site-header
   { background: transparent } plus haut dans ce fichier), pas seulement la
   home : cette compensation cree donc un grand vide en haut de chaque page.
   ============================================================ */
body:not(.home) #main-content {
    padding-top: 0 !important;
}
