/* ========================================
   HEADER -- aligne sur la palette de assets/css/home.css (--primary / --accent)
   au lieu de son ancien navy/or independant (#1a1a6e / #c9922a).
======================================== */
.site-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--primary-dark, #0a1f3d);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 30px rgba(0, 0, 0, .28);
    transition: box-shadow .3s ease;
}

/* -- Carrousel de fond (photos reelles Auxano en fondu) -- */
.header-bg-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.header-bg-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.header-bg-carousel img.is-active {
    opacity: 1;
}

.header-bg-fondu {
    position: absolute;
    inset: 0;
    /* Opacite du fondu marine par-dessus les photos du carrousel :
       baisser les valeurs alpha (dernier chiffre de chaque rgba) rend les
       photos plus visibles, les remonter les voile davantage.
       Pas de backdrop-filter/blur ici : les photos restent nettes, seule
       la teinte couleur est posee par-dessus. */
}

.site-header.is-scrolled .header-bg-fondu {
    background: linear-gradient(120deg, rgba(6, 17, 34, .70) 0%, rgba(14, 42, 79, .56) 100%);
}

.site-header > .topbar,
.site-header > .header-logo-row,
.site-header > .nav,
.site-header > .top-banner {
    position: relative;
    z-index: 2;
}

/* -- Vague ondulee en bas de l'entete -- */
.header-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 34px;
    z-index: 3;
    pointer-events: none;
}

/* Liseré or : anime via transform (compositable/GPU) plutôt que
   background-position, qui forcerait un repaint a chaque frame sur toute
   la largeur de l'entete pendant les 7s de boucle -- cause de saccades au
   scroll sur les appareils moins puissants. */
.site-header::after {
    content: '';
    position: absolute;
    z-index: 4;
    left: -50%;
    width: 200%;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-strong, #e6a93a) 35%,
        var(--gold-on-dark-strong, #ffcf5c) 50%,
        var(--accent-strong, #e6a93a) 65%,
        transparent 100%);
    animation: goldSheen 7s linear infinite;
    opacity: .95;
    pointer-events: none;
    will-change: transform;
}

@keyframes goldSheen {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(50%); }
}

.site-header.is-scrolled {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 34px rgba(0, 0, 0, .38);
}

.site-header.is-scrolled .nav {
    min-height: 60px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.site-header.is-scrolled .header-logo-row {
    padding-top: 6px;
    padding-bottom: 4px;
}

.site-header.is-scrolled .brand-link {
    height: 56px;
}

/* -- TOPBAR : contact direct + reseaux, au-dessus de la nav -- */
.topbar {
    background: rgba(6, 14, 28, .55);
    border-bottom: 1px solid rgba(214, 162, 77, .18);
    overflow: hidden;
    transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
}

.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 28px;
}

.topbar-contact {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.topbar-contact a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(245, 247, 250, .82);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    transition: color .2s;
}

.topbar-contact a i {
    color: var(--gold-on-dark, #f1d18f);
    font-size: 11px;
}

.topbar-contact a:not(:first-child)::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(214, 162, 77, .5);
    transform: translateY(-50%);
}

.topbar-contact a:hover {
    color: var(--gold-on-dark-strong, #ffcf5c);
}

.topbar-contact a:hover i {
    color: var(--gold-on-dark-strong, #ffcf5c);
}

.topbar-socials {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    color: rgba(245, 247, 250, .78);
    font-size: 12px;
    transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}

.topbar-socials a:hover {
    color: var(--gold-on-dark-strong, #ffcf5c);
    background: rgba(214, 162, 77, .16);
    border-color: rgba(214, 162, 77, .4);
    transform: translateY(-2px);
}

.site-header.is-scrolled .topbar {
    max-height: 0;
    opacity: 0;
    padding: 0;
    border-bottom: none;
}

.site-header.is-scrolled .topbar-inner {
    padding: 0 28px;
}

/* -- BANDE LOGO : independante de la bande menu ci-dessous. Le logo peut
   etre aussi haut qu'on veut ici (voir .brand-link), rien d'autre ne se
   dispute cet espace -- agrandir/reduire se fait uniquement en changeant
   .brand-link (height / width), sans jamais toucher au menu. -- */
.header-logo-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 24px 10px;
    transition: padding .2s ease;
}

.brand-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 120px;
    max-width: 480px;
    padding: 6px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, height .2s ease;
}

.brand-link:hover {
    background: rgba(255, 255, 255, .2);
    border-color: rgba(214, 162, 77, .4);
    box-shadow: 0 0 24px rgba(214, 162, 77, .22);
}

.nav-logo {
    /* Logo au format large (embleme + "Group" sur cadre blanc, ~4.25:1).
       Se dimensionne pour remplir la zone .brand-link (ci-dessus) sans la
       depasser : pour l'agrandir, changer .brand-link (height/width), pas
       cette regle. */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
    transition: transform .35s ease, filter .35s ease;
}

/* -- BANDE MENU : liens + CTA, pleine largeur, separee du logo -- */
.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 12px 24px;
    min-height: 76px;
    transition: min-height .2s ease, padding .2s ease;
}

