/* Une page lue au téléphone, souvent dehors : gros texte, fort contraste, rien d'autre. Les
   couleurs ne viennent pas des jetons de l'écran — la page vit hors du produit, et ne charge rien
   qu'elle n'apporte. */
:root {
  color-scheme: light dark;
  --fond: #ffffff;
  --encre: #111111;
  --contour: #555555;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #111111;
    --encre: #f2f2f2;
    --contour: #aaaaaa;
  }
}

body {
  background: var(--fond);
  color: var(--encre);
  font: 1.125rem/1.5 system-ui, sans-serif;
  margin: 0;
}

main {
  margin: 0 auto;
  max-width: 36rem;
  padding: 1rem;
}

li {
  margin-bottom: 1.25rem;
}

.valeur {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

input {
  border: 2px solid var(--contour);
  border-radius: 0.375rem;
  flex: 1;
  font: 1rem ui-monospace, monospace;
  min-width: 0;
  padding: 0.625rem;
}

button {
  border: 2px solid var(--encre);
  border-radius: 0.375rem;
  font: inherit;
  min-height: 3rem;
  padding: 0 1rem;
}

.avis {
  border-left: 4px solid var(--encre);
  padding-left: 0.75rem;
}

/* Le guide : des étapes numérotées en gros, chacune avec son titre. */
.guide {
  padding-left: 1.75rem;
}

.guide h2 {
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.guide li::marker {
  font-size: 1.25rem;
  font-weight: bold;
}

.magasins {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.magasin {
  align-items: center;
  border: 2px solid var(--encre);
  border-radius: 0.375rem;
  color: var(--encre);
  display: inline-flex;
  flex-direction: column;
  font-weight: bold;
  justify-content: center;
  min-height: 3rem;
  min-width: 9rem;
  padding: 0.375rem 1rem;
  text-decoration: none;
}

.magasin span {
  font-size: 0.875rem;
  font-weight: normal;
}

/* Les schémas : un téléphone dessiné au trait, et en encre pleine ce qu'il faut toucher. */
.schema {
  display: block;
  margin-top: 0.75rem;
  max-width: 16rem;
  width: 100%;
}

.schema rect {
  fill: none;
  stroke: var(--contour);
  stroke-width: 2;
}

.schema .barre,
.schema .volet {
  fill: var(--fond);
}

.schema .cible rect,
.schema .ligne {
  fill: var(--contour);
  stroke: none;
}

.schema .choisie {
  fill: var(--encre);
}

.schema text {
  fill: var(--encre);
  font: 10px system-ui, sans-serif;
}

.schema .choisie + text {
  fill: var(--fond);
  font-weight: bold;
}

/* L'ordinateur : le code se tape en grand, et la réponse se lit sous le champ. */
label {
  display: block;
  font-weight: 600;
}

#code {
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.reponse:empty {
  display: none;
}

#code[aria-invalid='true'] {
  border-width: 4px;
  border-style: dashed;
}
