/* Mon histoire avec le souffle. Clair et nacré au début, bleu-violet de l'accueil en descendant,
   bleu Release dans la nuit, crème à l'arrivée.
   Polices : Amaterasu utilise TWK Lausanne (payante) ; Hanken Grotesk est l'équivalent libre le plus proche.
   Les petits libellés reprennent ceux de l'accueil (DM Sans en capitales espacées, point pêche). */
@font-face { font-family: 'Hanken Grotesk'; src: url('/assets/hanken-grotesk-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/dm-sans-latin.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

body[data-page="/mon-histoire/"] {
  --s-ink: #1f2152;
  --s-soft: #8d8fc4;
  --s-cream: #f6efe6;
  --s-peach: #f3b58d;
  --s-blue: #192c44;
  --s-font: 'Hanken Grotesk', var(--sans);
  --s-label: 'DM Sans', var(--sans);
  background: var(--s-blue);
  color: var(--s-ink);
}
body[data-page="/mon-histoire/"] .site-header {
  position: fixed;
  inset: 0 0 auto;
  background: linear-gradient(to bottom, #fbf9f6e0 30%, #fbf9f600);
  color: var(--s-ink);
  transition: color .5s, background .5s;
}
body[data-page="/mon-histoire/"] .site-header .current-chapter { color: inherit; opacity: .75; }
body[data-page="/mon-histoire/"] .site-header .release-wordmark { filter: brightness(0) saturate(100%) invert(12%) sepia(30%) saturate(2400%) hue-rotate(220deg) opacity(.85); transition: none; }
body[data-page="/mon-histoire/"][data-souffle-dark] .site-header { color: #efeefe; background: linear-gradient(to bottom, #0f1a33cc 30%, #0f1a3300); }
body[data-page="/mon-histoire/"][data-souffle-dark] .site-header .release-wordmark { filter: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Socle ---------- */
.souffle, .souffle-doors { font-family: var(--s-font); }
.souffle { position: relative; }
.souffle-stage { position: relative; overflow: clip; isolation: isolate; }
.souffle-sky, .souffle-night, .souffle-dawn, .souffle-fx { position: absolute; inset: 0; pointer-events: none; }
.souffle-fx { z-index: 2; width: 100%; height: 100%; }

/* Ciel clair : nacre au départ, puis le bleu-violet de l'accueil (--tone de 0 à 1). */
.souffle-sky {
  z-index: -4; overflow: hidden;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, #fdfbf8, #e9e5f6 calc(var(--tone, 0) * 100%)) 0%,
      color-mix(in oklab, #f4eef0, #d5d0ee calc(var(--tone, 0) * 100%)) 50%,
      color-mix(in oklab, #ebe6f1, #bfbbe4 calc(var(--tone, 0) * 100%)) 100%);
}
/* Reflets qui dérivent lentement, comme sur Amaterasu */
.souffle-sky i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.souffle-sky i:nth-child(1) { width: 58vw; height: 46vw; left: -12vw; top: 30vh; background: radial-gradient(closest-side, #f7d9c4, transparent); animation: souffle-drift-a 26s ease-in-out infinite alternate; }
.souffle-sky i:nth-child(2) { width: 52vw; height: 40vw; right: -10vw; top: -8vh; background: radial-gradient(closest-side, #ccd3f6, transparent); animation: souffle-drift-b 31s ease-in-out infinite alternate; }
.souffle-sky i:nth-child(3) { width: 40vw; height: 34vw; left: 38vw; bottom: -14vh; background: radial-gradient(closest-side, #cfe6ea, transparent); opacity: .45; animation: souffle-drift-c 23s ease-in-out infinite alternate; }
@keyframes souffle-drift-a { to { transform: translate(14vw, -10vh) scale(1.15); } }
@keyframes souffle-drift-b { to { transform: translate(-12vw, 14vh) scale(.9); } }
@keyframes souffle-drift-c { to { transform: translate(-16vw, -8vh) scale(1.2); } }

/* Nuit : le bleu de Release, plus profond, avec une lueur froide en bas */
.souffle-night {
  z-index: -2;
  opacity: var(--night, 0);
  background:
    radial-gradient(ellipse 120% 40% at 50% 108%, #4f7fb099, transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 40%, #1f3a78, transparent 78%),
    linear-gradient(180deg, #0c1530 0%, #152a5a 60%, #1f3d6e 100%);
}
/* Arrivée : la lumière qui monte du bas puis l'écran crème */
.souffle-dawn {
  z-index: -1;
  opacity: var(--dawn, 0);
  background: radial-gradient(ellipse 90% 70% at 50% 60%, #fffaf3, #f6efe6 60%, #ece3d8);
}

.souffle h1, .souffle h2 { font-family: var(--s-font); font-weight: 330; letter-spacing: -.035em; line-height: 1.02; }
.souffle h1 .soft, .souffle h2 span, .souffle h2 .soft { color: var(--s-soft); }
.souffle h2 .line:not(.soft), .souffle h2 .line:not(.soft) .w { color: var(--s-ink); }
.souffle h2 .line.soft .w { color: var(--s-soft); }
.souffle p { font-size: clamp(1.05rem, 1.22vw, 1.22rem); line-height: 1.5; max-width: 36ch; font-weight: 400; }
.souffle-kicker {
  display: flex; align-items: center; gap: .8rem;
  font: 650 .9rem/1.35 var(--s-label) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--s-ink);
  max-width: none !important;
}
.souffle-kicker::before { content: ''; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--s-peach); }

/* Titre qui flotte : déjà écrit, il sort du flou mot par mot, par paliers */
[data-blur-title] .w {
  --k: clamp(0, calc(var(--hv, 0) * 4.2 - var(--i) * .7), 1);
  display: inline-block;
  opacity: calc(.28 + var(--k) * .72);
  filter: blur(calc((1 - var(--k)) * 14px));
}

/* ---------- Ouverture ---------- */
.souffle-emblem {
  --mark: url('/assets/release-embleme-or.webp');
  width: min(44vw, 106vh, 700px);
  aspect-ratio: 1900 / 1110;
  pointer-events: none;
}
.souffle-emblem-glass {
  width: 100%; height: 100%;
  -webkit-mask: var(--mark) center / contain no-repeat, linear-gradient(90deg, rgba(0,0,0,var(--fade-l, 1)), #000 50%, rgba(0,0,0,var(--fade-r, 1)));
  -webkit-mask-composite: source-in;
  mask: var(--mark) center / contain no-repeat, linear-gradient(90deg, rgba(0,0,0,var(--fade-l, 1)), #000 50%, rgba(0,0,0,var(--fade-r, 1)));
  mask-composite: intersect;
  background:
    radial-gradient(circle 15vw at calc(50% - var(--mx, 0) * 55%) calc(42% - var(--my, 0) * 50%), #fffdf6f0, #fff8e800 72%),
    linear-gradient(calc(115deg + var(--mx, 0) * 35deg), #f2dba6 0%, #ddb061 34%, #fbecc8 50%, #d3a24a 70%, #eed192 100%);
  opacity: .5;
}
.scene-opening { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.souffle-trait { position: absolute; left: 0; top: 0; overflow: visible; }
.souffle-trait path { fill: none; stroke: var(--s-ink); stroke-opacity: .26; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1 1; }
.souffle-trait .trait-up { stroke-dashoffset: calc(1 - var(--up, 0)); }
.souffle-trait .trait-down { stroke-dashoffset: calc(1 - var(--down, 0)); }
/* la lumière qui descend le long du trait et scintille, comme sur l'accueil */
.souffle-trait .trait-lit { stroke: #8d8fd8; stroke-opacity: .95; stroke-width: 1.6; stroke-dasharray: .07 1; filter: drop-shadow(0 0 5px #a9adff); animation: trait-run 6.5s cubic-bezier(.45,0,.2,1) infinite, trait-twinkle 1.6s ease-in-out infinite; }
@keyframes trait-run { from { stroke-dashoffset: .07; } to { stroke-dashoffset: -1; } }
@keyframes trait-twinkle { 50% { stroke-opacity: .45; } }
.opening-shade { position: absolute; left: -10vw; right: -10vw; top: calc(var(--label-y, 90vh) - 10vh); height: 120vh; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 60% 45% at 55% 45%, #c9c4ee88, transparent 70%), radial-gradient(ellipse 40% 30% at 30% 70%, #f2cdb666, transparent 70%); filter: blur(30px); }
.souffle-whisper { color: #2a2d63; font-size: clamp(1.1rem, 1.35vw, 1.35rem) !important; line-height: 1.5 !important; max-width: 27ch !important; }
.souffle-heading { text-align: center; }
.souffle-heading h1 { font-size: clamp(3.3rem, 5.8vw, 7rem); }
.souffle-heading .line { display: inline-block; filter: blur(var(--b1, 0px)); }
.souffle-heading .line.soft { filter: blur(var(--b2, 0px)); }
.door-title .line { display: inline-block; filter: blur(var(--b1, 0px)); opacity: calc(1 - var(--b1n, 0) * .7); }
.door-title .line.soft { filter: blur(var(--b2, 0px)); opacity: calc(1 - var(--b2n, 0) * .7); }
.souffle-lede { margin: 1.8rem auto 0; max-width: 42ch !important; color: #1b1d4c; opacity: var(--lv, 1); font-size: clamp(1.18rem, 1.42vw, 1.42rem) !important; }

/* ---------- Portrait : net, lumière de côté, projecteur à la souris ---------- */
.souffle-portrait {
  --mask: url('/assets/benjamin-profil-nuit-hd.webp');
  margin: 0;
  pointer-events: none;
}
.souffle-portrait img { width: 100%; height: auto; }
.souffle-sidelight, .souffle-spot {
  position: absolute; inset: 0;
  -webkit-mask: var(--mask) 0 0 / 100% 100% no-repeat; mask: var(--mask) 0 0 / 100% 100% no-repeat;
  mix-blend-mode: screen;
}
/* Comme un projecteur de la couleur du fond posé à droite */
.souffle-sidelight { background: linear-gradient(270deg, #b8c3f2b3 0%, #8f9be055 14%, transparent 34%); }
/* La lumière suit la souris : elle passe sur le visage et arrive dans les yeux */
.souffle-spot { display: none; }

/* ---------- Compteur cerclé ---------- */
.souffle-counter {
  position: absolute; z-index: 4; left: 0; top: 0;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: grid; place-items: center;
  font: 600 12px/1 var(--s-label); letter-spacing: .14em; color: var(--s-ink);
  transform: translate(var(--cx, 40vw), var(--cy, 55vh));
  opacity: var(--counter, 0);
  pointer-events: none;
}
.souffle-counter svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.souffle-counter circle { fill: none; stroke: var(--s-ink); stroke-opacity: .22; stroke-width: 1; vector-effect: non-scaling-stroke; }
.souffle-counter .souffle-counter-run { stroke-opacity: .9; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--run, 0)); }

/* ---------- Questions ---------- */
.souffle-questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.souffle-question {
  display: flex; align-items: center; gap: 1.6rem;
  padding: 1.7rem 2.6rem 1.7rem 2.2rem; border-radius: 999px;
  border: 1px solid #1f21522e; background: linear-gradient(120deg, #ffffff30, #ffffff08);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-size: clamp(1.15rem, 1.6vw, 1.6rem); font-weight: 330; letter-spacing: -.015em; line-height: 1.3;
  color: var(--s-ink);
}
.q-wave { flex: none; width: 2.6rem; fill: none; stroke: #8fb9d8; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 60; animation: q-wave 2.6s ease-in-out infinite; }
@keyframes q-wave { 0% { stroke-dashoffset: 60; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -60; } }
.q-word { color: #a5a7d0; transition: color .45s ease; }
.q-word.lit { color: var(--s-ink); }

/* ---------- Chiffres ---------- */
.figure strong { display: flex; align-items: flex-start; justify-content: center; font-weight: 230; letter-spacing: -.045em; line-height: 1; }
.reels { display: flex; }
.reel { display: block; height: 1em; overflow: hidden; }
.reel > span { display: flex; flex-direction: column; transform: translateY(calc(var(--roll, 0) * -1em)); }
.reel i { font-style: normal; display: block; height: 1em; }
.figure-label { display: block; font-size: clamp(1.15rem, 1.45vw, 1.5rem); color: #e4e7fb; }

/* ---------- Les portes : trois cercles reliés par un trait de lumière, comme les cercles de l'accueil ---------- */
.souffle-doors {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(6rem, 16vh, 11rem) clamp(1.4rem, 6vw, 8rem) clamp(5rem, 14vh, 9rem);
  background: linear-gradient(180deg, #f6efe6, #f1ebe8 45%, #e9e6f1);
  color: var(--s-ink); text-align: center;
}
.doors-light { position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 34% 30% at 20% 30%, #f3d3bd88, transparent 70%), radial-gradient(ellipse 40% 36% at 82% 70%, #cdd2f2aa, transparent 70%);
  animation: doors-drift 20s ease-in-out infinite alternate; }
@keyframes doors-drift { to { transform: translate(5%, -4%) scale(1.06); } }
.doors-kicker { display: inline-flex; align-items: center; gap: .7rem; font: 650 .72rem/1.3 var(--s-label); letter-spacing: .15em; text-transform: uppercase; }
.doors-kicker::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--s-peach); }
.souffle-doors h2 { margin-top: 1.2rem; font-size: clamp(2.8rem, 5vw, 5.6rem); font-weight: 330; letter-spacing: -.035em; line-height: 1.02; }
.doors-lede { margin: 1.1rem auto 0; font-size: clamp(1.1rem, 1.35vw, 1.3rem); color: #3d4078; }
.souffle-doors-grid {
  --c: clamp(13rem, 22vw, 19rem);
  position: relative; display: flex; justify-content: center; align-items: center; gap: clamp(1.5rem, 5vw, 5rem);
  margin: clamp(3rem, 8vh, 5rem) auto 0;
}
/* le fil qui relie les cercles, avec une lumière qui le parcourt sans la souris */
.souffle-doors-grid::before { content: ''; position: absolute; left: 10%; right: 10%; top: 50%; height: 1px; background: #1f215230; z-index: -1; }
.souffle-doors-grid::after {
  content: ''; position: absolute; top: calc(50% - 30px); left: 8%; width: 60px; height: 60px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, #ffffff, #c9c4f0aa 30%, transparent 70%);
  animation: doors-travel 7s cubic-bezier(.6,0,.22,1) infinite;
}
@keyframes doors-travel { from { left: 8%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } to { left: calc(92% - 60px); opacity: 0; } }
.souffle-doors-grid a {
  position: relative; display: grid; place-content: center; justify-items: center; gap: .8rem;
  width: var(--c); aspect-ratio: 1; border-radius: 50%; padding: 2rem;
  text-decoration: none; color: var(--s-ink);
  border: 1px solid #1f215238;
  background: radial-gradient(circle at 50% 120%, #c8c3ef00, transparent 60%) , #ffffff2e;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .7s var(--ease), border-color .6s, background .8s, box-shadow .7s;
}
.souffle-doors-grid small { display: flex; align-items: center; gap: .55rem; font: 650 .64rem/1.3 var(--s-label); letter-spacing: .16em; text-transform: uppercase; color: #565a90; }
.souffle-doors-grid small::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--s-peach); flex: none; }
.souffle-doors-grid strong { font-size: clamp(1.45rem, 2vw, 2rem); font-weight: 330; letter-spacing: -.03em; line-height: 1.05; }
.souffle-doors-grid span { font-size: 1.1rem; opacity: .6; transition: transform .6s var(--ease), opacity .6s; }
/* chaque cercle s'éclaire à son tour, même sans la souris */
.souffle-doors-grid a::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 80%, #d6d1f6, transparent 65%); opacity: 0; animation: door-breathe 9s ease-in-out infinite; }
.souffle-doors-grid a:nth-child(2)::after { animation-delay: 3s; }
.souffle-doors-grid a:nth-child(3)::after { animation-delay: 6s; }
@keyframes door-breathe { 0%, 100% { opacity: 0; } 18% { opacity: .75; } 40% { opacity: 0; } }
.souffle-doors-grid a > * { position: relative; z-index: 1; }
.souffle-doors-grid a:is(:hover, :focus-visible) { transform: translateY(-6px) scale(1.02); border-color: #1f215266; background: #ffffff80; box-shadow: 0 30px 70px -36px #1f215266; }
.souffle-doors-grid a:is(:hover, :focus-visible) span { transform: translateX(6px); opacity: 1; }

/* ---------- Lecture sans animation (pas de JS, mouvement réduit) ---------- */
.souffle:not(.is-film) .souffle-stage { padding: calc(var(--header) + 4rem) clamp(1.4rem, 8vw, 10rem) 5rem; background: linear-gradient(180deg, #fbf9f6, #e3e0f1); }
.souffle:not(.is-film) :is(.souffle-sky, .souffle-night, .souffle-dawn, .souffle-fx, .souffle-counter, .souffle-trait, .reels, .figure-suffix, .door-thread, .souffle-sidelight, .souffle-spot) { display: none; }
.souffle:not(.is-film) .souffle-emblem { margin: 0 0 3rem; width: min(60vw, 360px); }
.souffle:not(.is-film) .souffle-portrait { width: min(100%, 520px); margin: 3rem 0; }
.souffle:not(.is-film) :is(.scene, .scene-opening > *) { margin-block: 3rem; }
.souffle:not(.is-film) .souffle-heading { text-align: left; }
.souffle:not(.is-film) .souffle-lede { margin-inline: 0; }
.souffle:not(.is-film) .scene h2:not(.visually-hidden) { font-size: clamp(2.2rem, 4.5vw, 3.8rem); margin-bottom: 1.2rem; }
.souffle:not(.is-film) .scene p + p, .souffle:not(.is-film) .scene div + div { margin-top: 1em; }
.souffle:not(.is-film) .night-figure strong, .souffle:not(.is-film) .figure strong { font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 250; display: block; }
.souffle:not(.is-film) .figure strong { justify-content: flex-start; }
.souffle:not(.is-film) .figure-label { color: var(--s-soft); }
.souffle:not(.is-film) .souffle-question { margin-bottom: .8rem; }

/* ---------- Le film ---------- */
.souffle.is-film { height: var(--film-height, 3000vh); }
.is-film .souffle-stage { position: sticky; top: 0; height: 100vh; height: 100svh; }
.is-film .scene {
  position: absolute; inset: 0;
  opacity: var(--v, 0);
  visibility: var(--vis, hidden);
  transform: translateY(var(--lift, 0px));
  filter: blur(calc((1 - var(--v, 0)) * 10px));
  pointer-events: none;
}
.is-film .souffle-emblem {
  position: absolute; left: 50%; top: 40%; margin: 0;
  transform: translate(-50%, -50%) translateY(var(--ey, 0px)) perspective(900px) rotateY(calc(var(--mx, 0) * 24deg)) rotateX(calc(var(--my, 0) * -16deg));
  opacity: var(--emblem, 1);
  animation: souffle-emblem-in 2.6s cubic-bezier(.2,.7,.2,1) .4s both;
}
@keyframes souffle-emblem-in { from { opacity: 0; filter: blur(22px); } }
.is-film .scene-opening { transform: translate3d(0, calc(var(--sy, 0px) * -1), 0); visibility: var(--ovis, visible); }
.is-film .scene-opening > * { position: absolute; }
/* le libellé et le texte sur le même alignement, le point pêche en retrait comme sur Aleph */
.is-film .souffle-kicker:not(.scene-kicker) { left: calc(var(--trait-x, 47vw) + 3.4rem - 5px - .7rem); top: calc(var(--label-y, 90vh) - .45rem); white-space: nowrap; }
.is-film .souffle-whisper { left: calc(var(--trait-x, 47vw) + 3.4rem); top: calc(var(--label-y, 90vh) + 2.6rem); }
.is-film .souffle-heading { left: 50%; top: var(--title-y, 205vh); translate: -50% 0; width: min(92vw, 64rem); }

.is-film .souffle-portrait {
  position: absolute; z-index: 1;
  width: var(--pw, 75vh); left: var(--px, 30vw); top: var(--py, 0);
  transform: translate3d(var(--pmx, 0px), calc(var(--rise, 0) * 100vh + var(--pmy, 0px)), 0) perspective(1400px) rotateY(var(--ry, 0deg));
  opacity: var(--photo, 1);
}

.is-film .scene-kicker { position: absolute; left: 9vw; top: calc(58% - 7.5rem); }
.is-film .souffle-questions { position: absolute; inset: 0; display: block; }
.is-film .souffle-question {
  position: absolute; left: 0; top: 0; width: min(46vw, 36rem); transform-origin: left center;
  transform: translate3d(var(--qx, 60vw), var(--qy, 40vh), 0) translateY(-50%) scale(var(--qs, .45));
  opacity: var(--qo, 0); filter: blur(var(--qb, 10px));
  will-change: transform, opacity, filter;
}
.is-film .scene-chapter { padding: 0 clamp(1.4rem, 4vw, 4.5rem); display: grid; align-content: center; }
.is-film .scene-chapter h2 { font-size: clamp(3.2rem, 5.6vw, 6.6rem); margin-bottom: clamp(1.1rem, 3.2vh, 2.2rem); }
.is-film .scene-chapter p { max-width: 31ch; color: #262961; font-size: clamp(1.1rem, 1.3vw, 1.3rem); }
.is-film .scene-chapter p + p { margin-top: .8em; }
.scene-chaos .word-chaos, .scene-chaos .word-calme { color: var(--s-ink); }
.is-film .scene-chaos .word-chaos { opacity: calc(1 - var(--order, 0) * .6); }
.is-film .scene-chaos .word-calme { opacity: calc(.4 + var(--order, 0) * .6); }
.is-film .scene-chaos :is(.chaos-copy, .calme-copy) { grid-area: 2 / 1; }
.is-film .scene-chaos h2 { grid-area: 1 / 1; }
.is-film .scene-chaos .chaos-copy { opacity: calc(1 - var(--order, 0) * 2); filter: blur(calc(var(--order, 0) * 6px)); }
.is-film .scene-chaos .calme-copy { opacity: calc(var(--order, 0) * 2 - 1); filter: blur(calc((1 - var(--order, 0)) * 6px)); }
.is-film .scene-belief p { max-width: 31ch; }

/* Nuit : les textes arrivent du fond, grossissent et s'effacent */
.is-film .scene-night { color: #f1f2ff; }
.is-film .night-line {
  position: absolute; left: 50%; top: 47%; translate: -50% -50%;
  width: min(30ch, 84vw); text-align: center; max-width: none;
  font-size: clamp(1.15rem, 1.6vw, 1.55rem); line-height: 1.42; font-weight: 350;
  opacity: var(--lo, 0); filter: blur(var(--lb, 8px));
  transform: scale(var(--ls, .7));
}
.is-film .night-figure {
  position: absolute; left: var(--fx, 50%); top: var(--fy, 50%); translate: -50% -50%;
  display: grid; justify-items: center; gap: .55rem; max-width: none; text-align: center;
  opacity: var(--lo, 0); filter: blur(var(--lb, 8px));
  transform: scale(var(--ls, .7));
}
.night-figure strong { font-size: clamp(3.6rem, 6vw, 6.4rem); font-weight: 230; letter-spacing: -.04em; line-height: 1; }
.night-figure span { font: 650 .6rem/1.4 var(--s-label); letter-spacing: .18em; text-transform: uppercase; color: #d8dbf6; max-width: 22ch; }
.night-figure[data-at="left"] { --fx: 38%; --fy: 47%; }
.night-figure[data-at="right"] { --fx: 60%; --fy: 40%; }
.night-figure[data-at="low"] { --fx: 46%; --fy: 56%; }

.is-film .scene-sky { color: #f1f2ff; display: grid; place-content: center; text-align: center; justify-items: center; padding: 0 1.4rem; }
.is-film .scene-sky h2 { font-size: clamp(3rem, 5.6vw, 6.6rem); max-width: 14ch; margin-bottom: 2rem; transform: scale(var(--ss, 1)); filter: blur(var(--sb, 0px)); }
.is-film .scene-sky p { opacity: var(--sp, 1); }
.is-film .scene-sky p { max-width: 44ch; color: #dcdcf6; margin-inline: auto; }

.is-film .scene-figures { color: #f3f4ff; display: grid; place-content: center; text-align: center; }
.is-film .figure { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 100%; max-width: none; display: grid; justify-items: center; transform: translateY(var(--fly, 0px)); }
.is-film .figure strong { font-size: clamp(6rem, 14vw, 14rem); }
.is-film .figure-static { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.is-film .figure-suffix { opacity: var(--suffix, 0); }
.is-film .figure-label { position: absolute; left: 0; right: 0; top: 100%; margin-top: 1.4rem; opacity: var(--suffix, 0); }
.is-film .figure strong { position: relative; }

/* Arrivée sur le crème */
.is-film .scene-door { display: block; color: var(--s-ink); }
.is-film .scene-door h2 { position: absolute; left: 50%; top: 22%; translate: -50% 0; width: min(92vw, 60rem); text-align: center; font-size: clamp(3rem, 5.4vw, 6.4rem); }
.door-thread { position: absolute; left: calc(50% - 4.5rem); top: 52%; width: 6rem; height: 48%; fill: none; overflow: visible; }
.door-thread path { stroke: var(--s-ink); stroke-opacity: .22; stroke-width: 1; vector-effect: non-scaling-stroke; }
.door-thread .door-lit { stroke: #7f87d6; stroke-opacity: .9; stroke-width: 1.6; stroke-dasharray: .12 1; filter: drop-shadow(0 0 5px #9aa3ff); animation: door-run 5s cubic-bezier(.55,0,.25,1) infinite; }
@keyframes door-run { from { stroke-dashoffset: .14; } to { stroke-dashoffset: -1; } }
.is-film .door-note { position: absolute; left: calc(50% + 2.5rem); top: 56%; }
.door-note p:not(.souffle-kicker) { margin-top: 1.4rem; color: #3b3e78; font-size: clamp(1.15rem, 1.4vw, 1.4rem); max-width: 26ch; }

@media (max-width: 760px) {
  .souffle-emblem { width: min(74vw, 340px); }
  .is-film .souffle-whisper { left: calc(var(--trait-x, 10vw) + 1.6rem); right: 1.2rem; max-width: none !important; }
  .is-film .souffle-heading h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); }
  .is-film .scene-chapter { align-content: start; padding-top: calc(var(--header) + 1.5rem); }
  .is-film .scene-chapter h2 { font-size: clamp(2.5rem, 11vw, 3.4rem); margin-bottom: .9rem; }
  .is-film .scene-chapter p { font-size: 1.02rem; max-width: 32ch; text-shadow: 0 0 18px #ecebfa; }
  .is-film .scene-kicker { left: 7vw; top: calc(58% - 7rem); }
  .is-film .souffle-question { font-size: 1.05rem; width: 84vw; padding: 1.2rem 1.6rem; gap: 1rem; border-radius: 40px; }
  .souffle-counter { width: 68px; height: 68px; margin: -34px 0 0 -34px; font-size: 10px; }
  .night-figure[data-at="left"] { --fx: 32%; --fy: 34%; }
  .night-figure[data-at="right"] { --fx: 68%; --fy: 30%; }
  .night-figure[data-at="low"] { --fx: 50%; --fy: 64%; }
  .is-film .scene-sky h2 { font-size: clamp(2.4rem, 10vw, 3.2rem); }
  .is-film .scene-door h2 { top: 18%; font-size: clamp(2.5rem, 10vw, 3.2rem); }
  .door-thread { left: 1.2rem; top: 46%; }
  .is-film .door-note { left: 3.6rem; right: 1.4rem; top: 50%; }
  .souffle-doors-grid { flex-direction: column; --c: min(66vw, 15rem); gap: 1.4rem; }
  .souffle-doors-grid::before { left: 50%; right: auto; top: 6%; bottom: 6%; width: 1px; height: auto; }
  .souffle-doors-grid::after { display: none; }
}

/* ---------- Ajustements du 24/11 ---------- */
/* Logo en verre bleu, comme le λ0 d'Aleph : plus grand, transparent, couleurs du site, reflet instable */
.souffle-emblem { width: min(47.6vw, 102vh, 765px); }
.is-film .souffle-emblem { top: 46%; }
.souffle-emblem-glass {
  background:
    radial-gradient(circle 16vw at calc(34% + var(--mx, 0) * 42%) calc(38% + var(--my, 0) * 36%), #ffffffe6, #ffffff00 70%),
    radial-gradient(ellipse 30% 60% at calc(72% - var(--mx, 0) * 30%) 62%, #c9d0ff99, #c9d0ff00 70%),
    linear-gradient(calc(102deg + var(--mx, 0) * 40deg), #f3fbff2e 0%, #c4e8f3a6 26%, #9ed6ead0 44%, #b6c3f2b8 62%, #e5ecff55 82%, #ffffff1a 100%);
  opacity: .92;
}
.is-film .souffle-emblem {
  transform: translate(-50%, -50%) translateY(var(--ey, 0px)) perspective(1100px) rotateY(calc(var(--mx, 0) * 11deg)) rotateX(calc(var(--my, 0) * -7deg));
}

/* Trait plus discret ; le halo qui descend est un vrai halo, lumineux et flou */
.souffle-trait path { stroke-opacity: .15; }
.souffle-trait .trait-lit { stroke: #f1f2ff; stroke-width: 1.4; stroke-dasharray: .09 1; filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 10px #b9bdff); }
.souffle-trait .trait-halo {
  stroke: #c7cbff; stroke-opacity: .7; stroke-width: 16; stroke-linecap: round; stroke-dasharray: .1 1;
  filter: blur(9px); mix-blend-mode: screen;
  animation: trait-run 6.5s cubic-bezier(.45,0,.2,1) infinite, trait-halo-breathe 2.3s ease-in-out infinite;
}
@keyframes trait-halo-breathe { 50% { stroke-opacity: .4; stroke-width: 22; } }

/* Aligné comme sur Aleph : le texte commence sur le point du libellé, plus loin du trait */
.is-film .souffle-kicker:not(.scene-kicker) { left: calc(var(--trait-x, 47vw) + clamp(3.4rem, 5.6vw, 7rem)); }
.is-film .souffle-whisper { left: calc(var(--trait-x, 47vw) + clamp(3.4rem, 5.6vw, 7rem)); }
/* « Le souffle a frappé à ma porte » : un vrai halo lumineux et flou qui descend le long du fil */
.door-thread path { stroke-opacity: .14; }
.door-thread .door-lit { stroke: #ffffff; stroke-width: 1.4; stroke-dasharray: .1 1; filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 12px #aab2ff); animation: door-run 5.5s cubic-bezier(.45,0,.2,1) infinite; }
.door-thread .door-halo { stroke: #c3c8ff; stroke-opacity: .75; stroke-width: 18; stroke-linecap: round; stroke-dasharray: .12 1; filter: blur(10px); animation: door-run 5.5s cubic-bezier(.45,0,.2,1) infinite, trait-halo-breathe 2.4s ease-in-out infinite; }

/* « Le souffle a frappé à ma porte » : le fil seul, sans lumière qui descend, et il s'efface avant le bas */
.door-thread .door-lit, .door-thread .door-halo { display: none; }
.door-thread { -webkit-mask-image: linear-gradient(#000 45%, transparent 92%); mask-image: linear-gradient(#000 45%, transparent 92%); }

/* Et toi ? : plusieurs lignes, les questions plus discrètes */
.is-film .door-note { top: 50%; }
.door-note .door-first { margin-top: 0; max-width: 30ch; }
.door-note .souffle-kicker { margin-top: 1.1rem; }
.door-note p:not(.souffle-kicker) { margin-top: 1.1rem; font-size: clamp(1.15rem, 1.4vw, 1.4rem); color: #3b3e78; max-width: 30ch; line-height: 1.4; }
.door-note p.door-first { margin-top: 0; }
/* La section « Et toi, ton souffle ? » apparaît dans un fondu, sans coupure nette avec la scène qui précède */
body[data-page="/mon-histoire/"] #portes { margin-top: -10rem; padding-top: calc(clamp(5rem, 12vh, 8rem) + 10rem);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10rem); mask-image: linear-gradient(to bottom, transparent 0, #000 10rem); }

/* Les questions et leur titre, un peu plus bas */
.is-film .scene-kicker { top: calc(65% - 7.5rem); }

/* Téléphone : images plus légères (moins de mémoire), et le portrait reste caché tant que le film n'a pas démarré */
@media (max-width: 760px) { .souffle-portrait { --mask: url('/assets/benjamin-profil-nuit-mobile.webp'); } }
.is-film .souffle-portrait { opacity: var(--photo, 0); }
