/* Thèmes : sombre (défaut), clair, jaune sur noir (celui de l'appli) */
:root, [data-theme="sombre"] {
  --fond: #0b0b0b; --surface: #181818; --texte: #f4f4f4; --doux: #cfcfcf;
  --accent: #ebff28; --accent-texte: #0b0b0b; --bord: #3a3a3a; --lien: #ebff28;
}
[data-theme="clair"] {
  --fond: #ffffff; --surface: #f2f2f2; --texte: #111111; --doux: #333333;
  --accent: #111111; --accent-texte: #ffffff; --bord: #8a8a8a; --lien: #0a3fa8;
}
[data-theme="jaune"] {
  --fond: #000000; --surface: #000000; --texte: #ffeb00; --doux: #ffeb00;
  --accent: #ffeb00; --accent-texte: #000000; --bord: #ffeb00; --lien: #ffeb00;
}
/* Couleurs des touches de la télécommande (texte : blanc sur rouge, vert, bleu ; noir sur jaune) */
:root { --rouge: #b3241d; --vert: #146b3a; --bleu: #1f4fb0; --jaune: #ffd21f; --taille: 1; }

* { box-sizing: border-box; }
html { font-size: calc(22px * var(--taille)); }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: "Atkinson Hyperlegible", Verdana, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--lien); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 4px solid var(--accent); outline-offset: 4px; }
[data-theme="clair"] :focus-visible { outline-color: #0a3fa8; }
.contenu { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

.evitement { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-texte); padding: 0.6rem 1rem; font-weight: 700; z-index: 10; }
.evitement:focus { left: 1rem; }

/* En-tête */
header { border-bottom: 2px solid var(--bord); }
.entete { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.5rem; padding: 0.8rem 1rem; }
.marque { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--texte); font-weight: 800; font-size: 1.5rem; }
.marque img { width: 3rem; height: 3rem; border-radius: 0.6rem; }
nav ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; list-style: none; margin: 0; padding: 0; }
nav a { font-weight: 700; text-decoration: none; padding: 0.3rem 0; display: inline-block; }
nav a:hover, nav a:focus-visible { text-decoration: underline; }
.outils { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; }
.outils button {
  font: inherit; font-size: 0.8rem; font-weight: 700; min-height: 2.6rem; padding: 0.3rem 0.9rem;
  background: var(--surface); color: var(--texte); border: 2px solid var(--bord); border-radius: 0.5rem; cursor: pointer;
}
.outils button[aria-pressed="true"] { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); }

