/**
 * Page d'accueil.
 */

.fl-home {
    --fl-home-width: 1190px;
    --fl-home-gutter: var(--fl-space-lg);
    --fl-home-section-gap: 80px;
    background: var(--fl-color-page);
    color: var(--fl-text-primary);
}

.fl-home__container {
    box-sizing: border-box;
    width: 100%;
    max-width: calc(var(--fl-home-width) + 2 * var(--fl-home-gutter));
    margin-inline: auto;
    padding-inline: var(--fl-home-gutter);
}

.fl-home__section {
    margin-top: var(--fl-home-section-gap);
}

.fl-home__section--events {
    margin-top: var(--fl-space-3xl);
}

/* Bandeau pleine largeur sur le gris de la page (catégories, régions) : même
   respiration au-dessus et en dessous que le padding du bandeau organisateur. */
.fl-home-band {
    padding-block: 72px;
}

/* Bandeau organisateur collé aux bandeaux qui l'encadrent. */
.fl-home-band + .fl-home-promo {
    margin-top: 0;
}

.fl-home__more {
    display: flex;
    justify-content: center;
    margin-top: var(--fl-space-2xl);
}

/* En-têtes de section : plus présents que dans les sliders du dashboard. */
.fl-home .fl-ui-card-slider__title {
    font-size: var(--fl-font-size-2xl);
    font-weight: var(--fl-font-weight-bold);
}

.fl-home .fl-ui-card-slider__subtitle {
    font-size: var(--fl-font-size-base);
}

.fl-home .fl-ui-card-slider__header {
    margin-bottom: var(--fl-space-2xl);
}

/* --- Hero ------------------------------------------------------------- */

.fl-home-hero {
    position: relative;
    padding: 240px var(--fl-home-gutter) 0;
    background-color: var(--fl-color-ink);
    /* Voile plus dense à gauche, sous le titre, pour laisser voir le lacet et la voiture à droite. */
    background-image:
        linear-gradient(90deg, rgba(2, 3, 38, 0.78) 0%, rgba(2, 3, 38, 0.5) 55%, rgba(2, 3, 38, 0.3) 100%),
        var(--fl-home-hero-image, none);
    /* Cadrage : vallée et lac derrière le titre, épingle et voiture au-dessus de la recherche. */
    background-position: center 68%;
    background-size: cover;
    color: var(--fl-text-inverse);
}

.fl-home-hero__credit {
    position: absolute;
    top: 72px;
    right: var(--fl-home-gutter);
    margin: 0;
    color: var(--fl-text-inverse-muted);
    font-size: var(--fl-font-size-xs);
}

.fl-home-hero__inner {
    /* Contexte de formatage propre : la marge négative de la recherche fait
       déborder la barre sous la photo au lieu de fuir hors du hero. */
    display: flow-root;
    max-width: var(--fl-home-width);
    margin-inline: auto;
}

.fl-home-hero__title {
    margin: 0;
    color: #F6F6F6;
    font-size: clamp(36px, 7vw, 56px);
    font-weight: 800;
    line-height: 0.9;
}

.fl-home-hero__accent {
    color: var(--fl-color-accent);
    font-size: clamp(48px, 12vw, 70px);
    font-style: italic;
}

.fl-home-hero__subtitle {
    display: block;
    margin-top: var(--fl-space-sm);
    font-size: clamp(28px, 7vw, 42px);
    font-weight: var(--fl-font-weight-regular);
    line-height: 1.1;
}

.fl-home-hero__perks {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fl-space-xs) var(--fl-space-xl);
    margin: var(--fl-space-xl) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--fl-font-size-md);
}

.fl-home-hero__perk {
    display: inline-flex;
    align-items: center;
    gap: var(--fl-space-xs);
}

.fl-home-hero__perk-icon {
    color: var(--fl-color-accent);
}