.brand-link:hover .nav-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(214, 162, 77, .45));
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 24px;
    row-gap: 10px;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-inverse, #f5f7fa);
    font-family: var(--nav-font, "Inter", sans-serif);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .2px;
    opacity: .88;
    white-space: nowrap;
}

.nav-links a:not(.nav-cta) {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0);
    transition: color .3s cubic-bezier(.22,1,.36,1),
                opacity .3s cubic-bezier(.22,1,.36,1),
                background .3s cubic-bezier(.22,1,.36,1),
                transform .3s cubic-bezier(.22,1,.36,1);
}

.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-on-dark-strong, #ffcf5c);
    box-shadow: 0 0 8px rgba(255, 216, 141, .7);
    transition: left .3s cubic-bezier(.22,1,.36,1), right .3s cubic-bezier(.22,1,.36,1);
}

.nav-links a:not(.nav-cta):hover {
    color: var(--gold-on-dark-strong, #ffcf5c);
    opacity: 1;
    background: rgba(255, 255, 255, .08);
    transform: translateY(-2px);
}

.nav-links a:not(.nav-cta):hover::after {
    left: 16px;
    right: 16px;
}

.nav-links a.is-active {
    color: var(--gold-on-dark-strong, #ffcf5c);
    opacity: 1;
    background: rgba(214, 162, 77, .12);
}

.nav-links a.is-active::after {
    left: 16px;
    right: 16px;
}

@media (max-width: 900px) {
    .nav-links a:not(.nav-cta)::after {
        display: none;
    }
}

/* -- Fond "pilule" marine (couleur du logo), pour que les liens restent
   lisibles quelle que soit la photo du carrousel affichee derriere.
   Uniquement en desktop : en mobile, .nav-links devient le panneau
   deroulant plein largeur (regle plus bas) et garde son propre fond.
   Le menu a maintenant sa bande a lui (le logo est sur sa propre bande
   au-dessus) : espacements plus confortables qu'avant, plus besoin de
   les resserrer a l'extreme. -- */
@media (min-width: 901px) {
    .nav-links {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 999px;
        background: var(--navy-brand, #294d81);
        box-shadow: 0 8px 22px rgba(10, 31, 61, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
    }

    .nav-links a:not(.nav-cta) {
        padding: 8px 12px;
        font-size: 14px;
    }

    .nav-cta {
        padding: 10px 18px;
        flex-shrink: 0;
    }

    .nav-divider {
        flex-shrink: 0;
    }
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, .18);
    display: inline-block;
}

/* -- Sous-menu deroulant "Nos equipements" -- */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0);
    color: var(--text-inverse, #f5f7fa);
    font-family: var(--nav-font, "Inter", sans-serif);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .2px;
    opacity: .88;
    cursor: pointer;
    white-space: nowrap;
    transition: color .3s cubic-bezier(.22,1,.36,1),
                opacity .3s cubic-bezier(.22,1,.36,1),
                background .3s cubic-bezier(.22,1,.36,1);
}

.nav-dropdown-toggle i {
    font-size: 11px;
    transition: transform .25s ease;
}

.nav-item-dropdown.open .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-toggle:hover,
.nav-item-dropdown.open .nav-dropdown-toggle {
    color: var(--gold-on-dark-strong, #ffcf5c);
    opacity: 1;
    background: rgba(255, 255, 255, .08);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    max-height: 340px;
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(10, 31, 61, .98) 0%, rgba(18, 58, 107, .98) 100%);
    border: 1px solid rgba(214, 162, 77, .22);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .38);
    z-index: 50;
}

.nav-item-dropdown.open .nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-inverse, #f5f7fa);
    opacity: .88;
    text-decoration: none;
    white-space: normal;
    transition: background .2s ease, color .2s ease, opacity .2s ease;
}

.nav-dropdown-menu a:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--gold-on-dark-strong, #ffcf5c);
    opacity: 1;
}

.nav-dropdown-divider {
    display: block;
    height: 1px;
    background: rgba(214, 162, 77, .2);
    margin: 6px 4px;
}

.nav-dropdown-voir-tout {
    color: var(--gold-on-dark, #f1d18f) !important;
    font-size: 12.5px !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

.nav-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent, #c8912c), var(--accent-strong, #e6a93a)) !important;
    color: #1a1712 !important;
    opacity: 1 !important;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 800 !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .25), 0 0 0 1px rgba(255, 255, 255, .12) inset;
    transition: transform .25s ease, box-shadow .25s ease !important;
    animation: ctaGlowPulse 3.2s ease-in-out infinite;
}

@keyframes ctaGlowPulse {
    0%, 100% { box-shadow: 0 10px 22px rgba(0, 0, 0, .25), 0 0 0 1px rgba(255, 255, 255, .12) inset; }
    50%      { box-shadow: 0 10px 26px rgba(214, 162, 77, .5), 0 0 0 1px rgba(255, 255, 255, .16) inset; }
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .65), transparent);
    transform: skewX(-20deg);
    transition: left .65s ease;
    pointer-events: none;
}