/* Ouverture */
.ouverture { padding: 2.5rem 0 1.5rem; }
h1 { font-size: 2.3rem; line-height: 1.2; margin: 0 0 1rem; max-width: 22ch; }
h1 em { font-style: normal; color: var(--accent); }
[data-theme="clair"] h1 em { color: #0a3fa8; }
.chapeau { font-size: 1.15rem; color: var(--doux); max-width: 46ch; margin: 0 0 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.bouton {
  display: inline-flex; align-items: center; min-height: 3.2rem; padding: 0.5rem 1.4rem; border-radius: 0.7rem;
  font-weight: 800; text-decoration: none; border: 3px solid var(--accent);
}
.bouton.plein { background: var(--accent); color: var(--accent-texte); }
.bouton.creux { color: var(--texte); }

.demo {
  margin: 2rem 0 0; border: 2px dashed var(--bord); border-radius: 1rem; padding: 2rem 1rem; text-align: center;
  background: var(--surface);
}
.demo p { margin: 0; color: var(--doux); }

/* Sections */
section { padding: 2rem 0; border-top: 2px solid var(--bord); }
h2 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.grande { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.8rem; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.carte { background: var(--surface); border: 2px solid var(--bord); border-radius: 1rem; padding: 1.1rem 1.2rem; }
.carte p { margin: 0; }
.pastille { display: inline-block; font-size: 0.8rem; font-weight: 800; padding: 0.15rem 0.7rem; border-radius: 99px; margin-bottom: 0.5rem; }
.p-rouge { background: var(--rouge); color: #fff; } .p-vert { background: var(--vert); color: #fff; }
.p-bleu { background: var(--bleu); color: #fff; } .p-jaune { background: var(--jaune); color: #000; }
[data-theme="jaune"] .pastille { background: #ffeb00; color: #000; }
.carte.trait-vert { border-left: 0.6rem solid var(--vert); }
.carte.trait-bleu { border-left: 0.6rem solid var(--bleu); }
.carte.trait-jaune { border-left: 0.6rem solid var(--jaune); }
.carte.trait-rouge { border-left: 0.6rem solid var(--rouge); }
[data-theme="jaune"] .carte { border-left-color: #ffeb00; }

ol.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 0; display: grid; gap: 1rem; }
ol.etapes li { counter-increment: etape; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; }
ol.etapes li::before {
  content: counter(etape); display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-texte); font-weight: 800; font-size: 1.3rem;
}
ol.etapes p { margin: 0; color: var(--doux); }
ul.liste { margin: 0; padding-left: 1.2rem; }
ul.liste li { margin-bottom: 0.4rem; }
ol.liste { margin: 0 0 1rem; padding-left: 1.6rem; }
ol.liste > li { margin-bottom: 0.6rem; }
.legal h3 { margin: 1.4rem 0 0.4rem; }
.note { color: var(--doux); font-size: 0.9rem; }

.tarif { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.2rem; }
.tarif .carte { flex: 1 1 11rem; }
.prix { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin: 0.2rem 0; }
[data-theme="clair"] .prix { color: #0a3fa8; }

details { background: var(--surface); border: 2px solid var(--bord); border-radius: 0.8rem; padding: 0.8rem 1rem; margin-bottom: 0.8rem; }
summary { font-weight: 700; cursor: pointer; min-height: 2.4rem; display: flex; align-items: center; }
details p { margin: 0.6rem 0 0; color: var(--doux); }

footer { border-top: 2px solid var(--bord); padding: 1.5rem 0 2.5rem; font-size: 0.9rem; color: var(--doux); }
footer ul { list-style: none; padding: 0; margin: 0 0 0.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }

@media (max-width: 640px) {
  html { font-size: calc(20px * var(--taille)); }
  h1 { font-size: 1.9rem; }
  .outils { margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Prérequis */
.prerequis-court { font-size: 1rem; margin: 0 0 1.4rem; max-width: 52ch; }
ul.coches { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 0.8rem; }
ul.coches li { position: relative; padding-left: 2.2rem; }
ul.coches li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--accent); font-size: 1.2rem; }
[data-theme="clair"] ul.coches li::before { color: #146b3a; }
.carte.attention { border-color: var(--rouge); border-left: 0.6rem solid var(--rouge); margin-bottom: 1rem; }
[data-theme="jaune"] .carte.attention { border-color: #ffeb00; }

/* Avant la sortie sur Google Play (3/11/2026) */
.annonce { background: var(--accent); color: var(--accent-texte); border-radius: 1rem; padding: 0.9rem 1.2rem; margin: 1.5rem 0 0; font-size: 1.05rem; }
.annonce a { color: var(--accent-texte); font-weight: 700; }

/* Pages légales */
.legal h2 { margin-top: 2rem; }
.legal p, .legal li { max-width: 70ch; }

/* Page d'aide */
.sommaire { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.sommaire a { font-weight: 700; }
.tarif + .carte { margin-bottom: 1.2rem; }

/* Mode d'emploi */
figure.photo { margin: 1rem 0 1.4rem; }
figure.photo img { display: block; width: auto; max-width: min(100%, 900px); max-height: 75vh; height: auto; border-radius: 0.8rem; border: 2px solid var(--bord); }
figure.photo figcaption { margin-top: 0.5rem; color: var(--doux); max-width: 900px; }
figure.photo.presentation { margin-top: 2rem; }
dl.touches { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.2rem; margin: 0 0 1rem; }
dl.touches dt { font-weight: 800; color: var(--accent); }
[data-theme="clair"] dl.touches dt { color: #0a3fa8; }
dl.touches dd { margin: 0; }
@media (max-width: 640px) { dl.touches { grid-template-columns: 1fr; gap: 0 0; } dl.touches dd { margin-bottom: 0.6rem; } }

/* Vidéo de démonstration */
figure.video { margin: 2rem 0 0; }
figure.video video { display: block; width: 100%; height: auto; border-radius: 1rem; border: 2px solid var(--bord); background: #000; }
figure.video figcaption { margin-top: 0.6rem; color: var(--doux); font-size: 0.95rem; }

/* Mode d'emploi complet (manuel.html, 3/11/2026) */
.manuel h2 { margin-top: 2.5rem; padding-top: 1rem; border-top: 2px solid var(--bord); }
.manuel h3 { margin-top: 1.8rem; }
.manuel h4 { margin-top: 1.4rem; }
.manuel p, .manuel li { max-width: 75ch; }
.manuel img { display: block; max-width: min(100%, 22rem); height: auto; margin: 0.8rem 0; border: 2px solid var(--bord); border-radius: 0.6rem; }
/* Copies d'écran en paysage (04/11/2026) : plus larges que les photos en hauteur */
.manuel img.large { max-width: min(100%, 900px); }
.manuel table { border-collapse: collapse; width: 100%; margin: 0.8rem 0 1.2rem; font-size: 0.95rem; }
.manuel th, .manuel td { border: 1px solid var(--bord); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
.manuel th { background: var(--surface); }
.manuel td p, .manuel th p, .manuel li p { margin: 0; }
.manuel blockquote { margin: 1rem 0; padding: 0.8rem 1.2rem; border-left: 0.5rem solid var(--accent); background: var(--surface); border-radius: 0.5rem; }
.manuel code { font-size: 0.9em; background: var(--surface); padding: 0 0.25em; border-radius: 0.25em; }
.sommaire-manuel { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.3rem 1.5rem; }
.sommaire-manuel a { font-weight: 700; }
@media (max-width: 640px) { .manuel table { display: block; overflow-x: auto; } }
@media print { html, html[data-theme] { --fond: #fff; --surface: #fff; --texte: #000; --doux: #222; --accent: #000; --accent-texte: #fff; --bord: #666; --lien: #000; } header, footer, .outils, .evitement { display: none; } .manuel img { max-width: 12rem; } .manuel img.large { max-width: 100%; } }
