/* Ghost me! : l'administration. Un tableau de bord calme, aux couleurs du jeu : son indigo, son jaune, son rose
   et le blanc de ses fantômes. Les titres sont dans sa police (Fredoka), le reste dans celle de l'appareil.

   Deux thèmes : clair et sombre. Sans choix, celui de l'appareil ; le choix fait dans la page est posé sur
   <html data-theme="clair"> ou <html data-theme="sombre">, et l'emporte dans les deux sens.

   Les couleurs des graphiques (--serie-1 à 3) sont l'indigo, le rose et le jaune du jeu, assombris ou éclaircis
   juste ce qu'il faut pour rester lisibles sur chaque fond et distincts pour un œil daltonien : elles ont été
   vérifiées, dans les deux thèmes, contre le fond des cartes. */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --indigo: #3a338c;
  --nuit: #1b1757;
  --jaune: #ffc93c;
  --rose: #ff4f9a;
  --fantome: #f8faff;

  --fond: #f5f4fa;
  --surface: #ffffff;
  --creux: #f0eff8;
  --encre: #17152b;
  --encre-2: #55526e;
  --encre-3: #7d7a94;
  --trait: #e4e2ef;
  --axe: #c9c6da;
  --accent: #3a338c;
  --sur-accent: #ffffff;
  --lien: #3a338c;
  --anneau: #6f66e0;
  --ombre: 0 1px 2px rgba(27, 23, 87, 0.06), 0 4px 16px rgba(27, 23, 87, 0.05);

  --serie-1: #4d44c4;
  --serie-2: #e8408a;
  --serie-3: #c28600;
  --attenue: #b9b6cc;
  --bon: #0ca30c;
  --bon-encre: #006300;
  --alerte: #fab219;
  --alerte-encre: #7a5200;
  --grave: #d03b3b;
  --grave-encre: #b42323;

  --barre: #1b1757;
  --sur-barre: #f8faff;
  --sur-barre-2: #b9b4e6;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="clair"])) {
    color-scheme: dark;
    --fond: #100e22;
    --surface: #1b1838;
    --creux: #252149;
    --encre: #f1f0fa;
    --encre-2: #c2bfd9;
    --encre-3: #9390ad;
    --trait: #2c2854;
    --axe: #3d386b;
    --accent: #ffc93c;
    --sur-accent: #17152b;
    --lien: #b3adf7;
    --anneau: #ffc93c;
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.3);

    --serie-1: #8b83f2;
    --serie-2: #e0508f;
    --serie-3: #ba8a12;
    --attenue: #55517a;
    --bon-encre: #4cc34c;
    --alerte-encre: #fab219;
    --grave: #e66767;
    --grave-encre: #f08a8a;

    --barre: #15122e;
  }
}
:root[data-theme="sombre"] {
  color-scheme: dark;
  --fond: #100e22;
  --surface: #1b1838;
  --creux: #252149;
  --encre: #f1f0fa;
  --encre-2: #c2bfd9;
  --encre-3: #9390ad;
  --trait: #2c2854;
  --axe: #3d386b;
  --accent: #ffc93c;
  --sur-accent: #17152b;
  --lien: #b3adf7;
  --anneau: #ffc93c;
  --ombre: 0 1px 2px rgba(0, 0, 0, 0.3);

  --serie-1: #8b83f2;
  --serie-2: #e0508f;
  --serie-3: #ba8a12;
  --attenue: #55517a;
  --bon-encre: #4cc34c;
  --alerte-encre: #fab219;
  --grave: #e66767;
  --grave-encre: #f08a8a;

  --barre: #15122e;
}

/* ------------------------------------------------------------------ Bases */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 500; line-height: 1.2; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--lien); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--anneau); outline-offset: 2px; border-radius: 6px; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.evitement {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: var(--sur-accent); text-decoration: none; font-weight: 600;
}
.evitement:focus { top: 12px; }
.attente { padding: 48px 16px; text-align: center; color: var(--encre-2); }

