:root {
  --fond: #f4f6f8; --carte: #ffffff; --texte: #1b2430; --doux: #5b6675; --bord: #d7dde4;
  --accent: #1f3a5f; --accent-texte: #ffffff; --rouge: #b42318; --rouge-fond: #fdecea;
  --vert: #18794e; --vert-fond: #e6f4ec; --orange: #a15c07; --orange-fond: #fff4e0;
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #11161c; --carte: #1a2129; --texte: #e6ebf0; --doux: #9aa6b2; --bord: #2e3843;
    --accent: #6ea8fe; --accent-texte: #0b1220; --rouge: #ff8a80; --rouge-fond: #3a1a18;
    --vert: #6fcf97; --vert-fond: #15301f; --orange: #f5b74f; --orange-fond: #3a2a10; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top)); background: var(--accent); color: var(--accent-texte); }
header h1 { font-size: 18px; margin: 0; flex: 1; }
main { max-width: 640px; margin: 0 auto; padding: 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
h2 { font-size: 16px; color: var(--doux); margin: 24px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
h3 { margin: 0 0 6px; font-size: 17px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border-radius: 10px; border: 1px solid var(--bord); background: var(--carte); padding: 10px 14px; }
button.principal { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); font-weight: 600; }
button.danger { color: var(--rouge); }
button.discret { background: transparent; border: none; color: inherit; padding: 6px 8px; text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
input, select { width: 100%; padding: 10px; border: 1px solid var(--bord); border-radius: 10px; background: var(--carte); min-height: 44px; }
label { display: block; margin-bottom: 6px; font-weight: 600; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.carte > * + * { margin-top: 10px; }
.erreur { color: var(--rouge); }
.info { color: var(--doux); font-size: 15px; margin: 6px 0; text-align: center; }
.pastille { background: var(--orange-fond); color: var(--orange); border-radius: 99px; padding: 2px 10px; font-size: 14px; }

.enregistreur { display: flex; flex-direction: column; align-items: center; padding: 18px 0 6px; }
.micro { width: 132px; height: 132px; border-radius: 50%; background: var(--accent); border: none;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.micro svg { width: 60px; height: 60px; fill: var(--accent-texte); }
.micro.actif { background: var(--rouge); animation: pulse 1.2s infinite; }
.micro.actif svg { fill: #fff; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.chrono { font-variant-numeric: tabular-nums; font-size: 22px; margin: 4px 0 0; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer; }
.liste .ligne1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.liste .extrait { color: var(--doux); font-size: 15px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statut { font-size: 13px; border-radius: 99px; padding: 2px 9px; white-space: nowrap; background: var(--fond); color: var(--doux); }
.statut.ok { background: var(--vert-fond); color: var(--vert); }
.statut.attention { background: var(--orange-fond); color: var(--orange); }
.statut.ko { background: var(--rouge-fond); color: var(--rouge); }

.transcription { font-style: italic; color: var(--doux); }
audio { width: 100%; }
.doutes { background: var(--orange-fond); color: var(--orange); border-radius: 10px; padding: 10px 12px; }
.doutes ul { margin: 4px 0 0; padding-left: 20px; }
.hors { background: var(--rouge-fond); color: var(--rouge); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.ligne { display: grid; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--bord); }
.ligne.mat { grid-template-columns: 1fr 84px 44px; }
.ligne.mdo { grid-template-columns: 1fr 84px 16px 44px; }
.ligne .suppr { padding: 8px; color: var(--rouge); }
.ligne p { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--doux); }
.ligne p.alerte { color: var(--orange); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.actions .principal { flex: 1; min-height: 50px; }
.total { text-align: right; color: var(--doux); font-size: 15px; }
.ecriture { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
