/* ==========================================================================
   11 Beauty — accueil « histoire » de la variante immersive (18/09/2026)
   Version claire. Chargé uniquement par site-anime/index.html,
   par-dessus style.css + immersif.css.
   Pensé téléphone d'abord : rien n'est épinglé sous 900 px, le rail devient
   un carrousel au doigt, toutes les cibles font au moins 44 px.
   Sans JS : tout reste lisible, empilé, rien n'est caché.
   ========================================================================== */

.histoire { overflow: clip; }
.histoire .acte { position: relative; padding-block: clamp(92px, 14vh, 180px); }
.histoire .h-acte {
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 1.1rem + 3.6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 0 0 clamp(18px, 2.4vw, 26px);
}
.histoire .h-acte em { color: var(--teal-deep); font-style: italic; }
.acte-intro {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem);
  line-height: 1.65;
  margin: 0 0 clamp(34px, 5vw, 56px);
}

/* ---------- Repères de chapitre (souris et grand écran) ---------- */
.chapitres { display: none; }
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .chapitres {
    display: block;
    position: fixed;
    z-index: 40;
    right: clamp(14px, 2vw, 28px);
    top: 50%;
    transform: translateY(-50%);
  }
  .chapitres ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
  .chapitres a {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    min-height: 44px; text-decoration: none; color: var(--ink-soft); font-size: .78rem;
  }
  .chapitres a::after {
    content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
    border: 1px solid var(--line-strong); background: transparent;
    transition: background-color .35s, transform .35s, border-color .35s;
  }
  .chapitres span { opacity: 0; transform: translateX(6px); transition: opacity .35s, transform .35s; }
  .chapitres a:hover span, .chapitres a:focus-visible span { opacity: 1; transform: none; }
  .chapitres a.actif { color: var(--teal-deep); }
  .chapitres a.actif::after { background: var(--gold); border-color: var(--gold); transform: scale(1.4); }
  .chapitres a.actif span { opacity: 1; transform: none; }
}

/* ==========================================================================
   Ouverture
   ========================================================================== */