/* ------------------------------------------------------------------ Boutons et champs */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: var(--sur-accent);
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.bouton:hover { filter: brightness(1.08); }
.bouton:disabled { opacity: 0.55; cursor: default; filter: none; }
.bouton.second { background: var(--surface); color: var(--encre); border-color: var(--axe); }
.bouton.second:hover { background: var(--creux); filter: none; }
.bouton.danger { background: var(--surface); color: var(--grave-encre); border-color: var(--grave); }
.bouton.danger:hover { background: var(--creux); filter: none; }
.bouton.petit { min-height: 32px; padding: 4px 12px; font-size: 0.87rem; border-radius: 8px; }
.bouton.lien { min-height: 0; padding: 0; background: none; border: 0; color: var(--lien); font-weight: 500; text-decoration: underline; }

.champ { display: grid; gap: 6px; }
.champ > span, .champ > label { font-weight: 600; font-size: 0.9rem; }
.champ small { color: var(--encre-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], select {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--axe); border-radius: 10px;
  background: var(--surface); color: var(--encre);
}
input:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--anneau); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.coche { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.secret { position: relative; }
.secret input { padding-right: 86px; }
.secret button { position: absolute; right: 6px; top: 5px; }

/* Un choix parmi quelques-uns, d'un seul coup d'œil : la période, un filtre. */
.choix { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--creux); gap: 2px; max-width: 100%; overflow-x: auto; }
.choix button {
  border: 0; background: none; padding: 6px 12px; min-height: 34px; border-radius: 8px; color: var(--encre-2);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; white-space: nowrap;
}
.choix button:hover { color: var(--encre); }
.choix button[aria-pressed="true"] { background: var(--surface); color: var(--encre); box-shadow: var(--ombre); }

.message { padding: 10px 14px; border-radius: 10px; background: var(--creux); color: var(--encre); border-left: 4px solid var(--axe); }
.message.grave { border-color: var(--grave); }
.message.bon { border-color: var(--bon); }
.message.alerte { border-color: var(--alerte); }

/* ------------------------------------------------------------------ L'entrée : connexion, premier mot de passe */

.entree {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(120% 90% at 50% 0%, #4a41b0 0%, #2a2470 45%, #1b1757 100%);
}
.entree-carte {
  width: 100%; max-width: 400px; padding: 28px 24px 24px; border-radius: 20px; background: var(--surface);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18), 0 24px 60px rgba(0, 0, 0, 0.35); display: grid; gap: 18px;
}
.entree-tete { display: grid; justify-items: center; gap: 6px; text-align: center; }
.entree-tete svg { width: 64px; height: 64px; }
.entree-tete p { color: var(--encre-2); }
.entree-carte form { display: grid; gap: 14px; }
.entree-carte form > .bouton { width: 100%; }
.regles { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 0.9rem; color: var(--encre-2); }
.regles li { display: flex; gap: 8px; align-items: baseline; }
.regles li::before { content: "•"; color: var(--encre-3); width: 1em; text-align: center; }
.regles li.ok { color: var(--bon-encre); }
.regles li.ok::before { content: "✓"; color: var(--bon-encre); font-weight: 700; }
.entree-pied { text-align: center; font-size: 0.87rem; color: var(--encre-2); }

/* ------------------------------------------------------------------ La coquille : menu, bandeau, contenu */