/* La barre de recherche chevauche le bas de la photo. */
.fl-home-hero .fl-home-hero__search {
    position: relative;
    z-index: 2;
    margin: 40px 25px -32px;
}

/* --- Raccourcis d'intention ----------------------------------------- */

.fl-home-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--fl-space-md);
    margin: 50px auto 0;
}

.fl-home-pills__pill {
    display: inline-flex;
    align-items: center;
    gap: var(--fl-space-sm);
    padding: var(--fl-space-sm) 14px;
    border: 1px solid var(--fl-color-border);
    border-radius: var(--fl-radius-pill);
    background: var(--fl-color-surface);
    box-shadow: var(--fl-shadow-sm);
    color: var(--fl-text-primary);
    font-size: var(--fl-font-size-md);
    font-weight: var(--fl-font-weight-semibold);
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: box-shadow var(--fl-transition-fast), border-color var(--fl-transition-fast);
}

.fl-home-pills__pill:hover,
.fl-home-pills__pill:focus-visible {
    border-color: var(--fl-color-border-strong);
    box-shadow: var(--fl-shadow-md);
    color: var(--fl-text-primary);
    text-decoration: none;
}

.fl-home-pills__icon {
    color: var(--fl-text-secondary);
}

/* --- Vous organisez ? -------------------------------------------- */

.fl-home-promo {
    margin-top: var(--fl-home-section-gap);
    padding: 72px var(--fl-home-gutter);
    overflow: hidden;
    /* Fond du footer (--fl-footer-bg), avec un quadrillage discret. */
    background-color: #05061a;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    color: var(--fl-text-inverse);
}

.fl-home-promo__inner {
    display: grid;
    /* Colonne texte assez large pour le titre en deux lignes à 40 px. */
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 56px;
    align-items: center;
    max-width: var(--fl-home-width);
    margin-inline: auto;
}

.fl-home-promo__eyebrow {
    margin: 0 0 var(--fl-space-md);
    color: var(--fl-color-accent);
    font-size: var(--fl-font-size-sm);
    font-weight: var(--fl-font-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fl-home-promo__title {
    margin: 0;
    color: var(--fl-text-inverse);
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.fl-home-promo__title-accent {
    display: block;
    color: var(--fl-text-inverse-muted);
}

.fl-home-promo__lead {
    max-width: 34em;
    margin: var(--fl-space-lg) 0 0;
    color: var(--fl-text-inverse-muted);
    font-size: var(--fl-font-size-lg);
    line-height: var(--fl-line-height-relaxed);
}

.fl-home-promo__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fl-space-md);
    margin-top: var(--fl-space-3xl);
}

/* Preuve sociale : avatars superposés des organisateurs les plus actifs. */
.fl-home-promo__organizers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--fl-space-md) var(--fl-space-lg);
    margin-top: var(--fl-space-2xl);
}

.fl-home-promo__avatars {
    display: flex;
    margin: 0;
    padding: 0 0 0 9px;
    list-style: none;
}

.fl-home-promo__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: -9px;
    overflow: hidden;
    border: 2px solid var(--fl-color-ink);
    border-radius: 50%;
    background: var(--fl-color-surface-sunken);
    color: var(--fl-text-primary);
    font-weight: var(--fl-font-weight-bold);
    text-decoration: none;
    transition: transform var(--fl-transition-fast);
}

.fl-home-promo__avatar:hover,
.fl-home-promo__avatar:focus-visible {
    position: relative;
    z-index: 1;
    transform: translateY(-3px) scale(1.08);
}

.fl-home-promo__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fl-home-promo__organizers-text {
    margin: 0;
    color: var(--fl-text-inverse-muted);
    font-size: var(--fl-font-size-md);
}

