/* =========================================================================
   ANGLE MORT - systeme de design « Manoir » (18/10/2026)
   Jeu de plateau d'enquete : tapis vert, bois, laiton, papier creme, bordeaux.
   Mobile d'abord (360 px), grille de 8 px, contrastes AA, aucune ressource externe.
   Pas de sang, pas de scene de crime : l'univers est celui du jeu de societe.
   ========================================================================= */

@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Special Elite"; src: url("../fonts/special-elite-latin-400-normal.woff2") format("woff2"); font-display: swap; }

/* ---------- 1. Jetons ---------- */
:root {
  --bordeaux: #6b1e2e;  --bordeaux-fonce: #4a1420;  --bordeaux-clair: #f3e3dc;
  --tapis: #1d4636;     --tapis-fonce: #12301f;     --tapis-clair: #2c5c47;
  --bois: #3a2418;      --bois-fonce: #26170e;
  --laiton: #c9a14a;    --laiton-clair: #ead39a;   --laiton-fonce: #8a6a2c;
  --creme: #f6eedb;     --papier: #fcf8ee;         --papier-ombre: #e9dcbd;
  --encre: #2a1f1a;     --sepia: #6b5745;          --bordure: #dccba5;
  --ok: #2e6a3e;        --ok-fond: #e2eed8;
  --alerte: #9b2d1f;    --alerte-fond: #f7e0d7;

  --titre: "Cinzel", Georgia, serif;
  --corps: "EB Garamond", Georgia, "Times New Roman", serif;
  --machine: "Special Elite", "Courier New", monospace;

  --e1: 8px; --e2: 16px; --e3: 24px; --e4: 32px; --e5: 48px;
  --r1: 6px; --r2: 12px; --r3: 18px;
  --ombre-1: 0 1px 0 rgba(0,0,0,.18), 0 3px 8px rgba(0,0,0,.22);
  --ombre-2: 0 2px 0 rgba(0,0,0,.2), 0 10px 26px rgba(0,0,0,.32);
  --onglets: 64px;
  font-size: 16px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--corps); font-size: 1.0625rem; line-height: 1.55; color: var(--creme);
  background-color: var(--tapis);
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px), radial-gradient(rgba(0,0,0,.07) 1px, transparent 1px);
  background-size: 6px 6px, 9px 9px; background-position: 0 0, 3px 4px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--laiton-clair); }
h1, h2, h3 { font-family: var(--titre); line-height: 1.2; letter-spacing: .03em; margin: 0 0 var(--e2); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 var(--e2); }
:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }
.aller-contenu { position: absolute; left: -999px; top: 8px; background: var(--papier); color: var(--encre); padding: var(--e1) var(--e2); z-index: 50; border-radius: var(--r1); }
.aller-contenu:focus { left: 8px; }
.mono { font-family: var(--machine); letter-spacing: .06em; }
.info { color: var(--sepia); }
.surtitre { font-family: var(--titre); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; margin: 0 0 var(--e1); color: var(--sepia); }
.grand { font-size: 1.25rem; font-weight: 600; }
.vide { text-align: center; color: var(--sepia); padding: var(--e3); }
.accroche { font-style: italic; color: var(--sepia); }
.en-ligne { display: inline; margin: 0; }

/* ---------- 3. Structure ---------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--e2);
  min-height: 56px; padding: var(--e1) var(--e2); padding-top: max(var(--e1), env(safe-area-inset-top));
  background: linear-gradient(var(--bordeaux), var(--bordeaux-fonce)); border-bottom: 2px solid var(--laiton);
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.logo { font-family: var(--titre); font-weight: 700; text-transform: uppercase; letter-spacing: .24em; font-size: 1rem; color: var(--laiton-clair); text-decoration: none; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.logo-angle { border-top: 1px solid var(--laiton); border-bottom: 1px solid var(--laiton); padding: 2px var(--e1); }
.entete-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px var(--e2); font-size: .95rem; }
.entete-nav a, .entete-nav .lien-bouton { color: var(--creme); text-decoration: none; }
.entete-nav a:hover { color: var(--laiton-clair); }
.entete-joueur { display: flex; align-items: center; gap: var(--e1); }
.puce-pseudo, .puce-org { font-family: var(--titre); font-size: .78rem; letter-spacing: .06em; padding: 4px 12px; border-radius: 99px; text-decoration: none; }
.puce-pseudo { background: var(--laiton); color: var(--encre); }
.puce-org { border: 1px solid var(--laiton); color: var(--laiton-clair); }

.contenu { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: var(--e2); }
.contenu-large { max-width: 1120px; }
.avec-onglets .contenu { padding-bottom: calc(var(--onglets) + var(--e3) + env(safe-area-inset-bottom)); }
.pied { text-align: center; font-size: .8rem; color: rgba(246,238,219,.75); padding: var(--e2) var(--e2) var(--e3); }
.avec-onglets .pied { padding-bottom: calc(var(--onglets) + var(--e3)); }
.pied a { color: var(--laiton-clair); }
.pied p { margin: 0 0 4px; }

/* Barre d'onglets (pouce) */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--onglets) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(var(--bois), var(--bois-fonce)); border-top: 2px solid var(--laiton);
  box-shadow: 0 -4px 14px rgba(0,0,0,.35);
}
.onglet { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: rgba(234,211,154,.72); text-decoration: none; font-family: var(--titre); font-size: .68rem; letter-spacing: .04em; }
.onglet .icone { width: 24px; height: 24px; }
.onglet.actif { color: var(--laiton-clair); }
.onglet.actif .icone { filter: drop-shadow(0 0 6px rgba(201,161,74,.55)); }
.onglet.actif span { border-bottom: 2px solid var(--laiton); }
.icone { flex: 0 0 auto; }

