/* ============================================================
   EDELWEISS 2100 — Fly-through hero (scroll-scrub)
   Hero d'accueil : vol montagnes → fenêtre → salon, piloté au scroll.
   ============================================================ */
.scrub { position: relative; height: 460vh; background: #14110D; }
.scrub__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.scrub__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrub__video { display: none; }

/* Bouton play — n'apparaît QUE si la lecture automatique est refusée
   (iOS en mode économie d'énergie) ou si la vidéo a été mise en pause. */
.scrub__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 16;
  width: 76px; height: 76px; padding: 0; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.78); background: rgba(20,17,13,0.42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.scrub__play[hidden] { display: none; }
.scrub__play svg { width: 28px; height: 28px; fill: #fff; margin-left: 4px; }
.scrub__play:active { transform: translate(-50%, -50%) scale(0.93); background: rgba(20,17,13,0.6); }

.scrub__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(12,10,8,0.80) 0%, rgba(12,10,8,0.12) 44%, rgba(12,10,8,0) 66%),
    linear-gradient(to bottom, rgba(12,10,8,0.55) 0%, rgba(12,10,8,0) 26%);
}

/* Loader (préchargement des frames) */
.loader {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: #14110D; transition: opacity .9s var(--ease), visibility .9s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__brand { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.04em; color: var(--paper); }
.loader__track { width: 180px; height: 1.5px; background: rgba(244,237,225,0.18); overflow: hidden; border-radius: 2px; }
.loader__bar { display: block; height: 100%; width: 0; background: var(--larch-glow); transition: width .25s var(--ease); }
.loader__pct { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.22em; color: rgba(244,237,225,0.6); }

/* Légendes (beats) — fondu sur le footage, en bas-gauche */
.scrub__beat {
  position: absolute; left: var(--gutter); bottom: clamp(72px, 14vh, 150px); z-index: 10;
  max-width: 760px; opacity: 0; will-change: opacity, transform;
}
.scrub__eyebrow {
  font-family: var(--font-script); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--larch-glow); margin: 0 0 6px;
  display: inline-block; padding: 0; background: none; box-shadow: none;
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
}
.scrub__eyebrow::before { display: none; }
.scrub__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(3.4rem, 9.5vw, 8rem); line-height: 0.9; letter-spacing: -0.035em; color: #fff;
  text-shadow: 0 2px 60px rgba(0,0,0,0.5);
}
.scrub__title em { font-style: italic; font-weight: 400; color: #fff; }
.scrub__tagline {
  font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 2.1vw, 1.7rem);
  color: rgba(255,255,255,0.85); margin: 22px 0 0; max-width: 32ch;
}
.scrub__beat-title {
  font-family: var(--font-display); font-weight: 500; line-height: 1.0; letter-spacing: -0.022em;
  font-size: clamp(2.5rem, 6.4vw, 5.6rem); color: #fff; text-shadow: 0 2px 60px rgba(0,0,0,0.5);
}
.scrub__beat-title em { font-style: italic; font-weight: 400; color: #fff; }
.scrub__beat-copy {
  font-size: clamp(1rem, 1.45vw, 1.25rem); color: rgba(255,255,255,0.85);
  margin: 20px 0 0; max-width: 44ch; line-height: 1.65; text-shadow: 0 1px 24px rgba(0,0,0,0.5);
}
.scrub__beat .btn { margin-top: 30px; }

.scrub__cue {
  position: absolute; right: var(--gutter); bottom: clamp(48px, 10vh, 96px); z-index: 12;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 22px rgba(0,0,0,0.7);
}
.scrub__cue-label { display: block; }
/* Souris stylisée — la molette descend en boucle (invitation franche à scroller) */
.scrub__mouse {
  width: 27px; height: 44px; border: 1.6px solid rgba(255,255,255,0.9); border-radius: 14px;
  position: relative; display: block; box-shadow: 0 2px 22px rgba(0,0,0,0.45);
}
.scrub__mouse-wheel {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; border-radius: 3px;
  background: #fff; transform: translate(-50%, 0);
  animation: mouseWheel 1.7s var(--ease) infinite;
}
@keyframes mouseWheel {
  0% { opacity: 0; transform: translate(-50%, 0); }
  25% { opacity: 1; }
  70% { opacity: 1; transform: translate(-50%, 13px); }
  100% { opacity: 0; transform: translate(-50%, 13px); }
}

/* Barre de progression du vol (bord droit) — signale que le scroll fait avancer l'image */
.scrub__progress {
  position: absolute; right: clamp(16px, 2.6vw, 34px); top: 50%; transform: translateY(-50%); z-index: 10;
  width: 2px; height: clamp(110px, 32vh, 260px); border-radius: 2px;
  background: rgba(255,255,255,0.16); overflow: hidden;
}
.scrub__progress-bar {
  position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background: linear-gradient(var(--larch-glow), rgba(255,255,255,0.9)); border-radius: 2px;
}

/* Mode vidéo : petit écran OU appareil tactile. Le pointer:coarse couvre le
   téléphone passé en paysage (844px de large) et la tablette — sans lui, la CSS
   basculait sur le canvas alors qu'aucune frame n'était chargée → hero noir. */
@media (max-width: 820px), (pointer: coarse) {
  .scrub { height: 100svh; }
  /* Hero mobile : courte vidéo en autoplay (vol montagnes → chalet → retour), pas de scroll → zéro saccade. */
  .scrub__canvas { display: none; }
  .scrub__video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; background: #14110D; }
  .loader { display: none; }
  .scrub__beat { bottom: clamp(90px, 16vh, 150px); }
  .scrub__cue, .scrub__progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scrub__mouse-wheel { animation: none; }
  .scrub__progress { display: none; }
}
