/* ===================== BLACK PINES 1987 — STYLE ===================== */
:root {
  --noir: #060708;
  --ecran: #0d1012;
  --panneau: #13171a;
  --trait: #262d31;
  --brume: #8e979c;
  --texte: #d9dcd6;
  --phosphore: #7cf29a;
  --phosphore-sombre: #2b5a37;
  --sang: #d21f2d;
  --sang-sombre: #5c1017;
  --ambre: #e8b04a;
  --papier: #e9e2cf;
  --encre: #22201c;
  --kraft: #c9b48a;
  --titre: 'VT323', 'Courier New', monospace;
  --corps: 'IBM Plex Mono', 'Courier New', monospace;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: inherit; }
html, body { margin: 0; min-height: 100%; background: var(--noir); color: var(--texte); }
body { font-family: var(--corps); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--phosphore); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Effets VHS ---------- */
.vhs::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.28) 3px);
  mix-blend-mode: multiply;
}
.vhs::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 91;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}
.aberration { text-shadow: -1.5px 0 rgba(255,40,60,.65), 1.5px 0 rgba(60,200,255,.45); }
.sans-effets .aberration { text-shadow: none; }
.sans-effets.vhs::before { display: none; }
.distorsion { animation: distorsion .55s steps(6) 1; }
@keyframes distorsion {
  0% { transform: translateX(0); filter: none; }
  20% { transform: translateX(-6px) skewX(4deg); filter: hue-rotate(40deg) contrast(1.6); clip-path: inset(12% 0 40% 0); }
  40% { transform: translateX(5px); filter: saturate(3); clip-path: inset(55% 0 8% 0); }
  60% { transform: translateX(-3px) skewX(-3deg); filter: invert(.15); clip-path: inset(0 0 0 0); }
  100% { transform: none; filter: none; }
}
.sans-effets .distorsion { animation: none; }
@media (prefers-reduced-motion: reduce) { .distorsion { animation: none; } }

.horodatage {
  position: fixed; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 92; pointer-events: none;
  font-family: var(--titre); font-size: 22px; letter-spacing: 1px; color: #f3f3ea; opacity: .85;
}
.horodatage .rec { color: var(--sang); }

/* ---------- Écrans ---------- */
.ecran { min-height: 100vh; min-height: 100dvh; }
.ecran-centre { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px 64px; }

