/* Styles communs des pages orateur et auditeur (repris de la charte du prototype). */
:root {
  --bg: #eef1f6; --surface: #ffffff; --line: #d8dee8; --ink: #121a2b; --muted: #5b6579;
  --brand: #1f5eff; --brand-soft: #e4ebff; --live: #e5484d; --ok: #1a8f5a;
  --ui: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1320; --surface: #171e2e; --line: #2a3347; --ink: #eef2fa; --muted: #9aa5bb;
    --brand: #5b8cff; --brand-soft: #1d2a4d; --live: #ff6b6f; --ok: #3ccf8e;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 17px; line-height: 1.45;
  min-height: 100dvh; -webkit-text-size-adjust: 100%;
}
.page { max-width: 720px; margin: 0 auto; padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 14px; min-height: 100dvh; }
header.barre { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marque { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.marque span { color: var(--brand); }
.pastille { font-family: var(--mono); font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.carte { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.carte h2 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
button, select { font: inherit; color: inherit; }
.bouton {
  appearance: none; border: 0; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 700;
  font-size: 18px; padding: 16px 20px; min-height: 56px; cursor: pointer; width: 100%;
}
.bouton:disabled { opacity: 0.5; cursor: default; }
.bouton.secondaire { background: var(--brand-soft); color: var(--brand); }
.bouton.danger { background: var(--live); }
select.grand {
  width: 100%; font-size: 20px; padding: 14px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); min-height: 56px;
}
.etat { color: var(--muted); font-size: 15px; min-height: 1.4em; }
.etat.alerte { color: var(--live); }
.etat.ok { color: var(--ok); }
.muet { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mention { color: var(--muted); font-size: 13px; text-align: center; margin-top: auto; }
.cache { display: none !important; }
/* Page masquée jusqu'au chargement des textes d'écran (évite d'afficher les clés). */
html.chargement body { visibility: hidden; }

/* Bouton qui affiche la langue choisie et ouvre le sélecteur. */
.bouton-langue {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%;
  min-height: 64px; padding: 10px 44px 10px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); text-align: start; cursor: pointer; position: relative;
}
.bouton-langue::after { content: "▾"; position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.bouton-langue .nom, .selecteur .ligne .nom { font-size: 20px; font-weight: 700; line-height: 1.2; }
.bouton-langue .detail, .selecteur .ligne .detail { font-size: 14px; color: var(--muted); }

/* Sélecteur de langue : plein écran sur téléphone, lignes larges pour le doigt. */
dialog.selecteur {
  padding: 0; border: 0; border-radius: 20px; width: min(560px, 100vw); max-width: 100vw; height: min(760px, 100dvh); max-height: 100dvh;
  background: var(--surface); color: var(--ink);
}
dialog.selecteur::backdrop { background: rgb(0 0 0 / 0.45); }
@media (max-width: 600px) { dialog.selecteur { width: 100vw; height: 100dvh; border-radius: 0; } }
.selecteur .cadre { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 14px 16px 0; }
.selecteur .tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.selecteur h2 { margin: 0; font-size: 20px; }
.selecteur .fermer { min-width: 48px; min-height: 48px; border: 0; border-radius: 12px; background: var(--bg); font-size: 20px; cursor: pointer; }
.selecteur .recherche {
  width: 100%; font: inherit; font-size: 18px; padding: 12px 14px; min-height: 52px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.selecteur .micro-langue {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border: 0; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); font-size: 17px; font-weight: 700; cursor: pointer;
}
.selecteur .pastille-micro { width: 14px; height: 14px; border-radius: 50%; background: currentColor; }
.selecteur .micro-langue.enregistre { background: var(--live); color: #fff; }
.selecteur .micro-langue.enregistre .pastille-micro { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.selecteur .message { margin: 0; min-height: 1.4em; font-size: 15px; color: var(--muted); }
.selecteur .message.ok { color: var(--ok); font-weight: 700; }
.selecteur .message.alerte { color: var(--live); }
.selecteur .propositions:empty { display: none; }
.selecteur .propositions { display: grid; gap: 6px; }
.selecteur .propositions .ligne { border: 2px solid var(--brand); }
.selecteur .liste { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; overscroll-behavior: contain; }
.selecteur h3 { margin: 10px 4px 2px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.selecteur .ligne {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; padding: 8px 14px;
  border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); text-align: start; cursor: pointer; font: inherit;
}
.selecteur .ligne[aria-current="true"] { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.selecteur .vide { color: var(--muted); padding: 12px 4px; }

/* Pages juridiques (public/juridique/) : brouillons, valeurs à compléter surlignées. */
.juridique nav { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; }
.juridique nav a[aria-current] { font-weight: 700; color: var(--ink); text-decoration: none; }
.juridique article h1 { font-size: 26px; margin: 0 0 8px; }
.juridique article h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 22px 0 6px; }
.juridique article p, .juridique article li { line-height: 1.55; }
.brouillon, .a-completer { background: #fff4d6; color: #6b4e00; }
.brouillon { border-radius: 12px; padding: 10px 14px; font-weight: 700; margin: 0; }
.a-completer { border-radius: 4px; padding: 0 3px; }
@media (prefers-color-scheme: dark) { .brouillon, .a-completer { background: #3d3112; color: #ffe08a; } }