.nav-cta:hover {
    color: #1a1712 !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .32), 0 0 22px rgba(214, 162, 77, .45), 0 0 0 1px rgba(255, 255, 255, .18) inset;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-inverse, #f5f7fa);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -- SOUS-BANDE : vague decorative + slogan defilant -- */
.top-banner {
    position: relative;
    background: linear-gradient(90deg, rgba(63, 106, 168, .55) 0%, rgba(41, 77, 129, .38) 50%, rgba(63, 106, 168, .55) 100%), var(--primary-dark, #0a1f3d);
    height: 50px;
    overflow: hidden;
    border-top: 1px solid rgba(214, 162, 77, .18);
    border-bottom: 1px solid rgba(214, 162, 77, .18);
}

.banner-waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.slogan-wrap {
    position: relative;
    z-index: 1;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

.slogan-text {
    font-family: var(--heading-font, "Manrope", sans-serif);
    font-style: italic;
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-shadow:
        0 0 14px rgba(230, 169, 58, .65),
        0 0 28px rgba(230, 169, 58, .35),
        0 1px 3px rgba(0, 0, 0, .5);
    transform-origin: center;
    animation: sloganGlow 2.4s ease-in-out infinite;
}

.slogan-spark {
    color: var(--gold-on-dark-strong, #ffcf5c);
    font-size: 12px;
    text-shadow: 0 0 8px rgba(255, 207, 92, .8);
    flex-shrink: 0;
    display: inline-block;
    animation: sparkPulse 2.4s ease-in-out infinite;
}

@keyframes sloganGlow {
    0%, 100% {
        transform: scale(1);
        text-shadow:
            0 0 10px rgba(230, 169, 58, .5),
            0 0 20px rgba(230, 169, 58, .25),
            0 1px 3px rgba(0, 0, 0, .5);
    }
    50% {
        transform: scale(1.045);
        text-shadow:
            0 0 20px rgba(230, 169, 58, .9),
            0 0 38px rgba(230, 169, 58, .5),
            0 1px 3px rgba(0, 0, 0, .5);
    }
}

@keyframes sparkPulse {
    0%, 100% {
        opacity: .55;
        transform: scale(.85);
    }
    50% {
        opacity: 1;
        transform: scale(1.25);
    }
}

/* -- RESPONSIVE -- */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(160deg, rgba(10, 31, 61, .97) 0%, rgba(18, 58, 107, .97) 100%);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid rgba(214, 162, 77, .2);
        padding: 18px 24px 26px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, .38);
        z-index: 999;
        gap: 10px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links.open a {
        animation: navLinkIn .35s cubic-bezier(.22,1,.36,1) both;
    }

    .nav-links.open a:nth-child(1) { animation-delay: .03s; }
    .nav-links.open a:nth-child(2) { animation-delay: .07s; }
    .nav-links.open a:nth-child(3) { animation-delay: .11s; }
    .nav-links.open a:nth-child(4) { animation-delay: .15s; }
    .nav-links.open a:nth-child(5) { animation-delay: .19s; }
    .nav-links.open a:nth-child(6) { animation-delay: .23s; }
    .nav-links.open a:nth-child(7) { animation-delay: .27s; }
    .nav-links.open a:nth-child(8) { animation-delay: .31s; }

    @keyframes navLinkIn {
        from { opacity: 0; transform: translateX(-14px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    .nav-links a {
        opacity: 1;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .nav-links a:not(.nav-cta):hover,
    .nav-links a:not(.nav-cta):active {
        background: rgba(255, 255, 255, .08);
    }

    /* Sous-menu "Nos equipements" en mobile : accordeon en ligne (pas de
       panneau flottant, pour rester dans le flux du panneau plein ecran). */
    .nav-item-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 12px;
        opacity: 1;
    }

    .nav-dropdown-menu {
        display: none;
        position: static;
        min-width: 0;
        max-height: none;
        width: 100%;
        margin-top: 4px;
        margin-bottom: 4px;
        background: rgba(255, 255, 255, .05);
        border-color: rgba(214, 162, 77, .16);
        box-shadow: none;
    }

    .nav-item-dropdown.open .nav-dropdown-menu {
        display: flex;
        flex-direction: column;
    }

    .nav-divider {
        width: 100%;
        height: 1px;
    }

    .nav-cta { text-align: center; }

    .header-logo-row {
        padding: 14px 18px 6px;
    }

    .brand-link {
        max-width: min(280px, 70vw);
        height: 72px;
    }

    .nav {
        min-height: 66px;
        padding: 8px 18px;
    }

    .header-wave {
        height: 20px;
    }

    .slogan-text { font-size: 11.5px; }

    .topbar-inner {
        padding: 6px 18px;
        justify-content: center;
    }

    .topbar-socials {
        display: none;
    }

    .topbar-contact {
        gap: 14px;
        justify-content: center;
        width: 100%;
    }

    .topbar-contact a {
        font-size: 11.5px;
    }
}
