/* La Résistance — thème sombre, pensé pour téléphone. */

:root {
  --bg: #0b0f1c;
  --bg2: #111a2e;
  --panel: #16203a;
  --panel-2: #1c2946;
  --line: #2a3a61;
  --text: #e8ecf6;
  --muted: #93a0bd;
  --blue: #4c8dff;
  --blue-2: #2f6ae0;
  --red: #e5484d;
  --red-2: #b83338;
  --gold: #f2c14e;
  --purple: #8b5cf6;
  --ok: #3ecf8e;
  --blue-bg: #14324d;
  --red-bg: #3c151c;
  --ok-bg: #123528;
  --card-face-1: #1d2846;
  --card-face-2: #111a2f;
  --card-line: #45568a;
  --icon-soft: #cfd8ee;
  --back-face-1: #202b4d;
  --back-face-2: #131b33;
  --mcard-1: #1c2440;
  --mcard-2: #131b30;
  --mcard-line: #3b4a74;
  --glow-1: #1a2545;
  --glow-2: #2a1020;
  --overlay: rgba(4, 7, 15, 0.75);
  --stripe: rgba(255, 255, 255, 0.03);
  --face-res-1: #1b2b4c;
  --face-res-2: #101a30;
  --face-res-line: #3d5a8c;
  --face-res-ink: #7fa7e8;
  --face-spy-1: #2e1e2c;
  --face-spy-2: #170f1c;
  --face-spy-line: #74404c;
  --face-spy-ink: #d98b93;
  --face-cmd-1: #262047;
  --face-cmd-2: #14102a;
  --face-cmd-line: #5b4a94;
  --face-cmd-ink: #a795e0;
  --radius: 16px;
}

/* Thème clair (bouton sur l'écran d'accueil). */
body.theme-light {
  --bg: #f2f5fb;
  --bg2: #e8edf7;
  --panel: #ffffff;
  --panel-2: #e9eef9;
  --line: #c9d4ea;
  --text: #17203a;
  --muted: #5b6a8c;
  --blue: #2f6ae0;
  --blue-2: #1d4fb8;
  --red: #d92d33;
  --red-2: #b02226;
  --gold: #b9871d;
  --purple: #7c4dff;
  --ok: #0e9f6e;
  --blue-bg: #dce9ff;
  --red-bg: #ffdfe1;
  --ok-bg: #d8f3e7;
  --card-face-1: #ffffff;
  --card-face-2: #e9eef9;
  --card-line: #b9c6e4;
  --icon-soft: #44536f;
  --back-face-1: #dfe6f6;
  --back-face-2: #cbd6ee;
  --mcard-1: #ffffff;
  --mcard-2: #eef2fa;
  --mcard-line: #b9c6e4;
  --glow-1: #dbe6fb;
  --glow-2: #f7dfe7;
  --overlay: rgba(23, 32, 58, 0.4);
  --stripe: rgba(23, 32, 58, 0.05);
  --face-res-1: #e8effc;
  --face-res-2: #d8e4f8;
  --face-res-line: #9db9e6;
  --face-res-ink: #2f5cb0;
  --face-spy-1: #fbeaee;
  --face-spy-2: #f3d9e0;
  --face-spy-line: #dfa4b0;
  --face-spy-ink: #a83a48;
  --face-cmd-1: #efe9fc;
  --face-cmd-2: #e2d8f6;
  --face-cmd-line: #b9a5e8;
  --face-cmd-ink: #6a45c2;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* L'attribut hidden doit toujours gagner, même sur les éléments en flex
   (sans ceci, la face de la carte de rôle resterait visible en permanence). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--glow-1) 0%, transparent 60%),
    radial-gradient(900px 400px at 110% 110%, var(--glow-2) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

.screen { display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - 60px); }

/* --- Typo & éléments communs ------------------------------------- */

