/* =====================================================
   En-tête du site : barre en verre, menu italique, trait rouge → bleu
   ===================================================== */

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(180deg, rgba(4, 9, 17, .86), rgba(4, 9, 17, .55));
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    transition: background .3s, box-shadow .3s;
}

/* Le trait lumineux sous la barre */
.top::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rouge-ligne) 0, var(--rouge-ligne) 18%, var(--ac) 60%, rgba(111, 176, 255, 0) 100%);
    box-shadow: 0 0 18px rgba(224, 38, 60, .45);
}

.top.fonce {
    background: rgba(4, 9, 17, .93);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.bar {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 6px 22px;
    flex-wrap: wrap;
    padding: 9px 18px;
}

/* ---------- Logo + nom ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font: italic 800 20px/1 var(--titre);
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.brand img {
    display: block;
    height: 36px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(111, 176, 255, .5));
    transition: transform .4s;
}

.brand:hover img {
    transform: rotate(-6deg) scale(1.08);
}

.brand .bt {
    color: #fff;
}

.brand em {
    color: var(--ac);
    font-style: italic;
}

/* ---------- Menu ---------- */
.links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    margin-left: auto;
}

.links a {
    position: relative;
    padding: 8px 13px;
    font: italic 600 17px/1 var(--titre);
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #d8e5f8;
    text-decoration: none;
    transition: color .2s;
}

/* Le fond du lien actif est un parallélogramme, comme un logo d'équipe */
.links a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    border-radius: 4px;
    transform: skewX(-14deg) scale(.9);
    opacity: 0;
    background: linear-gradient(180deg, #9ccaff, #4f8fe6);
    transition: opacity .2s, transform .25s;
}

.links a:hover {
    color: #fff;
}

.links a:hover::before {
    opacity: .22;
    transform: skewX(-14deg) scale(1);
}

.links a.on {
    color: #04101f;
}

.links a.on::before {
    opacity: 1;
    transform: skewX(-14deg) scale(1);
    box-shadow: 0 6px 20px rgba(79, 143, 230, .55);
}

.links a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .bar {
        padding: 8px 14px;
    }

    .brand {
        font-size: 17px;
    }

    .links {
        margin-left: 0;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .links::-webkit-scrollbar {
        display: none;
    }

    .links a {
        white-space: nowrap;
        padding: 7px 10px;
        font-size: 16px;
    }
}

/* ---------- Commanditaire majeur : « Présenté par » à droite de la barre ---------- */
.presente {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: 14px;
    padding: 4px 10px 4px 12px;
    border: 1px solid rgba(150, 190, 250, .25);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    text-decoration: none;
    transition: border-color .2s, background .2s;
}

.presente:hover {
    border-color: var(--ac);
    background: rgba(255, 255, 255, .1);
}

.presente small {
    font: italic 600 11px/1.1 var(--titre);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mu);
}

.presente img {
    display: block;
    height: 30px;
    width: auto;
    max-width: 120px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #ffffff;
    object-fit: contain;
}

@media (max-width: 1240px) {
    .presente small { display: none; }
}

@media (max-width: 760px) {
    /* Sur téléphone : le commanditaire reste sur la première ligne, à côté du nom */
    .brand { order: 1; }
    .presente { order: 2; margin-left: auto; padding: 3px 6px; }
    .presente small { display: none; }
    .presente img { height: 26px; }
    .links { order: 3; }
}

/* =====================================================
   Menu plein écran (téléphone seulement)
   Bouton ☰ dans l'en-tête, grand écran sombre avec les pages en gros caractères
   ===================================================== */

.burger,
.menu-plein {
    display: none;
}

