/*
   En-tête moderne du Volley Club Mouvallois
   À charger APRÈS assets/style.css.
   Palette : bleu marine VCM + jaune.
*/

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: linear-gradient(112deg, #041a36 0%, #062653 62%, #0b3971 100%);
    border-bottom: 4px solid #ffd400;
    box-shadow: 0 8px 24px rgba(3, 20, 44, 0.22);
}

.header .container.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 1.3vw, 22px);
    box-sizing: border-box;
    width: min(1320px, calc(100% - 40px));
    max-width: 1320px;
    min-height: 82px;
    margin: 0 auto;
    padding: 10px 0;
}

.header .logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 11px;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.075em;
    text-decoration: none;
    text-transform: uppercase;
}

.header .logo img {
    display: block;
    width: 58px;
    height: 58px;
    box-sizing: border-box;
    padding: 3px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.header .menu {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

.header .menu > a,
.header .menu .menu-titre {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 42px;
    margin: 0;
    padding: 10px 11px;
    color: #ffffff !important;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.header .menu > a:hover,
.header .menu > a:focus-visible,
.header .menu .menu-titre:hover,
.header .menu .menu-titre:focus-visible {
    color: #ffd400 !important;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.12);
    outline: none;
}

.header .menu > a[aria-current="page"] {
    color: #062653 !important;
    background: #ffd400;
    border-color: #ffd400;
}

.header .menu-pratique {
    position: relative;
    flex: 0 0 auto;
}

.header .menu .menu-titre {
    cursor: pointer;
}

.header .menu .sous-menu {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    z-index: 1100;
    display: none;
    min-width: 215px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #ffffff;
    border: 1px solid #e5ebf3;
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(3, 20, 44, 0.2);
}

.header .menu-pratique:hover .sous-menu,
.header .menu-pratique:focus-within .sous-menu {
    display: block;
}

.header .menu .sous-menu li {
    margin: 0;
    padding: 0;
}

.header .menu .sous-menu li a {
    display: flex;
    align-items: center;
    min-height: 39px;
    box-sizing: border-box;
    padding: 9px 12px;
    color: #062653 !important;
    background: #ffffff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.header .menu .sous-menu li a:hover,
.header .menu .sous-menu li a:focus-visible {
    color: #062653 !important;
    background: #fff4ad;
    outline: none;
}

.header .cta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    margin: 0;
    padding: 11px 16px;
    color: #062653 !important;
    background: #ffd400;
    border: 2px solid #ffd400;
    border-radius: 999px;
    box-shadow: 0 5px 13px rgba(0, 0, 0, 0.13);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.header .cta:hover,
.header .cta:focus-visible {
    color: #062653 !important;
    background: #ffe566;
    border-color: #ffe566;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    outline: none;
}

.header .menu-btn {
    display: none;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.header .menu-btn:hover,
.header .menu-btn:focus-visible {
    color: #ffd400;
    background: rgba(255, 255, 255, 0.13);
    outline: 2px solid #ffd400;
    outline-offset: 2px;
}

@media (max-width: 1120px) {
    .header .container.nav {
        position: relative;
        flex-wrap: wrap;
        width: calc(100% - 32px);
        min-height: 74px;
        gap: 10px 14px;
        padding: 8px 0;
    }

    .header .logo img {
        width: 52px;
        height: 52px;
    }

    .header .menu-btn {
        display: inline-flex;
        margin-left: auto;
    }

    .header .menu {
        display: none;
        order: 5;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        gap: 4px;
        margin-top: 4px;
        padding: 10px;
        background: rgba(2, 16, 35, 0.42);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 14px;
    }

    /* Le menu mobile doit fonctionner avec les deux scripts déjà utilisés sur le site. */
    .header .menu.active,
    .header .menu.menu-ouvert {
        display: flex !important;
    }

    .header .menu > a,
    .header .menu .menu-titre {
        display: flex;
        justify-content: flex-start;
        width: 100%;
        min-height: 43px;
        padding: 11px 13px;
        font-size: 14px;
        text-align: left;
        white-space: normal;
    }

    .header .menu-pratique {
        width: 100%;
    }

    .header .menu .sous-menu {
        position: static;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        margin-top: 3px;
        padding: 6px;
        background: #ffffff;
        border-radius: 10px;
        box-shadow: none;
    }

    .header .menu .sous-menu li a {
        min-height: 40px;
        font-size: 14px;
    }

    .header .cta {
        min-height: 41px;
        padding: 10px 14px;
    }
}

@media (max-width: 560px) {
    .header .container.nav {
        width: calc(100% - 24px);
        gap: 8px;
    }

    .header .logo {
        gap: 8px;
        font-size: 11px;
        letter-spacing: 0.055em;
    }

    .header .logo img {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }

    .header .cta {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header .menu > a,
    .header .menu .menu-titre,
    .header .menu .sous-menu li a,
    .header .cta {
        transition: none;
    }
}

/* Sous-menu ouvert au toucher sur tablette et téléphone */
.header .menu-pratique.ouvert > .sous-menu {
    display: block;
}


/* Largeurs communes des bandeaux de titre VCM */
.page-hero,
.hero.hero-real,
.banner {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.page-hero > .container,
.hero.hero-real > .container.hero-inner,
.banner > .container.banner-inner {
    width: min(1320px, calc(100% - 40px));
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (max-width: 560px) {
    .page-hero > .container,
    .hero.hero-real > .container.hero-inner,
    .banner > .container.banner-inner {
        width: calc(100% - 24px);
    }
}
