:root {
  --nuit: #0e0f10;
  --nuit-2: #17191b;
  --nuit-3: #22262a;
  --trait: #2f3439;
  --texte: #ece6da;
  --texte-doux: #a9a294;
  --papier: #efe6d2;
  --papier-2: #e4d8bd;
  --encre: #2a2520;
  --encre-douce: #6b6152;
  --rouge: #c0392b;
  --rouge-vif: #e0533f;
  --ambre: #e8a23a;
  --jade: #5fb39a;
  --rayon: 14px;
  --titre: 'Fraunces', Georgia, serif;
  --dactylo: 'Courier Prime', 'Courier New', monospace;
  --ui: 'Inter', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--nuit);
  color: var(--texte);
  font: 16px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ambre); outline-offset: 2px; }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 44px;
  padding: .6em 1.2em;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--nuit-3);
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s;
}
.bouton:hover { border-color: var(--ambre); }
.bouton:active { transform: scale(.98); }
.bouton-principal { background: var(--ambre); border-color: var(--ambre); color: #1b1408; }
.bouton-principal:hover { background: #f2b452; }
.bouton-rouge { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.bouton-rouge:hover { background: var(--rouge-vif); }

.tampon {
  display: inline-block;
  padding: .25em .7em;
  border: 3px solid currentColor;
  border-radius: 6px;
  font: 700 .9rem/1 var(--dactylo);
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(-6deg);
  background: rgba(14, 15, 16, .55);
  backdrop-filter: blur(2px);
}
.tampon-nouvelle, .tampon-rejete { color: var(--rouge-vif); }
.tampon-en-cours { color: var(--ambre); }
.tampon-classee { color: var(--jade); }

.image-absente {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .4em;
  padding: 1rem;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.025) 14px 28px),
    radial-gradient(circle at 50% 40%, #2a2f33, #141617);
  color: var(--texte-doux);
}
.image-absente-nom { font: 700 .8rem var(--dactylo); color: var(--ambre); letter-spacing: .05em; }
.image-absente-alt { font-size: .8rem; max-width: 30ch; }

/* Accueil */
.accueil { max-width: 1100px; margin: 0 auto; padding: clamp(24px, 6vw, 64px) 16px 48px; }
.accueil-tete { text-align: center; margin-bottom: 40px; }
.logo {
  display: inline-block;
  padding: .2em .5em;
  border: 4px solid var(--rouge);
  border-radius: 8px;
  color: var(--rouge-vif);
  font: 700 clamp(1.6rem, 5vw, 2.2rem)/1 var(--dactylo);
  letter-spacing: .2em;
  transform: rotate(-4deg);
}
.accueil h1 { font: 800 clamp(2.2rem, 7vw, 4.2rem)/1.05 var(--titre); margin: .4em 0 .2em; letter-spacing: -.02em; }
.accueil-slogan { color: var(--texte-doux); font-size: clamp(1rem, 2.5vw, 1.2rem); margin: 0; }
.accueil-regles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}
.accueil-regles div { padding: 16px 18px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--nuit-2); }
.accueil-regles strong { display: block; font: 600 1.15rem var(--titre); color: var(--ambre); }
.accueil-regles span { color: var(--texte-doux); font-size: .95rem; }
.accueil-dossiers { display: grid; gap: 24px; }
.accueil-pied { margin-top: 48px; text-align: center; color: var(--texte-doux); font-size: .85rem; }