/* ---------- 4. Surfaces ---------- */
.carte, .formulaire-grille, .table-defile, .compteur, .carnet, .accusation, .question-bloc {
  background: var(--papier); color: var(--encre); border: 1px solid var(--bordure); border-radius: var(--r2); box-shadow: var(--ombre-2);
}
.carte { position: relative; padding: var(--e3) var(--e2); margin-bottom: var(--e2); }
.carte::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(201,161,74,.45); border-radius: 8px; pointer-events: none; }
.carte h1, .carte h2 { color: var(--bordeaux-fonce); }
.carte a:not(.bouton) { color: var(--bordeaux); }
.carte-etroite { max-width: 440px; margin: var(--e4) auto; }
.encart { display: flex; gap: var(--e1); align-items: center; padding: var(--e1) var(--e2); border-radius: var(--r1); background: var(--bordeaux-clair); color: var(--bordeaux-fonce); }
.encart-ok { background: var(--ok-fond); color: var(--ok); }
.titre-section { color: var(--laiton-clair); font-size: 1rem; text-transform: uppercase; letter-spacing: .14em; margin: var(--e4) 0 var(--e2); display: flex; align-items: center; gap: var(--e2); }
.titre-section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--laiton), transparent); }
.flash { padding: var(--e1) var(--e2); border-radius: var(--r1); margin: 0 0 var(--e2); }
.flash-ok { background: var(--ok-fond); color: var(--ok); border: 1px solid #b9d3a9; }
.flash-erreur { background: var(--alerte-fond); color: var(--alerte); border: 1px solid #e3b5a6; }
.retour { display: inline-flex; align-items: center; gap: 4px; font-family: var(--titre); font-size: .82rem; letter-spacing: .05em; text-decoration: none; color: var(--laiton-clair); margin-bottom: var(--e1); min-height: 44px; }
.retour-clair { color: var(--laiton-clair); }

/* ---------- 5. Boutons et formulaires ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e1);
  min-height: 50px; padding: 12px var(--e3); border-radius: var(--r1);
  font-family: var(--titre); font-weight: 700; font-size: .92rem; letter-spacing: .07em; text-decoration: none; cursor: pointer;
  background: linear-gradient(var(--bordeaux), var(--bordeaux-fonce)); color: var(--laiton-clair) !important;
  border: 1px solid var(--laiton-fonce); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 0 rgba(0,0,0,.25);
}
.bouton:hover { filter: brightness(1.08); }
.bouton:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton-plein { width: 100%; margin-top: var(--e2); }
.bouton-secondaire { background: var(--creme); color: var(--bordeaux-fonce) !important; border-color: var(--laiton); }
.bouton-danger { background: linear-gradient(#a33a2a, #7e2a1d); }
.bouton-accuser { font-size: 1.05rem; letter-spacing: .16em; text-transform: uppercase; border: 2px solid var(--laiton); }
.lien-bouton { background: none; border: 0; padding: var(--e1) 0; min-height: 44px; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: var(--e1); margin-top: var(--e2); align-items: center; }

.formulaire { display: flex; flex-direction: column; gap: 6px; }
.formulaire label { font-weight: 600; margin-top: var(--e1); }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 1.05rem; color: var(--encre);
  background: #fffdf7; border: 1px solid var(--bordure); border-radius: var(--r1);
}
input:focus, select:focus, textarea:focus { border-color: var(--bordeaux); outline: 3px solid rgba(201,161,74,.5); outline-offset: 0; }
input:disabled { background: var(--creme); }
.formulaire small, .aide-champ { color: var(--sepia); font-size: .88rem; }
.erreur-champ { color: var(--alerte); font-size: .88rem; }
.formulaire-grille { display: grid; grid-template-columns: 1fr; gap: 4px var(--e3); padding: var(--e3); }
.champ { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 760px) { .formulaire-grille { grid-template-columns: 1fr 1fr; } .champ-large { grid-column: 1 / -1; } }
.question fieldset, .choix-cartes { border: 0; padding: 0; margin: 0 0 var(--e2); }
.question-texte, .choix-cartes legend { font-family: var(--titre); font-weight: 700; font-size: 1rem; color: var(--bordeaux-fonce); margin-bottom: var(--e1); display: flex; align-items: center; gap: var(--e1); }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 14px; margin: var(--e1) 0; min-height: 52px; background: #fffdf7; border: 1px solid var(--bordure); border-radius: var(--r1); cursor: pointer; font-weight: 400 !important; }
.option input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--bordeaux); }
.option:has(input:checked) { border-color: var(--bordeaux); background: var(--bordeaux-clair); box-shadow: inset 4px 0 0 var(--bordeaux); }
.etape { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bordeaux); color: var(--laiton-clair); font-size: .85rem; flex: 0 0 auto; }

/* ---------- 6. Tableaux : fiches empilees sur mobile ---------- */
.table-defile { overflow-x: auto; margin-bottom: var(--e2); }
.table { width: 100%; border-collapse: collapse; color: var(--encre); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.table th { font-family: var(--titre); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bordeaux); background: #f6eedb; }
.table tbody tr:nth-child(even) { background: rgba(233,220,189,.25); }
@media (max-width: 620px) {
  .table-cartes thead { position: absolute; left: -9999px; }
  .table-cartes, .table-cartes tbody, .table-cartes tr, .table-cartes td { display: block; width: 100%; }
  .table-cartes tr { padding: var(--e1) 12px; border-bottom: 2px solid var(--bordure); background: transparent !important; }
  .table-cartes td { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: var(--e1); padding: 6px 0; border: 0; }
  .table-cartes td::before { content: attr(data-label); font-family: var(--titre); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bordeaux); padding-top: 3px; }
  .table-defile:has(.table-cartes) { overflow: visible; }
}

/* ---------- 7. Pastilles ---------- */
.pastille { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-family: var(--titre); letter-spacing: .04em; background: var(--creme); color: var(--sepia); border: 1px solid var(--bordure); white-space: nowrap; }
.pastille-ouverte, .statut-valide { background: var(--ok-fond); color: var(--ok); border-color: #b9d3a9; }
.pastille-brouillon { background: var(--bordeaux-clair); color: var(--bordeaux-fonce); }
.pastille-cloturee, .pastille-tiree, .pastille-verrou, .statut-attente { background: #fbf0cf; color: #6d520f; border-color: #e7d29a; }
.statut-faux, .statut-sans_reponse { background: var(--alerte-fond); color: var(--alerte); border-color: #e3b5a6; }

/* ---------- 8. Accueil du jeu ---------- */
.bloc-etat { display: none; }
.bloc-etat.actif { display: block; }
.banniere { position: relative; overflow: hidden; border-radius: var(--r3); margin: 0 calc(-1 * var(--e1)) var(--e2); min-height: 150px; display: flex; align-items: flex-end;
  background: radial-gradient(circle at 70% 20%, var(--tapis-clair), var(--tapis-fonce)); border: 2px solid var(--laiton); box-shadow: var(--ombre-2); }
.banniere-fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banniere-image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(18,48,31,.05) 20%, rgba(18,22,15,.88)); }
.banniere-texte { position: relative; z-index: 2; padding: var(--e3) var(--e2) var(--e2); color: var(--creme); }
.banniere-texte h1 { color: var(--laiton-clair); text-shadow: 0 2px 6px rgba(0,0,0,.6); margin-bottom: 4px; }
.banniere-texte .surtitre { color: var(--laiton-clair); }
.banniere-texte p { margin: 0; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.banniere-statut { font-size: .95rem; }
.banniere-lieu { min-height: 190px; }
.progression { list-style: none; padding: 0; margin: 0 0 var(--e2); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e1); }
.progression li { background: rgba(0,0,0,.22); border: 1px solid rgba(201,161,74,.4); border-radius: var(--r2); padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.progression strong { font-family: var(--titre); font-size: 1.2rem; color: var(--laiton-clair); }
.progression span { font-size: .8rem; color: var(--creme); line-height: 1.2; }

.plateau { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: var(--e2); }
@media (min-width: 620px) { .plateau { grid-template-columns: repeat(3, 1fr); } }
.salle { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r2); text-decoration: none; color: var(--encre);
  background: var(--papier); border: 2px solid var(--laiton-fonce); box-shadow: var(--ombre-1); transition: transform .15s ease, box-shadow .15s ease; }
.salle:hover, .salle:focus-visible { transform: translateY(-2px); box-shadow: var(--ombre-2); border-color: var(--laiton); }
.salle-image { display: block; aspect-ratio: 16 / 10; background: linear-gradient(160deg, #e8d7ae, #c9ad74); position: relative; }
.salle-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.salle-corps { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; }
.salle-nom { font-family: var(--titre); font-weight: 700; font-size: .86rem; line-height: 1.2; color: var(--bordeaux-fonce); }
.salle-meta { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--sepia); }
.salle-verrou { display: inline-flex; align-items: center; gap: 2px; background: var(--bordeaux); color: var(--laiton-clair); border-radius: 99px; padding: 1px 8px 1px 5px; font-size: .78rem; }
.salle-verrou .icone { width: 14px; height: 14px; }
.jauge { display: block; height: 5px; border-radius: 99px; background: var(--papier-ombre); overflow: hidden; }
.jauge > span { display: block; height: 100%; background: linear-gradient(90deg, var(--laiton-fonce), var(--laiton)); }
.jauge-0 { width: 0; } .jauge-10 { width: 10%; } .jauge-20 { width: 20%; } .jauge-30 { width: 30%; } .jauge-40 { width: 40%; } .jauge-50 { width: 50%; }
.jauge-60 { width: 60%; } .jauge-70 { width: 70%; } .jauge-80 { width: 80%; } .jauge-90 { width: 90%; } .jauge-100 { width: 100%; }

.actions-jeu { display: grid; gap: 10px; margin: var(--e3) 0 var(--e2); }
.action-jeu { display: flex; align-items: center; gap: 14px; padding: 14px var(--e2); min-height: 64px; border-radius: var(--r2); text-decoration: none; box-shadow: var(--ombre-1); }
.action-jeu .icone { width: 28px; height: 28px; }
.action-jeu span { display: flex; flex-direction: column; }
.action-jeu strong { font-family: var(--titre); letter-spacing: .06em; font-size: 1rem; }
.action-jeu small { font-size: .88rem; opacity: .9; }
.action-accuser { background: linear-gradient(135deg, var(--bordeaux), var(--bordeaux-fonce)); color: var(--laiton-clair); border: 2px solid var(--laiton); }
.action-juge { background: linear-gradient(135deg, var(--tapis-clair), var(--tapis-fonce)); color: var(--laiton-clair); border: 2px solid var(--laiton-fonce); }
.action-mission { background: var(--papier); color: var(--bordeaux-fonce); border: 1px solid var(--bordure); }
.deconnexion-jeu { text-align: center; color: rgba(246,238,219,.7); }
.carte-attente { text-align: center; margin-top: var(--e3); }
.patience { display: flex; justify-content: center; gap: 6px; margin: var(--e3) 0 var(--e2); }
.patience span { width: 10px; height: 10px; border-radius: 50%; background: var(--bordeaux); opacity: .3; animation: patience 1.2s infinite ease-in-out; }
.patience span:nth-child(2) { animation-delay: .2s; } .patience span:nth-child(3) { animation-delay: .4s; }
@keyframes patience { 50% { opacity: 1; } }

/* ---------- 9. Cartes a jouer ---------- */
.paquet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 var(--e3); }
@media (min-width: 520px) { .paquet { grid-template-columns: repeat(3, 1fr); } }
.carte-jeu { position: relative; aspect-ratio: 5 / 7; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: var(--e2) 12px;
  border-radius: var(--r2); text-decoration: none; text-align: center; color: var(--encre);
  background: radial-gradient(circle at 50% 35%, #fffdf6, var(--papier) 60%, var(--creme));
  border: 2px solid var(--laiton); box-shadow: inset 0 0 0 5px var(--papier), inset 0 0 0 6px var(--bordeaux), var(--ombre-1); transition: transform .15s ease; }
.carte-jeu:hover, .carte-jeu:focus-visible { transform: translateY(-3px) rotate(-.6deg); box-shadow: inset 0 0 0 5px var(--papier), inset 0 0 0 6px var(--bordeaux), var(--ombre-2); }
.carte-coin { position: absolute; top: 12px; left: 14px; font-family: var(--titre); font-weight: 700; font-size: 1.05rem; color: var(--bordeaux); }
.carte-titre { font-family: var(--titre); font-weight: 700; font-size: .8rem; line-height: 1.25; color: var(--bordeaux-fonce); }
.carte-type { font-style: italic; font-size: .82rem; color: var(--sepia); }
.carte-tampon { position: absolute; bottom: 14px; right: 12px; transform: rotate(-12deg); border: 2px solid var(--ok); color: var(--ok); font-family: var(--machine); font-size: .72rem; padding: 0 6px; border-radius: 4px; background: rgba(226,238,216,.6); }
.carte-verso { background: repeating-linear-gradient(45deg, var(--bordeaux) 0 9px, var(--bordeaux-fonce) 9px 18px); border-color: var(--laiton); box-shadow: inset 0 0 0 5px var(--bordeaux-fonce), inset 0 0 0 6px var(--laiton), var(--ombre-1); }
.carte-verso .carte-coin, .carte-verso .carte-titre, .carte-verso .carte-type { color: var(--laiton-clair); }
.carte-verso .carte-titre { background: rgba(38,10,16,.6); padding: 4px 6px; border-radius: 4px; }
.carte-sceau { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #c2463f, #7a1f1f 70%); color: var(--laiton-clair); font-family: var(--titre); font-weight: 700; box-shadow: 0 2px 5px rgba(0,0,0,.45), inset 0 0 0 3px rgba(0,0,0,.15); }
.carte-mini { display: inline-grid; place-items: center; width: 40px; height: 56px; border-radius: 6px; font-family: var(--titre); font-weight: 700; color: var(--laiton-clair); flex: 0 0 auto; border: 2px solid var(--laiton); }
.titre-lieu-court { color: var(--laiton-clair); font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; }

/* Piece ouverte */
.contenu-piece .piece { background: var(--papier); color: var(--encre); border-radius: var(--r2); box-shadow: var(--ombre-2); padding: var(--e2); margin-bottom: var(--e2); }
.mention-fictif { font-family: var(--machine); font-size: .8rem; color: var(--bordeaux); text-transform: uppercase; letter-spacing: .05em; }
.telephone { margin: 0 auto; max-width: 380px; border: 10px solid #151515; border-radius: 30px; overflow: hidden; background: #000; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.telephone img { display: block; width: 100%; height: auto; }
.version-texte { margin-top: var(--e2); }
.version-texte summary { cursor: pointer; color: var(--bordeaux); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.md p, .md li { margin: 6px 0; }
.md blockquote { margin: 12px 0; padding: 4px var(--e2); border-left: 4px solid var(--laiton); background: #fbf3df; font-style: italic; }
.md .table-defile { box-shadow: none; }
.note-piece { color: var(--sepia); }
.titre-notes { font-family: var(--titre); font-weight: 700; color: var(--bordeaux-fonce); }
.notes { width: 100%; margin-top: 6px; font-family: var(--machine); font-size: .95rem; line-height: 28px; background: #fffdf4; background-image: repeating-linear-gradient(transparent 0 27px, rgba(110,90,72,.18) 27px 28px); border: 1px solid var(--bordure); border-radius: var(--r1); padding: 0 12px; resize: vertical; }

/* ---------- 10. Carnet du detective ---------- */
.carnet { padding: var(--e3) var(--e2); border-radius: 4px var(--r2) var(--r2) 4px; border-left: 8px double var(--bordeaux);
  background: #fffdf4; background-image: repeating-linear-gradient(transparent 0 31px, rgba(110,90,72,.16) 31px 32px); }
.carnet h1 { color: var(--bordeaux-fonce); }
.carnet-aide { font-family: var(--machine); font-size: .9rem; color: var(--sepia); }
.carnet-liste { list-style: none; padding: 0; margin: 0; }
.carnet-ligne { border-bottom: 1px dashed rgba(110,90,72,.45); }
.carnet-lien { display: flex; gap: 14px; align-items: flex-start; padding: 14px 4px; text-decoration: none; color: var(--encre); min-height: 56px; }
.carnet-lien:hover { background: rgba(201,161,74,.1); }
.carnet-texte { display: flex; flex-direction: column; gap: 2px; font-family: var(--machine); font-size: .9rem; }
.carnet-texte strong { font-family: var(--titre); font-size: .95rem; color: var(--bordeaux-fonce); }
.carnet-etat { color: var(--sepia); }
.coche { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 2px solid var(--sepia); border-radius: 4px; font-family: var(--machine); font-size: 1.15rem; color: var(--bordeaux); background: #fffdf7; }
.coche .icone { width: 18px; height: 18px; }
.coche-repondu { border-color: var(--bordeaux); background: var(--bordeaux-clair); }
.coche-piece_manquante { color: var(--sepia); opacity: .8; }
.coche-valide { border-color: var(--ok); color: var(--ok); }
.coche-faux, .coche-sans_reponse { border-color: var(--alerte); color: var(--alerte); }
.ligne-piece_manquante .carnet-etat { color: var(--alerte); }
.fiche-indice .indice { font-style: italic; color: var(--sepia); font-size: 1.05rem; }

/* ---------- 11. J'accuse ---------- */
.titre-accuse-bloc { text-align: center; margin: var(--e2) 0 var(--e3); }
.titre-accuse { font-size: 2.1rem; letter-spacing: .18em; text-transform: uppercase; color: var(--laiton-clair); text-shadow: 0 2px 0 rgba(0,0,0,.4); margin-bottom: var(--e1); }
.titre-accuse-bloc p { color: var(--creme); }
.titre-accuse-bloc .surtitre { color: var(--laiton-clair); }
.accusation { padding: var(--e3) var(--e2); }
.paquet-suspects { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.carte-suspect, .carte-preuve { position: relative; display: block; cursor: pointer; }
.carte-suspect input, .carte-preuve input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.carte-suspect-face { display: flex; flex-direction: column; gap: 6px; padding: 6px; aspect-ratio: 2 / 3; border-radius: 10px; background: var(--papier); border: 2px solid var(--laiton);
  box-shadow: inset 0 0 0 3px var(--papier), inset 0 0 0 4px var(--tapis), var(--ombre-1); transition: transform .15s ease; }
.carte-suspect-face img { flex: 1; min-height: 0; width: 100%; object-fit: cover; border-radius: 6px; }
.silhouette { flex: 1; display: grid; place-items: center; border-radius: 6px; font-family: var(--titre); font-size: 2.2rem; color: var(--laiton-clair);
  background: radial-gradient(circle at 50% 36%, #3a6b55 0 21%, transparent 22%), radial-gradient(ellipse at 50% 100%, #3a6b55 0 46%, transparent 47%), var(--tapis-fonce); }
.carte-suspect-nom { font-family: var(--titre); font-weight: 700; font-size: .78rem; text-align: center; color: var(--bordeaux-fonce); }
.carte-suspect input:checked + .carte-suspect-face { border-color: var(--bordeaux); transform: translateY(-4px); box-shadow: inset 0 0 0 3px var(--papier), inset 0 0 0 5px var(--bordeaux), 0 0 0 3px var(--laiton), var(--ombre-2); }
.carte-suspect input:focus-visible + .carte-suspect-face, .carte-preuve input:focus-visible + .carte-preuve-face { outline: 3px solid var(--laiton); outline-offset: 2px; }
.paquet-preuves { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.carte-preuve-face { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; aspect-ratio: 4 / 5; padding: 26px 6px 8px; border-radius: 8px; text-align: center; background: var(--papier); border: 2px solid var(--bordure); }
.carte-preuve-face .carte-coin { top: 6px; left: 8px; font-size: .9rem; }
.carte-preuve-face .carte-titre { font-size: .68rem; }
.carte-preuve input:checked + .carte-preuve-face { border-color: var(--bordeaux); background: var(--bordeaux-clair); box-shadow: 0 0 0 2px var(--laiton); }
.carte-preuve input:disabled + .carte-preuve-face { opacity: .4; }

/* ---------- 12. Juge ---------- */
.quota { font-family: var(--titre); font-size: .9rem; letter-spacing: .04em; color: var(--laiton-clair); }
.quota-epuise { color: #ffb4a6; }
.requete summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; min-height: 56px; }
.requete summary::-webkit-details-marker { display: none; }
.requete[open] summary { margin-bottom: var(--e2); }
.requete-titre { display: flex; flex-direction: column; }
.requete-titre strong { font-family: var(--titre); font-size: .9rem; color: var(--bordeaux-fonce); }
.requete-titre small { color: var(--sepia); }
.liste-requetes, .recap-liste { list-style: none; padding: 0; margin: 0; }

/* ---------- 13. Recapitulatif ---------- */
.bilan { text-align: center; }
.bilan-tickets { display: flex; flex-direction: column; align-items: center; margin-bottom: var(--e1); }
.bilan-tickets strong { font-family: var(--titre); font-size: 3rem; line-height: 1; color: var(--bordeaux); }
.bilan-tickets span { font-family: var(--titre); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--sepia); }
.bilan-detail { list-style: none; padding: 0; margin: var(--e2) 0; display: grid; gap: 6px; text-align: left; }
.bilan-detail li { padding: var(--e1) 12px; background: var(--creme); border-radius: var(--r1); }
.recap-valide { border-left: 6px solid var(--ok); }
.recap-faux, .recap-sans_reponse { border-left: 6px solid var(--alerte); }
.explication { background: #fbf3df; border-left: 3px solid var(--laiton); padding: var(--e1) 12px; border-radius: 0 var(--r1) var(--r1) 0; font-size: .97rem; }
.titre-ligne { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--e1); margin-bottom: var(--e1); }
.titre-ligne h1 { margin: 0; }
.gain { margin: var(--e2) 0; padding: var(--e2); text-align: center; border-radius: var(--r2); color: var(--encre); background: linear-gradient(var(--laiton-clair), var(--laiton)); border: 2px solid var(--laiton-fonce); }
.gain-titre { font-family: var(--titre); font-weight: 700; font-size: 1.2rem; margin: 0 0 var(--e1); }
.gain-jeton { font-family: var(--machine); font-size: 2rem; letter-spacing: .25em; background: var(--papier); border-radius: var(--r1); padding: var(--e1); margin: var(--e1) 0 0; }

/* ---------- 14. Aide, notifications, modale ---------- */
.aide-liste { list-style: none; padding: 0; display: grid; gap: var(--e2); }
.aide-numero { display: inline-block; min-width: 72px; margin-right: var(--e1); padding: 6px 12px; border-radius: var(--r1); text-align: center; text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: 1.2rem; background: var(--bordeaux); color: var(--laiton-clair) !important; }
.aide-urgence { background: #a33a2a; }
.bouton-aide { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30; padding: 12px var(--e3); min-height: 48px; border-radius: 99px;
  background: var(--papier); color: var(--bordeaux-fonce); border: 2px solid var(--laiton); font-family: var(--titre); font-weight: 700; text-decoration: none; box-shadow: var(--ombre-2); white-space: nowrap; }
.notifications { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 40; width: min(520px, calc(100vw - 32px)); display: grid; gap: var(--e1); pointer-events: none; }
.notification { pointer-events: auto; position: relative; padding: 12px 44px 12px var(--e2); border-radius: var(--r2); background: var(--papier); color: var(--encre); border-left: 6px solid var(--bordeaux); box-shadow: var(--ombre-2); }
.notification a { color: var(--bordeaux); font-weight: 600; }
.notification p { margin: 0 0 4px; }
.notification-fermer { position: absolute; top: 2px; right: 4px; min-width: 44px; min-height: 44px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--sepia); }
.modale { border: 2px solid var(--laiton); border-radius: var(--r2); padding: var(--e3); max-width: min(440px, calc(100vw - 32px)); background: var(--papier); color: var(--encre); box-shadow: var(--ombre-2); }
.modale::backdrop { background: rgba(18,22,15,.6); }
.modale .actions { justify-content: flex-end; }
.legal h1, .legal h2 { color: var(--bordeaux-fonce); }

/* ---------- 15. Espace organisateur (lisibilite d'abord) ---------- */
.mode-org { background: #efe6d2; color: var(--encre); }
.mode-org .contenu > h1, .mode-org .titre-ligne h1 { color: var(--bordeaux-fonce); }
.mode-org a { color: var(--bordeaux); }
.mode-org .contenu > p.info, .mode-org .vide { color: var(--sepia); }
.mode-org .table-defile, .mode-org .carte { box-shadow: var(--ombre-1); }
.mode-org .pied { color: var(--sepia); } .mode-org .pied a { color: var(--bordeaux); }
.grille-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e2); }
@media (min-width: 880px) { .grille-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.qr { display: block; width: 220px; height: 220px; margin: var(--e1) 0 var(--e2); border: 4px solid var(--laiton); border-radius: var(--r1); }
.copiable code { word-break: break-all; font-size: .9rem; }
.fiche { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px var(--e2); margin: 0; }
.fiche dt { color: var(--sepia); } .fiche dd { margin: 0; overflow-wrap: anywhere; }
.compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: var(--e2); }
.compteur { display: flex; flex-direction: column; padding: var(--e2); text-decoration: none; color: var(--sepia); }
.compteur-nombre { font-family: var(--titre); font-size: 2.1rem; font-weight: 700; color: var(--bordeaux); line-height: 1.1; font-variant-numeric: tabular-nums; }
.activite { width: 100%; height: auto; display: block; }
.activite .barre { fill: var(--bordeaux); }
.activite .etiquette { fill: var(--sepia); font-size: 9px; }
.graine { word-break: break-all; font-size: .85rem; }
.liste-pieces { list-style: none; padding: 0; margin: 0; }
.liste-pieces a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 4px; border-bottom: 1px solid var(--bordure); text-decoration: none; color: var(--encre); }
.piece-numero { flex: 0 0 3rem; font-family: var(--titre); font-weight: 700; color: var(--bordeaux); }
.piece-titre { flex: 1; }
.solution summary { cursor: pointer; font-weight: 600; color: var(--bordeaux); }
.liste-elements > li { margin-bottom: var(--e2); }
.bonne { color: var(--ok); font-weight: 600; }
.motivations { padding-left: 20px; }
.motivations .piege strong { color: var(--alerte); }

/* ---------- 16. Ecran de projection ---------- */
.mode-projection { background: var(--tapis-fonce); color: var(--creme); }
.projection { min-height: 100vh; display: flex; flex-direction: column; padding: 2vh 3vw; }
.proj-entete { display: flex; justify-content: space-between; align-items: baseline; font-size: 2vw; border-bottom: 2px solid var(--laiton); padding-bottom: 1vh; }
.proj-entete .logo { font-size: 2.4vw; }
.proj-nom { font-family: var(--titre); color: var(--laiton-clair); }
.proj-centre { flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4vw; }
.proj-rejoindre, .proj-compteur { text-align: center; }
.proj-code { font-family: var(--titre); font-weight: 700; font-size: 4vw; color: var(--laiton-clair); margin: 1vh 0; overflow-wrap: anywhere; }
.proj-qr { width: 22vw; height: 22vw; max-width: 420px; max-height: 420px; background: #fff; border: 6px solid var(--laiton); border-radius: 12px; }
.proj-libelle { font-size: 2vw; color: var(--creme); margin: 0; }
.proj-nombre { font-family: var(--titre); font-size: 13vw; font-weight: 700; line-height: 1; margin: 0; color: var(--laiton-clair); font-variant-numeric: tabular-nums; }
.proj-nombre-2 { font-size: 7vw; color: var(--creme); margin-top: 2vh; }
.proj-etat, .proj-rebours { font-size: 2.3vw; margin-top: 2vh; }
.proj-rebours strong { font-size: 3vw; }
.proj-tirage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; text-align: center; }
.proj-defile { font-family: var(--titre); font-size: 6vw; font-weight: 700; min-height: 8vw; margin: 0; color: var(--laiton-clair); }
.proj-gagnants { font-family: var(--titre); font-size: 4.5vw; margin: 0; padding: 0; list-style-position: inside; color: var(--laiton-clair); }
.proj-verif { max-width: 90vw; font-size: 1.3vw; text-align: left; color: var(--creme); }
.proj-verif summary { cursor: pointer; } .proj-verif a { color: var(--laiton-clair); }
.proj-graine { overflow-wrap: anywhere; }
.proj-participants { columns: 3; font-size: 1.1vw; }
.proj-pied { text-align: center; font-size: 1.1vw; color: rgba(246,238,219,.6); }
@media (max-width: 700px) {
  .proj-centre { grid-template-columns: 1fr; } .proj-code { font-size: 8vw; } .proj-qr { width: 60vw; height: 60vw; }
  .proj-libelle, .proj-etat, .proj-rebours { font-size: 4.5vw; } .proj-nombre { font-size: 28vw; } .proj-defile { font-size: 10vw; }
  .proj-gagnants { font-size: 8vw; } .proj-verif, .proj-participants { font-size: 3.5vw; columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .carte-jeu:hover, .salle:hover, .carte-suspect input:checked + .carte-suspect-face { transform: none; }
}

/* ---------- 17. Lisibilite : la Cinzel (capitales seules) pour les titres courts, le Garamond pour les textes longs ---------- */
.question-texte, .choix-cartes legend { font-family: var(--corps); font-weight: 600; font-size: 1.15rem; letter-spacing: 0; line-height: 1.35; }
.titre-piece { font-family: var(--corps); font-weight: 600; font-size: 1.5rem; letter-spacing: 0; color: var(--creme); }
.titre-piece .numero-piece { display: block; font-family: var(--titre); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--laiton-clair); margin-bottom: 4px; }
.carte-titre, .carte-preuve-face .carte-titre { font-family: var(--corps); font-weight: 600; font-size: .95rem; letter-spacing: 0; line-height: 1.25; }
.carte-preuve-face .carte-titre { font-size: .8rem; }
.carnet-texte strong, .requete-titre strong, .salle-nom { font-family: var(--corps); font-weight: 600; font-size: 1.02rem; letter-spacing: 0; }
.fiche-indice h1 { font-family: var(--corps); font-weight: 600; font-size: 1.55rem; letter-spacing: 0; }
