/* LitKeys — page d'accueil
   Nuit chaude (laque d'un piano), ivoire (les touches, le papier d'un programme),
   rouge « touche allumée » (celui du produit). */

@font-face {
  font-family: "Instrument Serif";
  src: url("../polices/instrument-serif.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  src: url("../polices/instrument-serif-italique.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../polices/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
/* Newsreader n'a ni bémol, ni dièse, ni noire : on les prend dans Instrument Serif */
@font-face {
  font-family: "Newsreader";
  src: url("../polices/instrument-serif.woff2") format("woff2");
  font-weight: 200 800;
  unicode-range: U+266D, U+266F, U+2669, U+2190-2193, U+2009, U+202F;
  font-display: swap;
}

:root {
  --nuit: #0b0908;
  --nuit-2: #14110f;
  --ivoire: #f2ece1;
  --ivoire-2: #e7dfd1;
  --papier: #f4efe6;
  --encre: #1b1714;
  --encre-2: #5b5148;
  --texte: #ece5d9;
  --texte-2: #bfb5a6;
  --texte-3: #8a8174;
  --rouge: #e5383b;
  --rouge-vif: #ff5a4f;
  --rouge-encre: #b3261e;
  --ambre: #f0a04b;
  --rose: #f2c4c4;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --texte-police: "Newsreader", "Iowan Old Style", Georgia, serif;
  --barre: 64px;
  --marge: clamp(20px, 6vw, 96px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--nuit);
  color: var(--texte);
  font: 400 18px/1.55 var(--texte-police);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}
.film, .seul { overflow-x: clip; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--rouge); color: #fff; }

/* deux langues dans la page : on montre celle du document */
html[lang="en"] [lang="fr"], html[lang="fr"] [lang="en"] { display: none !important; }

.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.evitement {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ivoire); color: var(--encre); padding: 10px 14px; text-decoration: none;
}
.evitement:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--rouge-vif); outline-offset: 3px; }