@media (max-width: 760px) {
    /* Le menu horizontal est remplacé par le bouton ☰ */
    .links {
        display: none;
    }

    .bar {
        flex-wrap: nowrap;
    }

    .burger {
        order: 3;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 38px;
        padding: 0 10px;
        flex: 0 0 auto;
        border: 1px solid rgba(150, 190, 250, .3);
        border-radius: 10px;
        background: rgba(255, 255, 255, .06);
    }

    .burger span {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: #fff;
        transition: transform .3s, opacity .2s;
    }

    /* ☰ devient ✕ */
    .menu-ouvert .burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-ouvert .burger span:nth-child(2) {
        opacity: 0;
    }

    .menu-ouvert .burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .menu-ouvert body {
        overflow: hidden;
    }

    .menu-ouvert .top {
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .menu-ouvert .presente {
        opacity: 0;
        pointer-events: none;
    }

    .brand {
        flex: 1 1 0;
        min-width: 0;
    }

    .brand .bt {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
    }

    .bar {
        gap: 8px;
    }

    .brand {
        gap: 8px;
    }

    .brand img {
        height: 30px;
    }

    .presente {
        margin-left: 0;
    }

    /* Le grand écran */
    .menu-plein {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 96px 28px max(28px, env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        background:
            radial-gradient(90% 55% at 80% 0%, rgba(111, 176, 255, .28), rgba(111, 176, 255, 0) 70%),
            linear-gradient(180deg, rgba(4, 9, 17, .86), rgba(4, 9, 17, .97)),
            url("../assets/images/fond-glace.jpg") center / cover no-repeat;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-14px);
        transition: opacity .3s, transform .3s, visibility 0s .3s;
    }

    .menu-plein.ouvert {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity .3s, transform .3s, visibility 0s;
    }

    .menu-plein nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .menu-plein nav a {
        position: relative;
        display: block;
        padding: 6px 0 6px 6px;
        font: italic 800 clamp(40px, 13vw, 56px)/1.02 var(--titre);
        text-transform: uppercase;
        text-decoration: none;
        color: #fff;
        text-shadow: 0 4px 24px rgba(0, 0, 0, .6);
        opacity: 0;
        transform: translateX(-26px);
        transition: opacity .35s, transform .35s;
    }

    /* Les pages arrivent l'une après l'autre */
    .menu-plein.ouvert nav a {
        opacity: 1;
        transform: none;
    }

    .menu-plein.ouvert nav a:nth-child(1) { transition-delay: .06s; }
    .menu-plein.ouvert nav a:nth-child(2) { transition-delay: .12s; }
    .menu-plein.ouvert nav a:nth-child(3) { transition-delay: .18s; }
    .menu-plein.ouvert nav a:nth-child(4) { transition-delay: .24s; }
    .menu-plein.ouvert nav a:nth-child(5) { transition-delay: .30s; }
    .menu-plein.ouvert nav a:nth-child(6) { transition-delay: .36s; }

    /* Page courante : bleu, avec le trait rouge → bleu de la bannière */
    .menu-plein nav a.on {
        color: var(--ac);
    }

    .menu-plein nav a.on::after {
        content: "";
        display: block;
        width: 96px;
        height: 4px;
        margin-top: 4px;
        background: linear-gradient(90deg, var(--rouge-ligne) 0, var(--rouge-ligne) 32px, var(--ac) 32px);
        box-shadow: 0 0 14px rgba(111, 176, 255, .6);
    }

    /* Commanditaire majeur, en bas */
    .mp-commandite {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-top: 28px;
        padding-top: 20px;
        border-top: 1px solid rgba(150, 190, 250, .25);
        text-decoration: none;
    }

    .mp-commandite small {
        font: italic 600 13px/1 var(--titre);
        letter-spacing: .2em;
        text-transform: uppercase;
        color: var(--red);
    }

    .mp-commandite img {
        display: block;
        height: 64px;
        width: auto;
        max-width: 200px;
        padding: 6px 12px;
        border-radius: 10px;
        background: #fff;
        object-fit: contain;
    }

    .mp-commandite strong {
        font: italic 800 22px/1 var(--titre);
        text-transform: uppercase;
        color: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu-plein,
    .menu-plein nav a {
        transition: none;
    }
}
