/* Chat public de la présentation — thème clair par défaut, sombre selon le système (prefers-color-scheme). */
:root {
  --fond: #f6f7f9;
  --surface: #ffffff;
  --texte: #1c2330;
  --discret: #5b6677;
  --bordure: #d9dee6;
  --accent: #1f5fbf;
  --accent-texte: #ffffff;
  --question-fond: #e6eefb;
  --alerte-fond: #fff4dc;
  --alerte-texte: #6b4b00;
  --erreur: #b3261e;
  --code-fond: #eef1f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #11151c;
    --surface: #1a2029;
    --texte: #e6e9ef;
    --discret: #9aa5b6;
    --bordure: #2c3544;
    --accent: #5b9bff;
    --accent-texte: #0b1220;
    --question-fond: #22304a;
    --alerte-fond: #3a2f12;
    --alerte-texte: #f3d58a;
    --erreur: #ff8b83;
    --code-fond: #232b38;
  }
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.page { max-width: 46rem; margin: 0 auto; padding: 1.25rem 16px 2rem; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.entete h1 { margin: 0 0 .25rem; font-size: 1.4rem; }
.intro { margin: 0 0 1rem; color: var(--discret); font-size: .95rem; }
.bandeau { background: var(--alerte-fond); color: var(--alerte-texte); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .8rem; font-size: .95rem; }
.fil { flex: 1; display: flex; flex-direction: column; gap: .75rem; padding-bottom: 1rem; }
.vide { color: var(--discret); }
.exemples { list-style: none; margin: .25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.exemple { width: 100%; text-align: left; background: var(--surface); color: var(--texte); border: 1px solid var(--bordure); border-radius: 8px; padding: .55rem .75rem; font: inherit; cursor: pointer; }
.exemple:hover, .exemple:focus-visible { border-color: var(--accent); outline: none; }
.message { max-width: 100%; padding: .6rem .85rem; border-radius: 10px; overflow-wrap: anywhere; }
.message.question { align-self: flex-end; background: var(--question-fond); white-space: pre-wrap; max-width: 85%; }
.message.reponse { align-self: stretch; background: var(--surface); border: 1px solid var(--bordure); }
.message.reponse p { margin: 0 0 .6rem; }
.message.reponse p:last-child, .message.reponse ul:last-child, .message.reponse ol:last-child { margin-bottom: 0; }
.message.reponse ul, .message.reponse ol { margin: 0 0 .6rem; padding-left: 1.3rem; }
.message.reponse pre { margin: 0 0 .6rem; padding: .6rem .75rem; background: var(--code-fond); border-radius: 6px; overflow-x: auto; font-size: .85rem; }
.message.reponse code { background: var(--code-fond); border-radius: 4px; padding: .05rem .3rem; font-size: .88em; }
.message.reponse pre code { background: none; padding: 0; }
.message.reponse .titre { font-weight: 650; margin: .4rem 0 .3rem; }
.consultes { margin: 0 0 .5rem; padding: 0; list-style: none; font-size: .82rem; color: var(--discret); }
.consultes li { overflow-wrap: anywhere; }
.etat { margin: 0; font-size: .85rem; color: var(--discret); }
.etat.erreur { color: var(--erreur); }
.formulaire { position: sticky; bottom: 0; background: var(--fond); padding-top: .5rem; display: flex; flex-direction: column; gap: .4rem; }
textarea { width: 100%; resize: vertical; min-height: 3.2rem; max-height: 12rem; padding: .6rem .75rem; border: 1px solid var(--bordure); border-radius: 8px; background: var(--surface); color: var(--texte); font: inherit; }
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.actions { display: flex; align-items: center; gap: .6rem; justify-content: flex-end; }
.compteur { margin-right: auto; font-size: .8rem; color: var(--discret); }
button { font: inherit; border-radius: 8px; padding: .5rem 1rem; cursor: pointer; border: 1px solid var(--bordure); }
button.principal { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); font-weight: 600; }
button.secondaire { background: var(--surface); color: var(--texte); }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pied { margin: .8rem 0 0; font-size: .78rem; color: var(--discret); text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