/* Titre */
.logo { font-family: var(--titre); font-weight: 400; text-align: center; line-height: .82; margin: 0 0 6px; color: #f4f1e8; }
.logo .l1 { display: block; font-size: clamp(64px, 16vw, 168px); letter-spacing: 2px; }
.logo .l2 { display: block; font-size: clamp(36px, 8vw, 84px); color: var(--sang); letter-spacing: 18px; margin-left: 18px; }
.accroche { max-width: 46ch; text-align: center; color: var(--brume); margin: 18px auto 30px; }
.carte-titre { width: min(420px, 100%); border: 1px solid var(--trait); background: var(--ecran); padding: 18px; }
.champ { display: grid; gap: 6px; margin-bottom: 14px; }
.champ label { color: var(--brume); font-size: 13px; }
.champ input, .champ select { background: var(--noir); border: 1px solid var(--trait); padding: 9px 10px; }
.difficultes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.difficultes button { background: var(--noir); border: 1px solid var(--trait); padding: 8px 4px; }
.difficultes button[aria-pressed="true"] { border-color: var(--phosphore); color: var(--phosphore); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--trait); background: var(--panneau); padding: 9px 14px; min-height: 40px; }
.btn small { white-space: nowrap; color: var(--brume); font-size: .85em; }
.btn-principal small, .btn-vert small { color: inherit; opacity: .8; }
.btn:hover:not(:disabled) { border-color: var(--brume); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-principal { background: var(--sang); border-color: var(--sang); color: #fff; font-family: var(--titre); font-size: 24px; letter-spacing: 2px; padding: 6px 18px; }
.btn-principal:hover:not(:disabled) { background: #ec2635; border-color: #ec2635; }
.btn-vert { border-color: var(--phosphore-sombre); color: var(--phosphore); }
.btn-plein { width: 100%; }
.pile { display: grid; gap: 8px; }
.discret { color: var(--brume); font-size: 13px; }

/* Choix de l'enquêteur : jaquettes */
.grille-enq { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; width: min(1100px, 100%); }
.jaquette { text-align: left; background: #111; border: 1px solid var(--trait); padding: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.jaquette:hover, .jaquette:focus-visible { border-color: var(--sang); }
.jaquette .bandeau { height: 8px; background: repeating-linear-gradient(90deg, var(--sang) 0 18px, #8a121c 18px 36px); }
.jaquette .tete { padding: 12px 14px 4px; }
.jaquette .nom { font-family: var(--titre); font-size: 30px; line-height: 1; color: #f4f1e8; }
.jaquette .titre { color: var(--brume); font-size: 13px; }
.jaquette .stats { padding: 4px 14px; font-size: 13px; color: var(--phosphore); }
.jaquette .bloc { padding: 6px 14px; font-size: 13px; }
.jaquette .bloc b { display: block; font-weight: 600; color: #f0eee6; }
.jaquette .faille b { color: var(--sang); }
.jaquette .pied { margin-top: auto; padding: 8px 14px 12px; font-family: var(--titre); font-size: 18px; color: var(--brume); border-top: 1px dashed var(--trait); }

/* ---------- Plateau ---------- */
.plateau { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr); grid-template-rows: auto 1fr auto; gap: 10px; padding: 10px 12px 56px; max-width: 1400px; margin: 0 auto; }
.plateau > *, .bas > *, .cote > * { min-width: 0; }
.jauges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 12px; background: var(--ecran); border: 1px solid var(--trait); }
.jauge { display: flex; align-items: baseline; gap: 8px; }
.jauge .lib { color: var(--brume); font-size: 12px; }
.jauge .val { font-family: var(--titre); font-size: 24px; line-height: 1; letter-spacing: 1px; }
.jauge .val.rouge { color: var(--sang); }
.jauge .val.vert { color: var(--phosphore); }
.jauges .outils { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.jauges .outils .btn { min-height: 34px; padding: 4px 10px; font-size: 13px; }

.carte-ville { position: relative; background: #0a0d0c; border: 1px solid var(--trait); min-height: 360px; overflow: hidden; }
.carte-ville > svg { display: block; width: 100%; height: 100%; }
.lieu-btn { cursor: pointer; }
.lieu-btn .pastille { fill: #0f1412; stroke: #3c4a44; stroke-width: 1.2; }
.lieu-btn:hover .pastille, .lieu-btn:focus .pastille { stroke: var(--phosphore); }
.lieu-btn.choisi .pastille { stroke: var(--phosphore); stroke-width: 2.2; }
.lieu-btn text { font-family: var(--corps); font-size: 11.5px; fill: #c9cec8; }
.lieu-btn:focus { outline: none; }
.lieu-btn:focus-visible .pastille { stroke: var(--ambre); stroke-width: 2.4; }

.cote { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.panneau { background: var(--ecran); border: 1px solid var(--trait); padding: 12px 14px; }
.panneau h2 { font-family: var(--titre); font-weight: 400; font-size: 28px; line-height: 1; margin: 0 0 4px; color: #f2efe6; }
.panneau h3 { font-size: 12px; font-weight: 600; color: var(--brume); margin: 14px 0 6px; letter-spacing: .5px; }
.panneau .desc { color: var(--brume); font-size: 13px; margin: 0 0 6px; }
.ligne-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--trait); }
.ligne-action:first-of-type { border-top: 0; }
.ligne-action .qui { min-width: 0; }
.ligne-action .qui small { display: block; color: var(--brume); font-size: 12px; }
.ligne-action .btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ligne-action .btn { min-height: 34px; padding: 4px 10px; font-size: 13px; }
.etiquette { display: inline-block; font-size: 11px; padding: 1px 6px; border: 1px solid currentColor; margin-left: 6px; vertical-align: 1px; }
.etiquette.vert { color: var(--phosphore); }
.etiquette.rouge { color: var(--sang); }
.etiquette.ambre { color: var(--ambre); }
.tags-scene { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-top: 2px; }
.tags-scene .inconnu { color: var(--brume); }
.tags-scene .efface { color: var(--sang); text-decoration: line-through; }

.journal { flex: 1; min-height: 160px; max-height: 340px; overflow-y: auto; font-size: 13px; }
.journal p { margin: 0 0 7px; padding-left: 10px; border-left: 2px solid var(--trait); }
.journal p .n { color: var(--brume); font-family: var(--titre); font-size: 16px; margin-right: 6px; }
.journal p.meurtre { border-color: var(--sang); }
.journal p.phenomene { border-color: #7b5cff; }
.journal p.indice, .journal p.bon { border-color: var(--phosphore); }
.journal p.demasque, .journal p.accusation { border-color: var(--ambre); }

/* Bas : phénomènes, main, actions */
.bas { grid-column: 1 / -1; display: grid; gap: 10px; }
.rangee { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; align-items: stretch; }
.rangee-titre { font-size: 12px; color: var(--brume); margin: 0 0 4px; }
.pheno { flex: 0 0 auto; width: 210px; text-align: left; background: #0e0b16; border: 1px solid #3a2d63; padding: 8px 10px; font-size: 12.5px; }
.pheno b { display: block; font-family: var(--titre); font-weight: 400; font-size: 19px; color: #cfc4ff; }
.pheno .res { color: var(--phosphore); margin-top: 4px; }
.pheno .res.rien { color: var(--brume); }
.pheno:hover { border-color: #8a72ff; }

.main { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.k7 { flex: 0 0 auto; width: 150px; min-height: 196px; text-align: left; padding: 0; border: 1px solid #2c2c2c; background: #141414; display: flex; flex-direction: column; position: relative; transition: transform .12s; }
.k7:hover, .k7:focus-visible { transform: translateY(-4px); border-color: var(--brume); }
.k7.choisie { border-color: var(--phosphore); transform: translateY(-6px); }
.k7 .tranche { padding: 5px 8px; font-size: 10.5px; letter-spacing: .5px; color: #111; background: var(--kraft); }
.k7.indice .tranche { background: var(--papier); }
.k7.objet .tranche { background: var(--phosphore); }
.k7.relique .tranche { background: var(--ambre); }
.k7 .titre-k7 { font-family: var(--titre); font-size: 22px; line-height: 1; padding: 10px 8px 6px; color: #f4f1e8; }
.k7 .corps-k7 { font-size: 11.5px; color: var(--brume); padding: 0 8px; }
.k7 .bas-k7 { margin-top: auto; padding: 6px 8px; font-size: 11px; border-top: 1px dashed #333; color: var(--brume); }
.k7 .bas-k7.douteux { color: var(--ambre); }
.k7.equipe { width: 136px; min-height: 120px; background: #0f1611; border-color: var(--phosphore-sombre); }

.barre-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.barre-actions .ressort { flex: 1; }
.barre-actions .btn { font-size: 13px; }
.pa-pips { font-family: var(--titre); font-size: 26px; letter-spacing: 3px; color: var(--phosphore); }
.pa-pips .vide { color: #2b3330; }

/* Popover d'une carte */
.menu-carte { position: fixed; z-index: 70; background: var(--panneau); border: 1px solid var(--brume); padding: 10px; width: 240px; box-shadow: 0 8px 30px rgba(0,0,0,.7); }
.menu-carte p { margin: 0 0 8px; font-size: 12.5px; color: var(--brume); }
.menu-carte b { color: var(--texte); }

/* ---------- Modales ---------- */
.voile { position: fixed; inset: 0; z-index: 80; background: rgba(2,3,3,.82); display: flex; align-items: center; justify-content: center; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.modale { width: min(620px, 100%); max-height: 100%; overflow-y: auto; background: var(--ecran); border: 1px solid var(--trait); padding: 18px 20px; }
.modale h2 { font-family: var(--titre); font-weight: 400; font-size: 36px; line-height: 1; margin: 0 0 12px; }
.modale .pied-modale { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.aube-ligne { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--trait); }
.saut { display: block; height: .7em; }
.aube-ligne .regle { display: block; margin-top: 5px; font-size: 12.5px; font-style: normal; color: var(--brume); }
.aube-ligne em, .journal em, .dn-journal em { color: #f2efe6; }
.aube-ligne.meurtre { border-color: var(--sang); }
.aube-ligne.tentative { border-color: var(--ambre); }
.aube-ligne.phenomene { border-color: #7b5cff; font-style: italic; }
.aube-ligne.evenement { border-color: var(--kraft); }
.aube-ligne.indice, .aube-ligne.bon { border-color: var(--phosphore); }
.aube-ligne.attaque, .aube-ligne.demasque { border-color: var(--sang); color: #ffb3b8; }
.liste-choix { display: grid; gap: 6px; }
.liste-choix button { text-align: left; background: var(--noir); border: 1px solid var(--trait); padding: 8px 10px; }
.liste-choix button:hover { border-color: var(--phosphore); }
.liste-choix button small { display: block; color: var(--brume); }

/* ---------- Dossier (fiches de police) ---------- */
.dossier { width: min(1000px, 100%); background: var(--papier); color: var(--encre); border: 0; padding: 0; }
.dossier .entete { background: var(--kraft); padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dossier .entete h2 { font-family: var(--titre); font-size: 34px; margin: 0; color: #2a2116; }
.dossier .onglets { display: flex; gap: 2px; padding: 0 12px; background: var(--kraft); overflow-x: auto; }
.dossier .onglets button { background: #b8a275; border: 0; padding: 6px 12px; color: #2a2116; white-space: nowrap; }
.dossier .onglets button[aria-selected="true"] { background: var(--papier); font-weight: 600; }
.dossier .contenu { padding: 14px 18px 18px; }
.dossier .defile { overflow-x: auto; }
.dossier table { border-collapse: collapse; width: 100%; font-size: 13px; }
.dossier th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--encre); padding: 5px 6px; white-space: nowrap; }
.dossier td { border-bottom: 1px solid #c8bfa8; padding: 5px 6px; vertical-align: top; }
.dossier tr.barre td { text-decoration: line-through; opacity: .45; }
.dossier tr.grise td { opacity: .35; }
.dossier .marque { background: none; border: 1px solid var(--encre); width: 26px; height: 26px; padding: 0; line-height: 1; }
.dossier .statut { font-size: 11px; padding: 1px 6px; border: 1px solid; white-space: nowrap; }
.dossier .statut.fiable { color: #1d5e2f; }
.dossier .statut.douteux { color: #8a5a00; }
.dossier .statut.corrobore { color: #fff; background: #1d5e2f; border-color: #1d5e2f; }
.dossier .statut.contradictoire { color: #fff; background: #8f1a22; border-color: #8f1a22; }
/* Refonte des cartes : entrées vérifiées par Recouper */
.dossier .statut.confirme { color: #fff; background: #123f22; border: 3px double #e9e2cf; font-weight: 600; }
.dossier .statut.dementi { color: #8f1a22; border-style: dashed; text-decoration: line-through; }
.dossier tr.dementi td:nth-child(2) { opacity: .55; }
.k7 .revers-k7 { display: block; margin-top: 4px; padding-top: 3px; border-top: 1px dotted rgba(233, 226, 207, .25); font-style: italic; opacity: .8; }
.dossier .note { color: #6b6455; font-size: 12px; }
.dossier .btn { background: #2a2116; color: var(--papier); border-color: #2a2116; }

/* ---------- Manuel ---------- */
.manuel { width: min(1120px, 100%); height: 100%; max-height: 100%; padding: 0; overflow: hidden; display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); background: var(--papier); color: var(--encre); border: 0; }
.m-entete { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; background: var(--kraft); }
.m-entete h2 { margin: 0; font-family: var(--titre); font-weight: 400; font-size: 32px; color: #2a2116; }
.m-entete .btn { background: #2a2116; color: var(--papier); border-color: #2a2116; }
.m-choix { display: none; }
.m-nav { overflow-y: auto; border-right: 1px solid #cdbf9f; padding: 12px 8px; background: #e2d9c2; }
.m-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.m-nav li { counter-increment: m; }
.m-nav button { width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; font-size: 13px; color: #3a3328; display: flex; gap: 8px; }
.m-nav button::before { content: counter(m); min-width: 1.6em; color: #8a7a5a; font-family: var(--titre); font-size: 17px; line-height: 1.1; }
.m-nav button:hover { background: #d6cbb0; }
.m-nav button[aria-current] { background: #2a2116; color: var(--papier); }
.m-corps { position: relative; overflow-y: auto; padding: 8px 28px 60px; scroll-behavior: smooth; }
.m-section { max-width: 74ch; padding: 18px 0 10px; border-bottom: 1px dashed #c3b48f; }
.m-section > h2 { font-family: var(--titre); font-weight: 400; font-size: 38px; line-height: 1; margin: 0 0 10px; color: #2a2116; }
.m-section h3 { font-size: 15px; font-weight: 600; margin: 22px 0 6px; color: #2a2116; }
.m-section p, .m-section li { font-size: 14.5px; line-height: 1.65; }
.m-section ul, .m-section ol { padding-left: 20px; }
.m-section table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 8px 0 12px; }
.m-section th { text-align: left; border-bottom: 2px solid var(--encre); padding: 5px 8px; font-weight: 600; }
.m-section td { border-bottom: 1px solid #cdbf9f; padding: 5px 8px; vertical-align: top; }
.m-section .defile { overflow-x: auto; }
.m-section .fiche { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.m-section .fiche span { font-size: 12.5px; padding: 2px 8px; border: 1px solid #a8987a; background: #efe8d6; }
.m-section .exemple { display: block; margin: 12px 0 18px; padding: 10px 16px 4px; background: #ddd2b8; border-left: 4px solid #8a6d3b; }
.m-section .exemple > b { display: block; font-family: var(--titre); font-weight: 400; font-size: 22px; color: #6b4f22; margin-bottom: 2px; }
.m-section .exemple p { margin: 0 0 8px; }
.m-section .enq { margin: 6px 0 18px; }
.m-section .formule { font-weight: 600; padding: 8px 12px; border: 1px solid #a8987a; background: #efe8d6; }
.m-section .phases li { margin-bottom: 6px; }
.m-section .conseils li { margin-bottom: 8px; }
@media (max-width: 760px) {
  .manuel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .m-choix > span { flex: none; }
  .m-section > h2 { font-size: 30px; }
  .m-nav { display: none; }
  .m-choix { display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: #e2d9c2; font-size: 13px; }
  .m-choix select { flex: 1; min-width: 0; width: 100%; background: var(--papier); color: var(--encre); border: 1px solid #a8987a; padding: 6px; }
  .m-corps { padding: 4px 16px 50px; }
  .m-entete h2 { font-size: 22px; min-width: 0; }
}

/* ---------- Dernière Nuit ---------- */
.dn { max-width: 860px; margin: 0 auto; padding: 18px 14px 70px; }
.dn h1 { font-family: var(--titre); font-weight: 400; font-size: clamp(48px, 10vw, 96px); line-height: .9; color: var(--sang); margin: 10px 0 4px; text-align: center; }
.dn .sous { text-align: center; color: var(--brume); margin: 0 0 18px; }
.dn-jauges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.dn-jauge { background: var(--ecran); border: 1px solid var(--trait); padding: 10px 12px; }
.dn-jauge .val { font-family: var(--titre); font-size: 40px; line-height: 1; }
.dn-jauge .val.coeurs { color: var(--sang); }
.barre-menace { height: 10px; background: #1b1b1b; margin-top: 6px; }
.barre-menace i { display: block; height: 100%; background: var(--sang); transition: width .4s; }
.des { display: flex; justify-content: center; gap: 22px; margin: 6px 0 14px; min-height: 70px; }
.de { width: 60px; height: 60px; border: 2px solid var(--texte); display: flex; align-items: center; justify-content: center; font-family: var(--titre); font-size: 40px; }
.de.tueur { border-color: var(--sang); color: var(--sang); }
.de.roule { animation: roule .45s steps(5) 1; }
@keyframes roule { 0% { transform: rotate(0) } 50% { transform: rotate(90deg) scale(.85) } 100% { transform: rotate(0) } }
.de.vide { opacity: .3; }
.de-lib { text-align: center; font-size: 11px; color: var(--brume); margin-top: 3px; }
.dn-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 14px; }
.dn-actions .btn { flex-direction: column; align-items: flex-start; text-align: left; padding: 8px 12px; }
.dn-actions .btn small { color: var(--brume); font-size: 11.5px; }
.dn-journal p { margin: 0 0 6px; font-size: 14px; }
.dn-journal .m { color: var(--brume); font-family: var(--titre); font-size: 18px; margin-right: 8px; }

/* ---------- Révélation ---------- */
.revelation { max-width: 720px; margin: 0 auto; padding: 30px 16px 80px; }
.revelation h1 { font-family: var(--titre); font-weight: 400; font-size: clamp(54px, 12vw, 110px); line-height: .85; margin: 0 0 10px; text-align: center; }
.revelation h1.perdu { color: var(--sang); }
.revelation h1.gagne { color: var(--phosphore); }
.fiche-coupable { background: var(--papier); color: var(--encre); padding: 16px 18px; margin: 18px 0; }
.fiche-coupable .nom { font-family: var(--titre); font-size: 40px; line-height: 1; }
.fiche-coupable dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 14px; }
.fiche-coupable dt { font-weight: 600; }
.fiche-coupable dd { margin: 0; }
.texte-revelation { font-size: 16px; border-left: 3px solid var(--sang); padding-left: 14px; }
.score { display: flex; gap: 22px; align-items: baseline; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.score .grand { font-family: var(--titre); font-size: 64px; line-height: 1; color: var(--phosphore); }
.score .rang { font-family: var(--titre); font-size: 34px; }
.epilogue { perspective: 900px; margin: 26px auto; width: min(360px, 100%); height: 200px; cursor: pointer; border: 0; background: none; padding: 0; display: block; }
.epilogue .face { position: absolute; inset: 0; backface-visibility: hidden; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; border: 1px solid var(--trait); transition: transform .7s; }
.epilogue .recto { background: repeating-linear-gradient(45deg, #111 0 10px, #161616 10px 20px); font-family: var(--titre); font-size: 28px; color: var(--brume); }
.epilogue .verso { background: #0b0b0b; transform: rotateY(180deg); font-size: 16px; font-style: italic; color: #f0ede4; }
.epilogue.retourne .recto { transform: rotateY(180deg); }
.epilogue.retourne .verso { transform: rotateY(360deg); }
.epilogue .carte-int { position: relative; width: 100%; height: 100%; }

/* ---------- Debug ---------- */
.debug { position: fixed; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 95; background: rgba(10,0,0,.94); border: 1px solid var(--sang); padding: 10px 12px; font-size: 12px; max-width: 360px; max-height: 60vh; overflow: auto; }
.debug b { color: var(--sang); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .plateau { grid-template-columns: 1fr; }
  .carte-ville { min-height: 0; }
  .journal { max-height: 220px; }
  .jauges .outils { margin-left: 0; width: 100%; }
  .horodatage { font-size: 15px; opacity: .7; }
}
@media (max-width: 520px) {
  .k7 { width: 128px; min-height: 176px; }
  .k7 .titre-k7 { font-size: 19px; }
  .jauge .val { font-size: 21px; }
  .dn-jauges { grid-template-columns: 1fr; }
}

/* ---------- Icônes ---------- */
.ico { display: inline-block; width: 32px; height: 32px; color: var(--phosphore); filter: drop-shadow(0 0 2px rgba(124, 242, 154, .45)); flex: none; }
.sans-effets .ico .ico-ab, .sans-effets .ico-lieu .ico-ab { display: none; }
.sans-effets .ico { filter: none; }
.ecran-k7 { display: flex; align-items: center; justify-content: center; height: 54px; margin: 6px 8px 0; background: #050806 repeating-linear-gradient(to bottom, transparent 0 2px, rgba(124,242,154,.05) 2px 3px); border: 1px solid #222; }
.ecran-k7 .ico { width: 40px; height: 40px; }
.k7.relique .ecran-k7 .ico { color: var(--ambre); filter: drop-shadow(0 0 2px rgba(232, 176, 74, .5)); }
.k7.indice .ecran-k7 .ico { color: var(--papier); filter: drop-shadow(0 0 2px rgba(233, 226, 207, .4)); }
.ecran-k7.petit { height: 40px; } .ecran-k7.petit .ico { width: 30px; height: 30px; }
.k7 { min-height: 236px; } .k7.equipe { min-height: 150px; }
.pheno b { display: flex; align-items: center; gap: 6px; }
.ico-titre { width: 22px; height: 22px; color: #cfc4ff; filter: drop-shadow(0 0 2px rgba(150, 130, 255, .6)); }
.aube-ligne.avec-ico { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.aube-ligne.avec-ico > :not(.ico) { grid-column: 2; }
.ico-aube { width: 32px; height: 32px; grid-row: 1 / span 9; }
.aube-ligne.meurtre .ico-aube, .aube-ligne.attaque .ico-aube { color: #f0ede4; }
.aube-ligne.phenomene .ico-aube { color: #cfc4ff; }
.aube-ligne.evenement .ico-aube { color: var(--kraft); }
.ico-jaq { width: 44px; height: 44px; float: right; margin: 0 0 4px 8px; }
.avec-ico-d { display: inline-flex; align-items: center; gap: 8px; }
.ico-d { width: 24px; height: 24px; color: #2a2116; filter: none; }
.ico-d .ico-ab { display: none; }
@media (max-width: 520px) { .k7 { min-height: 214px; } .ecran-k7 { height: 46px; } .ecran-k7 .ico { width: 34px; height: 34px; } }

/* ---------- Galerie des cartes ---------- */
.m-boutons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.galerie { width: min(1240px, 100%); height: 100%; max-height: 100%; padding: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; background: #08090a; }
.g-entete { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--trait); }
.g-entete h2 { margin: 0; font-family: var(--titre); font-weight: 400; font-size: 34px; color: #f4f1e8; }
.g-onglets { display: flex; gap: 4px; overflow-x: auto; padding: 8px 14px; border-bottom: 1px solid var(--trait); }
.g-onglets button { flex: none; background: var(--noir); border: 1px solid var(--trait); padding: 6px 12px; font-size: 13px; }
.g-onglets button[aria-selected="true"] { border-color: var(--phosphore); color: var(--phosphore); }
.g-corps { overflow-y: auto; padding: 14px 18px 40px; }
.g-intro { color: var(--brume); margin: 0 0 14px; max-width: 70ch; }
.g-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cc { --c: var(--brume); background: #121314; border: 1px solid #2a2c2e; display: flex; flex-direction: column; min-width: 0; }
.cc-tranche { display: flex; justify-content: space-between; padding: 4px 10px; font-size: 11px; letter-spacing: .5px; color: #111; background: var(--c); font-weight: 600; }
.cc-ecran { display: flex; align-items: center; justify-content: center; height: 92px; margin: 10px 10px 0; background: #040605 repeating-linear-gradient(to bottom, transparent 0 2px, rgba(255,255,255,.035) 2px 3px); border: 1px solid #1e2021; }
.cc-ecran .ico { width: 64px; height: 64px; color: var(--c); filter: drop-shadow(0 0 3px var(--c)); }
.cc-nom { font-family: var(--titre); font-weight: 400; font-size: 26px; line-height: 1; margin: 10px 10px 2px; color: #f4f1e8; }
.cc-sous { margin: 0 10px 6px; font-size: 12.5px; color: var(--brume); }
.cc-stats { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 4px 10px 6px; font-size: 12px; }
.cc-stats dt { color: var(--brume); }
.cc-stats dd { margin: 0; color: var(--texte); }
.cc-texte { margin: 4px 10px 6px; font-size: 12.5px; line-height: 1.5; }
.cc-texte b { color: #f0eee6; }
.cc-texte.faille b { color: var(--sang); }
.cc-texte.note { color: var(--brume); }
.cc-texte.citation { font-style: italic; color: #d8d4c8; }
.cc-pied { margin-top: auto; padding: 6px 10px; border-top: 1px dashed #2c2c2c; font-size: 11.5px; color: var(--brume); }
.cc-enq { --c: var(--phosphore); } .cc-suspect { --c: var(--papier); } .cc-ado { --c: var(--ambre); } .cc-habitant { --c: #a9b0b5; }
.cc-lieu { --c: #7fc7e8; } .cc-arme { --c: #ff4a57; } .cc-croyance { --c: #b9a6ff; } .cc-indice { --c: var(--papier); }
.cc-objet { --c: var(--phosphore); } .cc-relique { --c: var(--ambre); } .cc-evenement { --c: var(--kraft); } .cc-phenomene { --c: #b9a6ff; } .cc-tueur { --c: #ff4a57; }
@media (max-width: 520px) { .g-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .cc-nom { font-size: 21px; } .cc-ecran { height: 70px; } .cc-ecran .ico { width: 48px; height: 48px; } .g-corps { padding: 10px 10px 30px; } }

.cc-tueur .cc-ecran .ico, .cc-arme .cc-ecran .ico { color: #f0ede4; filter: drop-shadow(0 0 3px rgba(255, 74, 87, .8)); }

/* ---------- Portraits ---------- */
.cc-ecran { position: relative; }
.cc-ecran .portrait { width: 84px; height: 84px; }
.cc-role { position: absolute; right: 6px; bottom: 5px; }
.cc-role .ico { width: 20px; height: 20px; filter: none; opacity: .8; }
.cc-role .ico-ab { display: none; }
.avec-portrait { display: flex; gap: 10px; align-items: flex-start; }
.ico-ligne { width: 34px; height: 34px; color: var(--phosphore); }
.ico-ligne.mort { opacity: .35; filter: grayscale(1); }
.ico-d.portrait { width: 30px; height: 30px; color: #2a2116; }
.ico-d.portrait path[fill="#040705"] { fill: #e9e2cf; }
.ico-jaq.portrait { width: 60px; height: 60px; }
.aube-ligne .portrait.ico-aube { width: 36px; height: 36px; color: #f0ede4; }
.jaquette .tete { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: start; }
.jaquette .tete .nom, .jaquette .tete .titre { display: block; grid-column: 1; }
.jaquette .tete .ico-jaq { grid-column: 2; grid-row: 1 / span 2; float: none; margin: 0; }

/* ---------- Page sur le site ---------- */
.alerte-textes { margin-top: 18px; width: min(420px, 100%); border: 1px solid var(--sang); background: #1a0a0c; padding: 12px 14px; font-size: 13px; display: grid; gap: 6px; }
.alerte-textes b { color: #ff8a92; }
.lien-site { color: var(--brume); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.lien-site:hover { color: var(--texte); }
a.btn { text-decoration: none; }
