/* Style de la base, repris de la maquette validée : bleu de travail et jaune chantier.
   Polices du téléphone seulement : aucune page n'appelle un service extérieur. */
:root {
  --fond: #f3f5f8;
  --ecran: #ffffff;
  --texte: #17202c;
  --sourdine: #5b6676;
  --trait: #d5dbe4;
  --accent: #1f4e8c;
  --sur-accent: #ffffff;
  --accent-doux: #e3ecf8;
  --attente-fond: #fff3c4;
  --attente-texte: #6b4e00;
  --ok-fond: #e2f3e6;
  --ok-texte: #1d5b2c;
  --refus-fond: #fde2e1;
  --refus-texte: #8a1c17;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0f141b;
    --ecran: #151c25;
    --texte: #e8edf4;
    --sourdine: #9aa6b6;
    --trait: #2c3644;
    --accent: #6f9fe0;
    --sur-accent: #0b1522;
    --accent-doux: #1c2b40;
    --attente-fond: #3d3205;
    --attente-texte: #ffe48a;
    --ok-fond: #16301d;
    --ok-texte: #9fdcae;
    --refus-fond: #3f1614;
    --refus-texte: #ffb4ad;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.45 var(--police);
  padding:
    max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
main { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 18px; margin: 8px 0 0; }
p { margin: 0; }
.colonne { display: flex; flex-direction: column; gap: 12px; }
.sourdine { color: var(--sourdine); }
.petit { font-size: 14px; }

.carte {
  background: var(--ecran);
  border: 1px solid var(--trait);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 0 16px;
  border-radius: 14px; border: 2px solid var(--trait);
  background: transparent; color: var(--texte);
  font: 700 17px var(--police); text-decoration: none; cursor: pointer;
}
.btn.principal { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.btn:focus-visible, .micro:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.bandeau { border-radius: 12px; padding: 10px 12px; font-size: 15px; font-weight: 700; }
.bandeau.attente { background: var(--attente-fond); color: var(--attente-texte); }
.bandeau.ok { background: var(--ok-fond); color: var(--ok-texte); }
.bandeau.refus { background: var(--refus-fond); color: var(--refus-texte); }

.zone-micro { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0; }
.micro {
  width: 136px; height: 136px; border-radius: 50%; border: none;
  background: var(--accent); color: var(--sur-accent);
  display: flex; align-items: center; justify-content: center;
  /* Appui long : ni sélection, ni loupe, ni menu, ni défilement. */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.micro svg { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.micro.enregistre { background: var(--refus-texte); }

.pastille { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pastille.attente { background: var(--attente-fond); color: var(--attente-texte); }
.pastille.ok { background: var(--ok-fond); color: var(--ok-texte); }
.pastille.refus { background: var(--refus-fond); color: var(--refus-texte); }

.journal { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.journal li { border-left: 3px solid var(--trait); padding: 2px 0 2px 10px; }

input[type="text"] {
  width: 100%; min-height: 56px; padding: 0 14px; border-radius: 14px;
  border: 2px solid var(--trait); background: var(--ecran); color: var(--texte);
  font: 20px var(--police); letter-spacing: 1px;
}
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--trait); vertical-align: top; }
pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; }
