/* Thème « ardoise de bar » : fond sombre, texte à la craie, quatre couleurs de réponse. */
:root {
  --board: #10262a;
  --board-2: #17363b;
  --board-3: #21474d;
  --chalk: #f4efe2;
  --chalk-dim: #a9bcb7;
  --line: rgba(244, 239, 226, 0.2);
  --red: #ef4b3a;
  --blue: #3a78f0;
  --amber: #f5b52a;
  --green: #2fbf71;
  --ink: #0d1f22;
  --display: 'Arial Rounded MT Bold', 'Segoe UI Black', 'Avenir Next Heavy', ui-rounded, system-ui, sans-serif;
  --body: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--board);
  color: var(--chalk);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.shape { width: 1em; height: 1em; fill: currentColor; flex: none; display: block; }

/* Couleurs des quatre réponses : triangle rouge, losange bleu, rond ambre, carré vert */
.c0 { --c: var(--red);   --on: var(--chalk); }
.c1 { --c: var(--blue);  --on: var(--chalk); }
.c2 { --c: var(--amber); --on: var(--ink); }
.c3 { --c: var(--green); --on: var(--ink); }

/* Barre de temps : une ligne à la craie qui se raccourcit */
.timebar { height: 1.1rem; background: var(--line); border-radius: 99px; overflow: hidden; }
.timebar > i {
  --p: 1;
  display: block; height: 100%; background: var(--amber);
  transform-origin: left; transform: scaleX(var(--p)); border-radius: 99px;
}

/* Bandeaux et superpositions */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: rgba(8, 20, 22, 0.86); text-align: center; padding: 2rem;
}
.overlay h2 { font-family: var(--display); font-size: 4em; }

.offline {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: var(--red); color: var(--chalk); text-align: center; padding: 0.5em 1em; font-weight: 700;
}

.muted { color: var(--chalk-dim); }

/* Cases du mot à deviner */
.slots { display: inline-flex; flex-wrap: wrap; justify-content: inherit; gap: .2em .3em; align-items: flex-end; }
.slot { display: inline-block; width: .6em; height: .9em; border-bottom: .1em solid currentColor; }
.gap { display: inline-block; width: .5em; }
