/* ── Road2Luxe — hero.css ────────────────────────────────────
   Section hero homepage.
   Vidéo de fond + grade chaud + voile charbon profond + grain.
   Enqueué sur la front-page uniquement (voir inc/enqueue.php).
   ──────────────────────────────────────────────────────────── */


/* ══════════════════════════════════════════════════════════════
   KEYFRAMES — 4, deux phases
   ══════════════════════════════════════════════════════════════ */

/* Phase 1 — voile + H1 : fondu pur, lent */
@keyframes r2lFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Phase 2 — éléments au-dessus du titre : arrivent du haut */
@keyframes r2lSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
}

/* Phase 2 — éléments en dessous du titre : arrivent du bas */
@keyframes r2lSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}


/* ══════════════════════════════════════════════════════════════
   STRUCTURE
   ══════════════════════════════════════════════════════════════ */

/* ⚠️ PAS d'overflow:hidden ici — un clip d'ancêtre coupe les panneaux dropdown
   de la barre de recherche au bas du hero (aucun z-index ne peut le contrer).
   Le clipping de la sur-hauteur parallax vit sur .r2l-hero__media.
   Le débord horizontal est déjà géré par html/body { overflow-x: clip }. */
.r2l-hero {
    position:            relative;
    min-height:          100vh;
    display:             flex;
    flex-direction:      column;
    background-color:    var(--r2l-fiche-dark);
    /* Poster toujours présent en fond — fallback si la vidéo tarde */
    background-image:    var(--r2l-hero-poster, none);
    background-size:     cover;
    background-position: center 30%;
}

/* Calque média — seul élément qui clippe (headroom parallax de la vidéo) */
.r2l-hero__media {
    position: absolute;
    inset:    0;
    overflow: hidden;
    z-index:  0;
}

/* Fond vidéo — pas d'animation, affichage direct */
.r2l-hero__bg {
    position:        absolute;
    inset:           0;
    width:           100%;
    height:          100%;
    object-fit:      cover;
    object-position: center 30%;
}

/* Headroom parallax — sur-hauteur pour absorber le déplacement JS */
html.js .r2l-hero__bg.js-parallax {
    top:    -8%;
    height: 116%;
}

/* ── Grade chaud : réchauffe les teintes grises du footage ─── */
.r2l-hero::before {
    content:    '';
    position:   absolute;
    inset:      0;
    background: linear-gradient(
        165deg,
        rgba(160, 110, 55, .28) 0%,
        rgba(110,  75, 30, .14) 45%,
        transparent 72%
    );
    z-index:        1;
    pointer-events: none;
}

/* ── Voile sombre — Phase 1 : se densifie avec le H1 ────────
   Rampe verticale haut transparent → pied #0c0a09 (~93 %).
   Bascule descendue : le voile dense reste bas, monte moins haut. */
.r2l-hero__veil {
    position:   absolute;
    inset:      0;
    background: linear-gradient(
        to bottom,
        rgba(12, 10, 9, 0)   0%,
        rgba(12, 10, 9, .10) 32%,
        rgba(12, 10, 9, .40) 56%,
        rgba(12, 10, 9, .72) 80%,
        rgba(12, 10, 9, .93) 100%
    );
    z-index:   2;
    animation: r2lFadeIn 1s ease-out forwards;
}

/* ── Grain texture ~3.5% ──────────────────────────────────── */
.r2l-hero::after {
    content:          '';
    position:         absolute;
    inset:            0;
    z-index:          3;
    pointer-events:   none;
    opacity:          .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.68' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
    background-size:  300px 300px;
}


/* ══════════════════════════════════════════════════════════════
   CONTENU CENTRÉ
   ══════════════════════════════════════════════════════════════ */

/* z-index 5 : au-dessus du bandeau piliers (4) qui suit dans le DOM — sinon
   les panneaux dropdown de la barre de recherche passent dessous. */
.r2l-hero__inner {
    position:        relative;
    z-index:         5;
    flex:            1;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    text-align:      center;
    width:           100%;
    max-width:       1120px; /* élargi pour que le formulaire tienne sur 1 ligne (durée/période) */
    margin-inline:   auto;
    padding:         clamp(6rem, 14vh, 10rem) var(--r2l-container-pad) clamp(3rem, 6vh, 5rem);
    gap:             var(--r2l-s-4);
}


/* ── Eyebrow — Phase 2 : glisse du haut (au-dessus du titre) ── */

