/* Chat visiteur combloux.com : page légère, aucune police ni ressource externe. */
:root {
  --bg: #ffffff;
  --ink: #1d2733;
  --muted: #5b6776;
  --line: #dde3ea;
  --brand: #0b5f8a;
  --brand-ink: #ffffff;
  --soft: #eef5f9;
  --bot: #f5f7fa;
  --warn: #8a5a00;
  --warn-bg: #fff6e0;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171d;
    --ink: #e6ebf0;
    --muted: #9aa6b2;
    --line: #2c3540;
    --brand: #4fa8d8;
    --brand-ink: #0c1218;
    --soft: #18232d;
    --bot: #1a2129;
    --warn: #f0c060;
    --warn-bg: #2a2414;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.chat {
  display: flex;
  flex-direction: column;
  max-width: 640px;
  min-height: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  gap: 10px;
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h1 { font-size: 1.15rem; margin: 0; }
.langs { display: flex; gap: 4px; }
.langs button, .suggestions button, .rate button {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.notice { margin: 0; font-size: .85rem; color: var(--muted); }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.msg { padding: 10px 12px; border-radius: 12px; max-width: 92%; white-space: pre-line; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.msg.bot { align-self: flex-start; background: var(--bot); border: 1px solid var(--line); }
.msg.wait { color: var(--muted); font-style: italic; }
.msg a { color: var(--brand); }
.intro { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; white-space: normal; }
.edition { display: block; font-size: .85rem; color: var(--warn); background: var(--warn-bg);
  border-radius: 6px; padding: 2px 6px; margin-bottom: 6px; white-space: normal; }
.meta { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; white-space: normal; }
.sources { margin: 8px 0 0; padding: 0 0 0 18px; font-size: .85rem; white-space: normal; }
.rate { display: flex; gap: 6px; margin-top: 8px; align-items: center; font-size: .85rem; color: var(--muted); white-space: normal; }
.rate button { padding: 2px 10px; }
.rate button:disabled { opacity: .5; cursor: default; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.suggestions button { background: var(--soft); }
form { display: flex; gap: 8px; align-items: flex-end; }
textarea {
  flex: 1;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  resize: none;
  min-width: 0;
}
textarea:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
#send {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  background: var(--brand);
  color: var(--brand-ink);
  cursor: pointer;
}
#send:disabled { opacity: .6; cursor: default; }
.privacy { margin: 0; font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.foot { font-size: .85rem; padding-bottom: 4px; }
.foot a { color: var(--brand); }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
