:root {
  --nuit: #0d0806;
  --papier: #ead9b2;
  --encre: #2a1a0e;
  --encre-douce: #5b4330;
  --sang: #8c1c13;
  --sang-fonce: #6a130c;
  --or: #c8963a;
  --or-clair: #f1cf8a;
  --creme: #f4e3c0;
}

* { box-sizing: border-box; }
html { background: var(--nuit); scroll-behavior: smooth; }
html.js:has(.intro:not(.partie)) { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 48px 16px 96px;
  font-family: "Special Elite", "Courier New", Courier, monospace;
  font-size: 17px;
  line-height: 1.55;
  color: var(--encre);
  background: var(--nuit);
}

/* ============================================================ décor */
.decor { position: fixed; inset: 0; z-index: 0; overflow: hidden; --px: 0; --py: 0; }
.ciel {
  position: absolute; inset: -4%;
  background:
    radial-gradient(ellipse 70% 45% at 50% 72%, rgba(255,190,100,.55), transparent 70%),
    linear-gradient(180deg, #07080f 0%, #151226 18%, #3a1c2c 38%, #7c2c1c 56%, #c95a22 68%, #f0a04a 78%, #f7c878 86%);
}
.soleil {
  position: absolute; left: 50%; top: 70%;
  width: 34vmin; height: 34vmin; margin: -17vmin 0 0 -17vmin;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3cf 0%, #ffd27a 38%, #ff9d3c 62%, rgba(255,120,40,0) 72%);
  box-shadow: 0 0 120px 60px rgba(255,150,60,.35);
  transform: translate(calc(var(--px) * -6px), calc(var(--py) * -4px));
}
@keyframes soleil { to { box-shadow: 0 0 160px 80px rgba(255,150,60,.45); } }

.relief { position: absolute; left: -4%; bottom: -1px; width: 108%; display: block; }
.relief.loin   { height: 58vh; fill: #6d2f22; opacity: .85; transform: translate(calc(var(--px) * -8px), calc(var(--py) * -3px)); }
.relief.milieu { height: 44vh; fill: #33140e; transform: translate(calc(var(--px) * -16px), calc(var(--py) * -5px)); }
.relief.ville  { height: 36vh; fill: #0b0504; transform: translate(calc(var(--px) * -28px), calc(var(--py) * -8px)); }
.fenetres rect { fill: #ffb347; animation: lueur 4s ease-in-out infinite alternate; }
.fenetres rect:nth-child(3n)   { animation-duration: 2.7s; animation-delay: -1s; }
.fenetres rect:nth-child(3n+1) { animation-duration: 5.3s; animation-delay: -2s; }
@keyframes lueur { from { opacity: .45; } to { opacity: 1; } }

/* trailer YouTube en fond : couvre l'écran, agrandi pour rogner l'habillage du lecteur */
.trailer {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.78vh;
  transform: translate(-50%, -50%) scale(1.32);
  border: 0; pointer-events: none;
  opacity: 0; animation: apparait 2.5s ease 4s forwards;
}
@keyframes apparait { to { opacity: 1; } }
.decor:has(.trailer) .voile {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(5,3,2,.25) 0%, rgba(5,3,2,.85) 100%),
    rgba(10,6,4,.45);
}
html.js:has(.intro:not(.partie)) .decor:has(.trailer) .voile {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(5,3,2,.15) 0%, rgba(5,3,2,.8) 100%),
    rgba(10,6,4,.25);
}

/* scène 3D de l'écran d'entrée : apparaît quand elle est prête, se dissout à l'entrée */
.scene3d {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 1.8s ease;
}
html.scene3d-prete:has(.intro:not(.partie)) .scene3d { opacity: 1; }
html.scene3d-prete:has(.intro:not(.partie)) .poussiere { opacity: 0; }
html.scene3d-prete:has(.intro:not(.partie)) .voile {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(5,3,2,.1) 0%, rgba(5,3,2,.7) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
}

html.scene3d-prete:has(.intro:not(.partie)) :is(.ciel, .soleil, .relief) { visibility: hidden; }
.trailer:not([src]) { display: none; }

.poussiere { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 1.5s; }
.voile {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(5,3,2,.6) 100%),
    rgba(10,6,4,.22);
  transition: background 1.6s ease;
}
html.js:has(.intro:not(.partie)) .voile {
  background:
    radial-gradient(ellipse at 50% 55%, transparent 40%, rgba(5,3,2,.82) 100%),
    rgba(10,6,4,0);
}

/* ============================================================ écran d'entrée */
.intro { display: none; }
html.js .intro {
  position: fixed; inset: 0; z-index: 30;
  display: grid; justify-items: center; align-items: start;
  padding: 7vh 20px 0;
  color: var(--creme); text-align: center;
  transition: opacity 1.3s ease, transform 1.6s cubic-bezier(.2,.7,.2,1), visibility 0s 1.5s;
}
.intro.partie { opacity: 0; transform: scale(1.12); visibility: hidden; pointer-events: none; }

.bande { position: absolute; left: 0; right: 0; height: 6vh; background: #000; transition: transform 1.1s cubic-bezier(.6,0,.2,1); }
.bande.haut { top: 0; }
.bande.bas  { bottom: 0; }
.intro.partie .bande.haut { transform: translateY(-100%); }
.intro.partie .bande.bas  { transform: translateY(100%); }

.intro-contenu { position: relative; width: 100%; max-width: 1500px; min-width: 0; }
.intro-contenu > * { animation: leve 1.1s cubic-bezier(.2,.7,.2,1) both; }
.intro-sur      { animation-delay: .2s; }
.intro-titre    { animation-delay: .5s; }
.intro-dates    { animation-delay: 1.1s; }
.intro-accroche { animation-delay: 1.4s; }
.entrer         { animation-delay: 1.9s; }
.entrer-muet    { animation-delay: 2.2s; }
.intro-note     { animation-delay: 2.4s; }
@keyframes leve { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.intro-sur {
  margin: 0 0 18px;
  font-size: clamp(.7rem, 1.6vw, .95rem);
  letter-spacing: .5em; text-transform: uppercase; color: var(--or-clair);
}
.intro-sur i { font-style: normal; color: var(--or); margin: 0 .4em; }

.intro-titre {
  margin: 0;
  font-family: "Rye", "Rockwell", Georgia, serif; font-weight: 400;
  font-size: clamp(1.8rem, 10.5vw, 8.6rem);
  line-height: .95; letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff1cc 8%, #f3b455 48%, #b6481c 78%, #6a130c 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.55)) drop-shadow(0 10px 40px rgba(255,120,30,.35));
}
.intro-titre small {
  display: block; margin-bottom: .25em;
  font-size: .3em; letter-spacing: .32em;
  background: none; color: var(--creme);
  -webkit-text-fill-color: var(--creme);
}
.intro-dates {
  display: inline-block;
  margin: 22px 0 0; padding: 8px 26px 5px;
  font-family: "Rye", Georgia, serif; font-size: clamp(1rem, 2.6vw, 1.6rem); letter-spacing: .12em;
  border-top: 1px solid var(--or); border-bottom: 1px solid var(--or);
  color: var(--or-clair);
}
.intro-dates i { font-style: normal; color: var(--creme); opacity: .7; margin: 0 .25em; }
.intro-accroche { margin: 16px 0 24px; font-size: clamp(.95rem, 2vw, 1.2rem); opacity: .9; text-shadow: 0 2px 10px #000; }

.entrer {
  position: relative; display: block; margin: 0 auto;
  padding: 18px 46px 14px;
  font-family: "Rye", Georgia, serif; font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  letter-spacing: .14em; text-transform: uppercase;
  color: #1a0e07;
  background: linear-gradient(180deg, #f6d894, #c8963a 55%, #96621c);
  border: 0; cursor: pointer;
  box-shadow: 0 0 0 2px #1a0e07, 0 0 0 4px var(--or), 0 14px 40px rgba(0,0,0,.6), 0 0 50px rgba(255,160,60,.35);
  transition: transform .2s, filter .2s;
}
.entrer::after {
  content: ""; position: absolute; inset: -4px;
  box-shadow: 0 0 0 0 rgba(241,207,138,.7);
  animation: pouls 2.4s ease-out 3s infinite;
  pointer-events: none;
}
@keyframes pouls { to { box-shadow: 0 0 0 26px rgba(241,207,138,0); } }
.entrer:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.1); }
.entrer:active { transform: translateY(1px) scale(.99); }

.entrer-muet {
  display: block; margin: 20px auto 0; padding: 6px 4px;
  font: inherit; font-size: .9rem; color: var(--creme); opacity: .9;
  text-shadow: 0 1px 2px #000, 0 0 12px #000;
  background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--or);
}
.entrer-muet:hover { opacity: 1; }
.intro-note { margin: 18px 0 0; font-size: .75rem; letter-spacing: .12em; opacity: .8; text-shadow: 0 1px 2px #000, 0 0 12px #000; }

/* ============================================================ registre (parchemin) */
.registre {
  position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto;
  padding: 48px 52px 52px;
  background:
    radial-gradient(ellipse at 15% 8%, rgba(255,255,255,.4), transparent 45%),
    radial-gradient(ellipse at 92% 96%, rgba(120,70,20,.32), transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(120,70,20,.25), transparent 40%),
    var(--papier);
  border: 1px solid #a88c56;
  box-shadow: inset 0 0 80px rgba(110,65,20,.42), 0 30px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(0,0,0,.4);
  outline: none;
  transition: opacity 1.1s ease .5s, transform 1.2s cubic-bezier(.2,.7,.2,1) .5s, visibility 0s;
}
.registre.large { max-width: 1320px; }
.registre::before {
  content: ""; position: absolute; inset: 12px;
  border: 2px solid var(--encre); outline: 1px solid var(--encre); outline-offset: -6px;
  opacity: .5; pointer-events: none;
}
html.js:has(.intro:not(.partie)) .registre,
html.js:has(.intro:not(.partie)) .pied {
  opacity: 0; visibility: hidden; transform: translateY(60px) rotate(-.6deg);
}
.registre.arrive { animation: leve .7s cubic-bezier(.2,.7,.2,1) both; }

h1 {
  margin: 0 0 6px;
  font-family: "Rye", "Rockwell", Georgia, serif; font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; text-wrap: balance;
}
h1 span { display: block; color: var(--sang); font-size: 1.25em; }

.surtitre { margin: 0 0 8px; font-size: .85rem; letter-spacing: .35em; text-transform: uppercase; color: var(--encre-douce); }
.soustitre { margin: 0 0 14px; font-family: "Rye", Georgia, serif; font-size: 1.05rem; color: var(--encre-douce); }
.chapo { margin: 0 0 14px; max-width: 52ch; }

.entete { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center; }
.entete.simple { grid-template-columns: 1fr auto; align-items: end; }

.affiche {
  display: block; width: 200px; height: auto;
  border: 6px solid #f3e7c8; outline: 1px solid #8f744a;
  box-shadow: 4px 8px 18px rgba(0,0,0,.5);
  transform: rotate(-3deg);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.affiche:hover { transform: rotate(0deg) scale(1.05); }

.compteur {
  display: inline-block; margin: 4px 0 0; padding: 7px 14px 4px;
  border: 2px solid var(--sang); color: var(--sang);
  letter-spacing: .04em; transform: rotate(-1deg);
}
.compteur strong { font-family: "Rye", Georgia, serif; font-weight: 400; font-size: 1.3em; }

.filet { margin: 32px 0; border: 0; height: 9px; border-top: 3px double var(--encre); border-bottom: 1px solid var(--encre); opacity: .6; }

/* ---------- formulaire ---------- */
.feuille { display: grid; gap: 30px; counter-reset: etape; }
.feuille.etroit { max-width: 380px; margin: 24px auto 0; text-align: left; }

.ligne { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.intitule { padding: 0; font-family: "Rye", Georgia, serif; font-size: 1.15rem; letter-spacing: .03em; }
.feuille:not(.etroit) .intitule::before {
  counter-increment: etape; content: counter(etape, upper-roman) ".";
  display: inline-block; min-width: 2.2em; color: var(--sang);
}
.intitule em { color: var(--sang); font-style: normal; }
small { color: var(--encre-douce); font-size: .85rem; }

input[type="text"], input[type="password"], select, textarea {
  width: 100%; padding: 12px 8px 7px;
  font: inherit; color: var(--encre);
  background: rgba(255,255,255,.22);
  border: 0; border-bottom: 2px solid var(--encre); border-radius: 0;
  transition: background .2s;
}
input[type="text"] { font-size: 1.15rem; }
input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus { background: rgba(255,255,255,.5); }
textarea {
  resize: vertical; line-height: 1.9;
  background-image: repeating-linear-gradient(transparent 0 calc(1.9em - 1px), rgba(42,26,14,.35) calc(1.9em - 1px) 1.9em);
  background-attachment: local; border: 0;
}
select { cursor: pointer; }
::placeholder { color: rgba(91,67,48,.6); }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--or); outline-offset: 2px;
}

/* tuiles à cocher (rôles, mécène, présence) */
.groupe {
  display: flex; align-items: center; gap: 12px;
  margin: 10px 0 0; font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--encre-douce);
}
.groupe::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .45; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.tuiles.duo { grid-template-columns: repeat(2, 1fr); }

.tuile {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 58px; padding: 11px 14px 8px;
  border: 1.5px solid rgba(42,26,14,.55);
  background: rgba(255,255,255,.22);
  cursor: pointer; user-select: none;
  transition: transform .15s, background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.tuile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tuile-nom { font-family: "Rye", Georgia, serif; font-size: .98rem; line-height: 1.2; }
.tuile-detail { font-size: .78rem; line-height: 1.3; color: var(--encre-douce); transition: color .2s; }
.tuile:hover { transform: translateY(-2px); background: rgba(255,255,255,.45); box-shadow: 0 6px 14px rgba(60,35,10,.25); }
.tuile:has(input:focus-visible) { outline: 3px solid var(--or); outline-offset: 2px; }
.tuile:has(input:checked) {
  color: var(--creme); background: var(--encre); border-color: var(--encre);
  box-shadow: 4px 5px 0 var(--sang);
  transform: translate(-2px, -2px);
}
.tuile:has(input:checked) .tuile-detail { color: var(--or-clair); }
.tuile:has(input:checked)::after {
  content: "✔"; position: absolute; top: 4px; right: 8px; font-size: .85rem; color: var(--or-clair);
}
.tuile.billet { min-height: 78px; border-style: dashed; }

.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tampon {
  justify-self: start;
  padding: 16px 36px 12px;
  font-family: "Rye", Georgia, serif; font-size: 1.3rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--creme); background: var(--sang);
  border: 2px solid var(--sang-fonce);
  box-shadow: inset 0 0 0 3px var(--sang), inset 0 0 0 4px rgba(246,234,208,.55), 4px 5px 0 var(--encre);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .15s;
}
.tampon:hover { background: var(--sang-fonce); }
.tampon:active { transform: translate(4px, 5px); box-shadow: inset 0 0 0 3px var(--sang), inset 0 0 0 4px rgba(246,234,208,.55), 0 0 0 var(--encre); }
.tampon:disabled { opacity: .7; cursor: progress; }

.erreurs { padding: 14px 18px; border: 2px solid var(--sang); color: var(--sang-fonce); background: rgba(140,28,19,.08); animation: secoue .4s; }
.erreurs ul { margin: 6px 0 0; padding-left: 20px; }
@keyframes secoue { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.avis { margin: 0; padding: 12px 16px; border: 2px dashed var(--encre-douce); background: rgba(184,134,43,.15); }

.confirmation { position: relative; text-align: center; padding: 24px 0; }
.confirmation .chapo { margin-inline: auto; }
.cachet {
  width: 170px; height: 170px; margin: 0 auto 26px;
  display: grid; place-items: center;
  border: 5px double var(--sang); border-radius: 50%;
  color: var(--sang);
  font-family: "Rye", Georgia, serif; font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase;
  transform: rotate(-14deg);
  animation: frappe .55s cubic-bezier(.2,1.6,.4,1) .35s both;
}
.cachet span { padding: 6px 0 3px; border-top: 2px solid; border-bottom: 2px solid; }
@keyframes frappe { from { opacity: 0; transform: rotate(-14deg) scale(2.6); } to { opacity: .9; transform: rotate(-14deg) scale(1); } }

.lien, .lien-bouton {
  color: var(--sang); font: inherit;
  text-decoration: underline; text-underline-offset: 4px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.lien:hover, .lien-bouton:hover { color: var(--sang-fonce); }

/* ---------- admin ---------- */
.actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .9rem; }
.stats li { padding: 4px 10px 2px; border: 1px solid var(--encre-douce); }
.stats strong { font-family: "Rye", Georgia, serif; font-weight: 400; color: var(--sang); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { font-family: "Rye", Georgia, serif; font-weight: 400; text-align: left; padding: 8px 10px; border-bottom: 3px double var(--encre); white-space: nowrap; }
td { padding: 9px 10px 6px; border-bottom: 1px solid rgba(42,26,14,.35); vertical-align: top; }
tbody tr:hover { background: rgba(184,134,43,.14); }
td.nom { font-weight: bold; white-space: nowrap; }
td.note { max-width: 320px; overflow-wrap: anywhere; white-space: pre-wrap; }
td.date { white-space: nowrap; color: var(--encre-douce); }
td.vide { text-align: center; padding: 32px; color: var(--encre-douce); }
.badge { padding: 2px 8px 0; color: #1a0e07; background: var(--or); white-space: nowrap; }
.rayer summary { cursor: pointer; color: var(--sang); }
.rayer button { margin-top: 6px; padding: 4px 10px 2px; font: inherit; color: var(--creme); background: var(--sang); border: 0; cursor: pointer; }
.legende { margin: 18px 0 0; font-size: .85rem; color: var(--encre-douce); }

.pied {
  position: relative; z-index: 1;
  margin: 26px auto 0; text-align: center;
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(244,227,192,.6);
  transition: opacity 1s ease 1s;
}

/* ============================================================ lecteur de musique */
.lecteur {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  width: 372px; max-width: calc(100vw - 32px);
  padding: 12px 14px;
  color: var(--creme);
  background: linear-gradient(180deg, rgba(34,20,13,.94), rgba(14,8,6,.94));
  border: 1px solid var(--or);
  box-shadow: 0 14px 40px rgba(0,0,0,.65), inset 0 0 0 3px rgba(14,8,6,.9), inset 0 0 0 4px rgba(200,150,58,.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: leve .8s cubic-bezier(.2,.7,.2,1) .6s both;
}
.lecteur[hidden] { display: none; }
.lecteur-tete { display: flex; align-items: center; gap: 12px; }
.lecteur-titres { flex: 1; min-width: 0; display: grid; gap: 1px; line-height: 1.25; }
.lecteur-titres strong {
  display: flex; align-items: center; gap: 8px;
  font-family: "Rye", Georgia, serif; font-weight: 400; font-size: 1rem; letter-spacing: .04em; color: var(--or-clair);
}
.lecteur-titres > span { font-size: .74rem; letter-spacing: .03em; line-height: 1.3; opacity: .85; overflow-wrap: anywhere; }

.l-btn {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  color: var(--creme); background: transparent;
  border: 1px solid rgba(200,150,58,.45); border-radius: 50%;
  cursor: pointer; transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.l-btn:hover { transform: scale(1.1); background: rgba(200,150,58,.2); border-color: var(--or); }
.l-btn:active { transform: scale(.94); }
.l-btn svg { width: 18px; height: 18px; fill: currentColor; }
.l-btn .trait { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.l-btn.principal {
  width: 44px; height: 44px; border: 0;
  color: #1a0e07; background: linear-gradient(180deg, #f6d894, #c8963a);
  box-shadow: 0 0 0 2px #1a0e07, 0 0 0 3px var(--or), 0 0 18px rgba(255,170,70,.35);
}
.l-btn.principal svg { width: 24px; height: 24px; }
.l-btn.principal:hover { filter: brightness(1.12); background: linear-gradient(180deg, #f6d894, #c8963a); }
.l-btn.discret { border-color: transparent; opacity: .7; }
.l-btn.discret svg { transition: transform .3s; }
.l-btn.bascule[aria-pressed="true"] { color: #1a0e07; background: var(--or-clair); border-color: var(--or-clair); }
.l-btn.bascule[aria-pressed="false"] { opacity: .55; }

.i-pause, .i-croix { display: none; }
.lecteur.joue .i-pause { display: inline; }
.lecteur.joue .i-lecture { display: none; }
.lecteur.muet .i-croix { display: inline; }
.lecteur.muet .i-onde { display: none; }
.lecteur.muet #son-bouton { color: #ff8f6b; border-color: #ff8f6b; }

.lecteur-corps {
  display: grid; gap: 10px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(200,150,58,.3);
}
.lecteur.plie .lecteur-corps { display: none; }
.lecteur.plie #son-plier svg { transform: rotate(180deg); }
.lecteur-temps { display: flex; align-items: center; gap: 10px; font-size: .74rem; font-variant-numeric: tabular-nums; opacity: .9; }
.lecteur-temps span { min-width: 2.6em; text-align: center; }
.lecteur-commandes { display: flex; align-items: center; gap: 8px; }
.lecteur-sep { width: 1px; height: 22px; margin: 0 2px; background: rgba(200,150,58,.35); }

.glissiere {
  --niveau: 0%;
  -webkit-appearance: none; appearance: none;
  flex: 1; min-width: 0; height: 22px; margin: 0; background: transparent; cursor: pointer;
}
.glissiere::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--or-clair) var(--niveau), rgba(244,227,192,.22) var(--niveau));
}
.glissiere::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(244,227,192,.22); }
.glissiere::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--or-clair); }
.glissiere::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px;
  border-radius: 50%; background: var(--or-clair); border: 2px solid #1a0e07;
  transition: transform .15s;
}
.glissiere:hover::-webkit-slider-thumb { transform: scale(1.3); }
.glissiere::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--or-clair); border: 2px solid #1a0e07; }

.barres { flex: none; display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.barres i { width: 3px; height: 100%; background: var(--or-clair); transform-origin: bottom; transform: scaleY(.2); opacity: .5; }
.lecteur.joue:not(.muet) .barres i { opacity: 1; animation: barre .9s ease-in-out infinite alternate; }
.lecteur.joue:not(.muet) .barres i:nth-child(2) { animation-duration: .6s; animation-delay: -.3s; }
.lecteur.joue:not(.muet) .barres i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.5s; }
@keyframes barre { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* ============================================================ adaptatif */
@media (max-width: 640px) {
  body { padding: 20px 16px 96px; font-size: 16px; }
  .registre { padding: 36px 24px 38px; }
  h1 { font-size: clamp(1.25rem, 7vw, 2rem); }
  .entete, .entete.simple { grid-template-columns: 1fr; gap: 22px; justify-items: start; }
  .affiche { width: 150px; margin: 0 auto; }
  .tuiles { grid-template-columns: repeat(2, 1fr); }
  .tuiles.duo { grid-template-columns: 1fr; }
  .tampon { justify-self: stretch; }
  .feuille:not(.etroit) .intitule::before { min-width: 1.8em; }
  .lecteur { left: 16px; right: 16px; width: auto; }
  .bande { height: 5vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* écrans peu hauts : on allège l'écran d'entrée pour laisser la place au cheval */
@media (max-height: 880px) {
  .intro-note { display: none; }
  .intro-sur { margin-bottom: 10px; }
  .intro-dates { margin-top: 14px; }
}

/* ============================================================ bêta-test : badge, console de build, signature */
.beta {
  display: inline-block; margin-right: 1em; padding: 3px 9px 1px;
  font-size: .85em; letter-spacing: .22em; text-transform: uppercase;
  color: #06181c; background: #6fe9ff;
  box-shadow: 0 0 14px rgba(111,233,255,.55);
}
.surtitre .beta { color: var(--creme); background: var(--sang); box-shadow: none; letter-spacing: .2em; }

.console {
  position: absolute; left: 24px; bottom: calc(6vh + 20px);
  width: min(520px, 38vw); padding: 0 0 12px;
  text-align: left; font-family: "Courier New", Courier, monospace; font-size: clamp(.64rem, .86vw, .82rem); line-height: 1.55;
  color: #d8c9a8;
  background: rgba(8,5,9,.86);
  border: 1px solid rgba(111,233,255,.35);
  box-shadow: 0 0 24px rgba(111,233,255,.12), 0 10px 30px rgba(0,0,0,.5);
  animation: leve 1s cubic-bezier(.2,.7,.2,1) 2.4s both;
}
.console-tete {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 8px; padding: 6px 10px;
  font-size: .66rem; letter-spacing: .08em; color: rgba(216,201,168,.7);
  border-bottom: 1px solid rgba(111,233,255,.2);
}
.console-tete i { width: 8px; height: 8px; border-radius: 50%; background: #ff6a5a; }
.console-tete i:nth-child(2) { background: #ffb648; }
.console-tete i:nth-child(3) { background: #6ee07a; margin-right: 6px; }
.console-lignes { height: calc(9 * 1.55em); overflow: hidden; padding: 0 10px; display: flex; flex-direction: column; justify-content: flex-end; }
.console-lignes p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-lignes p:last-child::after { content: "▋"; margin-left: 2px; animation: curseur .8s steps(1) infinite; }
@keyframes curseur { 50% { opacity: 0; } }
.c-ok { color: #6ee07a; }
.c-err { color: #ff6a5a; }
.c-fix { color: #6fe9ff; }
.c-warn { color: #ffb648; }
.c-info { color: #fff1cc; }
.c-cmd { color: #d8c9a8; }

.signature {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; text-align: left; color: var(--creme);
}
.signature img { width: 56px; height: 56px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.signature span { display: grid; opacity: .85; }
.signature strong { font-family: "Rye", Georgia, serif; font-weight: 400; font-size: 1.35em; letter-spacing: .06em; color: var(--or-clair); }
.intro .signature { position: absolute; right: 24px; bottom: calc(6vh + 20px); animation: leve 1s cubic-bezier(.2,.7,.2,1) 2.6s both; }
.pied .signature { margin-bottom: 14px; }
.pied p { margin: 0; }

.tuiles:has(.large) { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .console { display: none; }
  .intro .signature { right: 50%; transform: translateX(50%); bottom: calc(5vh + 10px); animation: none; }
  .intro .signature img { width: 40px; height: 40px; }
}
