/* Jeux de Veni Vidi Ludi - pages des QR codes. Aucune police ni ressource externe. */
:root {
  --framboise: #D60A51;
  --vert-foret: #008D36;
  --orange: #F29100;
  --or: #F9B133;
  --creme: #FFF8EC;
  --encre: #222222;
  --titre: Georgia, "Times New Roman", serif;
  --texte: Verdana, Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 18px;
  line-height: 1.6;
}
.bandeau {
  background: var(--framboise);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 6px solid var(--or);
}
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}
h1 {
  font-family: var(--titre);
  color: var(--framboise);
  text-align: center;
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 8px 0 16px;
}
.vignette {
  display: block;
  width: 150px;
  max-width: 45%;
  height: auto;
  margin: 0 auto 12px;
  border: 4px solid var(--or);
  border-radius: 16px;
  background: #fff;
}
.intro { text-align: center; margin: 0 0 16px; }
.carte {
  background: #fff;
  border: 3px solid var(--or);
  border-radius: 16px;
  padding: 16px;
  margin: 0 0 16px;
}
audio { display: block; width: 100%; }
.note-audio {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: #555;
}
.note-audio.erreur { color: var(--framboise); font-weight: 700; }

.bouton, summary.bouton {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--framboise);
  color: #fff;
  border: 0;
  border-radius: 14px;
  font: 700 1.1rem var(--texte);
  text-align: center;
  cursor: pointer;
  list-style: none;
}
summary.bouton::-webkit-details-marker { display: none; }
.bouton:focus-visible, summary.bouton:focus-visible, .case:focus-visible {
  outline: 4px solid var(--encre);
  outline-offset: 3px;
}
.bouton:hover { background: #B2107F; }
details.texte-lire { margin: 0 0 16px; }
details.texte-lire .cacher { display: none; }
details.texte-lire[open] .lire { display: none; }
details.texte-lire[open] .cacher { display: inline; }
.texte {
  margin: 12px 0 0;
  padding: 16px;
  background: #fff;
  border: 3px solid var(--vert-foret);
  border-radius: 16px;
  font-size: 1.15rem;
  line-height: 1.7;
}
.texte p { margin: 0; }

/* Page du code */
.cases {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 16px;
}
.case {
  width: 64px;
  height: 80px;
  text-align: center;
  font: 700 2.2rem var(--texte);
  color: var(--encre);
  background: #fff;
  border: 4px solid var(--orange);
  border-radius: 14px;
  padding: 0;
}
.case:focus { border-color: var(--framboise); }
.resultat { min-height: 1px; margin: 16px 0 0; }
.resultat .carte { margin: 0; }
.resultat.ok .carte { border-color: var(--vert-foret); background: #F2FBF4; }
.resultat.ko .carte { border-color: var(--orange); }
.resultat p { margin: 0 0 8px; }
.resultat p:last-child { margin: 0; }
.resultat .gros { font-size: 1.25rem; font-weight: 700; }

footer {
  max-width: 640px;
  margin: 8px auto 0;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #444;
}
footer a { color: var(--vert-foret); font-weight: 700; }
footer p { margin: 0 0 6px; }

@media (min-width: 900px) {
  body { font-size: 20px; }
  main { padding-top: 32px; }
  .vignette { width: 190px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