.title {
  margin: 6px 0 0;
  text-align: center;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tagline { text-align: center; color: var(--muted); margin: 0 0 10px; }

.unofficial {
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  opacity: 0.7;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.topbar h2 { margin: 0; font-size: 1.05rem; text-align: center; letter-spacing: 0.06em; text-transform: uppercase; }
.topbar > :first-child { justify-self: start; }
.topbar > :last-child { justify-self: end; }
.topbar-right { display: flex; align-items: center; }
.topbar-right .btn-link { padding: 8px 6px; }
.progress { color: var(--muted); font-size: 0.85rem; text-align: center; }

.hint { color: var(--muted); font-size: 0.9rem; margin: 4px 0; line-height: 1.45; }
.center { text-align: center; }
.warn { color: var(--gold); text-align: center; font-weight: 600; }

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.card-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Boutons ------------------------------------------------------ */

.btn {
  font: inherit;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel-2);
  transition: transform 0.06s ease, opacity 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: default; }

.btn-primary { background: linear-gradient(180deg, var(--blue), var(--blue-2)); }
.btn-danger { background: linear-gradient(180deg, var(--red), var(--red-2)); }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); }
.btn-link { background: transparent; color: var(--muted); padding: 8px 10px; font-weight: 600; }
.btn-big { width: 100%; padding: 16px 20px; font-size: 1.05rem; margin-top: auto; }
.btn-round { width: 52px; height: 52px; padding: 0; font-size: 1.6rem; line-height: 1; border-radius: 50%; }
.btn-mini { padding: 6px 12px; font-size: 0.8rem; }

/* --- Accueil ------------------------------------------------------ */

.home { align-items: center; justify-content: center; text-align: center; padding-top: 24px; }
.home .stack { width: 100%; max-width: 320px; }
.home-emblem { filter: drop-shadow(0 6px 24px rgba(229, 72, 77, 0.35)); }

/* --- Configuration ------------------------------------------------ */

.counter { display: flex; align-items: center; justify-content: center; gap: 22px; }
.counter-value { font-size: 2.2rem; font-weight: 800; min-width: 56px; text-align: center; }

.names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.name-input {
  font: inherit;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  width: 100%;
}
.name-input:focus { outline: 2px solid var(--blue); border-color: transparent; }

.opt-row {
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  color: var(--text);
  padding: 12px 2px;
  text-align: left;
  cursor: pointer;
}
.opt-row:first-of-type { border-top: none; }
.opt-row small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.opt-value { color: var(--blue); font-weight: 700; white-space: nowrap; }

.switch {
  flex: none;
  width: 46px;
  height: 27px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  transition: background 0.15s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s ease;
}
.switch.on { background: var(--blue); }
.switch.on::after { left: 22px; }

/* --- Passage de téléphone ---------------------------------------- */

.pass-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.pass-label { color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }
.pass-name { font-size: 2.1rem; font-weight: 800; margin: 0 0 14px; }
.pass-box .btn-big { max-width: 320px; margin-top: 10px; }

/* --- Carte de rôle ------------------------------------------------ */

.role-card-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }

.role-card {
  width: min(88vw, 340px);
  height: min(120vw, 440px);
  border-radius: 22px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none; /* iOS : pas de loupe/menu sur appui long */
  touch-action: manipulation;
  cursor: pointer;
  perspective: 1200px;
}
.role-card * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Retournement 3D : un toucher bascule la classe .flipped */
.role-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.role-card.flipped .role-inner { transform: rotateY(180deg); }

.role-back, .role-front {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.role-front { transform: rotateY(180deg); }

.role-back {
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, var(--stripe) 14px 28px),
    linear-gradient(160deg, var(--back-face-1), var(--back-face-2));
  border: 1.5px solid var(--line);
}
.role-back-stamp {
  border: 3px solid var(--red);
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 10px 18px;
  border-radius: 8px;
  transform: rotate(-12deg);
  font-size: 1.3rem;
}