.coquille { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.menu {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--barre); color: var(--sur-barre); padding: 18px 12px 14px;
}
.marque { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; }
.marque svg { width: 34px; height: 34px; flex: none; }
.marque strong { font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 1.2rem; line-height: 1.1; display: block; }
.marque strong em { font-style: normal; color: var(--jaune); }
.marque span { font-size: 0.78rem; color: var(--sur-barre-2); letter-spacing: 0.02em; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--sur-barre-2);
  text-decoration: none; font-weight: 500; border-left: 3px solid transparent;
}
.menu a svg { width: 18px; height: 18px; flex: none; }
.menu a:hover { background: rgba(255, 255, 255, 0.07); color: var(--sur-barre); }
.menu a[aria-current="page"] { background: rgba(255, 255, 255, 0.11); color: #ffffff; border-left-color: var(--jaune); }
.menu a .pastille { margin-left: auto; }
.menu :focus-visible { outline-color: var(--jaune); }
.menu-pied { margin-top: auto; padding: 14px 8px 0; display: grid; gap: 10px; font-size: 0.85rem; color: var(--sur-barre-2); }
.menu-pied .adresse { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pied .ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-pied button {
  border: 1px solid rgba(255, 255, 255, 0.22); background: none; color: var(--sur-barre); border-radius: 8px;
  padding: 5px 10px; cursor: pointer; font-size: 0.85rem;
}
.menu-pied button:hover { background: rgba(255, 255, 255, 0.09); }
.pastille {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--rose); color: #ffffff;
  font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 20px;
}

.bandeau-mobile { display: none; }
.voile { display: none; }

.page { min-width: 0; padding: 22px 28px 48px; max-width: 1320px; width: 100%; }
.page-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 6px; }
.page-tete h1 { margin-right: auto; }
.page-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 10px 0 18px; }
.fraicheur { display: inline-flex; align-items: center; gap: 8px; color: var(--encre-2); font-size: 0.87rem; }
.fraicheur .point { width: 8px; height: 8px; border-radius: 50%; background: var(--bon); }
.fraicheur.panne .point { background: var(--grave); }
.fraicheur.pause .point { background: var(--attenue); }
.page-corps { display: grid; gap: 18px; transition: opacity 0.15s; }
.page-corps.rafraichit { opacity: 0.6; }
.intro { color: var(--encre-2); max-width: 70ch; }