.fl-home-promo__organizers-text a {
    margin-left: var(--fl-space-2xs);
    color: var(--fl-text-inverse);
    font-weight: var(--fl-font-weight-semibold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Aperçu : carte publiée et notifications flottantes, dans l'ordre du
   parcours (vues, réservation, jour J), en débord pour ne rien masquer. */
.fl-home-promo__visual {
    position: relative;
    padding: 40px 8px 72px;
}

.fl-home-promo__card {
    max-width: 340px;
    margin-inline: auto;
    transform: rotate(-2deg);
    transition: transform var(--fl-transition-slow);
}

.fl-home-promo__card .fl-ui-event-card-type2 {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.fl-home-promo__visual:hover .fl-home-promo__card {
    transform: rotate(0deg) translateY(-4px);
}

.fl-home-promo__notice {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--fl-space-md);
    padding: var(--fl-space-md) var(--fl-space-lg);
    border-radius: var(--fl-radius-lg);
    background: var(--fl-color-surface);
    box-shadow: var(--fl-shadow-lg);
    color: var(--fl-text-primary);
    font-size: var(--fl-font-size-md);
    line-height: 1.3;
    white-space: nowrap;
}

.fl-home-promo__notice b,
.fl-home-promo__notice small {
    display: block;
}

.fl-home-promo__notice small {
    color: var(--fl-text-secondary);
    font-size: var(--fl-font-size-sm);
}

.fl-home-promo__notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--fl-radius-md);
    background: var(--fl-color-accent-soft);
    color: #0B7A4B;
}

.fl-home-promo__notice--views {
    top: 8px;
    left: -56px;
}

.fl-home-promo__notice--booking {
    top: 36%;
    right: -44px;
}

.fl-home-promo__notice--scan {
    right: -28px;
    bottom: 36px;
}

/* Animations : entrée au défilement (classe posée par home.js), puis
   notifications qui flottent doucement. Sans JS, tout reste visible. */
.fl-home-promo__notice {
    animation: fl-home-promo-float 6s ease-in-out infinite;
}

.fl-home-promo__notice--views {
    animation-delay: -2s;
}

.fl-home-promo__notice--scan {
    animation-delay: -4s;
}

@keyframes fl-home-promo-float {
    50% {
        translate: 0 -6px;
    }
}

.fl-home-reveal-ready .fl-home-promo__copy > *,
.fl-home-reveal-ready .fl-home-promo__card,
.fl-home-reveal-ready .fl-home-promo__notice {
    transition: opacity 0.6s ease, transform 0.6s ease, scale 0.5s ease;
}

.fl-home-reveal-ready .fl-home-promo:not(.is-visible) .fl-home-promo__copy > * {
    opacity: 0;
    transform: translateY(16px);
}

.fl-home-reveal-ready .fl-home-promo:not(.is-visible) .fl-home-promo__card {
    opacity: 0;
    transform: rotate(-6deg) translateY(24px);
}

.fl-home-reveal-ready .fl-home-promo:not(.is-visible) .fl-home-promo__notice {
    opacity: 0;
    scale: 0.85;
}

