:root {
  --fond: #fbfaf7; --surface: #ffffff; --texte: #1d2330; --doux: #5a6272; --bord: #d9dce3;
  --accent: #1f5fbf; --accent-texte: #ffffff; --bulle-moi: #e6eefb; --alerte: #9a3412;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #14171d; --surface: #1d2129; --texte: #e8eaef; --doux: #a3aab8; --bord: #343a46;
    --accent: #7fb0ff; --accent-texte: #0b1220; --bulle-moi: #22314a; --alerte: #fdba74;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fond); color: var(--texte); min-height: 100vh; display: flex; flex-direction: column; }
.entete, main, footer { width: 100%; max-width: 820px; margin: 0 auto; padding: 16px; }
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
h1 { margin: 0; font-size: 1.5rem; }
.sous-titre { margin: 2px 0 0; color: var(--doux); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.langue { display: flex; gap: 6px; align-items: center; color: var(--doux); font-size: .9rem; }
main { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.avertissement { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--bord); color: var(--alerte); font-size: .9rem; }
#fil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#fil li { padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--bord); white-space: pre-wrap; overflow-wrap: anywhere; }
#fil li.moi { align-self: flex-end; background: var(--bulle-moi); max-width: 85%; }
#fil li .auteur { display: block; font-size: .75rem; color: var(--doux); font-weight: 600; }
.maquette iframe { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--bord); border-radius: 10px; margin-top: 8px; background: #fff; }
.maquette a { display: inline-block; margin-top: 6px; color: var(--accent); font-weight: 600; }
form#formulaire { display: flex; gap: 8px; position: sticky; bottom: 0; background: var(--fond); padding: 8px 0; }
textarea { flex: 1; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); resize: vertical; width: 100%; }
button, select { font: inherit; }
button { background: var(--accent); color: var(--accent-texte); border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
button.secondaire { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.lien { background: none; color: var(--accent); padding: 0; font-weight: 400; text-decoration: underline; }
button:disabled { opacity: .6; cursor: wait; }
select { padding: 6px; border-radius: 8px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
footer { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--doux); }
footer a { color: var(--accent); }
dialog { border: 1px solid var(--bord); border-radius: 12px; background: var(--surface); color: var(--texte); width: min(520px, calc(100vw - 32px)); }
dialog h2 { margin-top: 0; font-size: 1.15rem; }
dialog .actions { justify-content: flex-end; margin-top: 8px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prose { max-width: 820px; margin: 0 auto; padding: 16px; }
