/* Même langage que les pages du Mac (tournée, bilans) : papier gris-vert, cartes blanches, titres serif,
   bleu pour agir, ocre pour ce qui attend. */
:root {
  --paper: #f2f4f3; --sheet: #ffffff; --ink: #1e2a2f; --soft: #55636a; --rule: #d6dcda; --rule2: #e3e8e6;
  --in: #2d6a86; --in-dark: #1f4d62; --out: #b9822e; --outtext: #7a5317; --outbg: #f6ecdb;
  --deficit: #9b3550; --surplus: #2f6b55; --surplusbg: #e3efe8;
  --serif: Charter, "Iowan Old Style", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141a1c; --sheet: #1a2124; --ink: #e6ecea; --soft: #9aa8ab; --rule: #2c3639; --rule2: #263033;
    --in: #6fb0cf; --in-dark: #9ccbe0; --out: #dcab5c; --outtext: #e2bd62; --outbg: #33291a;
    --deficit: #e07b98; --surplus: #7cc4a5; --surplusbg: #1d3229;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--in); }
a:hover { color: var(--in-dark); }
.ecran { max-width: 520px; margin: 0 auto; min-height: 100dvh; padding: max(env(safe-area-inset-top), 28px) 16px 24px;
  display: flex; flex-direction: column; gap: 14px; }
.ecran.page { padding: 0; max-width: none; gap: 0; }
h1 { margin: 0 4px; font-family: var(--serif); font-size: 30px; line-height: 1.15; font-weight: 700; }
h1.grand { font-size: 34px; margin-top: 32px; }
p { margin: 0; }
.doux { color: var(--soft); }
.petit { font-size: 13px; line-height: 1.5; }
.marque { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 14px; padding: 0 4px; }
.carte { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px; }
a.carte { color: var(--ink); text-decoration: none; }
a.carte:hover { border-color: var(--in); }
.carte-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.carte-titre { font-size: 17px; font-weight: 600; }
.chiffre { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.bandeau { padding: 10px 14px; border-radius: 10px; background: var(--rule2); font-size: 14px; line-height: 1.45; }
.pastille { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pastille.attente { background: var(--outbg); color: var(--outtext); }
.pastille.neutre { background: var(--rule2); color: var(--soft); }
.vide { flex-grow: 1; }
.bouton { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 12px;
  border: 0; background: var(--in); color: #fff; font: inherit; font-size: 17px; font-weight: 600; text-decoration: none;
  cursor: pointer; padding: 0 18px; }
.bouton:hover { background: var(--in-dark); color: #fff; }
.bouton.contour { background: var(--sheet); color: var(--in); border: 1px solid var(--in); min-height: 48px; font-size: 16px; }
.bouton[disabled] { opacity: .55; cursor: not-allowed; }
.lien { align-self: center; min-height: 44px; display: flex; align-items: center; font-size: 15px; background: none; border: 0;
  color: var(--in); font: inherit; cursor: pointer; text-decoration: underline; }
.retour { display: flex; align-items: center; gap: 4px; min-height: 44px; font-size: 16px; text-decoration: none;
  align-self: flex-start; background: none; border: 0; color: var(--in); font-family: inherit; cursor: pointer; padding: 0; }
.pilule { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 0 4px; }
.groupe { margin: 6px 4px 0; font-size: 13px; font-weight: 600; color: var(--soft); }
.liste { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; display: flex; flex-direction: column; }
.ligne { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.ligne + .ligne { border-top: 1px solid var(--rule2); }
.ligne .corps { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ligne b { font-size: 16px; font-weight: 600; }
.retirer { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet);
  color: var(--deficit); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; align-self: center; }
.choix { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.choix legend { margin: 0 4px 8px; padding: 0; font-size: 15px; font-weight: 600; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--rule);
  background: var(--sheet); cursor: pointer; }
.option:has(input:checked) { border: 2px solid var(--in); }
.option input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--in); }
.option span { display: flex; flex-direction: column; gap: 2px; }
.option b { font-size: 15px; font-weight: 600; }
.champ { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.champ span { font-size: 15px; font-weight: 600; }
.champ input, .champ textarea { min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--sheet); font: inherit; font-size: 17px; color: var(--ink); }
.champ textarea { font-size: 13px; font-family: ui-monospace, Menlo, monospace; min-height: 90px; }
.code { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.code svg { width: 210px; height: 210px; }
.viseur { position: relative; border-radius: 14px; background: #1e2a2f; overflow: hidden; aspect-ratio: 4 / 3; }
.viseur video { width: 100%; height: 100%; object-fit: cover; display: block; }
.viseur p { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 13px; color: #d6dcda; }
.alerte { background: var(--outbg); color: var(--outtext); border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.erreur { background: #f6e9ed; color: var(--deficit); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.recup { font-family: ui-monospace, Menlo, monospace; font-size: 15px; word-break: break-all; background: var(--sheet);
  border: 1px dashed var(--out); border-radius: 10px; padding: 14px; }
.barre { position: sticky; top: 0; z-index: 2; padding: max(env(safe-area-inset-top), 12px) 16px 10px; background: var(--sheet);
  border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.barre .entete { padding: 0; align-items: center; }
iframe.lecture { display: block; width: 100%; border: 0; height: calc(100dvh - 96px); background: var(--paper); }
ul.points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.45; }
:focus-visible { outline: 2px solid var(--in); outline-offset: 2px; }