/* Décalages d'entrée, retirés une fois l'animation jouée (`is-settled`) pour ne pas ralentir le survol. */
.fl-home-promo:not(.is-settled) .fl-home-promo__copy > :nth-child(2) { transition-delay: 0.08s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__copy > :nth-child(3) { transition-delay: 0.16s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__copy > :nth-child(4) { transition-delay: 0.24s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__copy > :nth-child(5) { transition-delay: 0.32s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__copy > :nth-child(6) { transition-delay: 0.4s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__card { transition-delay: 0.15s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__notice--booking { transition-delay: 0.45s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__notice--views { transition-delay: 0.6s; }
.fl-home-promo:not(.is-settled) .fl-home-promo__notice--scan { transition-delay: 0.75s; }

@media (prefers-reduced-motion: reduce) {
    .fl-home-promo__notice {
        animation: none;
    }

    .fl-home-reveal-ready .fl-home-promo:not(.is-visible) .fl-home-promo__copy > *,
    .fl-home-reveal-ready .fl-home-promo:not(.is-visible) .fl-home-promo__card,
    .fl-home-reveal-ready .fl-home-promo:not(.is-visible) .fl-home-promo__notice {
        opacity: 1;
        transform: none;
        scale: none;
    }
}

/* --- Newsletter -------------------------------------------------------- */

.fl-home-newsletter {
    margin-top: var(--fl-home-section-gap);
    padding: 46px var(--fl-home-gutter);
    background: var(--fl-color-ink);
    color: var(--fl-text-inverse);
}

.fl-home-newsletter__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--fl-space-2xl);
    max-width: var(--fl-home-width);
    margin-inline: auto;
}

.fl-home-newsletter__copy {
    max-width: 575px;
}

.fl-home-newsletter__title {
    margin: 0 0 var(--fl-space-2xs);
    color: var(--fl-text-inverse);
    font-size: var(--fl-font-size-2xl);
    font-weight: var(--fl-font-weight-bold);
}

.fl-home-newsletter__text {
    margin: 0;
    color: var(--fl-text-secondary);
    font-size: var(--fl-font-size-base);
    font-weight: var(--fl-font-weight-medium);
}

.fl-home-newsletter__form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--fl-space-sm);
    width: min(100%, 460px);
}

.fl-home-newsletter__field {
    flex: 1 1 240px;
}

.fl-home-newsletter__field .fl-ui-field__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.fl-home-newsletter__honeypot {
    position: absolute;
    left: -9999px;
}

.fl-home-newsletter__feedback {
    flex-basis: 100%;
    margin: 0;
    color: var(--fl-color-accent);
    font-size: var(--fl-font-size-md);
}

.fl-home-newsletter__feedback.is-error {
    color: #FCA5A5;
}

/* --- Partenaires et présentation ------------------------------------- */

.fl-home-partners__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: var(--fl-space-2xl);
    margin: var(--fl-space-2xl) 0 0;
    padding: 0;
    list-style: none;
}

.fl-home-partners__logo {
    display: block;
    width: auto;
    max-width: 200px;
    height: 70px;
    object-fit: contain;
}

.fl-home-faq {
    max-width: 760px;
    margin-inline: auto;
    padding-bottom: var(--fl-home-section-gap);
}

.fl-home-faq .fl-ui-card-slider__title {
    margin-bottom: var(--fl-space-2xl);
    text-align: center;
}

/* --- Entrée vers la carte --------------------------------------------- */

.fl-home-map__frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1280 / 470;
    border: 1px solid var(--fl-color-border);
    border-radius: var(--fl-radius-xl);
    background: #eef0f3;
}

/* Voile depuis la gauche : la carte de texte reste lisible sur le fond. */
.fl-home-map__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(247, 247, 247, 0.85) 0%, rgba(247, 247, 247, 0.35) 30%, rgba(247, 247, 247, 0) 45%);
    pointer-events: none;
}

.fl-home-map__stage {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
}

/* Cadre au ratio du fond de carte : image et points rognés ensemble. */
.fl-home-map__canvas {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    aspect-ratio: 1280 / 470;
    transform: translateX(-50%);
}

.fl-home-map__canvas img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Même repère que la page carte : rond marine, contour blanc. */
.fl-home-map__dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid var(--fl-color-surface);
    border-radius: 50%;
    background: var(--fl-color-ink);
    box-shadow: 0 1px 3px rgba(2, 3, 38, 0.35);
    transform: translate(-50%, -50%);
}

.fl-home-map__card {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: var(--fl-space-4xl);
    max-width: 430px;
    padding: var(--fl-space-3xl);
    border: 1px solid var(--fl-color-border);
    border-radius: var(--fl-radius-lg);
    background: var(--fl-color-surface);
    box-shadow: var(--fl-shadow-md);
    transform: translateY(-50%);
}

