#page-container #main-header{
    background-color: transparent;
    box-shadow: none;
}
#page-container #main-header.et-fixed-header{
    background: rgba(2, 20, 17, 0.64);
    backdrop-filter: blur(10px);
}

.et_fixed_nav.et_show_nav #page-container {
    padding-top: 104px;
}

#header-menu {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 80%;
    max-width: 1730px;
        margin: auto;
        padding: 30px 0;
        transition: all 0.3s ease-in-out;

        #menu-principal{
            display: flex;
            flex-direction: row;
            gap: 6px;
            position: relative;
            margin: 0;
            padding: 0;
            list-style: none;
        }

}

.et-fixed-header #header-menu{
    padding: 10px 0;
}

/* ===================== MENU CENTRAL (pilule + indicateur) ===================== */

.header-nav-pill {
    background: #ECEFF4;
    border-radius: 50px;
    padding: 5px;
}

/* Items top-level */
#header-menu #menu-principal > li {
    position: relative;
    z-index: 1; /* texte au-dessus de l'indicateur */
}

#header-menu #menu-principal > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 50px;
    color: #0A1F38; /* texte sombre sur fond clair */
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.3s ease;
}

/* Item survolé : texte blanc (au-dessus de la pilule bleue) */
#header-menu #menu-principal > li.is-active > a {
    color: #fff;
}

/* Chevron toujours doré */
#header-menu #menu-principal .mega-menu-chevron {
    color: #FFD166;
}

/* Indicateur glissant (injecté en JS) */
.nav-hover-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #0076FF;
    border-radius: 50px;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1),
                width 0.35s cubic-bezier(0.65, 0, 0.35, 1),
                opacity 0.25s ease;
    will-change: transform, width;
}

/* ===================== MEGA MENU ===================== */

/* Parent item wrapper */
.mega-menu-item {
    position: relative;
}

.mega-menu-item > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mega-menu-chevron {
    transition: transform 0.3s ease;
}

.mega-menu-item:hover .mega-menu-chevron,
.mega-menu-item.active .mega-menu-chevron {
    transform: rotate(180deg);
}

/* Dropdown container */
.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
}

.mega-menu-item:hover .mega-menu-dropdown,
.mega-menu-item.active .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Panneau bleu arrondi */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 48px;
    background: #0076FF;
    border-radius: 24px;
    padding: 32px;
    width: max-content;
    max-width: min(720px, 90vw);
    box-shadow: 0 20px 50px -20px rgba(0, 118, 255, 0.6);
}

/* Carte = lien (chevron + titre + description) */
.mega-menu-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    border-radius: 12px;
    padding: 6px 8px;
    margin: -6px -8px;
    transition: background-color 0.2s ease;
}

.mega-menu-card:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* Chevron */
.mega-menu-card-chevron {
    flex-shrink: 0;
    margin-top: 4px;
    color: #fff;
    opacity: 0.9;
}

.mega-menu-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Titre */
.mega-menu-card-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* Description */
.mega-menu-card-description {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* ===================== HEADER LEFT (logo + search) ===================== */

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-search {
    display: flex;
    align-items: center;
}

/* ===================== HEADER RIGHT (CTA + lang + search) ===================== */

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===================== BOUTONS CTA (menu header-cta) ===================== */

.header-cta-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-cta-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Base : tous les items rendus en bouton pilule */
.header-cta-menu li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
    /* Effet vague liquide */
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.3s ease;
}

/* Vague liquide : remplit le bouton du bas vers le haut au hover */
.header-cta-menu li a::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120%;
    background: var(--liquid-fill, currentColor);
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50' preserveAspectRatio='none'><path d='M0 6 Q 10 2 20 6 T 40 6 L40 50 L0 50 Z' fill='black'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 50' preserveAspectRatio='none'><path d='M0 6 Q 10 2 20 6 T 40 6 L40 50 L0 50 Z' fill='black'/></svg>");
    -webkit-mask-repeat: repeat-x;
            mask-repeat: repeat-x;
    -webkit-mask-size: 4rem 100%;
            mask-size: 4rem 100%;
    -webkit-mask-mode: alpha;
            mask-mode: alpha;
    transform: translateY(101%);
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    animation: flip-wave-flow 3s linear infinite paused;
    z-index: -1;
}

.header-cta-menu li a:hover::before {
    transform: translateY(0);
    animation-play-state: running;
}

/* Remplissage de la vague : gris clair pour tous les boutons */
.header-cta-menu li a {
    --liquid-fill: #F4F5F5;
}

