/* Habillage de l'application (hors carte). Ambiance « console d'astreinte » sombre. */

:root {
  --bg: #070b16;
  --panel: #0d1424;
  --panel-2: #111a2e;
  --line: #1e293b;
  --line-2: #2b3a52;
  --text: #e2e8f0;
  --muted: #8a9ab3;
  --accent: #38bdf8;
  --accent-ink: #04121c;
  --danger: #f83838;
  --radius: 12px;
  --grid-scale: 0.61;
  --text-2: #c3cfe0;
  --money: #fbbf24;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, sans-serif;
  /* Couleurs des types pour l'interface (bordure et badge des cartes : card.css) */
  --t-resource: #38bdf8;
  --t-incident: #f83838;
  --t-hr: #6d68ff; /* #0800f6 du Figma, éclairci pour rester lisible sur fond sombre */
  --t-app: #f88838;
  --t-event: #a538f8;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgb(56 189 248 / 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgb(248 136 56 / 0.06), transparent 60%),
    radial-gradient(rgb(148 163 184 / 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", system-ui, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.muted { color: var(--muted); margin: 4px 0 0; }
.small { font-size: 13px; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Barre du haut */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgb(7 11 22 / 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--accent); }
.brand-mark { display: grid; gap: 3px; }
.brand-mark i { display: block; height: 4px; border-radius: 2px; }
.brand-mark i:nth-child(1) { width: 18px; background: #f88838; }
.brand-mark i:nth-child(2) { width: 13px; background: #38bdf8; }
.brand-mark i:nth-child(3) { width: 8px;  background: #a538f8; }
.topnav { display: flex; align-items: center; gap: 16px; }
.topnav > a:not(.btn) { color: var(--muted); font-weight: 500; }
.topnav > a:not(.btn):hover { color: var(--text); text-decoration: none; }

.page { max-width: 1280px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: 14px; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: #3b4f6e; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #7dd3fc; border-color: #7dd3fc; }
.btn-danger { background: transparent; border-color: rgb(248 56 56 / 0.5); color: #fca5a5; }
.btn-danger:hover { background: rgb(248 56 56 / 0.12); border-color: var(--danger); }
.btn:focus-visible, .chip:focus-visible, .menu-item:focus-visible, .grid-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Menu */
.menu {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 180px);
}
.menu h1 { font-size: clamp(30px, 4.2vw, 50px); }
.lead { max-width: 52ch; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.menu-actions { display: grid; gap: 12px; }
.menu-item {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  transition: transform 120ms ease, border-color 120ms ease;
}
.menu-item-sub .more { color: var(--accent); font-weight: 600; }
.pill-admin {
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 3px;
}
.page-actions { display: flex; align-items: center; gap: 10px; }
.demo-banner {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--money) 45%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--money) 8%, var(--panel));
  font-size: 14px;
  color: var(--text-2);
}
.demo-banner strong { color: var(--money); white-space: nowrap; }
.demo-note { margin: 0 0 14px; font-size: 14px; color: var(--money); }
.page-actions form { margin: 0; }
.menu-item:hover { text-decoration: none; transform: translateX(4px); border-color: var(--line-2); }
.menu-item-title { font-size: 19px; font-weight: 700; }
.menu-item-sub { color: var(--muted); font-size: 14px; }
.menu-item.is-disabled { opacity: 0.45; border-left-color: var(--line-2); cursor: not-allowed; }
.menu-item.is-disabled:hover { transform: none; }

/* Filtres */
.filters { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  --chip: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.chip:hover { text-decoration: none; color: var(--text); border-color: var(--line-2); }
.chip.is-active { color: var(--text); border-color: var(--chip); background: color-mix(in srgb, var(--chip) 16%, var(--panel)); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip); flex: none; }

/* Grille */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, calc(374px * var(--grid-scale)));
  gap: 26px 22px;
}
.grid-item { display: block; border-radius: 14px; transition: transform 140ms ease; }
.grid-item:hover { transform: translateY(-6px) rotate(-0.6deg); text-decoration: none; }

.empty { display: grid; justify-items: center; gap: 12px; padding: 80px 0; text-align: center; }
.empty p { margin: 0; color: var(--muted); }

/* Détail */
.detail { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.detail-side { flex: 1 1 280px; max-width: 420px; padding-top: 8px; }
.facts { display: grid; gap: 0; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--panel); }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.actions form { margin: 0; }

/* Éditeur */
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert code, .files code, .empty code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.files { display: grid; gap: 4px; margin: 4px 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.files .eyebrow { margin-bottom: 2px; }
.files code { color: #cbd5e1; }
.empty p { max-width: 52ch; }
.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgb(248 56 56 / 0.45);
  border-radius: 10px;
  background: rgb(248 56 56 / 0.1);
  color: #fecaca;
}
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 374px; gap: 40px; align-items: start; }
.editor-preview { position: sticky; top: 84px; }
.editor-form { display: grid; gap: 4px; }
.editor-form fieldset { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }

.field { display: grid; gap: 6px; margin-bottom: 10px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .field .label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}
.counter { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-near { color: #fbbf24; }
.field-hint { margin: 0; font-size: 12px; color: var(--muted); }
.field-error { margin: 0; font-size: 12px; color: #fca5a5; }
.field-error:empty { display: none; }

input:not([type="radio"]):not([type="checkbox"]), textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(56 189 248 / 0.18); }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { --chip: var(--accent); position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.seg:hover span { color: var(--text); }
.seg input:checked + span { color: var(--text); border-color: var(--chip); background: color-mix(in srgb, var(--chip) 18%, var(--panel)); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; color: #cbd5e1; }

/* Responsive */
@media (max-width: 960px) {
  .menu { grid-template-columns: 1fr; gap: 32px; min-height: 0; padding-top: 12px; }
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; order: -1; }
  .editor-preview .card-frame { --s: 0.72; margin: 0 auto; }
}


/* ------------------------------------------------------------------------------------------
   Page des règles (/regles)
   ------------------------------------------------------------------------------------------ */
.rules { display: grid; gap: 88px; padding-bottom: 32px; }
.rules h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
.rules h3 { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 0; }
.rules p { margin: 0; }
.prose { display: grid; gap: 14px; color: var(--text-2); }
.rules-lead { font-size: 17px; color: var(--text-2); }
.money { font-family: var(--mono); font-weight: 600; color: var(--money); white-space: nowrap; }
.rules strong em { font-weight: 700; font-style: italic; color: var(--text); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; align-content: start; }
.section-head .eyebrow { margin: 0; }

/* En-tête sur une colonne : titre et texte sur toute la largeur, chiffres clés en dessous */
.rules-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 8px; }
.rules-hero-text { display: grid; gap: 22px; min-width: 0; }
.rules-hero-text .eyebrow { margin: 0; }
.rules-hero h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.05; font-weight: 800; text-wrap: balance; }
.draft {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border: 1px dashed var(--line-2); border-radius: 999px;
  font-size: 12px; color: var(--muted);
}
.draft::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--money); }

.ledger { margin: 0; display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.ledger div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 18px; }
.ledger div + div { border-top: 1px solid var(--line); }
.ledger dt { color: var(--muted); font-size: 14px; }
.ledger dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ledger .ledger-title { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2); }

.rules-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.roster { display: grid; gap: 14px; }
.roster-group { display: grid; gap: 10px; }
.roster-group .eyebrow { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  display: flex; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--c, var(--accent)); border-radius: 10px;
  background: var(--panel); font-weight: 600;
}