@media (max-width: 900px) {
  .coquille { display: block; }
  .bandeau-mobile {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 14px;
    background: var(--barre); color: var(--sur-barre);
  }
  .bandeau-mobile strong { font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 1.1rem; }
  .bandeau-mobile strong em { font-style: normal; color: var(--jaune); }
  .bandeau-mobile button {
    margin-left: auto; border: 1px solid rgba(255, 255, 255, 0.25); background: none; color: var(--sur-barre);
    border-radius: 8px; padding: 6px 12px; min-height: 38px; cursor: pointer; font-weight: 600;
  }
  .bandeau-mobile :focus-visible { outline-color: var(--jaune); }
  .menu {
    position: fixed; z-index: 40; left: 0; top: 0; width: min(280px, 86vw); transform: translateX(-102%);
    transition: transform 0.18s ease; visibility: hidden;
  }
  .coquille.menu-ouvert .menu { transform: none; visibility: visible; }
  .coquille.menu-ouvert .voile { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(10, 8, 30, 0.5); border: 0; }
  .page { padding: 16px 16px 40px; }
  h1 { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  .menu, .page-corps { transition: none; }
}

/* ------------------------------------------------------------------ Cartes, chiffres, tableaux */

.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 16px 18px; box-shadow: var(--ombre); min-width: 0; }
.carte > h2, .carte > h3 { margin-bottom: 4px; }
.carte > .sous-titre { color: var(--encre-2); font-size: 0.87rem; margin-bottom: 12px; }
.carte-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.carte-tete h2, .carte-tete h3 { margin-right: auto; }
.grille { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grille.large { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.section { display: grid; gap: 12px; }
.section > h2 { margin-top: 6px; }

.chiffres { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.chiffre {
  background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 14px 16px 12px;
  box-shadow: var(--ombre); display: grid; gap: 2px; align-content: start; min-width: 0;
}
.chiffre .nom { color: var(--encre-2); font-size: 0.87rem; font-weight: 500; }
.chiffre .valeur { font-size: 1.7rem; font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.chiffre .valeur small { font-size: 0.95rem; font-weight: 500; color: var(--encre-2); }
.chiffre .detail { color: var(--encre-2); font-size: 0.82rem; }
.chiffre .haut { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 10px; }
.chiffre svg.etincelle { width: 96px; height: 28px; flex: none; margin-bottom: 4px; }
.evolution { font-size: 0.82rem; font-weight: 600; color: var(--encre-2); margin-top: 4px; }
.evolution.bon { color: var(--bon-encre); }
.evolution.grave { color: var(--grave-encre); }
.evolution small { font-weight: 400; color: var(--encre-3); }
@media (max-width: 520px) {
  /* Sur un téléphone, les chiffres vont deux par deux. */
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .chiffre { padding: 12px 12px 10px; }
  .chiffre .valeur { font-size: 1.4rem; }
  .chiffre svg.etincelle { width: 72px; }
}

.defile { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
caption { text-align: left; color: var(--encre-2); font-size: 0.85rem; padding-bottom: 6px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
thead th { color: var(--encre-2); font-weight: 600; font-size: 0.82rem; white-space: nowrap; border-bottom-color: var(--axe); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 500; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.fin, th.fin { white-space: nowrap; }
tr.cliquable { cursor: pointer; }
tr.cliquable:hover td, tr.cliquable:hover th { background: var(--creux); }
th button.tri { border: 0; background: none; padding: 0; font-weight: 600; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button.tri:hover { color: var(--encre); }
th[aria-sort="ascending"] button.tri::after { content: "↑"; }
th[aria-sort="descending"] button.tri::after { content: "↓"; }
td .secondaire, .secondaire { color: var(--encre-2); font-size: 0.85rem; }
.vide { padding: 22px 8px; text-align: center; color: var(--encre-2); }
.note { color: var(--encre-2); font-size: 0.85rem; }

.etiquette {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap;
  background: var(--creux); color: var(--encre-2); border: 1px solid var(--trait); vertical-align: 1px;
}
.etiquette.bon { color: var(--bon-encre); border-color: currentColor; background: none; }
.etiquette.grave { color: var(--grave-encre); border-color: currentColor; background: none; }
.etiquette.alerte { color: var(--alerte-encre); border-color: currentColor; background: none; }
.etiquette.marque { background: var(--indigo); color: #ffffff; border-color: var(--indigo); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin-top: 12px; color: var(--encre-2); font-size: 0.9rem; }
.pagination .boutons { display: flex; gap: 8px; }
.outils { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; }
.outils .recherche { flex: 1 1 220px; max-width: 360px; }

dl.fiche { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dl.fiche dt { color: var(--encre-2); }
dl.fiche dd { margin: 0; overflow-wrap: anywhere; }

.badges { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); list-style: none; margin: 0; padding: 0; }
.badges li { border: 1px solid var(--trait); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.badges li.gagne { border-color: var(--serie-1); }
.badges li strong { font-weight: 600; }
.badges li span { color: var(--encre-2); font-size: 0.82rem; }
.jauge { display: block; width: 100%; min-width: 70px; height: 6px; margin-top: 4px; }
.jauge .piste { fill: var(--creux); }
.jauge .plein { fill: var(--serie-1); }

details.equipe { border-top: 1px solid var(--trait); }
details.equipe:first-of-type { border-top: 0; }
details.equipe summary { cursor: pointer; padding: 10px 4px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; list-style: none; }
details.equipe summary::-webkit-details-marker { display: none; }
details.equipe summary::before { content: "▸"; color: var(--encre-3); }
details.equipe[open] summary::before { content: "▾"; }
details.equipe summary .nom { font-weight: 600; margin-right: auto; }
details.equipe .dedans { padding: 0 4px 12px 22px; }

/* ------------------------------------------------------------------ Graphiques */

.graphe { margin: 0; min-width: 0; }
.graphe-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.graphe-tete h3 { margin-right: auto; }
.graphe-tete .sous-titre { flex-basis: 100%; color: var(--encre-2); font-size: 0.85rem; }
.legende { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 0; font-size: 0.85rem; color: var(--encre-2); }
.legende li { display: inline-flex; align-items: center; gap: 6px; }
.legende svg { width: 16px; height: 8px; }
.graphe-zone { position: relative; touch-action: pan-y; border-radius: 8px; }
.graphe-zone svg { display: block; width: 100%; overflow: visible; }
.graphe .grille-trait { stroke: var(--trait); stroke-width: 1; shape-rendering: crispEdges; }
.graphe .base { stroke: var(--axe); stroke-width: 1; shape-rendering: crispEdges; }
.graphe text { fill: var(--encre-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.graphe .courbe { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graphe .aire { stroke: none; opacity: 0.1; }
.graphe .repere { stroke: var(--axe); stroke-width: 1; shape-rendering: crispEdges; }
.graphe .point { stroke: var(--surface); stroke-width: 2; }
.graphe .colonne { transition: opacity 0.1s; }
.graphe .colonne.estompe { opacity: 0.45; }
.s1 { stroke: var(--serie-1); fill: var(--serie-1); }
.s2 { stroke: var(--serie-2); fill: var(--serie-2); }
.s3 { stroke: var(--serie-3); fill: var(--serie-3); }
.s-attenue { stroke: var(--attenue); fill: var(--attenue); }
.courbe.s1, .courbe.s2, .courbe.s3, .courbe.s-attenue { fill: none; }

.bulle {
  position: absolute; top: 0; z-index: 5; pointer-events: none; min-width: 140px; max-width: 260px; padding: 8px 10px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--axe); box-shadow: 0 6px 20px rgba(10, 8, 30, 0.18);
  font-size: 0.85rem;
}
.bulle .quand { color: var(--encre-2); margin-bottom: 4px; }
.bulle .rang { display: flex; align-items: center; gap: 8px; }
.bulle .rang svg { width: 14px; height: 8px; flex: none; }
.bulle .rang strong { font-variant-numeric: tabular-nums; }
.bulle .rang span { color: var(--encre-2); }

.barres { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.barres li { display: grid; grid-template-columns: minmax(84px, 34%) minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 0.9rem; }
.barres .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barres svg { display: block; width: 100%; height: 10px; }
.barres .valeur { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 3.2em; }
.barres .valeur small { color: var(--encre-2); margin-left: 6px; }
/* Un nom trop long pour tenir à côté de sa barre passe au-dessus : il n'est jamais coupé. */
.barres.empile li { grid-template-columns: minmax(0, 1fr) auto; }
.barres.empile .nom { grid-column: 1 / -1; white-space: normal; }
@media (max-width: 420px) {
  .barres:not(.empile) li { grid-template-columns: minmax(0, 1fr) auto; }
  .barres:not(.empile) svg { grid-column: 1 / -1; grid-row: 2; }
}

/* ------------------------------------------------------------------ Erreurs */

.erreur-ligne { display: grid; gap: 4px; }
.erreur-ligne .texte { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
.erreur-ligne .ou { color: var(--encre-2); font-size: 0.82rem; }
.erreur-ligne a.texte { text-decoration: none; }
.erreur-ligne a.texte:hover, .erreur-ligne a.texte:focus-visible { text-decoration: underline; }
.jetons { display: flex; flex-wrap: wrap; gap: 4px; }
.jetons + .jetons { margin-top: 4px; }
pre.brut {
  margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--creux); overflow-x: auto; white-space: pre-wrap;
  overflow-wrap: anywhere; font: 0.85rem/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.ligne input[type="number"] { width: 90px; }
form.pile { display: grid; gap: 14px; max-width: 420px; }

@media print {
  .menu, .bandeau-mobile, .page-outils, .evitement { display: none !important; }
  .coquille { display: block; }
  .carte, .chiffre { box-shadow: none; break-inside: avoid; }
}