.r2l-hero__eyebrow {
    display:         inline-block;
    font-family:     var(--r2l-font-corps);
    font-size:       var(--r2l-text-eyebrow);
    font-weight:     var(--r2l-fw-eyebrow);
    letter-spacing:  var(--r2l-ls-eyebrow);
    text-transform:  uppercase;
    /* Exception hero (§7 pt1) : crème pleine opacité, pas le .65 des eyebrows dark. */
    color:           var(--r2l-sable-1);
    animation:       r2lSlideDown .6s ease .95s both;
}


/* ── H1 deux lignes — Phase 1 : fondu pur avec le voile ──────── */

.r2l-hero__h1 {
    font-family:    var(--r2l-font-titres);
    font-size:      clamp(3rem, 5.5vw, 5rem); /* 48→80px — signature hero */
    line-height:    0.96;
    color:          var(--r2l-blanc);
    margin:         0;
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            0;
    animation:      r2lFadeIn 1s ease both;
}

/* Ligne 1 — fine et posée */
.r2l-hero__h1-line1 {
    font-weight: 400;
    font-style:  normal;
    display:     block;
}

/* Ligne 2 — bold italic, le moment statement */
.r2l-hero__h1-line2 {
    font-weight: 700;
    font-style:  italic;
    display:     block;
}

/* « libre. » — accent de titre (Terre sec sur fond sombre → #C2A98F via contexte) */
.r2l-hero__libre {
    color:      var(--r2l-accent-titre);
    font-style: inherit;
}


/* ── Sous-ligne — Cabinet italic (moment d'émotion) ──────────── */

.r2l-hero__subtitle {
    font-family: var(--r2l-font-titres);
    font-style:  italic;
    font-size:   clamp(1.125rem, 1.8vw, 1.5rem);
    font-weight: 500;
    color:       rgba(247, 243, 238, .84);
    line-height: 1.4;
    max-width:   34ch;
    text-wrap:   balance;
    margin:      0;
    animation:   r2lSlideUp .6s ease .95s both;
}

/* Search bar — Phase 2 : glisse du bas, légèrement décalé.
   position/z-index : la barre (et ses panneaux dropdown) passe AU-DESSUS
   de la phrase de réassurance qui la suit dans le flux. */
.r2l-hero__inner > .r2l-sig {
    position:  relative;
    z-index:   5;
    animation: r2lSlideUp .6s ease 1.08s both;
}


/* ── Phrase de réassurance (sous le formulaire, market-aware) ── */

.r2l-hero__reassurance-text {
    position:    relative;
    z-index:     1; /* sous la barre de recherche (dropdowns ouverts) */
    font-family: var(--r2l-font-corps);
    font-size:   var(--r2l-text-meta);
    font-weight: 400;
    color:       rgba(247, 243, 238, .72);
    line-height: 1.6;
    max-width:   68ch;
    text-wrap:   balance;
    margin:      0;
    animation:   r2lSlideUp .6s ease 1.2s both;
}


/* ══════════════════════════════════════════════════════════════
   BANDEAU PILIERS — bas du hero, sur l'image
   ══════════════════════════════════════════════════════════════ */

.r2l-hero__piliers {
    position:   relative;
    z-index:    4;
    width:      100%;
    padding:    var(--r2l-s-3) var(--r2l-container-pad);
    border-top: 1px solid rgba(247, 243, 238, .12);
    animation:  r2lSlideUp .6s ease .95s both;
}

.r2l-hero__piliers-list {
    list-style:      none;
    margin:          0;
    padding:         0;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             var(--r2l-s-2) var(--r2l-s-4);
}

.r2l-hero__piliers-item {
    font-family:    var(--r2l-font-corps);
    font-size:      var(--r2l-text-eyebrow);
    font-weight:    600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color:          rgba(247, 243, 238, .58);
}


/* ══════════════════════════════════════════════════════════════
   MOBILE : poster uniquement, pas d'autoplay vidéo
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .r2l-hero__bg {
        display: none;
    }

    .r2l-hero__inner {
        gap: var(--r2l-s-3);
    }

    .r2l-hero__piliers-list {
        justify-content: center;
        gap:             var(--r2l-s-2) var(--r2l-s-3);
    }

    .r2l-hero__piliers-item {
        font-size: 0.625rem;
    }

    .r2l-hero__reassurance-text {
        font-size: var(--r2l-text-caption);
    }
}


/* ══════════════════════════════════════════════════════════════
   ACCESSIBILITÉ — supprime les animations si demandé
   ══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .r2l-hero__veil,
    .r2l-hero__h1,
    .r2l-hero__eyebrow,
    .r2l-hero__subtitle,
    .r2l-hero__inner > .r2l-sig,
    .r2l-hero__reassurance-text,
    .r2l-hero__piliers {
        animation: none;
        opacity:   1;
        transform: none;
    }
}