/* Style par défaut + classe d'item .flip-btn--member → bleu */
.header-cta-menu li a,
.header-cta-menu li.flip-btn--member a {
    background-color: #0076FF;
    border-color: #0076FF; /* bordure = couleur du bouton */
    color: #fff;
}

/* Texte lisible une fois le bouton rempli en gris clair */
.header-cta-menu li a:hover,
.header-cta-menu li.flip-btn--member a:hover {
    color: #0076FF;
}

/* Dernier item OU classe d'item .flip-btn--join → jaune (CTA principal) */
.header-cta-menu li:last-child a,
.header-cta-menu li.flip-btn--join a {
    background-color: #FFD166;
    border-color: #FFD166; /* bordure = couleur du bouton */
    color: #04221D;
}

.header-cta-menu li:last-child a:hover,
.header-cta-menu li.flip-btn--join a:hover {
    color: #04221D; /* texte sombre déjà lisible sur le gris clair */
}

/* ===================== LANGUAGE SWITCHER ===================== */

.lang-switcher {
    position: relative;
}

.lang-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(187, 254, 241, 0.3);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: #0A1F38;
    transition: border-color 0.3s ease;
}

.lang-switcher-toggle:hover {
    border-color: #0A1F38;
}

.lang-switcher-toggle img {
    border-radius: 2px;
}

.lang-chevron {
    transition: transform 0.3s ease;
}

.lang-switcher.open .lang-chevron {
    transform: rotate(180deg);
}

.lang-switcher-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #0a1219;
    border: 1px solid rgba(187, 254, 241, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    min-width: 140px;
}

.lang-switcher.open .lang-switcher-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lang-switcher-dropdown li {
    list-style: none;
}

.lang-switcher-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.lang-switcher-dropdown li a:hover {
    background: rgba(187, 254, 241, 0.1);
}

.lang-switcher-dropdown li a img {
    border-radius: 2px;
}

/* ===================== BURGER TOGGLE ===================== */

.burger-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #0A1F38;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===================== MOBILE OVERLAY ===================== */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #ECEFF4;
    z-index: 99999;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.open {
    opacity: 1;
}

.mobile-menu-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
}

.mobile-menu-overlay-header .logo-site img {
    height: 40px;
    width: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #0A1F38;
    cursor: pointer;
    padding: 8px;
}

/* Mobile nav list */
.mobile-nav {
    flex: 1;
    padding: 20px 30px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav-list > li {
    border-bottom: 1px solid rgba(187, 254, 241, 0.1);
}

.mobile-nav-list > li > a {
    display: block;
    padding: 18px 0;
    color: #0A1F38;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-nav-list > li > a:hover,
.mobile-nav-list > li.current-menu-item > a {
    color: #fff;
}

/* Mega menu in mobile = accordion */
.mobile-nav-list .mega-menu-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-list .mega-menu-dropdown {
    position: static;
    transform: none;
    padding-top: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.mobile-nav-list .mega-menu-item.active .mega-menu-dropdown {
    max-height: 2000px;
}

.mobile-nav-list .mega-menu-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: none;
    padding: 4px 0 18px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.mobile-nav-list .mega-menu-card {
    margin: 0;
    padding: 0;
}

.mobile-nav-list .mega-menu-card:hover {
    background: transparent;
}

/* Mobile footer */
.mobile-menu-footer {
    padding: 20px 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid rgba(187, 254, 241, 0.1);
}

.mobile-header-cta .header-cta-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.mobile-header-cta .header-cta-menu li a {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
}

.mobile-lang-switcher {
    display: flex;
    gap: 16px;
    list-style: none;
    padding: 0;
}

.mobile-lang-switcher li {
    list-style: none;
}

.mobile-lang-switcher li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0A1F38;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid rgba(187, 254, 241, 0.3);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.mobile-lang-switcher li.current-lang a {
    color: #fff;
    border-color: #0A1F381;
}

.mobile-lang-switcher li a img {
    border-radius: 2px;
}

/* Body lock */
body.mobile-menu-open {
    overflow: hidden;
}

/* ===================== RESPONSIVE ===================== */


@media (max-width: 1200px) {
    /* Show burger, hide desktop nav */
    .burger-toggle {
        display: flex;
    }

    .header-nav-pill {
        display: none;
    }

    /* Hide desktop search + CTA in top bar (handled in overlay) */
    .header-search,
    .header-cta {
        display: none;
    }

    /* Show overlay when open */
    .mobile-menu-overlay {
        display: flex;
    }

    .mobile-menu-overlay:not(.open) {
        pointer-events: none;
    }

    /* Adjust header for mobile */
    #header-menu {
        width: 90%;
        padding: 15px 0;
    }

    .et_fixed_nav.et_show_nav #page-container {
        padding-top: 80px;
    }
}