.goal { display: grid; gap: 22px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.track { position: relative; height: 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); }
.track-fill { position: absolute; inset: 0 auto 0 0; min-width: 12px; border-radius: 999px; background: var(--money); }
.track-legend { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }

.types { display: grid; gap: 18px; }
.type-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start;
  padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.type-row .card-frame { --s: 0.5; border-radius: 10px; }
.type-row .card-frame:hover { text-decoration: none; }
.type-empty {
  display: grid; place-items: center; width: 187px; height: 287px; padding: 16px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 13px;
}
.type-body { display: grid; gap: 10px; min-width: 0; }
.type-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.type-name h3 { color: var(--c); letter-spacing: 0.02em; }
.count { font-size: 13px; color: var(--muted); }
.count:hover { color: var(--text); }
.type-body p { color: var(--text-2); max-width: 64ch; }

.day { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: phase; }
.phase { display: grid; align-content: start; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); min-width: 0; }
.phase-top { display: flex; align-items: baseline; gap: 12px; }
.phase-top::before {
  counter-increment: phase; content: counter(phase);
  display: grid; place-items: center; width: 28px; height: 28px; flex: none; align-self: center;
  border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 13px; color: var(--accent);
}
.phase-top h3 { flex: 1; }
.when { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.phase p { color: var(--text-2); }
.points {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 16px;
  padding: 20px 22px; border: 1px dashed var(--line-2); border-radius: 16px;
}
.points-badge { font-family: var(--mono); font-weight: 600; font-size: 22px; color: var(--accent); padding: 6px 12px; border-radius: 10px; background: rgb(56 189 248 / 0.1); }
.points ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text-2); }