/* ---------- barre du haut ---------- */
.barre {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--barre);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(14px, 3vw, 36px);
  padding-top: env(safe-area-inset-top);
  background: rgba(11, 9, 8, 0);
  border-bottom: 1px solid transparent;
  transition: color 0.35s, background-color 0.35s, border-color 0.35s;
}
.barre.defilee {
  background: rgba(11, 9, 8, 0.78);
  border-bottom-color: rgba(242, 236, 225, 0.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}
.barre.claire {
  color: var(--encre);
  background: rgba(242, 236, 225, 0.86);
  border-bottom-color: rgba(27, 23, 20, 0.1);
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marque-touches { width: 22px; height: 20px; }
.marque-touches .b { fill: var(--ivoire); stroke: rgba(0, 0, 0, 0.35); stroke-width: 0.6; }
.marque-touches .b.allumee { fill: var(--rouge); }
.marque-touches .n { fill: #161210; }
.barre.claire .marque-touches .b { fill: #fff; stroke: rgba(27, 23, 20, 0.5); }
.barre.claire .marque-touches .b.allumee { fill: var(--rouge); }
.marque-nom { font: 400 27px/1 var(--serif); letter-spacing: 0.005em; }
.barre-outils { display: flex; align-items: center; gap: clamp(8px, 1.4vw, 18px); }

.langues { display: flex; align-items: center; }
.langues button {
  background: none; border: 0; padding: 8px 7px 7px;
  font: 600 12px/1 var(--texte-police); letter-spacing: 0.14em;
  opacity: 0.5; position: relative;
}
.langues button + button::before {
  content: ""; position: absolute; left: -1px; top: 8px; bottom: 7px; width: 1px;
  background: currentColor; opacity: 0.4;
}
.langues button[aria-pressed="true"] { opacity: 1; }
.langues button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 7px; right: 7px; bottom: 2px; height: 1.5px; background: var(--rouge);
}
.langues button:hover { opacity: 1; }

.son {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid rgba(242, 236, 225, 0.28); border-radius: 999px;
  padding: 6px 13px 6px 10px; font: 500 13px/1 var(--texte-police); white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.barre.claire .son { border-color: rgba(27, 23, 20, 0.3); }
.son:hover { border-color: var(--rouge); }
.son[aria-pressed="true"] { border-color: var(--rouge); }
.son-etiquette { display: none; }
[data-son][data-etat="eteint"] .son-etiquette[data-etat-son="eteint"],
[data-son][data-etat="accordage"] .son-etiquette[data-etat-son="accordage"],
[data-son][data-etat="allume"] .son-etiquette[data-etat-son="allume"],
[data-son]:not([data-etat]) .son-etiquette[data-etat-son="eteint"] { display: inline; }

.mini-octave { width: 29px; height: 16px; flex: none; overflow: visible; }
.mini-octave .b { fill: var(--ivoire); }
.mini-octave .n { fill: #1c1714; stroke: var(--ivoire); stroke-width: 0.5; }
.barre.claire .mini-octave .b { fill: #fff; stroke: rgba(27, 23, 20, 0.55); stroke-width: 0.6; }
.mini-octave .on { fill: var(--rouge) !important; }
[data-etat="accordage"] .mini-octave .b { animation: accordage 1.2s ease-in-out infinite; }
[data-etat="accordage"] .mini-octave .b:nth-child(2) { animation-delay: 0.1s; }
[data-etat="accordage"] .mini-octave .b:nth-child(3) { animation-delay: 0.2s; }
[data-etat="accordage"] .mini-octave .b:nth-child(4) { animation-delay: 0.3s; }
[data-etat="accordage"] .mini-octave .b:nth-child(5) { animation-delay: 0.4s; }
[data-etat="accordage"] .mini-octave .b:nth-child(6) { animation-delay: 0.5s; }
[data-etat="accordage"] .mini-octave .b:nth-child(7) { animation-delay: 0.6s; }
@keyframes accordage { 0%, 100% { fill: var(--ivoire); } 40% { fill: var(--rouge); } }

.barre-envoi {
  text-decoration: none; white-space: nowrap;
  font: 500 14px/1 var(--texte-police);
  padding: 10px 15px 11px;
  background: var(--ivoire); color: var(--encre);
  border-radius: 2px 2px 6px 6px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.barre.claire .barre-envoi { background: var(--encre); color: var(--ivoire); }
.barre-envoi:hover, .barre.claire .barre-envoi:hover {
  background: var(--rouge); color: #fff; box-shadow: 0 6px 24px -8px rgba(229, 56, 59, 0.8);
}

/* ---------- boutons : des touches qui s'allument ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 17px/1 var(--texte-police);
  padding: 16px 24px 17px;
  border-radius: 2px 2px 7px 7px;
  text-decoration: none; border: 0;
  transition: background 0.18s, color 0.18s, box-shadow 0.25s, transform 0.08s, border-color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.bouton:active { transform: translateY(1.5px); }
.bouton-plein { background: var(--ivoire); color: var(--encre); }
.bouton-plein:hover {
  background: var(--rouge); color: #fff;
  box-shadow: 0 0 0 1px rgba(229, 56, 59, 0.5), 0 14px 44px -12px rgba(229, 56, 59, 0.85);
}
.bouton-ecoute, .bouton-trait {
  background: transparent; color: var(--texte);
  box-shadow: inset 0 0 0 1px rgba(242, 236, 225, 0.32);
}
.bouton-ecoute:hover, .bouton-trait:hover { box-shadow: inset 0 0 0 1px var(--rouge); }
.bouton-ecoute[aria-pressed="true"], .bouton-trait[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px var(--rouge), 0 10px 36px -14px rgba(229, 56, 59, 0.9);
}
.fleche { font-family: var(--serif); font-size: 1.15em; line-height: 0; transform: translateY(-0.04em); }

/* ---------- le film ---------- */
.film { position: relative; }
.film-scene {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
}
.film-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.legende-scene {
  position: absolute; right: var(--marge); bottom: calc(27% + 16px);
  max-width: 30ch; text-align: right;
  font: italic 400 15px/1.35 var(--serif); letter-spacing: 0.01em;
  color: rgba(242, 236, 225, 0.55);
  opacity: var(--legende, 1);
  pointer-events: none;
}
.film-etapes { position: relative; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.etape {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--barre) + 2vh) var(--marge) 4vh;
}
.etape:not(.etape-ouverture):not(.etape-questions) { min-height: 86vh; min-height: 86svh; }
.etape .texte {
  pointer-events: auto;
  max-width: 31vw;
  opacity: var(--presence, 1);
  transform: translate3d(0, calc(var(--avant, 0) * -7vh), 0);
  will-change: opacity, transform;
}

.surtitre {
  display: flex; align-items: center; gap: 12px;
  font: 600 12px/1.2 var(--texte-police); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--texte-2);
  margin-bottom: 22px;
}
.surtitre::before {
  content: ""; width: 7px; height: 13px; border-radius: 1px 1px 2.5px 2.5px;
  background: var(--rouge); box-shadow: 0 0 12px rgba(229, 56, 59, 0.8);
  flex: none;
}
.film h2, .ecoute h2, .programme h2 {
  font: 400 clamp(36px, min(4.3vw, 7.6vh), 78px)/1.02 var(--serif);
  letter-spacing: -0.008em;
  margin-bottom: 0.5em;
  text-wrap: balance;
}
.film h2 em, .offre-titre em, .seul h2 em { font-style: italic; }
.film .texte p:not(.surtitre):not(.question):not(.petit):not(.note-offerte):not(.chapeau):not(.reponse) {
  font-size: clamp(17px, 1.3vw, 20px); color: #d6cec1; max-width: 32em; text-wrap: pretty;
}
.film .texte > .bouton, .film .texte > .commandes { margin-top: 30px; }
.petit { margin-top: 22px; font: italic 15px/1.4 var(--serif); color: var(--texte-3); letter-spacing: 0.01em; }
.petit + .petit { margin-top: 6px; }
.clavier-ordi { color: var(--texte-2); }
@media (hover: none), (pointer: coarse) { .clavier-ordi { display: none !important; } }

/* ouverture */
.etape-ouverture { justify-content: flex-start; padding-top: calc(var(--barre) + 7vh); }
.etape-ouverture .texte { max-width: min(38vw, 640px); transform: translate3d(0, calc(var(--avant, 0) * -12vh), 0); }
.titre-ouverture {
  font: 400 clamp(40px, min(4.3vw, 8vh), 88px)/0.94 var(--serif);
  letter-spacing: -0.016em;
  margin-bottom: 0.3em;
}
.titre-ouverture em { display: block; font-style: italic; color: var(--ivoire); }
.chapeau {
  font-size: clamp(17px, 1.32vw, 21px); line-height: 1.5; color: #d9d1c4;
  max-width: 33em; text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.note-offerte { margin-top: 16px; font: italic 16px/1.3 var(--serif); color: var(--texte-2); letter-spacing: 0.01em; }
.note-offerte a { color: var(--ivoire); text-underline-offset: 3px; }

/* la Toccata de Bach par Pierre-Yves Plat (messages 44 et 45 du mandant) : sa vraie vidéo posée sur la zone vidéo
   de la scène (variables --vx… écrites à chaque image par js/accueil.js), les notes qui tombent dessous, le clavier */
.plat-video {
  position: absolute; z-index: 2; margin: 0;
  left: var(--vx, 0); top: var(--vy, 0); width: var(--vw, 0); height: var(--vh, 0);
  opacity: var(--vo, 0);
}
.plat-video.cachee { visibility: hidden; pointer-events: none; }
.plat-vignette, .plat-cadre {
  display: block; position: relative; width: 100%; height: 100%; padding: 0; border: 0;
  border-radius: 8px; overflow: hidden; background: #000; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(242, 236, 225, 0.16), 0 26px 60px -30px rgba(229, 56, 59, 0.7);
}
.plat-vignette img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.plat-vignette:hover img { transform: scale(1.02); }
.plat-vignette:focus-visible { outline: 2px solid var(--ivoire); outline-offset: 3px; }
.plat-lecture {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px 10px 12px; border-radius: 5px; background: rgba(11, 9, 8, 0.84); color: var(--ivoire);
  font: 500 15px/1.1 var(--texte-police); text-align: left;
}
.plat-triangle { flex: none; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--rouge); }
.plat-cadre iframe, .plat-cadre > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.plat-texte { margin-top: 6px; }
.plat-qui { font: italic 400 clamp(17px, 1.3vw, 21px)/1.35 var(--serif); color: #d9d1c4; max-width: 26em; text-wrap: pretty; }
.plat-partition { margin-top: 10px; font: 500 15px/1.3 var(--texte-police); }
.plat-partition a { color: var(--ivoire); text-decoration-color: var(--rouge); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.plat-qui, .plat-partition { text-shadow: 0 0 2px rgba(11, 9, 8, 0.9), 0 0 14px rgba(11, 9, 8, 0.85); }
.en-video .etape-ouverture .bouton-ecoute { display: none; }
.etape-ouverture .legende-scene {
  position: static; max-width: 40ch; margin-top: 18px; text-align: left; font-size: 14px;
}
.js .etape-ouverture .plat-texte { animation: entree 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) 0.8s both; }

/* entrée de l'ouverture */
.js .etape-ouverture .surtitre, .js .etape-ouverture .titre-ouverture > span > *, .js .etape-ouverture .titre-ouverture > span,
.js .etape-ouverture .chapeau, .js .etape-ouverture .actions, .js .etape-ouverture .note-offerte, .js .legende-entree {
  animation: entree 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.js .etape-ouverture .titre-ouverture em { animation-delay: 0.62s; }
.js .etape-ouverture .titre-ouverture > span { animation-delay: 0.35s; }
.js .etape-ouverture .chapeau { animation-delay: 0.9s; }
.js .etape-ouverture .actions { animation-delay: 1.05s; }
.js .etape-ouverture .note-offerte { animation-delay: 1.2s; }
.js .legende-entree { display: block; animation-delay: 1.6s; }
@keyframes entree {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* questions */
.etape-questions { justify-content: center; }
.etape-questions .texte { max-width: min(78vw, 1100px); }
.question {
  font: italic 400 clamp(40px, min(6.4vw, 11vh), 116px)/1 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ivoire);
}
.question.q2 { margin: 0.12em 0 0 clamp(40px, 12vw, 220px); color: rgba(242, 236, 225, 0.78); }
.question, .reponse, .chapeau { text-shadow: 0 0 2px rgba(11, 9, 8, 0.9), 0 0 14px rgba(11, 9, 8, 0.85); }
.reponse {
  margin-top: 1.6em; margin-left: clamp(40px, 12vw, 220px);
  font-size: clamp(17px, 1.35vw, 21px); color: #d9d1c4; max-width: 30em; text-wrap: pretty;
}
.etape-questions .question { transform: translate3d(calc(var(--avant, 0) * 6vw), 0, 0); }
.etape-questions .question.q2 { transform: translate3d(calc(var(--avant, 0) * -5vw), 0, 0); }

/* commandes de l'étape « ralentir » */
.commandes { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.tempo { display: grid; gap: 8px; min-width: 220px; flex: 1 1 220px; max-width: 320px; }
.tempo-titre {
  display: flex; justify-content: space-between; align-items: baseline;
  font: 600 12px/1 var(--texte-police); letter-spacing: 0.16em; text-transform: uppercase; color: var(--texte-2);
}
.tempo output { font: italic 400 24px/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ivoire); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: none; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgba(242, 236, 225, 0.25); }
input[type="range"]::-moz-range-track { height: 2px; background: rgba(242, 236, 225, 0.25); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--rouge); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 24px; margin-top: -11px;
  background: var(--ivoire); border-radius: 1px 1px 4px 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 24px; border: 0;
  background: var(--ivoire); border-radius: 1px 1px 4px 4px;
}
input[type="range"]:active::-webkit-slider-thumb { background: var(--rouge); }
.reprise {
  width: 14px; height: 18px; flex: none;
  background:
    radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 4px / 5px 5px no-repeat,
    radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 10px / 5px 5px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 0 / 1.2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 11px 0 / 3px 100% no-repeat;
}

/* ---------- comment ça marche ---------- */
.ecoute {
  background: var(--ivoire); color: var(--encre);
  color-scheme: light;
  padding: calc(var(--barre) + 14vh) var(--marge) 10vh;
  position: relative;
  /* une feuille posée sur la nuit */
  box-shadow: 0 -40px 80px -20px rgba(0, 0, 0, 0.7), 0 40px 80px -20px rgba(0, 0, 0, 0.7);
  z-index: 1;
}
.ecoute::before {
  /* grain du papier */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}
.ecoute .surtitre { color: var(--encre-2); }
.ecoute-entete { max-width: 980px; position: relative; }
.ecoute h2 { font-size: clamp(40px, min(5.4vw, 9vh), 96px); margin-bottom: 0; }
.ecoute-film {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 5vw;
  margin-top: 8vh; position: relative;
}
.ecoute-scene {
  grid-column: 2; grid-row: 1;
  position: sticky; top: calc(var(--barre) + 6vh);
  height: calc(100vh - var(--barre) - 14vh); height: calc(100svh - var(--barre) - 14vh);
}
.ecoute-scene canvas { width: 100%; height: 100%; display: block; }
.ecoute-etapes { grid-column: 1; grid-row: 1; list-style: none; padding: 0; margin: 0; }
.ecoute-etapes li {
  min-height: 62vh; min-height: 62svh;
  display: flex; gap: 22px; align-items: flex-start;
  padding-top: 18vh;
  opacity: 0.28; transition: opacity 0.5s;
}
.ecoute-etapes li:first-child { padding-top: 6vh; }
.ecoute-etapes li:last-child { min-height: 100vh; min-height: 100svh; }
.ecoute-etapes li[data-actif] { opacity: 1; }
.ecoute-etapes .num {
  font: italic 400 46px/0.85 var(--serif); color: var(--rouge-encre); min-width: 0.9em;
  font-variant-numeric: lining-nums;
}
.ecoute-etapes p {
  font: 400 clamp(23px, min(2.1vw, 3.7vh), 36px)/1.18 var(--serif);
  letter-spacing: -0.003em; text-wrap: pretty;
}

/* ---------- piano seul ---------- */
.seul { position: relative; height: 240vh; height: 240svh; }
.seul-scene { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.seul-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.seul-texte { position: relative; text-align: center; padding: 0 var(--marge); max-width: 1200px; }
.seul h2 {
  font: 400 clamp(52px, min(9vw, 15vh), 168px)/0.92 var(--serif);
  letter-spacing: -0.015em; text-shadow: 0 2px 40px rgba(11, 9, 8, 0.9);
}
.seul h2 em { display: block; }
.intrus {
  list-style: none; padding: 0; margin: 4vh 0 3.5vh;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px;
  font: italic 400 clamp(22px, 2.4vw, 38px)/1.2 var(--serif); color: var(--texte-2);
}
.intrus li { position: relative; opacity: var(--vu, 0); transform: translateY(calc((1 - var(--vu, 0)) * 12px)); }
.intrus li::after {
  content: ""; position: absolute; left: -4%; top: 55%; height: 2px; width: calc(108% * var(--raye, 0));
  background: var(--rouge); box-shadow: 0 0 10px rgba(229, 56, 59, 0.7);
}
.seul-texte p { font-size: clamp(17px, 1.35vw, 21px); color: #d9d1c4; max-width: 30em; margin: 0 auto; text-shadow: 0 1px 20px rgba(11, 9, 8, 1); }

/* ---------- ce que ça engage ---------- */
.offre { padding: 22vh var(--marge) 18vh; position: relative; }
.offre-titre {
  font: 400 clamp(54px, min(9vw, 16vh), 170px)/0.9 var(--serif);
  letter-spacing: -0.016em; max-width: 12ch;
}
.offre-titre em { display: block; color: var(--ivoire); position: relative; width: fit-content; }
.offre-titre em::after {
  content: ""; position: absolute; left: 0.04em; right: 0.02em; bottom: 0.02em; height: 0.045em;
  background: var(--rouge); box-shadow: 0 0 24px rgba(229, 56, 59, 0.75);
  transform-origin: left; transform: scaleX(1);
  transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.1, 1) 0.25s;
}
.js .offre:not(.vu) .offre-titre em::after { transform: scaleX(0); }
.engagements { margin-top: 12vh; max-width: 1060px; margin-left: auto; border-top: 1px solid rgba(242, 236, 225, 0.16); }
.engagements > div {
  display: grid; grid-template-columns: minmax(150px, 0.34fr) 1fr; gap: 24px;
  padding: 30px 0 32px; border-bottom: 1px solid rgba(242, 236, 225, 0.16);
}
.engagements dt { font: italic 400 clamp(26px, 2.3vw, 36px)/1.05 var(--serif); }
.engagements dd { font-size: clamp(18px, 1.4vw, 22px); line-height: 1.5; color: #d9d1c4; max-width: 34em; padding-top: 0.2em; }
.qui {
  max-width: 1060px; margin: 9vh 0 0 auto;
  font: italic 400 clamp(22px, 1.9vw, 30px)/1.3 var(--serif); color: var(--texte-2);
}
.qui a { color: var(--ivoire); text-decoration-color: var(--rouge); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.qui a:hover { color: var(--rouge-vif); }

.js .engagements > div, .js .qui { transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.1, 1); }
.js .offre:not(.vu) .engagements > div, .js .offre:not(.vu) .qui { opacity: 0; transform: translateY(18px); }
.js .offre .engagements > div:nth-child(2) { transition-delay: 0.15s; }
.js .offre .engagements > div:nth-child(3) { transition-delay: 0.3s; }
.js .offre .qui { transition-delay: 0.5s; }

/* ---------- le programme (formulaire) ---------- */
.programme {
  position: relative;
  padding: 18vh var(--marge) 16vh;
  background:
    radial-gradient(ellipse 60% 55% at 50% 30%, rgba(255, 214, 170, 0.11), rgba(255, 214, 170, 0) 70%),
    var(--nuit);
}
.programme-entete { text-align: center; margin-bottom: 7vh; }
.programme-entete .surtitre { justify-content: center; }
.programme h2 { font-size: clamp(54px, min(8vw, 14vh), 150px); line-height: 0.92; margin: 0; }

.carton {
  position: relative;
  max-width: 640px; margin: 0 auto;
  perspective: 1600px;
}
.js .carton { transition: opacity 1s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1); }
.js .programme:not(.vu) .carton { opacity: 0; transform: translateY(40px) rotate(-0.6deg); }
.carton-recto, .carton-verso {
  background: var(--papier); color: var(--encre);
  color-scheme: light;
  padding: clamp(32px, 5vw, 60px) clamp(22px, 5vw, 64px) clamp(30px, 4vw, 48px);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  position: relative;
  text-align: center;
}
.carton-recto::before, .carton-verso::before {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid rgba(27, 23, 20, 0.18);
}
.carton-presente {
  font: 600 11.5px/1 var(--texte-police); letter-spacing: 0.32em; text-transform: uppercase; color: var(--encre-2);
}
.interprete { display: block; margin-top: 26px; }
.interprete input {
  width: 100%; text-align: center;
  font: italic 400 clamp(32px, 5vw, 50px)/1.1 var(--serif);
  background: transparent; border: 0; border-bottom: 1px dashed rgba(27, 23, 20, 0.35);
  padding: 4px 0 8px; color: var(--encre); border-radius: 0;
}
.interprete input::placeholder { color: rgba(27, 23, 20, 0.32); }
.interprete input:focus { outline: none; border-bottom-color: var(--rouge); }
.au-piano { margin-top: 10px; font: italic 400 21px/1 var(--serif); color: var(--encre-2); }
.carton-clavier { display: block; width: 169px; height: 22px; margin: 18px auto 0; overflow: visible; }
.carton-clavier .b { fill: #fffdf8; stroke: rgba(27, 23, 20, 0.4); stroke-width: 0.6; transition: fill 0.5s; }
.carton-clavier .n { fill: #1b1714; transition: fill 0.5s; }
.carton-clavier .on { fill: var(--rouge); transition: none; }
.filet {
  display: flex; align-items: center; gap: 16px; margin: 40px 0 24px;
  font: 600 11px/1 var(--texte-police); letter-spacing: 0.3em; text-transform: uppercase; color: var(--encre-2);
}
.filet::before, .filet::after { content: ""; flex: 1; height: 1px; background: rgba(27, 23, 20, 0.22); }

.champ { text-align: left; margin-bottom: 22px; }
.champ label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font: 600 14.5px/1.3 var(--texte-police); color: var(--encre);
}
.requis, .facultatif {
  font: italic 400 14px/1 var(--serif); letter-spacing: 0.01em; color: var(--encre-2); font-weight: 400;
}
.champ input, .champ textarea {
  width: 100%; margin-top: 8px;
  font: 400 18px/1.4 var(--texte-police); color: var(--encre);
  background: rgba(255, 255, 255, 0.55);
  border: 0; border-bottom: 1.5px solid rgba(27, 23, 20, 0.35);
  border-radius: 2px 2px 0 0;
  padding: 11px 12px 10px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.champ textarea { resize: vertical; min-height: 88px; }
.champ input::placeholder, .champ textarea::placeholder { color: rgba(27, 23, 20, 0.36); }
.champ input:focus, .champ textarea:focus { outline: none; border-bottom-color: var(--rouge); background: #fff; }
.aide { margin-top: 7px; font-size: 14.5px; line-height: 1.45; color: var(--encre-2); }
.erreur { margin-top: 0; font: 600 14.5px/1.45 var(--texte-police); color: var(--rouge-encre); }
.erreur:not(:empty) { margin-top: 8px; display: flex; gap: 8px; }
.erreur:not(:empty)::before {
  content: ""; flex: none; width: 6px; height: 12px; margin-top: 4px; border-radius: 1px 1px 2px 2px; background: var(--rouge);
}
.champ.invalide input { border-bottom-color: var(--rouge); background: #fff4f2; }
.champ.valide input { border-bottom-color: #2f6b3a; }

.case {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  font: 400 17px/1.35 var(--texte-police); margin: 4px 0 26px;
  position: relative;
}
.case input { position: absolute; opacity: 0; width: 18px; height: 28px; margin: 0; cursor: pointer; }
.case-touche {
  flex: none; width: 18px; height: 30px; border-radius: 1px 1px 4px 4px;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(27, 23, 20, 0.45), inset 0 -4px 0 rgba(27, 23, 20, 0.1);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.case input:checked + .case-touche {
  background: linear-gradient(#c22b2f, var(--rouge) 30%, var(--rouge-vif));
  box-shadow: inset 0 0 0 1px #8e1c1f, inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 0 16px rgba(229, 56, 59, 0.55);
  transform: translateY(1px);
}
.case input:focus-visible + .case-touche { outline: 2px solid var(--rouge-vif); outline-offset: 3px; }

.champ-accord { margin: 4px 0 26px; }
.champ-accord .case { margin: 0; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.envoi { margin-top: 34px; }
.bouton-envoi {
  width: 100%; background: var(--encre); color: var(--ivoire); font-size: 18px; padding: 19px 24px 20px;
  position: relative;
}
.bouton-envoi:hover { background: var(--rouge); color: #fff; }
.envoi-cours { display: none; align-items: center; gap: 14px; }
.carton.envoi-en-cours .envoi-repos { display: none; }
.carton.envoi-en-cours .envoi-cours { display: inline-flex; }
.carton.envoi-en-cours .bouton-envoi { background: var(--encre); cursor: progress; }
.temps-points { display: inline-flex; gap: 7px; }
.temps-points i {
  width: 9px; height: 9px; border-radius: 50%; background: rgba(242, 236, 225, 0.25);
  animation: temps 2.5s steps(1) infinite;
}
.temps-points i:nth-child(2) { animation-delay: 0.625s; }
.temps-points i:nth-child(3) { animation-delay: 1.25s; }
.temps-points i:nth-child(4) { animation-delay: 1.875s; }
@keyframes temps { 0% { background: var(--rouge); box-shadow: 0 0 8px var(--rouge); } 25%, 100% { background: rgba(242, 236, 225, 0.25); box-shadow: none; } }
.envoi-note { margin-top: 14px; font: italic 400 17px/1.3 var(--serif); color: var(--encre-2); }
.panne {
  margin-top: 22px; text-align: left; padding: 14px 16px 15px 18px;
  background: #fff1ee; border-left: 3px solid var(--rouge);
  font-size: 16px; line-height: 1.5; color: var(--encre);
}
.panne a { color: var(--rouge-encre); font-weight: 600; }

.carton-verso:not([hidden]) { animation: verso 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
@keyframes verso {
  from { opacity: 0; transform: rotateY(-70deg) translateZ(40px); }
  to { opacity: 1; transform: none; }
}
.reussite-nom { margin-top: 26px; font: italic 400 clamp(36px, 5.5vw, 56px)/1.05 var(--serif); }
.reussite-titre { margin-top: 38px; font: 400 clamp(30px, 4vw, 42px)/1.1 var(--serif); }
.reussite-texte { margin: 14px auto 0; max-width: 28em; font-size: 18px; color: var(--encre-2); }
.reussite-texte strong { color: var(--encre); font-weight: 600; overflow-wrap: anywhere; }
.reussite-midi { margin-top: 10px; font: italic 400 18px/1.3 var(--serif); color: var(--encre-2); }
.carton-verso .bouton-trait { margin-top: 30px; color: var(--encre); box-shadow: inset 0 0 0 1px rgba(27, 23, 20, 0.4); }
.carton-verso .bouton-trait:hover { box-shadow: inset 0 0 0 1px var(--rouge); }

.contact-direct { text-align: center; margin-top: 40px; font: italic 400 19px/1.4 var(--serif); color: var(--texte-2); }
.contact-direct a { color: var(--ivoire); text-decoration-color: var(--rouge); text-underline-offset: 0.18em; }

/* ---------- pied de page ---------- */
.pied {
  border-top: 1px solid rgba(242, 236, 225, 0.12);
  padding: 48px var(--marge) calc(56px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: minmax(200px, 0.6fr) 1.4fr; gap: 32px 6vw;
  font-size: 14.5px; line-height: 1.6; color: var(--texte-3);
}
.pied a { color: var(--texte-2); text-underline-offset: 0.18em; text-decoration-color: rgba(242, 236, 225, 0.3); }
.pied a:hover { color: var(--ivoire); text-decoration-color: var(--rouge); }
.pied-haut { display: grid; gap: 4px; align-content: start; }
.pied-marque { font: 400 26px/1 var(--serif); color: var(--texte); margin-bottom: 10px; }
.credits { display: grid; gap: 10px; max-width: 62em; }

/* ---------- écrans larges mais bas (portables 720–820 px de haut, tablettes couchées) ---------- */
@media (min-aspect-ratio: 85/100) and (max-height: 820px) and (min-width: 700px) {
  .etape-ouverture { padding-top: calc(var(--barre) + 3vh); }
  .titre-ouverture { font-size: clamp(38px, min(4vw, 7.4vh), 80px); }
  .etape-ouverture .surtitre { margin-bottom: 14px; }
  .chapeau { font-size: 16.5px; line-height: 1.45; }
  .actions { margin-top: 18px; }
  .bouton { padding: 13px 20px 14px; font-size: 16px; }
  .note-offerte { margin-top: 10px; font-size: 15px; }
  .legende-scene { bottom: calc(23.5% + 12px); }
}

/* ---------- mentions légales ---------- */
.mentions { max-width: 820px; margin: 0 auto; padding: calc(var(--barre) + 12vh) var(--marge) 14vh; }
.mentions h1 { font: 400 clamp(48px, 7vw, 104px)/0.95 var(--serif); letter-spacing: -0.012em; margin-bottom: 8vh; }
.mentions section { padding: 34px 0 36px; border-top: 1px solid rgba(242, 236, 225, 0.14); }
/* ancre (mentions-legales#prospection, lien des messages) : le titre ne passe pas sous la barre fixe */
.mentions section[id] { scroll-margin-top: var(--barre); }
.mentions h2 { font: italic 400 clamp(28px, 2.6vw, 38px)/1.1 var(--serif); margin-bottom: 20px; }
.mentions dl { display: grid; grid-template-columns: minmax(170px, 0.42fr) 1fr; gap: 12px 28px; }
.mentions dt { font: 600 14px/1.5 var(--texte-police); color: var(--texte-2); padding-top: 2px; }
.mentions dd { margin: 0; }
.mentions p + p { margin-top: 14px; }
.mentions p, .mentions dd { color: #d9d1c4; max-width: 38em; }
.mentions a { color: var(--ivoire); text-decoration-color: var(--rouge); text-underline-offset: 0.18em; }
/* page de l'accord écrit (accord.html) : la liste des usages */
.accord ul { margin: 14px 0; padding-left: 1.2em; color: #d9d1c4; max-width: 38em; }
.accord li + li { margin-top: 8px; }
.a-completer { color: var(--ambre) !important; font-style: italic; }
.retour { margin-top: 8vh; font: italic 400 22px/1.3 var(--serif); }
.retour a { text-decoration: none; }
.retour a:hover { color: var(--rouge-vif); }

/* ---------- écrans en hauteur (téléphones, tablettes debout) ---------- */
@media (max-aspect-ratio: 85/100), (max-width: 699px) {
  :root { --barre: 58px; }
  .marque-nom { font-size: 24px; }
  .etape { justify-content: flex-end; padding-bottom: 5svh; }
  .etape .texte { max-width: 640px; }
  /* sous la scène, le texte reste en place et passe d'une étape à l'autre en fondu */
  .etape:not(.etape-ouverture):not(.etape-questions) { display: block; padding: 0 var(--marge); min-height: 92svh; }
  .etape:not(.etape-ouverture):not(.etape-questions) .texte { position: sticky; top: calc(58svh + 12px); transform: none; }
  .etape-ouverture { justify-content: flex-start; padding-top: calc(var(--barre) + 4svh); }
  .etape-ouverture .texte { max-width: 100%; }
  .titre-ouverture { font-size: clamp(32px, 8.6vw, 64px); }
  /* titre, puis la scène (vidéo, notes, clavier), puis les boutons : --ouv-trou = hauteur de la scène */
  .etape-ouverture .texte { display: flex; flex-direction: column; }
  .etape-ouverture .actions { order: 2; margin-top: var(--ouv-trou, 60svh); }
  .etape-ouverture .plat-texte { order: 3; margin-top: 14px; }
  .etape-ouverture .note-offerte { order: 4; }
  .etape-ouverture .legende-scene { order: 5; }
  .plat-lecture { left: 10px; bottom: 10px; padding: 7px 11px 8px 10px; font-size: 13.5px; }
  .plat-qui { font-size: 15.5px; }
  .plat-partition { margin-top: 4px; font-size: 14.5px; }
  .etape-ouverture .note-offerte { margin-top: 10px; font-size: 14.5px; }
  .etape-questions { justify-content: flex-start; padding-top: calc(var(--barre) + 8svh); }
  .question { font-size: clamp(36px, 10.6vw, 80px); }
  .question.q2, .reponse { margin-left: 8vw; }
  .legende-scene { bottom: calc(22% + 12px); left: var(--marge); right: var(--marge); max-width: none; font-size: 14px; }
  .film h2 { font-size: clamp(30px, 8.4vw, 54px); }
  .ecoute-film { display: block; margin-top: 5vh; }
  .ecoute-scene {
    position: sticky; top: var(--barre); z-index: 1;
    height: 40svh; background: var(--ivoire);
    margin: 0 calc(-1 * var(--marge)); padding: 2svh var(--marge) 0;
    box-shadow: 0 18px 22px -16px rgba(242, 236, 225, 1);
  }
  .ecoute-etapes li { min-height: 52svh; padding-top: 6svh; }
  .ecoute-etapes li:first-child { padding-top: 4svh; }
  .ecoute-etapes .num { font-size: 38px; }
  .engagements > div { grid-template-columns: 1fr; gap: 6px; padding: 22px 0 24px; }
  .pied { grid-template-columns: 1fr; }
  .mentions dl { grid-template-columns: 1fr; gap: 2px; }
  .mentions dd { margin-bottom: 12px; }
}
@media (max-width: 520px) {
  .son { padding: 7px 9px; }
  .son .son-etiquette { display: none !important; }
  .barre-envoi { padding: 9px 11px 10px; font-size: 13.5px; }
  .marque-touches { display: none; }
  .actions .bouton { flex: 1 1 auto; }
  .bouton { font-size: 16px; padding: 15px 18px 16px; }
}
@media (max-width: 360px) {
  .barre-envoi { display: none; }
}

/* ---------- réduire les animations ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .etape .texte, .etape-ouverture .texte, .etape-questions .question { transform: none !important; }
  .intrus li { transform: none; }
}

/* ---------- questions (mêmes réponses que le JSON-LD de <head>) ---------- */
.faq { padding: 0 var(--marge) 16vh; position: relative; }
.faq-titre { font: 400 clamp(40px, min(6vw, 11vh), 110px)/0.95 var(--serif); letter-spacing: -0.016em; }
.faq .engagements { margin-top: 6vh; }
.faq .engagements dt { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.15; }

/* ouverture : le bloc de texte laisse passer les clics vers la vidéo posée sur la scène, sauf ses liens et boutons */
.etape-ouverture .texte { pointer-events: none; }
.etape-ouverture .texte a, .etape-ouverture .texte button { pointer-events: auto; }

/* boutons de paiement de la question sur le prix */
.payer { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