.dossier { position: relative; }
.dossier-lien {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--rayon);
  background: var(--papier);
  color: var(--encre);
  text-decoration: none;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  transition: transform .2s;
}
.dossier-lien:hover { transform: translateY(-3px); }
.dossier-visuel { position: relative; aspect-ratio: 16 / 9; background: #000; }
.dossier-visuel img, .dossier-visuel .image-absente { width: 100%; height: 100%; object-fit: cover; }
.dossier-visuel .tampon { position: absolute; top: 16px; right: 16px; font-size: 1.05rem; }
.dossier-texte { padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: .4em; }
.dossier-numero { font: 700 .85rem var(--dactylo); letter-spacing: .08em; text-transform: uppercase; color: var(--rouge); }
.dossier-texte h2 { font: 800 clamp(1.7rem, 4vw, 2.4rem)/1.1 var(--titre); margin: 0; }
.dossier-meta { font: .95rem var(--dactylo); color: var(--encre-douce); margin: 0; }
.dossier-texte p { margin: 0; }
.dossier-texte .bouton { margin-top: auto; align-self: flex-start; }
.dossier-recommencer {
  position: absolute;
  bottom: 12px;
  right: 12px;
  border: 0;
  background: none;
  color: var(--encre-douce);
  font-size: .85rem;
  text-decoration: underline;
  padding: 8px;
}
@media (max-width: 760px) {
  .dossier-lien { grid-template-columns: 1fr; }
  .dossier-texte { padding-bottom: 52px; }
}

.chargement { min-height: 100vh; display: grid; place-items: center; font-family: var(--dactylo); color: var(--texte-doux); }

/* Jeu */
.jeu { min-height: 100vh; display: flex; flex-direction: column; }
.barre {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: rgba(14, 15, 16, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--trait);
}
.barre-logo {
  flex: none;
  padding: .15em .4em;
  border: 3px solid var(--rouge);
  border-radius: 6px;
  color: var(--rouge-vif);
  font: 700 1rem/1 var(--dactylo);
  letter-spacing: .15em;
  text-decoration: none;
}
.barre-titre { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.barre-titre span { font: .72rem var(--dactylo); color: var(--texte-doux); text-transform: uppercase; letter-spacing: .08em; }
.barre-titre strong { font: 600 1.05rem var(--titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-outils { margin-left: auto; display: flex; gap: 6px; }
.outil {
  position: relative;
  display: flex;
  align-items: center;
  gap: .45em;
  min-height: 40px;
  padding: 0 .9em;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--nuit-2);
  font-size: .9rem;
  font-weight: 500;
}
.outil:hover { border-color: var(--ambre); }
.outil-icone { font-size: 1.05rem; color: var(--ambre); width: 1.1em; text-align: center; }
.outil-special { border-color: var(--ambre); }
.outil-special.fait { border-color: var(--trait); }
.outil-accuser { background: var(--rouge); border-color: var(--rouge); color: #fff; animation: battement 2s infinite; }
.outil-accuser .outil-icone { color: #fff; }
.pastille {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rouge-vif);
  color: #fff;
  font: 700 .72rem/20px var(--ui);
  text-align: center;
}
@keyframes battement { 50% { box-shadow: 0 0 0 6px rgba(192, 57, 43, .25); } }

.objectif {
  margin: 0;
  padding: 8px 16px;
  background: var(--nuit-2);
  border-bottom: 1px solid var(--trait);
  font-size: .9rem;
  color: var(--texte-doux);
  text-align: center;
}
.objectif b { color: var(--ambre); font-weight: 600; }

@media (max-width: 900px) {
  .barre { flex-wrap: wrap; gap: 8px 12px; }
  .barre-outils { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; padding-top: 4px; }
  .barre-outils::-webkit-scrollbar { display: none; }
  .outil { flex: none; }
}
@media (max-width: 520px) {
  .barre-outils { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .outil { flex-direction: column; gap: 0; padding: 4px 2px; min-height: 48px; border-radius: 10px; font-size: .68rem; justify-content: center; }
  .outil-icone { font-size: 1.1rem; }
}

.scene-zone { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 16px; }
.scene-bloc { display: grid; gap: 16px; }
.scene {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--rayon);
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  touch-action: pan-y;
  --x: 50%;
  --y: 55%;
  --r: 160px;
}
.scene-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lampe {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle var(--r) at var(--x) var(--y), rgba(0,0,0,0) 0, rgba(0,0,0,.15) 45%, rgba(0,0,0,.93) 100%);
}
.point {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.point-marque {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ambre);
  box-shadow: 0 0 0 0 rgba(232, 162, 58, .7);
  animation: pulsation 2.2s infinite;
  transition: opacity .3s, transform .3s;
}
.point.vu .point-marque { background: rgba(236, 230, 218, .55); animation: none; transform: scale(.7); }
.point.passage .point-marque { background: var(--jade); }
.point.discret .point-marque { opacity: 0; }
.point.discret.eclaire .point-marque { opacity: 1; }
.point:hover { background: rgba(232, 162, 58, .12); box-shadow: inset 0 0 0 1px rgba(232, 162, 58, .5); }
.point.discret:not(.eclaire):hover { background: transparent; box-shadow: none; }
@keyframes pulsation {
  70% { box-shadow: 0 0 0 14px rgba(232, 162, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 162, 58, 0); }
}
.scene.debug .point { box-shadow: inset 0 0 0 2px #0ff; background: rgba(0,255,255,.08); }
.scene.debug .point .point-marque { opacity: 1; }
.point-debug { position: absolute; top: 2px; left: 4px; font: 700 11px var(--dactylo); color: #0ff; text-shadow: 0 1px 2px #000; }

.scene-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 32px;
  align-items: start;
}
.scene-groupe { font: .78rem var(--dactylo); color: var(--ambre); text-transform: uppercase; letter-spacing: .1em; }
.scene-texte h1 { font: 800 clamp(1.5rem, 3.5vw, 2.1rem)/1.1 var(--titre); margin: .1em 0 .3em; }
.scene-texte p { margin: 0 0 .5em; color: var(--texte-doux); max-width: 65ch; }
.astuce { font-size: .9rem; color: var(--ambre) !important; opacity: .85; }
.sorties { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 460px; }
.sorties-titre { width: 100%; text-align: right; font: .78rem var(--dactylo); color: var(--texte-doux); text-transform: uppercase; letter-spacing: .1em; }
.sortie {
  min-height: 44px;
  padding: 0 1em;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--nuit-2);
  font-weight: 500;
}
.sortie:hover { border-color: var(--jade); color: var(--jade); }
.scene-compteur { grid-column: 1 / -1; margin: 0; font: .85rem var(--dactylo); color: var(--texte-doux); }
@media (max-width: 760px) {
  .scene-zone { padding: 0 0 24px; }
  .scene { border-radius: 0; }
  .scene-info { grid-template-columns: 1fr; padding: 0 16px; }
  .sorties { justify-content: flex-start; max-width: none; }
  .sorties-titre { text-align: left; }
  .scene-compteur { grid-column: auto; }
}

/* Calques */
.calque {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 6, 7, .72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s;
  overflow-y: auto;
}
.calque.visible { opacity: 1; }
.calque-boite {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border: 1px solid var(--trait);
  border-radius: 18px;
  background: var(--nuit-2);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform: translateY(12px);
  transition: transform .25s;
}
.calque.visible .calque-boite { transform: none; }
.calque-tete {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
  background: inherit;
}
.calque-tete h2 { font: 800 1.45rem/1.15 var(--titre); margin: 0; }
.calque-sous-titre { font: .78rem var(--dactylo); color: var(--ambre); text-transform: uppercase; letter-spacing: .1em; }
.bouton-fermer {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--trait);
  border-radius: 50%;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
}
.bouton-fermer:hover { border-color: var(--ambre); }
.calque-corps { padding: 4px 20px 22px; }
.calque-panneau { width: min(860px, 100%); }
.calque-enigme { width: min(760px, 100%); }
.calque-intro { width: min(760px, 100%); }
.calque-image { width: calc(100% + 40px); margin: 0 -20px 16px; aspect-ratio: 16 / 9; object-fit: cover; }
.calque-image.image-absente { min-height: 180px; }
.calque-image-carree { aspect-ratio: 4 / 3; }
.texte p { margin: 0 0 .9em; }
.texte-dactylo { font-family: var(--dactylo); font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.vide { color: var(--texte-doux); font-style: italic; }
.gains { display: grid; gap: 8px; margin-top: 12px; }
.gain {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(232, 162, 58, .1);
  border: 1px solid rgba(232, 162, 58, .35);
  font-size: .95rem;
}
.gain-icone { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ambre); color: #1b1408; font-weight: 700; flex: none; }
.gain-glyphe { background: rgba(95, 179, 154, .1); border-color: rgba(95, 179, 154, .4); }
.gain-svg { width: 40px; height: 40px; color: var(--jade); flex: none; }

.calque-papier .calque-boite, .calque-boite.calque-papier { background: var(--papier); color: var(--encre); border-color: #cbbd9c; }
.calque-papier .calque-tete { background: var(--papier); }
.calque-papier .calque-sous-titre { color: var(--rouge); }
.calque-papier .bouton-fermer { border-color: #cbbd9c; }
.calque-papier .vide { color: var(--encre-douce); }
.calque-papier .bouton { background: var(--papier-2); border-color: #cbbd9c; color: var(--encre); }
.calque-papier .bouton-principal { background: var(--encre); border-color: var(--encre); color: var(--papier); }
.calque-papier .bouton-rouge { background: var(--rouge); border-color: var(--rouge); color: #fff; }

@media (max-width: 600px) {
  .calque { padding: 0; place-items: end stretch; }
  .calque-boite { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; }
}

#toasts { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: grid; gap: 8px; transform: translateX(-50%); width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--papier);
  color: var(--encre);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  font-size: .95rem;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
}
.toast.visible { opacity: 1; transform: none; }

/* Panneaux */
.lieux-groupe h3 { font: .8rem var(--dactylo); text-transform: uppercase; letter-spacing: .1em; color: var(--ambre); margin: 8px 0 10px; }
.lieux-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.lieu-carte {
  display: grid;
  gap: 4px;
  padding: 0 0 10px;
  overflow: hidden;
  border: 1px solid var(--trait);
  border-radius: 12px;
  background: var(--nuit);
  text-align: left;
}
.lieu-carte:hover { border-color: var(--ambre); }
.lieu-carte.actuel { border-color: var(--jade); }
.lieu-vignette { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lieu-vignette.image-absente .image-absente-alt { display: none; }
.lieu-nom { padding: 0 12px; font-weight: 600; }
.lieu-progres { padding: 0 12px; font: .8rem var(--dactylo); color: var(--texte-doux); }

.onglets { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; }
.onglets button {
  flex: none;
  padding: .5em 1em;
  border: 1px solid #cbbd9c;
  border-radius: 999px;
  background: transparent;
  color: var(--encre);
  font-weight: 500;
}
.onglets button[aria-selected="true"] { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.preuves-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.preuve-carte {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 0 0 12px;
  overflow: hidden;
  border: 1px solid #cbbd9c;
  border-radius: 12px;
  background: #fbf6ea;
  color: var(--encre);
  text-align: left;
}
.calque-boite:not(.calque-papier) .preuve-carte { background: var(--nuit); color: var(--texte); border-color: var(--trait); }
.preuve-carte:hover { border-color: var(--rouge); }
.preuve-vignette { width: 100%; aspect-ratio: 1; object-fit: cover; }
.preuve-vignette.image-absente .image-absente-alt { display: none; }
.preuve-icone { display: grid; place-items: center; font-size: 2.2rem; color: var(--rouge); background: var(--papier-2); }
.calque-boite:not(.calque-papier) .preuve-icone { background: var(--nuit-3); color: var(--ambre); }
.preuve-nom { padding: 0 10px; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.preuve-resume { padding: 0 10px; font-size: .8rem; color: var(--encre-douce); }
.temoignages { display: grid; gap: 12px; }
.temoignage { margin: 0; padding: 12px 16px; border-left: 4px solid var(--rouge); background: #fbf6ea; border-radius: 0 10px 10px 0; }
.temoignage p { margin: 0 0 .3em; font-family: var(--dactylo); }
.temoignage cite { font-size: .85rem; color: var(--encre-douce); font-style: normal; font-weight: 600; }
.personnes { display: grid; gap: 14px; }
.personne { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.personne-portrait { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; }
.personne-portrait.image-absente .image-absente-alt, .personne-portrait.image-absente .image-absente-nom { display: none; }
.personne h3 { margin: 0; font: 700 1.1rem var(--titre); }
.personne-role { font-size: .85rem; color: var(--encre-douce); }
.personne p { margin: .3em 0 0; font-size: .95rem; }

.texte-intro { margin-top: 0; }
.lexique { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.lexique-case { display: grid; justify-items: center; gap: 4px; padding: 14px 10px; border: 1px solid #cbbd9c; border-radius: 12px; background: #fbf6ea; text-align: center; }
.lexique-case strong { font: 700 1.05rem var(--titre); }
.lexique-case span { font-size: .8rem; color: var(--encre-douce); }
.lexique-case.inconnu { opacity: .45; border-style: dashed; }
.lexique-svg { width: 72px; height: 72px; color: var(--encre); }

.glyphe { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.glyphe .plein { fill: currentColor; stroke: none; }

.indice-objectif b { color: var(--ambre); }
.indices { padding-left: 1.3em; display: grid; gap: 8px; }

/* Interrogatoire */
.suspects { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.suspect { position: relative; display: grid; gap: 2px; padding: 0 0 12px; overflow: hidden; border: 1px solid var(--trait); border-radius: 12px; background: var(--nuit); text-align: left; }
.suspect:hover { border-color: var(--ambre); }
.suspect-portrait { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 8px; }
.suspect-portrait.image-absente .image-absente-alt { display: none; }
.suspect-nom { padding: 0 12px; font: 700 1.05rem var(--titre); }
.suspect-role { padding: 0 12px; font-size: .82rem; color: var(--texte-doux); }
.suspect-nouveau { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--ambre); color: #1b1408; font-size: .75rem; font-weight: 600; }
.conversation { display: grid; gap: 12px; }
.retour { justify-self: start; border: 0; background: none; color: var(--ambre); padding: 4px 0; }
.conversation-tete { display: flex; align-items: center; gap: 14px; }
.conversation-portrait { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.conversation-portrait.image-absente { padding: 0; }
.conversation-portrait.image-absente span { display: none; }
.conversation-tete h3 { margin: 0; font: 700 1.2rem var(--titre); }
.conversation-tete span { font-size: .85rem; color: var(--texte-doux); }
.conversation-presentation { margin: 0; font-style: italic; color: var(--texte-doux); }
.fil { display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.bulle { max-width: 88%; padding: 10px 14px; border-radius: 14px; }
.bulle p { margin: 0; }
.bulle-enqueteur { justify-self: end; background: var(--ambre); color: #1b1408; border-bottom-right-radius: 4px; font-weight: 500; }
.bulle-suspect { justify-self: start; background: var(--nuit-3); border-bottom-left-radius: 4px; }
.bulle .gains { margin-top: 10px; }
.conversation-actions { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--trait); }
.questions { display: grid; gap: 8px; }
.question { padding: 10px 14px; border: 1px solid var(--trait); border-radius: 10px; background: var(--nuit); text-align: left; }
.question:hover { border-color: var(--ambre); }
.bouton-preuve { justify-self: start; border-color: var(--rouge); }

/* Énigmes */
.enigme { display: grid; gap: 14px; }
.enigme-intro { color: var(--texte-doux); }
.enigme-message { margin: 0; min-height: 1.5em; text-align: center; color: var(--ambre); font-weight: 500; }
.enigme-aide { margin: 0; font-size: .88rem; color: var(--texte-doux); text-align: center; }

.disques { display: flex; justify-content: center; gap: clamp(8px, 3vw, 24px); flex-wrap: wrap; padding: 10px 0; }
.disque { display: flex; align-items: center; gap: 4px; }
.disque-pierre {
  width: clamp(88px, 22vw, 140px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6d675c, #3b3832 70%);
  box-shadow: inset 0 -6px 14px rgba(0,0,0,.5), 0 8px 20px rgba(0,0,0,.5);
  color: #e9dcc0;
}
.disque-svg { width: 64%; height: 64%; }
.disque-fleche { width: 36px; height: 56px; border: 1px solid var(--trait); border-radius: 10px; background: var(--nuit); font-size: 1.6rem; }
.disque-fleche:hover { border-color: var(--ambre); }
.secousse { animation: secousse .45s; }
@keyframes secousse { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.miroirs-cadre { padding: 0 44px; }
.miroirs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--colonnes), 1fr);
  grid-template-rows: repeat(var(--lignes), 1fr);
  aspect-ratio: calc(var(--colonnes) / var(--lignes));
  border-radius: 12px;
  background: linear-gradient(#4a2219, #2d1510);
  border: 2px solid #5b2d22;
}
.case { border: 1px dashed rgba(255,255,255,.06); }
.case.pilier { background: radial-gradient(circle, #6c625a 0 38%, transparent 40%); }
.case.miroir { position: relative; z-index: 2; display: grid; place-items: center; padding: 0; border: 0; background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%); }
.miroir-lame { width: 12%; height: 74%; border-radius: 4px; background: linear-gradient(90deg, #111, #3c3f44 50%, #111); box-shadow: 0 0 0 2px #8a7b67; transition: transform .25s; }
.lame-montante { transform: rotate(45deg); }
.lame-descendante { transform: rotate(-45deg); }
.lame-profil { transform: rotate(0deg) scaleX(.5); opacity: .55; }
.faisceau { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.faisceau polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.faisceau-halo { stroke: rgba(255, 196, 92, .35); stroke-width: 12; }
.faisceau-coeur { stroke: #ffe3a3; stroke-width: 3; }
.torche, .miroirs-cible { position: absolute; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; }
.torche { left: -44px; font-size: 1.6rem; }
.miroirs-cible { right: -44px; color: #7a6a58; }
.miroirs-cible.touchee { color: #ffe3a3; filter: drop-shadow(0 0 8px #ffb84d); }
.cible-svg { width: 40px; height: 40px; }

.traduction-mur { display: grid; gap: 12px; padding: 18px; border-radius: 12px; background: linear-gradient(#59544b, #3f3b35); }
.traduction-ligne { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.traduction-case { display: grid; justify-items: center; gap: 6px; }
.traduction-svg { width: clamp(64px, 16vw, 88px); height: clamp(64px, 16vw, 88px); color: #f4f0e6; filter: drop-shadow(0 0 2px rgba(255,255,255,.4)); }
.traduction-case select { min-width: 110px; min-height: 40px; padding: 0 8px; border: 1px solid var(--trait); border-radius: 8px; background: var(--nuit); }

.chronologie { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chrono-carte { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--trait); border-radius: 10px; background: var(--nuit); }
.chrono-rang { font: 700 1rem var(--dactylo); color: var(--ambre); }
.chrono-texte { font-size: .95rem; }
.chrono-boutons { display: flex; gap: 4px; }
.chrono-boutons button { width: 40px; height: 40px; border: 1px solid var(--trait); border-radius: 8px; background: var(--nuit-2); }
.chrono-boutons button:disabled { opacity: .3; cursor: default; }

/* Accusation et épilogue */
.accusation-question { margin: 0 0 18px; padding: 0; border: 0; }
.accusation-question legend { font: 700 1.1rem var(--titre); margin-bottom: 8px; }
.accusation-options { display: grid; gap: 6px; }
.accusation-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #cbbd9c; border-radius: 10px; background: #fbf6ea; cursor: pointer; }
.accusation-option:has(input:checked) { border-color: var(--rouge); box-shadow: inset 0 0 0 1px var(--rouge); }
.accusation-option input { accent-color: var(--rouge); width: 18px; height: 18px; flex: none; }
.calque-papier .enigme-message { color: var(--rouge); }
.verdict { text-align: center; padding: 16px 0; }
.verdict .tampon { font-size: 1.6rem; }

.epilogue-visuel { position: relative; }
.epilogue-visuel .tampon { position: absolute; right: 8px; bottom: 28px; font-size: clamp(1.1rem, 4vw, 1.8rem); }
.epilogue-rates { padding: 12px 16px; border-radius: 10px; background: var(--nuit); margin-bottom: 12px; }
.epilogue-rates h3 { margin: 0 0 8px; font: 700 1rem var(--titre); color: var(--ambre); }
.epilogue-rates p { margin: 0 0 8px; font-size: .92rem; }
.bilan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 8px; }
.bilan div { padding: 10px; border: 1px solid var(--trait); border-radius: 10px; text-align: center; }
.bilan dt { font: .72rem var(--dactylo); color: var(--texte-doux); text-transform: uppercase; letter-spacing: .08em; }
.bilan dd { margin: 0; font: 700 1.3rem var(--titre); }
.mention { text-align: center; font-family: var(--dactylo); color: var(--jade); }
@media (max-width: 520px) { .bilan { grid-template-columns: repeat(2, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