.stack { display: grid; gap: 12px; }
.stack .eyebrow { margin: 0; }
.stack .stack-gap { margin-top: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
  font-size: 13px; font-weight: 600; color: #cbd5e1;
}
.tag.code { font-family: var(--mono); font-weight: 500; }
.versions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.versions .sep { color: var(--line-2); }

/* Partie Concepts des règles : une bande par réglage, qui défile en boucle (contenu doublé,
   translation de -50 %), en pause au survol. Les sens alternent d'une bande à l'autre. */
.foil-item { display: grid; justify-items: center; gap: 10px; text-align: center; }
.foil-item b { font-size: 14px; }
.foil-item .st { display: grid; }
.rail-label { display: flex; align-items: center; gap: 8px; margin: 6px 0 -4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rail-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel-2);
  color: var(--text); font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.skin-rail {
  overflow: hidden;
  padding-block: 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.skin-track { display: flex; gap: 32px; width: max-content; animation: skin-scroll 45s linear infinite; }
.skin-track > .foil-item { flex: none; }
.skin-rail[data-dir="right"] .skin-track { animation-direction: reverse; animation-duration: 38s; }
.skin-rail:hover .skin-track { animation-play-state: paused; }
@keyframes skin-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 16px)); } }
.skin-rail .card-frame { --s: 0.61; cursor: zoom-in; border-radius: 12px; }
.skin-rail .card-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* le reflet qui tourne tourne en continu dans les bandes, comme les autres effets */
.skin-rail .card[data-shape="sweep"] .card-stroke { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
  .skin-rail { overflow-x: auto; }
  .skin-track { animation: none; }
}
.concepts { display: grid; gap: 40px; }
.concepts-head { align-items: flex-end; }
.concepts-head .muted { max-width: 70ch; margin: 6px 0 0; }
.concepts-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 120px);
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #070b14;
}
.concepts > .section-head { margin-bottom: 0; }
.concept { display: grid; gap: 18px; padding-top: 28px; border-top: 1px solid var(--line); }
.concept-head { display: grid; gap: 6px; }
.concept-head .eyebrow { margin: 0; }
.concept-head h3 { margin: 0; font-size: 20px; }
.concept-head p:not(.eyebrow) { margin: 0; color: var(--text-2); }

.topnav > a[aria-current="page"] { color: var(--text); box-shadow: 0 2px 0 var(--accent); }

@media (max-width: 860px) {
  .rules-hero, .rules-split { grid-template-columns: 1fr; gap: 28px; }
  .day { grid-template-columns: 1fr; }
  .type-row { grid-template-columns: 1fr; justify-items: center; }
  .type-body { justify-self: stretch; }
}

