/* ============================================================
   LUMINEYES — Hero vidéo scroll-driven (scrub) + titres étapes
   ============================================================ */

/* Zone scrollable haute qui pilote le scrub de la vidéo */
.hero-scroll-section {
  position: relative;
  height: 360vh; /* course allongée : les 8 titres ont de l'air, le dernier ne saute plus entre 2 crans */
  background: #080807; /* fond sombre : aucun flash blanc/ancienne image avant que la vidéo peigne */
}

/* Container sticky : la vidéo reste plein écran pendant le scroll */
.hero-scroll-sticky {
  position: -webkit-sticky; /* compat iOS Safari */
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* dvh : suit la barre d'URL mobile -> la video remplit TOUJOURS l'ecran, plus de vide noir */
  width: 100%;
  overflow: hidden;
  background: #080807; /* anti-flash */
}

/* Vidéo background plein écran dès le chargement */
.hero-scroll-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Overlay sombre pour lisibilité */
.hero-scroll-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8,8,7,0.55) 0%,
    rgba(8,8,7,0.35) 45%,
    rgba(8,8,7,0.75) 100%
  );
  z-index: 1;
}

/* Container des titres d'étapes */
.hero-steps {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-step {
  position: absolute;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  max-width: 900px;
  padding: 0 2rem;
}

.hero-step.active {
  opacity: 1;
  transform: translateY(0);
}

.hero-step-num {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.hero-step-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1.08;
  font-weight: 700;
  color: #f5f0e8;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Étape finale = logo */
.hero-step.final .hero-step-title {
  color: #CD9847; /* logo gold */
}

.hero-step.final .hero-step-tagline {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: rgba(245,240,232,0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 1.4rem;
}

/* Indicateur de scroll en bas */
.hero-scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: hint-bounce 2s infinite;
  transition: opacity 0.4s ease;
}

.hero-scroll-hint::after {
  content: '';
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, #c9a84c, transparent);
}

@keyframes hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 768px) {
  .hero-step-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }

  /* Sur mobile le sticky doit tenir : on réaffirme la position et on garde
     une course suffisante. Si la vidéo "monte" au scroll, c'est qu'un parent
     clippe le sticky (overflow) OU que la hauteur a été écrasée ailleurs :
     on force ici une hauteur cohérente et un sticky explicite. */
  .hero-scroll-section {
    height: 300vh; /* course mobile (un peu plus courte que desktop, suffisante pour 8 titres) */
  }
  .hero-scroll-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }
}

/* ============================================================
   PHASE 3 — Polish hero : hiérarchie + profondeur cinématique
   ============================================================ */
.hero-step-num {
  color: var(--gold, #CD9847);
  letter-spacing: 0.34em;
}
.hero-step-title {
  text-shadow: 0 0.4rem 2.4rem rgba(0, 0, 0, 0.55), 0 0 4rem rgba(205, 152, 71, 0.18);
  letter-spacing: -0.025em;
}
.hero-step.final .hero-step-title {
  text-shadow: 0 0 3.4rem rgba(205, 152, 71, 0.5);
}
/* Overlay : vignette dorée subtile pour décoller le texte de la vidéo */
.hero-scroll-overlay {
  background:
    radial-gradient(120% 80% at 50% 38%, transparent 42%, rgba(8, 8, 7, 0.5) 100%),
    linear-gradient(180deg, rgba(8, 8, 7, 0.55) 0%, rgba(8, 8, 7, 0.32) 45%, rgba(8, 8, 7, 0.78) 100%);
}
.hero-scroll-hint {
  color: rgba(245, 240, 232, 0.55);
  letter-spacing: 0.28em;
}

/* ============================================================
   MOBILE — Hero vidéo : la source est 16:9 (1920×1080).
   En plein écran portrait, `cover` sur-zoome et coupe le cadre.
   Sur mobile on montre le cadre entier (`contain`) sur un fond
   sombre premium : plus de sur-zoom, rien d'important n'est coupé.
   Le scroll-scrubbing (piloté par currentTime) reste intact.
   ============================================================ */
@media (max-width: 640px) {
  .hero-scroll-video {
    object-fit: cover;        /* vidéo mobile VERTICALE : remplit l'écran, aucune bande noire */
    object-position: center;
  }
  .hero-scroll-overlay {
    background: linear-gradient(180deg,
      rgba(5, 4, 3, 0.42) 0%,
      rgba(5, 4, 3, 0.10) 45%,
      rgba(5, 4, 3, 0.68) 100%);
  }
  .hero-step { padding: 0 1.1rem; }
}

/* ============================================================
   Sous-texte sous chaque titre d'étape
   ============================================================ */
.hero-step-sub{
  margin-top: 1rem;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: clamp(0.85rem, 1.5vw, 1.15rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: rgba(245, 240, 232, 0.74);
  text-shadow: 0 0.2rem 1.4rem rgba(0,0,0,0.5);
}
.hero-step.final .hero-step-sub{
  margin-top: 1.2rem;
  color: rgba(205, 152, 71, 0.9);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 1.2vw, 0.95rem);
}
@media (max-width: 640px){
  .hero-step-sub{ font-size: 0.92rem; margin-top: 0.7rem; }
}