.home-container {
    width: 100%;
    font-family: var(--pe-font);
    background-color: var(--perigord-black);
}

/* Bannière « roadbook » : photo des équipes, la route jaune se dessine entre les villages */
.banner {
    position: relative;
    min-height: calc(100svh - 61px);
    display: grid;
    align-items: end;
    padding: 7rem clamp(1rem, 4vw, 3rem) 3.5rem;
    overflow: hidden;
    background-color: var(--perigord-black);
    color: var(--white);
}

.banner-photo {
    position: absolute;
    inset: 0;
    background-position: center 35%;
    background-size: cover;
    filter: saturate(0.85);
    transform: scale(1.04);
    animation: banner-settle 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.banner-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 4, 7, 0.35) 0%, rgba(5, 4, 7, 0.55) 45%, var(--perigord-black) 100%);
}

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

.banner-route path {
    fill: none;
    stroke: var(--perigord-yellow);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 2600;
    stroke-dashoffset: 2600;
    animation: route-draw 2.4s 0.3s cubic-bezier(0.6, 0.1, 0.2, 1) forwards;
}

.banner-route circle {
    fill: var(--perigord-black);
    stroke: var(--perigord-yellow);
    stroke-width: 4;
    opacity: 0;
    animation: route-stop 0.3s forwards;
}

.banner-route text {
    fill: var(--pe-paper);
    font: 600 15px var(--pe-font);
    letter-spacing: 0.02em;
    opacity: 0;
    animation: route-stop 0.3s forwards;
}

/* Libellés courts placés autour des points, réservés aux petits écrans */
.banner-route .label-narrow {
    display: none;
}

.banner-route .stop-1 { animation-delay: 0.6s; }
.banner-route .stop-2 { animation-delay: 1.1s; }
.banner-route .stop-3 { animation-delay: 1.6s; }
.banner-route .stop-4 { animation-delay: 2.1s; }
.banner-route .stop-5 { animation-delay: 2.5s; }

@keyframes route-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes route-stop {
    to { opacity: 1; }
}

@keyframes banner-settle {
    to { transform: scale(1); }
}

.banner-content {
    position: relative;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
}

.home-container .banner-title {
    font-size: clamp(4rem, 13vw, 11.5rem);
    line-height: 0.92;
    color: var(--perigord-yellow);
    letter-spacing: 0.04em;
}

.banner-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2.5rem;
    margin-top: 1.75rem;
}

.banner-description {
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    line-height: 1.5;
    max-width: 36ch;
    color: var(--pe-paper);
}

.banner-description strong {
    color: var(--perigord-yellow);
    font-weight: 700;
}

.banner-signature {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95em;
    color: var(--pe-muted);
}

.banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Boutons de la home : pilule pleine jaune, ou contour clair */
.btn-register,
.btn-ghost {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn-register {
    position: relative;
    overflow: hidden;
    background-color: var(--perigord-yellow);
    color: var(--perigord-black);
}

/* Au survol, un reflet blanc traverse le bouton d'inscription (animation pe-shine définie dans components/navbar.css) */
.btn-register::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
}

.btn-register:hover::after {
    animation: pe-shine 0.7s ease;
}

.btn-ghost {
    color: var(--pe-paper);
    box-shadow: inset 0 0 0 2px var(--pe-paper);
}

.btn-ghost:hover {
    background-color: var(--pe-paper);
    color: var(--perigord-black);
    transform: translateY(-2px);
}

.btn-register:focus-visible,
.btn-ghost:focus-visible {
    outline: 3px solid var(--perigord-yellow);
    outline-offset: 3px;
}

.parallax-divider {
    height: 420px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

@media (max-width: 768px) {
    .banner {
        padding-bottom: 2.5rem;
    }

    /* La bannière empile la route et le texte en bas de l'écran : la route se pose juste au-dessus du titre */
    .banner {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        min-height: auto;
        padding-top: 2.5rem;
    }

    /* La route garde les proportions de son dessin (1440 × 900) pour rester entière, d'un bord à l'autre */
    .banner-route {
        position: relative;
        inset: auto;
        flex-shrink: 0;
        width: 100vw;
        height: 62.5vw;
        /* Le dessin n'occupe que la bande haute du cadre (y 120 à 420 sur 900) : les marges négatives retirent le vide */
        margin: -8vw calc(-1 * clamp(1rem, 4vw, 3rem)) -28vw;
    }

    /* Dessin réduit d'environ 4 fois : trait et étapes épaissis pour rester lisibles */
    .banner-route path {
        stroke-width: 14;
    }

    .banner-route circle {
        r: 26px;
        stroke-width: 10;
    }

    /* Libellés d'ordinateur illisibles une fois réduits : remplacés par des libellés plus gros, centrés sur leur point */
    .banner-route .label-wide {
        display: none;
    }

    .banner-route .label-narrow {
        display: inline;
        font-size: 38px;
        font-weight: 700;
        text-anchor: middle;
        paint-order: stroke;
        stroke: rgba(5, 4, 7, 0.55);
        stroke-width: 8px;
        stroke-linejoin: round;
    }

    .banner-actions {
        width: 100%;
    }

    .parallax-divider {
        background-attachment: scroll;
        height: 240px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-register:hover::after {
        animation: none;
    }

    .banner-photo {
        animation: none;
        transform: none;
    }

    .banner-route path {
        animation: none;
        stroke-dashoffset: 0;
    }

    .banner-route circle,
    .banner-route text {
        animation: none;
        opacity: 1;
    }
}
