/* ==========================================================================
   Alive — refonte de l'accueil (v2)
   1. Le haut de page : le texte ; les appareils sont dans produit.css.
   2. Les « scènes fixes » : le texte ne bouge plus, seule l'animation tourne,
      et les points de la liste s'allument à son rythme.
   3. Les trois jours de la mise en place.
   ========================================================================== */

/* ==========================================================================
   1. HAUT DE PAGE
   ========================================================================== */
.ouverture {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: clamp(100px, 12vh, 140px);
}
.ouverture > .lueur { z-index: -1; }
.ouverture__texte { text-align: center; }
.ouverture__titre {
  font-size: min(clamp(2.4rem, 4.8vw, 4.4rem), 8.6svh);
  line-height: .95;
  margin: 0 auto 20px;
}
.ouverture__ligne {
  max-width: 640px; margin: 0 auto;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.5;
  color: var(--gris); text-wrap: pretty;
}
.ouverture__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ==========================================================================
   2. SCÈNES FIXES
   ========================================================================== */
.scene--fixe .scene__colle { padding-bottom: calc(clamp(64px, 10vh, 110px) + (100lvh - 100svh)); }
.scene__texte { max-width: 540px; }
.scene__para { color: var(--gris); font-size: clamp(1rem, 1.25vw, 1.12rem); line-height: 1.55; max-width: 46ch; text-wrap: pretty; }
.scene__para + .scene__para { margin-top: 12px; }
.scene__para--fort { color: var(--blanc); font-weight: 600; }
.scene__lien { margin-top: 24px; }

/* La liste qui s'allume au rythme de l'animation ; un clic mène à l'étape */
.points { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--trait); max-width: 460px; }
.points li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--trait);
  color: var(--gris-bas); font-size: .98rem; line-height: 1.35;
  cursor: pointer;
  transition: color .4s var(--doux);
}
.points li::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 12px; height: 2px; background: var(--trait-fort);
  transition: width .4s var(--sortie), background .4s;
}
.points li:hover { color: var(--gris); }
.points li.actif { color: var(--blanc); font-weight: 600; }
.points li.actif::before { width: 18px; background: var(--degrade); }
.points li::after {            /* le temps qu'il reste avant l'étape suivante */
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--degrade); transform: scaleX(0); transform-origin: left;
}
.scene.joue .points li.actif::after { animation: fil-remplit var(--duree, 3s) linear forwards; }
.scene.joue.attente .points li.actif::after { animation-play-state: paused; }

/* Le module prioritaire, glissé sous la fidélisation */
.scene__module { margin-top: clamp(26px, 4vh, 44px); }
.scene__module p {
  max-width: 920px; padding-top: 18px; border-top: 1px solid var(--trait);
  color: var(--gris); font-size: .95rem; line-height: 1.5;
}
.scene__module b { color: var(--blanc); }

/* ==========================================================================
   5. MISE EN PLACE : les trois jours, sous l'animation
   ========================================================================== */
.chantier { display: grid; gap: 18px; }
.chantier .maquette3d { height: min(460px, 54svh); }
.jours { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.jours span {
  padding: 8px 14px; border: 1px solid var(--trait);
  font-size: .82rem; color: var(--gris-bas); white-space: nowrap;
  transition: color .4s, border-color .4s, background .4s;
}
.jours b { margin-right: 6px; font-weight: 700; }
[data-etape='0'] [data-jour='0'], [data-etape='1'] [data-jour='1'], [data-etape='2'] [data-jour='2'] {
  color: var(--blanc); border-color: var(--trait-fort); background: var(--noir-3);
}
[data-etape='1'] [data-jour='0'], [data-etape='2'] [data-jour='0'], [data-etape='2'] [data-jour='1'] { color: var(--gris); }


/* ==========================================================================
   RUPTURES
   ========================================================================== */
@media (max-width: 980px) {
  .scene__texte { max-width: none; }
  .points { display: none; }
}
@media (max-width: 640px) {
  .ouverture { padding-top: 104px; }
  .ouverture__texte { text-align: left; }
  .ouverture__titre { margin-left: 0; font-size: clamp(2.3rem, 11vw, 3rem); }
  .ouverture__actions { justify-content: stretch; flex-direction: column; }
  .ouverture__actions .btn { justify-content: center; }
  .scene--fixe .scene__colle { padding-bottom: calc(40px + (100lvh - 100svh)); }
  .scene__para { font-size: .94rem; }
  .scene__module p { font-size: .84rem; }
  .chantier { gap: 10px; }
  .chantier .maquette3d { height: calc(var(--visuel) - 50px); }
  .jours { gap: 6px; }
  .jours span { padding: 6px 9px; font-size: .7rem; }
}
/* le constat passe plus vite : les messages arrivent en rafale */
[data-scene='constat'][data-etape='0'] .desordre .bulle:not([data-vague]) { transition-delay: calc(var(--d) * .18); }
[data-scene='constat'][data-etape='1'] .bulle[data-vague='2'] { transition-delay: calc(var(--t, 0s) * .6); }