.fl-home-map__eyebrow {
    margin: 0 0 var(--fl-space-md);
    color: var(--fl-text-secondary);
    font-size: var(--fl-font-size-sm);
    font-weight: var(--fl-font-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fl-home-map__title {
    margin: 0 0 var(--fl-space-md);
    font-size: var(--fl-font-size-2xl);
    font-weight: var(--fl-font-weight-bold);
    line-height: var(--fl-line-height-snug);
}

.fl-home-map__text {
    margin: 0 0 var(--fl-space-2xl);
    color: var(--fl-text-secondary);
    font-size: var(--fl-font-size-base);
    line-height: var(--fl-line-height-relaxed);
}

.fl-home-map__chips {
    position: absolute;
    z-index: 1;
    right: var(--fl-space-2xl);
    bottom: var(--fl-space-2xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--fl-space-sm);
    margin: 0;
    padding: 0;
    list-style: none;
}

.fl-home-map__chip {
    display: inline-flex;
    align-items: center;
    gap: var(--fl-space-sm);
    padding: var(--fl-space-sm) 14px;
    border: 1px solid var(--fl-color-border);
    border-radius: var(--fl-radius-pill);
    background: var(--fl-color-surface);
    box-shadow: var(--fl-shadow-sm);
    color: var(--fl-text-primary);
    font-size: var(--fl-font-size-md);
    font-weight: var(--fl-font-weight-semibold);
}

.fl-home-map__chip svg {
    color: var(--fl-text-secondary);
}

@media (max-width: 1100px) {
    .fl-home-map__chips {
        display: none;
    }
}

/* --- Petits écrans ---------------------------------------------------- */

@media (max-width: 900px) {
    .fl-home-promo__inner {
        grid-template-columns: 1fr;
        gap: var(--fl-space-3xl);
    }

    /* L'aperçu garde la largeur de la carte : les notifications restent collées à elle. */
    .fl-home-promo__visual {
        width: 100%;
        max-width: 360px;
        margin-inline: auto;
    }
}

@media (max-width: 767px) {
    .fl-home {
        --fl-home-section-gap: 56px;
    }

    .fl-home-hero {
        padding-top: 140px;
        background-image:
            linear-gradient(rgba(2, 3, 38, 0.62), rgba(2, 3, 38, 0.62)),
            var(--fl-home-hero-image-mobile, var(--fl-home-hero-image, none));
        /* Photo agrandie et calée à droite : l'épingle reste visible au-dessus de la recherche. */
        background-size: auto 135%;
        background-position: 64% 100%;
    }

    .fl-home-hero .fl-home-hero__search {
        margin-inline: 0;
    }

    .fl-home-band {
        padding-block: 56px;
    }

    .fl-home .fl-ui-card-slider__view-all {
        display: none;
    }

    /* Fond de carte en bandeau, centré sur la France, carte de texte dessous. */
    .fl-home-map__frame {
        aspect-ratio: auto;
        background: var(--fl-color-surface);
    }

    .fl-home-map__frame::after {
        display: none;
    }

    .fl-home-map__stage {
        position: relative;
        height: 200px;
    }

    .fl-home-map__canvas {
        transform: translateX(-62%);
    }

    .fl-home-map__card {
        position: static;
        max-width: none;
        padding: var(--fl-space-2xl);
        border: 0;
        border-top: 1px solid var(--fl-color-border);
        border-radius: 0;
        box-shadow: none;
        transform: none;
    }
}

@media (max-width: 560px) {
    .fl-home-promo {
        padding-block: 56px;
    }


    .fl-home-promo__actions .fl-ui-button {
        flex: 1 1 100%;
        justify-content: center;
    }

    .fl-home-promo__visual {
        padding: 48px 0 64px;
    }

    .fl-home-promo__notice--views {
        display: none;
    }

    .fl-home-promo__notice--booking,
    .fl-home-promo__notice--scan {
        right: 0;
    }
}