/* Faces de rôle aux teintes SOURDES : même structure et luminosité
   proche pour tous les camps (rien de repérable de loin ni dans un
   reflet), mais de près chacun sent sa couleur. */
.role-front.res { background: linear-gradient(160deg, var(--face-res-1), var(--face-res-2)); border: 1.5px solid var(--face-res-line); }
.role-front.spy { background: linear-gradient(160deg, var(--face-spy-1), var(--face-spy-2)); border: 1.5px solid var(--face-spy-line); }
.role-front.commander { background: linear-gradient(160deg, var(--face-cmd-1), var(--face-cmd-2)); border: 1.5px solid var(--face-cmd-line); }
.role-title { font-size: 1.7rem; font-weight: 800; letter-spacing: 0.14em; color: var(--text); }
.role-front.res .role-title { color: var(--face-res-ink); }
.role-front.spy .role-title { color: var(--face-spy-ink); }
.role-front.commander .role-title { color: var(--face-cmd-ink); }
.role-icon { font-size: 3.4rem; }
.role-icon svg { width: 92px; height: 92px; display: block; }
.role-front.res .role-icon { color: var(--face-res-ink); }
.role-front.spy .role-icon { color: var(--face-spy-ink); }
.role-front.commander .role-icon { color: var(--face-cmd-ink); }
.role-badge {
  display: inline-block;
  border: 1.5px solid var(--card-line);
  color: var(--icon-soft);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 800;
}
.role-hint { color: var(--text); opacity: 0.85; margin: 0; line-height: 1.4; }
.accomplices-label { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
.accomplices { font-weight: 800; font-size: 1.15rem; margin: 2px 0 0; }

/* --- Plateau ------------------------------------------------------ */

.mtrack { display: flex; justify-content: space-between; gap: 6px; }
.mslot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mnode {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem;
  background: var(--panel);
  border: 2px solid var(--line);
  color: var(--muted);
}
.mnode.now { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.12); }
.mnode.ok { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }
.mnode.ko { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.mbadge { font-size: 0.62rem; color: var(--red); font-weight: 700; white-space: nowrap; }

.vtrack {
  display: flex; align-items: center; gap: 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}
.vtrack-label { color: var(--muted); font-size: 0.78rem; margin-right: auto; }
.pip { width: 12px; height: 12px; border-radius: 50%; background: var(--bg2); border: 1.5px solid var(--line); }
.pip.on { background: var(--red); border-color: var(--red); }

.phase { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.center-phase { align-items: center; justify-content: center; text-align: center; }
.phase h3 { margin: 6px 0 0; font-size: 1.15rem; }

.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pchip {
  font: inherit;
  display: flex; align-items: center; gap: 7px;
  background: var(--panel);
  border: 2px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.pchip.sel { border-color: var(--blue); background: var(--blue-bg); }
.pchip.sel.danger { border-color: var(--red); background: var(--red-bg); }
.pchip.sel.danger .check { color: var(--red); }
.pchip .check { margin-left: auto; color: var(--blue); font-weight: 800; }
.pchip .star, .vote-name { font-weight: 600; }
.star { color: var(--gold); }

.team-line { margin: 0; }

/* --- Vote --------------------------------------------------------- */

.vote-list { display: flex; flex-direction: column; gap: 6px; }
.vote-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 8px 8px 14px;
}
.vote-btns { display: flex; gap: 6px; }
.vbtn {
  font: inherit; font-size: 1.05rem;
  width: 46px; height: 40px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--bg2);
  cursor: pointer;
  opacity: 0.55;
}
.vbtn.on { opacity: 1; }
.vbtn.up.on { border-color: var(--ok); background: var(--ok-bg); }
.vbtn.down.on { border-color: var(--red); background: var(--red-bg); }

.verdict {
  font-size: 1.5rem; font-weight: 800;
  padding: 14px 22px;
  border-radius: 14px;
  letter-spacing: 0.04em;
}
.verdict.ok { color: var(--ok); background: rgba(62, 207, 142, 0.1); border: 1.5px solid var(--ok); }
.verdict.ko { color: var(--red); background: rgba(229, 72, 77, 0.1); border: 1.5px solid var(--red); }
.verdict.neutral { color: var(--text); background: var(--panel); border: 1.5px solid var(--line); font-size: 1.15rem; }

.big-count { font-size: 1.2rem; margin: 4px 0; }
.vote-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.vote-tag { font-size: 0.82rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.vote-tag.up { border-color: rgba(62, 207, 142, 0.5); }
.vote-tag.down { border-color: rgba(229, 72, 77, 0.5); }

/* --- Mission ------------------------------------------------------ */

.mission-cards { display: flex; gap: 12px; width: 100%; max-width: 380px; }
.mcard {
  font: inherit;
  flex: 1;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-weight: 800; letter-spacing: 0.08em;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.mcard:active { transform: scale(0.97); }
.mcard-icon { font-size: 2.6rem; }
.mcard-icon svg { width: 58px; height: 58px; display: block; }
/* Cartes de mission : même FOND pour les deux choix (anti-regards) ;
   seules les étiquettes et icônes sont colorées, lisibles de près. */
.mcard.neutral {
  background: linear-gradient(160deg, var(--mcard-1), var(--mcard-2));
  border: 2px solid var(--mcard-line);
}
.mcard.neutral.success { color: var(--blue); }
.mcard.neutral.success .mcard-icon { color: var(--blue); }
.mcard.neutral.fail { color: var(--red); }
.mcard.neutral.fail .mcard-icon { color: var(--red); }
.mcard.picked { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18); }
.mcard.dim { opacity: 0.35; }
.mcard:disabled { opacity: 0.25; cursor: default; }

.confirm-bar { display: flex; gap: 10px; width: 100%; max-width: 380px; }
.confirm-bar .btn { flex: 1; }

.rcards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.rcard {
  font: inherit;
  width: 64px; height: 88px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 800;
  border: 2px solid var(--line);
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, var(--stripe) 10px 20px),
    var(--panel-2);
  color: var(--muted);
  cursor: pointer;
}
.rcard.ok { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }
.rcard.ko { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.rcard svg { width: 36px; height: 36px; display: block; }

/* --- Cérémonie d'ouverture ---------------------------------------- */

.cer-icon { font-size: 3rem; }
.cer-step {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  max-width: 420px;
}
.cer-dots { display: flex; gap: 8px; justify-content: center; margin-top: 6px; }

/* --- Minuteur ----------------------------------------------------- */

.timer-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
}
.timer-label { color: var(--muted); font-size: 0.82rem; }
.timer-left { font-variant-numeric: tabular-nums; font-weight: 800; margin-right: auto; }
.timer-chip.timer-done { border-color: var(--gold); }
.timer-chip.timer-done .timer-left { color: var(--gold); }

/* --- Fin de partie ------------------------------------------------ */

.over-banner {
  text-align: center;
  border-radius: var(--radius);
  padding: 26px 16px;
  border: 1.5px solid var(--line);
}
.over-banner.res { background: linear-gradient(170deg, #16345f, #0d1c36); border-color: var(--blue); }
.over-banner.spy { background: linear-gradient(170deg, #55202b, #260c12); border-color: var(--red); }
.over-banner h1 { margin: 6px 0 4px; font-size: 1.6rem; letter-spacing: 0.05em; }
.over-icon { font-size: 3rem; display: flex; justify-content: center; }
.over-icon svg { width: 72px; height: 72px; }
.over-banner.res .over-icon { color: #9cc2ff; }
.over-banner.spy .over-icon { color: #ff9ba0; }

.role-list { display: flex; flex-direction: column; gap: 6px; }
.role-row {
  display: flex; justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg2);
  border-left: 4px solid var(--line);
}
.role-row.res { border-left-color: var(--blue); }
.role-row.spy { border-left-color: var(--red); }
.role-row.commander { border-left-color: var(--purple); }

/* --- Règles ------------------------------------------------------- */

/* --- Tutoriel en pages -------------------------------------------- */

.tut-pager {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tut-pager::-webkit-scrollbar { display: none; }
.tut-page {
  flex: 0 0 100%;
  scroll-snap-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.tut-illu {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  pointer-events: none;
}
.tut-h { font-weight: 800; font-size: 1.1rem; }
.tut-t { margin: 0; color: var(--muted); line-height: 1.5; }
.tut-dots { display: flex; align-items: center; justify-content: center; gap: 8px; }
.tut-vs { font-weight: 800; color: var(--muted); font-size: 1.1rem; }
.camp-mini {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.camp-mini svg { width: 46px; height: 46px; }
.camp-mini.res { background: var(--blue-bg); color: var(--blue); border: 2px solid var(--blue); }
.camp-mini.spy { background: var(--red-bg); color: var(--red); border: 2px solid var(--red); }
.tut-card-back, .tut-card-front {
  width: 100px; height: 136px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--back-face-1), var(--back-face-2));
}
.tut-card-back span {
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: 800;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  padding: 4px 7px;
  border-radius: 6px;
  transform: rotate(-12deg);
}
.tut-card-front { background: linear-gradient(160deg, var(--card-face-1), var(--card-face-2)); border-color: var(--card-line); color: var(--icon-soft); }
.tut-card-front svg { width: 52px; height: 52px; }
.tut-chips { display: flex; flex-direction: column; gap: 6px; width: 80%; }
.tut-mcards { display: flex; gap: 12px; }
.tut-mcard { width: 96px; aspect-ratio: 3 / 4; font-size: 0.6rem; border-radius: 12px; padding: 6px; letter-spacing: 0.06em; }
.tut-mcard .mcard-icon svg { width: 34px; height: 34px; }
.tut-track { width: auto; justify-content: center; gap: 8px; }
.tut-track .mnode { width: 42px; height: 42px; font-size: 1rem; }
.tut-trophy { font-size: 2.2rem; }

.camp-cards { display: flex; gap: 10px; }
.camp-card {
  flex: 1;
  border-radius: var(--radius);
  padding: 16px 12px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.camp-card.res { background: linear-gradient(170deg, var(--blue-bg), transparent 90%); border: 1.5px solid var(--blue); }
.camp-card.spy { background: linear-gradient(170deg, var(--red-bg), transparent 90%); border: 1.5px solid var(--red); }
.camp-icon svg { width: 54px; height: 54px; display: block; }
.camp-card.res .camp-icon { color: var(--blue); }
.camp-card.spy .camp-icon { color: var(--red); }
.camp-name { font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; font-size: 0.95rem; }
.camp-card.res .camp-name { color: var(--blue); }
.camp-card.spy .camp-name { color: var(--red); }
.camp-card p { margin: 0; font-weight: 700; }
.camp-card small { color: var(--muted); line-height: 1.35; }

.rules-win { text-align: center; font-weight: 700; margin: 0; }

.step-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg2);
  border-radius: 12px;
  padding: 12px;
}
.step-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card p { margin: 4px 0 0; line-height: 1.45; }

.trap { background: var(--bg2); border-radius: 12px; padding: 11px 13px; line-height: 1.45; }
.rtable { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rtable th, .rtable td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: center; }
.rtable th { color: var(--muted); font-weight: 600; }

/* --- Modale ------------------------------------------------------- */

.modal-back {
  position: fixed; inset: 0;
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%; max-width: 340px;
  text-align: center;
}
.modal-btns { display: flex; gap: 10px; margin-top: 14px; }
.modal-btns .btn { flex: 1; }