.acte--ouverture {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(clamp(92px, 13vw, 160px) + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(44px, 7vh, 90px);
}
.ouverture-grid { display: grid; gap: clamp(22px, 4vw, 72px); align-items: center; }
@media (min-width: 900px) { .ouverture-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.acte--ouverture .display {
  font-size: clamp(2.5rem, 1.1rem + 7.4vw, 5.6rem);
  line-height: 1.12;
  letter-spacing: -.028em;
  margin: 0;
}
.acte--ouverture .display em { color: var(--teal-deep); font-style: italic; }
.ouverture-lead {
  margin-top: clamp(20px, 3vw, 30px);
  max-width: 54ch;
  line-height: 1.68;
}
.ouverture-cta { margin-top: clamp(26px, 4vw, 38px); }

/* trois faits sous les boutons : lisibles au pouce, jamais coupés */
.hero-preuves {
  list-style: none;
  margin: clamp(30px, 4vw, 44px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 18px);
  max-width: 460px;
}
.hero-preuves li {
  display: grid;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}
.hero-preuves b {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem);
  line-height: 1.1;
  color: var(--night);
  font-variant-numeric: lining-nums tabular-nums;
}
.hero-preuves span { color: var(--ink-soft); font-size: .86rem; }

/* ---------- Le visuel d'ouverture : une vitrine dessinée, pas une photo ---------- */
.ouverture-visuel { order: -1; display: grid; place-items: center; }
@media (min-width: 900px) { .ouverture-visuel { order: 0; } }
.vitrine {
  position: relative;
  margin: 0;
  width: min(100%, 370px);
  aspect-ratio: 5 / 4;          /* au téléphone : large et basse, pour laisser
                                   le titre ET les boutons dans le premier écran */
  max-height: 30svh;
  display: grid;
  place-items: center;
  border-radius: clamp(28px, 5vw, 46px);
  background:
    radial-gradient(120% 90% at 30% 12%, #FFFFFF, rgba(255, 255, 255, 0) 62%),
    linear-gradient(155deg, #FFFDF8 0%, #F4EADA 52%, #EADFC9 100%);
  box-shadow: 0 1px 2px rgba(31, 42, 44, .05), 0 50px 90px -48px rgba(31, 42, 44, .45);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 900px) { .vitrine .medaillon { width: min(52%, 230px); } .vitrine { aspect-ratio: 4 / 5; width: min(100%, 460px); max-height: none; } }
.vitrine-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  fill: none;
  stroke: rgba(214, 178, 65, .8);
  stroke-width: 1.2;
  stroke-linecap: round;
}
.vitrine .medaillon {
  position: relative;
  z-index: 1;
  width: min(42%, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #FFFFFF, #FCF7EF 70%, #F3E9D8);
  box-shadow: 0 26px 50px -26px rgba(31, 42, 44, .5);
  will-change: transform;
}
.vitrine .medaillon img { width: 80%; height: auto; }
.vitrine .medaillon::before {
  content: ""; position: absolute; inset: -9%;
  border: 1px dashed rgba(214, 178, 65, .85); border-radius: 50%;
  animation: medaillon-tourne 52s linear infinite;
}
@keyframes medaillon-tourne { to { transform: rotate(360deg); } }
.vitrine-chip {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px -18px rgba(31, 42, 44, .6);
  font-size: clamp(.72rem, .68rem + .2vw, .82rem);
  color: var(--ink);
  white-space: nowrap;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.vitrine-chip--a { left: clamp(10px, 4%, 26px); top: clamp(14px, 7%, 40px); }
.vitrine-chip--b { right: clamp(10px, 4%, 26px); bottom: clamp(14px, 7%, 40px); }

.descendre {
  margin: clamp(34px, 5vh, 64px) 0 0;
  text-align: center;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.descendre span { display: inline-block; animation: respire 2.6s var(--ease) infinite; }
.descendre span::after { content: ""; display: block; width: 1px; height: 34px; margin: 12px auto 0; background: linear-gradient(var(--gold), transparent); }
@keyframes respire { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(7px); opacity: .45; } }

/* ==========================================================================
   Acte I : le rail
   ========================================================================== */
.rail-tete { margin-bottom: clamp(24px, 3.5vw, 40px); }
.rail-piste {
  display: flex;
  gap: clamp(16px, 2vw, 26px);
  padding-inline: var(--gutter);
  padding-block: 6px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.rail-piste::-webkit-scrollbar { display: none; }
.carte-fam {
  flex: 0 0 min(84vw, 360px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(26px, 3.4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  min-height: 390px;
}
.carte-fam h3 { font-size: clamp(1.45rem, 1.1rem + 1vw, 2rem); line-height: 1.12; }
.carte-fam p { color: var(--ink-soft); margin: 0; line-height: 1.6; }
.carte-fam .btn { margin-top: auto; align-self: flex-start; min-height: 44px; }
.fam-num { font-family: var(--f-display); font-size: 1.05rem; color: var(--gold); letter-spacing: .12em; }
.fam-detail { font-size: .9rem; padding-top: 12px; border-top: 1px solid var(--line); }
.fam-prix { color: var(--teal-deep) !important; font-weight: 600; }
.carte-fam--fort { background: linear-gradient(155deg, #FFFDF6, #F6EDDC); border-color: var(--line-strong); }

/* indicateur de carrousel au doigt */
.rail-points { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.rail-points i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); opacity: .35; transition: opacity .3s, transform .3s; }
.rail-points i.on { opacity: 1; transform: scale(1.5); background: var(--gold); }
@media (min-width: 900px) {
  .rail-points { display: none; }
  .histoire .acte--rail { padding-block: 0; }
  .rail-scene { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(70px, 10vh, 120px); }
  .rail-piste { overflow: visible; scroll-snap-type: none; flex-wrap: nowrap; will-change: transform; }
  .carte-fam { flex-basis: 380px; }
}

/* ==========================================================================
   Acte II : la journée
   ========================================================================== */
.journee-grid { display: grid; gap: clamp(28px, 4vw, 66px); }
@media (min-width: 900px) { .journee-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: start; } }
.journee-fixe .journee-num {
  font-family: var(--f-display);
  font-size: clamp(3.4rem, 2rem + 7vw, 8rem);
  line-height: 1;
  color: var(--night);
  margin: clamp(10px, 1.6vw, 18px) 0 0;
  font-variant-numeric: lining-nums tabular-nums;
}
.journee-num small { font-size: .3em; color: var(--ink-soft); margin-left: .2em; }
.journee-nom { color: var(--teal-deep); font-size: 1.05rem; margin: 8px 0 0; min-height: 1.6em; font-weight: 500; }
.journee-jauge { height: 3px; background: var(--line); border-radius: 3px; margin-top: 16px; overflow: hidden; }
.journee-jauge span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); }
@media (min-width: 900px) { .journee-fixe { position: sticky; top: 24vh; } }
.journee-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2.4vw, 26px); }
.etape {
  padding: clamp(24px, 3.2vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(31, 42, 44, .04), 0 24px 44px -34px rgba(31, 42, 44, .35);
  transition: border-color .5s, box-shadow .5s, transform .5s var(--ease-out);
}
.etape h3 { font-size: clamp(1.35rem, 1.05rem + .9vw, 1.9rem); margin-bottom: 10px; line-height: 1.15; }
.etape p { color: var(--ink-soft); margin: 0; line-height: 1.68; }
.etape-num { font-family: var(--f-display); color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: .84rem; margin: 0 0 8px; }
.etape-plus { margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; }
.etape.vue { border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(31, 42, 44, .04), 0 34px 56px -34px rgba(31, 42, 44, .45); }

/* ==========================================================================
   Acte III : le geste
   ========================================================================== */
.geste-grid { display: grid; gap: clamp(30px, 4.5vw, 70px); align-items: center; }
@media (min-width: 900px) { .geste-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.geste-dessin { display: grid; place-items: center; }
.geste-dessin svg {
  width: min(100%, 420px);
  height: auto;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.phrase {
  font-family: var(--f-display);
  font-size: clamp(1.85rem, 1.1rem + 3.1vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--ink);
}
.phrase .m { transition: color .5s, opacity .5s; }
.phrase.scrub .m { color: rgba(31, 42, 44, .20); }
.phrase.scrub .m.on { color: var(--ink); }
.geste-apres { margin-top: clamp(24px, 3vw, 36px); color: var(--ink-soft); line-height: 1.68; max-width: 56ch; }
.geste-note {
  margin-top: clamp(18px, 2.4vw, 26px);
  color: var(--ink-soft);
  font-size: .92rem;
  line-height: 1.6;
  border-left: 2px solid var(--gold);
  padding-left: 16px;
}

/* ==========================================================================
   Acte IV : les prix
   ========================================================================== */
.grille-prix { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(14px, 2vw, 22px); }
@media (min-width: 620px) { .grille-prix { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grille-prix { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bloc-prix {
  padding: clamp(26px, 3.2vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 210px;
}
.bloc-prix h3 { font-size: 1.18rem; margin: 8px 0 4px; line-height: 1.25; }
.bloc-prix p:last-child { color: var(--ink-soft); font-size: .9rem; margin: auto 0 0; line-height: 1.55; }
.chiffre {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4rem);
  line-height: 1.1;
  color: var(--night);
  margin: 0;
  font-variant-numeric: lining-nums tabular-nums;
}
.bloc-prix--fort { background: linear-gradient(155deg, #FFFDF6, #F6EDDC); border-color: var(--line-strong); }
.bloc-prix--fort .chiffre { color: var(--teal-deep); }
.prix-pied { margin-top: clamp(26px, 3vw, 38px); color: var(--ink-soft); max-width: 68ch; line-height: 1.65; }

/* ==========================================================================
   Acte V : final
   ========================================================================== */
.final-grid { display: grid; gap: clamp(30px, 4.5vw, 70px); align-items: center; }
@media (min-width: 900px) { .final-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.final-titre { font-size: clamp(2.4rem, 1.2rem + 5.4vw, 5rem); }
.final-faits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.final-faits li { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line-strong); }
.final-faits b {
  font-family: var(--f-display);
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem);
  color: var(--night);
  font-weight: 500;
  line-height: 1.12;
}
.final-faits span { color: var(--ink-soft); font-size: .94rem; line-height: 1.55; }

/* ---------- Titres découpés : préparés seulement si JS ----------
   La ligne masque ce qui dépasse pendant que le texte monte : il lui faut
   un peu d'air en bas, sinon la police de titre perd ses jambages. */
.histoire [data-lignes] .line { padding-block-end: .09em; }
.histoire [data-lignes] .line > span { display: block; }
.histoire [data-lignes] { line-height: 1.12; }
.js .histoire [data-lignes] .line > span { will-change: transform; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .vitrine .medaillon::before, .descendre span { animation: none; }
  .phrase.scrub .m { color: var(--ink); }
}
