/* « Mon TO8, où l'on jouait avec mon papa » (maj64, 13/11/2026) : trois écrans de 320 × 200 points, agrandis sans flou.
   Chargée après site.css et jeux-commun.css. Les écrans gardent leurs couleurs d'époque (fond noir) dans tous les
   thèmes ; tout le reste suit les jetons du site. Cibles de 44 px au moins. */
.to8-piece {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin-top: 1.25rem;
}

.to8-piece[hidden] {
  display: none;
}

.to8-intro {
  max-width: var(--mesure);
}

.to8-moniteur {
  position: relative;
  justify-self: start;
  max-width: 100%;
  padding: 0.75rem;
  border-radius: 14px;
  background: #cfc9bb;
  box-shadow: inset 0 0 0 2px #8f887a;
}

.to8-ecran {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  aspect-ratio: 320 / 200;
  background: #000;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.to8-ecran:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.to8-message {
  position: absolute;
  inset: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.to8-message[hidden] {
  display: none;
}

.to8-tableau {
  margin: 0;
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

.to8 .to8-actions {
  margin: 0;
}

.to8-pave {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.5rem;
  max-width: 28rem;
}

.to8-touche {
  min-height: 3.5rem;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  color: var(--encre);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.to8-touche--tir {
  font-size: 1.05rem;
}

.to8-touche.actif {
  background: var(--accent);
  color: var(--fond);
}

.to8-formulaire {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
}

.to8-champ {
  display: grid;
  gap: 0.3rem;
  margin: 0;
}

.to8-champ input,
.to8-champ select {
  min-height: 2.75rem;
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--encre-3);
  border-radius: 8px;
  background: var(--fond);
  color: var(--encre);
  font: inherit;
}

.to8-champ input[type="number"] {
  width: 9rem;
}

.to8-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.to8-pastille {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 0.35rem;
  border-radius: 4px;
  background: #000;
  font-family: var(--f-mono);
  font-weight: 700;
}

.to8-pastille--1 { color: #ff4040; }
.to8-pastille--3 { color: #ffff00; }
.to8-pastille--6 { color: #00ffff; }
.to8-pastille--7 { color: #ffffff; }

.to8-resultat {
  max-width: var(--mesure);
  margin: 0;
}

.to8-listing {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border-radius: 8px;
  background: #000;
  color: #77dd77;
  font-family: var(--f-mono);
  font-size: 0.875rem;
  line-height: 1.5;
}

.to8-listing:focus-visible,
.to8-tableau-defile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.to8-tableau-defile {
  max-width: 100%;
  max-height: 24rem;
  overflow: auto;
}

.to8-table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.to8-table caption {
  padding-bottom: 0.5rem;
  font-weight: 600;
  text-align: left;
}

.to8-table th,
.to8-table td {
  padding: 0.3rem 0.7rem;
  border-bottom: 1px solid var(--filet);
  text-align: right;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .to8-touche {
    transition: none;
  }
}