/* ------------------------------------------------------------------------------------------
   Comptes : connexion, mon compte, administration
   ------------------------------------------------------------------------------------------ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.usermenu { position: relative; }
.usermenu summary {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  padding: 4px 10px 4px 4px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text);
}
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel-2); color: var(--accent); font-weight: 800; font-size: 13px;
}
.usermenu-name { font-size: 14px; font-weight: 600; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 200px;
  display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--panel); box-shadow: 0 12px 30px rgb(2 6 23 / 0.5);
}
.usermenu-panel p { margin: 0 6px 4px; }
.usermenu-panel a, .usermenu-panel button {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.usermenu-panel a:hover, .usermenu-panel button:hover { background: var(--panel-2); text-decoration: none; }
.usermenu-panel form { margin: 0; }

.auth { display: grid; gap: 24px; max-width: 440px; margin: 24px auto 0; }
.auth-intro { display: grid; gap: 8px; }
.auth-intro .eyebrow, .auth-intro .muted { margin: 0; }
.auth-form {
  display: grid; gap: 4px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.auth-form .btn { margin-top: 8px; justify-self: start; }
.auth-subtitle { margin: 0 0 12px; font-size: 18px; }
.alert pre { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); overflow-x: auto; }
.alert-ok { border-color: rgb(74 222 128 / 0.45); background: rgb(74 222 128 / 0.1); color: #bbf7d0; }
.alert-info { border-color: rgb(56 189 248 / 0.45); background: rgb(56 189 248 / 0.08); color: #bae6fd; }

.secret { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.secret-value {
  padding: 6px 10px; border-radius: 8px; background: var(--bg); color: var(--text);
  font: 600 15px/1.4 var(--mono); letter-spacing: 0.04em; user-select: all;
}

.admin { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-new { display: grid; gap: 4px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.admin-new .btn { justify-self: start; margin-top: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); min-width: 0; }
.users { width: 100%; border-collapse: collapse; font-size: 14px; }
.users th, .users td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.users thead th { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); }
.users tbody tr:last-child td { border-bottom: 0; }
.users .num { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.users tr.is-off td { color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--accent); font-size: 12px; font-weight: 600; }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.state-on::before { background: #4ade80; }
.state-off::before { background: var(--muted); }

@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
}

/* Anatomie d'une carte (page des règles) : schéma annoté d'une carte de la collection, à taille
   réelle dans une scène de 920 × 640 (cotes des zones : src/anatomy.rs). */
.anat { display: grid; gap: 20px; margin-bottom: 56px; }
.anat-head h2 { margin: 0; }
.anat-lead { margin: 8px 0 0; color: var(--text-2); }
.anat-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.anat-card { margin: 0; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.anat-tag {
  display: inline-block; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 700; line-height: 20px;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); letter-spacing: .02em;
}
.anat-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.anat-switch button {
  height: 30px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.anat-switch button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.anat-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.anat-diagram {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgb(148 163 184 / .06) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgb(148 163 184 / .06) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--panel);
}
.anat-stage { position: relative; width: 920px; height: 640px; margin: 0 auto; }
.anat-stage > .card-frame, .anat-skeleton, .anat-zones { position: absolute; left: 273px; top: 28px; }
.anat-zones { width: 374px; height: 574px; pointer-events: none; z-index: 3; }
.anat-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 4; }
.anat-leaders path { fill: none; stroke: #64748b; stroke-width: 1.25; transition: stroke 120ms; }
.anat-leaders circle { fill: var(--panel); stroke: #64748b; stroke-width: 1.5; transition: fill 120ms, stroke 120ms; }
.anat-leaders g.is-active path { stroke: var(--accent); }
.anat-leaders g.is-active circle { fill: var(--accent); stroke: var(--accent); }
.anat-zone { position: absolute; border-radius: 12px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color 120ms, background 120ms; }
.anat-zone.is-active { outline-color: var(--accent); background: rgb(56 189 248 / .18); }
.anat-zone.is-stroke { border-radius: 16px; }
.anat-zone.is-stroke.is-active { background: transparent; outline-width: 3px; outline-offset: 0; }

.anat-pin {
  position: absolute; width: 200px; display: grid; gap: 1px; padding: 4px 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: default;
  transform: translateY(-50%);
}
.anat-pin.is-left { left: 40px; text-align: right; justify-items: end; }
.anat-pin:not(.is-left) { left: 680px; }
.anat-pin-title { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--text); }
.anat-pin.is-left .anat-pin-title { flex-direction: row-reverse; }
.anat-num {
  display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  font: 600 11px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums;
}
.anat-field { font: 12px var(--mono); color: var(--muted); }
.anat-pin.is-active .anat-num, .anat-item.is-active .anat-num, .anat-code li.is-active .anat-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.anat-pin.is-active .anat-pin-title { color: var(--accent); }
.anat-pin:focus-visible, .anat-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.anat-skeleton { width: 374px; height: 574px; border-radius: 20px; background: #0a101e; box-shadow: inset 0 0 0 1px var(--line-2); font-family: var(--mono); }
.sk-z { position: absolute; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px dashed #3b4f6e; border-radius: 12px; color: #94a3b8; font-size: 12px; text-align: center; }
.sk-z small { font-size: 10px; color: #64748b; font-family: var(--sans); }
.sk-stroke { inset: 7px; border: 2px dashed var(--type); border-radius: 16px; }
.sk-stroke > span { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 0 6px; background: #0a101e; color: var(--type); font-size: 10px; white-space: nowrap; }
.sk-type { border-color: color-mix(in srgb, var(--type) 60%, transparent); color: var(--type); }
.sk-flavor { border-radius: 4px; }

.anat-sub { margin-top: 20px; }
.anat-sub h3 { margin: 0; font-size: 20px; }
.anat-sub p { margin: 6px 0 0; color: var(--text-2); }
.anat-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.anat-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-content: start;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  transition: border-color 120ms;
}
.anat-item.is-active { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.anat-item .anat-num { grid-row: span 3; margin-top: 1px; }
.anat-item h4 { margin: 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.anat-item h4 code { font: 12px var(--mono); color: var(--muted); font-weight: 400; }
.anat-item p { margin: 0; font-size: 14px; color: var(--text-2); }
.anat-item .anat-tag { margin: 4px 6px 0 0; padding: 0; background: none; }
.anat-rule { font-size: 13px !important; color: var(--muted) !important; }
.anat-rule b { color: var(--text-2); font-weight: 600; }

.anat-file { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.anat-code { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #060a14; overflow: hidden; }
.anat-code figcaption { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--line); font: 600 12px var(--mono); color: var(--text-2); }
.anat-code figcaption span { color: var(--muted); font-weight: 400; }
.anat-code ol { list-style: none; margin: 0; padding: 10px 0; font: 13px/1.65 var(--mono); }
.anat-code li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 0 14px 0 8px; border-left: 2px solid transparent; white-space: pre-wrap; overflow-wrap: anywhere; }
.anat-code li.is-active { background: rgb(56 189 248 / .14); border-left-color: var(--accent); }
.anat-code .ln { justify-self: end; }
.anat-code .ln .anat-num { width: 18px; height: 18px; font-size: 10px; border-radius: 5px; }
.t-key { color: #7dd3fc; } .t-str { color: #a5e3a1; } .t-num { color: #fdba74; } .t-com { color: #64748b; font-style: italic; }
.anat-notes { display: grid; gap: 12px; font-size: 14px; color: var(--text-2); }
.anat-notes p { margin: 0; }
.anat-notes ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.anat-notes code { font: 13px var(--mono); color: var(--text); }

.anat-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.anat-look {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: baseline;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text);
}
.anat-look:hover { text-decoration: none; border-color: var(--line-2); }
.anat-look code { font: 12px var(--mono); color: var(--muted); }
.anat-look span { grid-column: 1 / -1; font-size: 14px; color: var(--text-2); }
.anat-next { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .anat * { transition: none !important; } }

/* Documentation (page des règles) : navigation à gauche, sommaire de la page à droite, fixes au
   défilement. Le sommaire est construit par rules.js depuis les sections [data-toc]. */
.page:has(.doc-layout) { max-width: 1640px; }
.doc-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 200px; gap: 48px; align-items: start; }
.doc-nav, .doc-toc { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; font-size: 14px; }
.doc-nav-title { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.doc-nav ul, .doc-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.doc-nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.doc-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.doc-toc ol { border-left: 1px solid var(--line); }
.doc-toc a { display: block; margin-left: -1px; padding: 4px 0 4px 12px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.35; }
.doc-toc a:hover { color: var(--text); text-decoration: none; }
.doc-toc a.is-current { color: var(--text); border-left-color: var(--accent); }
[data-toc] { scroll-margin-top: 84px; }
@media (max-width: 1280px) { .doc-layout { grid-template-columns: 180px minmax(0, 1fr); } .doc-toc { display: none; } }

/* Chiffres clés de la partie */
.facts-tiles { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.fact-tile { display: grid; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.fact-tile dt { font-size: 13px; color: var(--muted); }
.fact-tile dd { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* Annotation : une ligne de commentaire sous le texte, comme une note glissée dans le code */
.rules-note { display: block; margin-top: 2px; font-family: var(--mono); font-size: 13px; font-style: italic; color: #7c8aa3; }
.rules-note::before { content: "# "; color: var(--accent); font-style: normal; }

/* Début de partie sur une colonne ; équipe avec avatar, application dont le nom se tape */
.rules-stack { display: grid; gap: 0; }
/* Début de partie : la liste Équipe suit de près l'annotation */
.rules-stack > .section-head { margin-bottom: 18px; }
/* Overview (règles, début de partie, victoire) : sections plus resserrées que le reste (88 px) */
.page-overview > [data-toc] + [data-toc] { margin-top: -32px; }
.rules-stack .tiles { display: flex; flex-wrap: wrap; }
.rules-stack .tile { white-space: nowrap; min-width: 150px; gap: 10px; }
.avatar-dot {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 28%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  color: var(--text); font-size: 12px; font-weight: 700;
}
.typed { font-family: var(--mono); font-size: 14px; }
.typed::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--c); animation: typed-caret 1s steps(1) infinite; }
@keyframes typed-caret { 50% { opacity: 0; } }

/* Condition de victoire : la trésorerie avance au fil des gains et des pertes */
.race { display: grid; gap: 40px; }
.race-now { font-size: 14px; color: var(--muted); }
.race-now b { font-size: 18px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.race-track { overflow: visible; }
.race-fill { transition: width .8s cubic-bezier(.2, .8, .2, 1), background-color .3s; }
.race-fill.is-down { background: var(--danger); }
.race-fill.is-win { background: #4ade80; box-shadow: 0 0 18px rgb(74 222 128 / .6); }
.race-pops { position: absolute; inset: 0; pointer-events: none; }
.race-pop {
  position: absolute; bottom: 20px; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  font: 700 12px/1.4 var(--mono); font-variant-numeric: tabular-nums;
  animation: race-pop 1.6s ease-out forwards;
}
.race-pop.is-gain { color: #4ade80; background: rgb(74 222 128 / .12); border: 1px solid rgb(74 222 128 / .35); }
.race-pop.is-loss { color: #f87171; background: rgb(248 113 113 / .12); border: 1px solid rgb(248 113 113 / .35); }
.race-pop small { font-weight: 400; color: var(--muted); margin-left: 4px; }
@keyframes race-pop { 0% { opacity: 0; translate: 0 8px; } 15% { opacity: 1; translate: 0 0; } 75% { opacity: 1; } 100% { opacity: 0; translate: 0 -16px; } }
@media (prefers-reduced-motion: reduce) { .typed::after { animation: none; } .race-fill { transition: none; } }

/* Galerie : filtres dans une colonne à gauche, un menu déroulant par réglage, cases à cocher */
.page:has(.gal-layout) { max-width: 1640px; }
.gal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 32px; align-items: start; }
/* défile si besoin, sans barre visible ni débordement horizontal */
.gal-side { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; display: grid; gap: 8px; padding-right: 4px; }
.gal-side::-webkit-scrollbar { display: none; }
.gal-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.gal-side-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gal-reset { font-size: 13px; }
.gal-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.gal-group summary { display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; list-style: none; user-select: none; }
.gal-group summary::-webkit-details-marker { display: none; }
.gal-group summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.gal-group[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.gal-group summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
.gal-group-title { font-weight: 600; font-size: 14px; }
.gal-current { margin-left: auto; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.gal-group summary > .gal-group-title { flex: none; }
.gal-current.is-set { color: var(--accent); }
.gal-group ul { list-style: none; margin: 0; padding: 6px 6px 8px; display: grid; gap: 1px; border-top: 1px solid var(--line); }
.gal-opt { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.gal-opt:hover { background: var(--panel-2); color: var(--text); }
.gal-opt input { position: absolute; opacity: 0; pointer-events: none; }
.gal-check { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--line-2); border-radius: 4px; display: grid; place-items: center; }
.gal-opt input:checked + .gal-check { background: var(--accent); border-color: var(--accent); }
.gal-opt input:checked + .gal-check::after { content: ""; width: 4px; height: 8px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.gal-opt input:checked ~ .gal-label { color: var(--text); }
.gal-opt input:focus-visible + .gal-check { outline: 2px solid var(--accent); outline-offset: 2px; }
.gal-opt.is-zero { opacity: .45; }
.gal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.gal-count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gal-main { min-width: 0; }
.gal-active { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.gal-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 13px; }
.gal-pill:hover { text-decoration: none; border-color: #3b4f6e; }
.gal-pill b { font-weight: 500; color: var(--muted); }
.gal-pill span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); }
.gal-pill:hover span { background: var(--panel-2); color: var(--text); }

/* Connexion dans la barre du haut (visiteur) et rôle dans le menu du compte */
.login-pop { position: relative; }
.login-pop summary { list-style: none; }
.login-pop summary::-webkit-details-marker { display: none; }
.login-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: 300px;
  display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--panel); box-shadow: 0 16px 40px rgb(2 6 23 / .55);
}
.login-panel .btn { width: 100%; justify-content: center; margin-top: 4px; }
.login-panel p.small { margin: 8px 0 0; text-align: center; }
.login-panel .alert { margin: 0 0 8px; font-size: 13px; }
.login-panel code { overflow-wrap: anywhere; }
.login-title { margin: 0 0 6px; font-weight: 700; font-size: 15px; }
.role-pill { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 8px; }
.role-pill.is-admin { color: var(--accent); }
.guest-hint { margin: 4px 0 0 4px; color: var(--muted); font-size: 14px; }
.role-form { margin: 0; display: flex; gap: 6px; align-items: center; }
.role-form select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 14px; }

/* Documentation en pages : séparation avant Releases, pastille des sections à écrire */
.nav-sep { height: 1px; margin: 10px 6px; background: var(--line); }
.draft-pill { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #fef3c7; color: #78350f; font-size: 10px; letter-spacing: .06em; vertical-align: 1px; }

/* Glossaire et réglages : termes en grille */
.glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.glossary > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.glossary dt { font-weight: 700; margin-bottom: 4px; }
.glossary dd { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* Économie : flux de l'argent */
.flow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flow-step { padding: 10px 14px; border: 1px solid var(--line-2); border-left-width: 3px; border-radius: var(--radius); background: var(--panel); font-weight: 600; font-size: 14px; }
.flow-step.is-in { border-left-color: #34d399; }
.flow-step.is-mid { border-left-color: #fbbf24; }
.flow-step.is-out { border-left-color: #f87171; }
.flow-arrow { color: var(--muted); font-size: 18px; }

/* Plateau : zones placées par leur clé (rules::BOARD_ZONES) */
.board {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
  grid-template-areas: "opp opp opp opp opp opp" "mid mid mid mid mid mid" "cluster cluster apps apps kanban kanban" "team team hand hand hand cash" "deck discard hand hand hand cash";
}
.zone { display: grid; align-content: center; gap: 2px; min-height: 64px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--panel); font-weight: 600; font-size: 14px; }
.zone small { color: var(--muted); font-weight: 400; font-size: 12px; }
.z-opp { grid-area: opp; opacity: .65; }
.z-mid { grid-area: mid; min-height: 44px; border-color: rgb(248 56 56 / .4); color: #fca5a5; }
.z-cluster { grid-area: cluster; border-left: 3px solid var(--t-resource); }
.z-apps { grid-area: apps; border-left: 3px solid var(--t-app); }
.z-kanban { grid-area: kanban; }
.z-team { grid-area: team; border-left: 3px solid #6d68ff; }
.z-hand { grid-area: hand; }
.z-deck { grid-area: deck; }
.z-discard { grid-area: discard; }
.z-cash { grid-area: cash; }

/* Étapes numérotées */
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.steps li { counter-increment: st; position: relative; padding: 12px 16px 12px 52px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text-2); font-size: 15px; line-height: 1.5; }
.steps li::before { content: counter(st); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); color: var(--accent); font-weight: 800; font-size: 13px; }
.steps b { display: block; color: var(--text); }

/* Releases */
.page-releases { gap: 20px; }
.rel-head { margin-bottom: 8px; }
.release { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: grid; gap: 12px; }
.release header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.release h3 { margin: 0; font-size: 18px; }
.rel-version { font-family: var(--mono); font-weight: 600; color: var(--accent); }
.release time { margin-left: auto; color: var(--muted); font-size: 13px; }
.rel-group ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.rel-kind { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.k-new { color: #34d399; }
.k-changed { color: #fbbf24; }
.k-fixed { color: #93c5fd; }

/* Roadmap : une colonne par statut */
.road { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.road-col { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.road-title { margin: 0 2px 10px; display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.road-title span { color: var(--text-2); }
.road-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.road-item { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; border-left: 3px solid var(--line-2); background: var(--panel-2); }
.road-item b { font-size: 14px; }
.road-item span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.road-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.c-study .road-item { border-left-color: #a78bfa; }
.c-doing .road-item { border-left-color: var(--accent); }
.c-done .road-item { border-left-color: #34d399; }
.c-done .road-item b { color: var(--text-2); }

/* Galerie : panneau Affichage à droite (un choix par réglage, appliqué à toutes les cartes) */
.gal-view-note { margin: -2px 2px 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.gal-sub { margin: 6px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gal-radio { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; }
.gal-opt input:checked + .gal-radio { border-color: var(--accent); }
.gal-opt input:checked + .gal-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.gal-opt input:focus-visible + .gal-radio { outline: 2px solid var(--accent); outline-offset: 2px; }
.gal-view .gal-group-title { white-space: nowrap; }

/* Éditeur : en Carte v2, les réglages qu'elle fixe sont grisés */
form:has(input[name="version"][value="v2"]:checked) .field[data-v2-locked] { opacity: .4; pointer-events: none; }
form:has(input[name="version"][value="v2"]:checked) .field[data-v2-locked] .label::after { content: " · fixé par la v2"; font-weight: 400; color: var(--muted); }

/* Accueil de l'image de préprod : canal, version et commit en bas à droite */
.build-badge { position: fixed; right: 16px; bottom: 16px; z-index: 50; margin: 0; display: flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid #f59e0b; color: var(--text); font-size: 13px; box-shadow: 0 6px 20px rgb(0 0 0 / .35); }
.build-channel { text-transform: uppercase; font-weight: 700; letter-spacing: .06em; color: #f59e0b; }
.build-badge code { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--muted); }
