:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --sidebar: #efeee9;
  --sidebar-active: #e8e6de;
  --accent: #d97757;
  --accent-strong: #c96a4b;
  --accent-soft: #f6e7e0;
  --text: #1f1e1c;
  --text-secondary: #4b4a45;
  --muted: #7a766e;
  --border: #e6e3db;
  --border-strong: #d9d5ca;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(31, 30, 28, 0.04), 0 8px 24px rgba(31, 30, 28, 0.06);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Garde-fou : le logo SVG a une taille intrinsèque de 1095x1095, donc toute
   <img> non contrainte exploserait la mise en page. */
img { max-width: 100%; height: auto; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100dvh; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ------------------------------------------------------------------ */
/* Boot overlay                                                        */
/* ------------------------------------------------------------------ */

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.boot.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.boot-logo { width: 56px; height: 56px; animation: boot-pulse 1.6s ease-in-out infinite; }
.boot-text {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.boot-sub { color: var(--muted); font-size: 13px; }
@keyframes boot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

/* ------------------------------------------------------------------ */
/* Navbar                                                              */
/* ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  height: 64px;
  background: rgba(250, 249, 245, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 8px; }
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.nav-logo img { width: 30px; height: 30px; border-radius: 8px; }
.nav-brand { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.01em; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: var(--sidebar); text-decoration: none; }
.nav-link.active { color: var(--text); background: var(--sidebar-active); }

/* ------------------------------------------------------------------ */
/* Home / hero                                                         */
/* ------------------------------------------------------------------ */

.home { max-width: 980px; margin: 0 auto; padding: 96px 28px 64px; }

.hero-mark { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 28px; box-shadow: var(--shadow); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  max-width: 760px;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 36px;
}
.hero-model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.center-hello .hero-model { margin-top: 16px; }

.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 4px 14px rgba(217, 119, 87, 0.35); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn-ghost svg, .btn-primary svg { width: 16px; height: 16px; }

.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 88px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.feature-icon { font-size: 22px; margin-bottom: 10px; }
.feature-title { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.feature-text { font-size: 14px; color: var(--text-secondary); margin: 0; }

.home-footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ------------------------------------------------------------------ */
/* Pages secondaires (Témoignages / Forfaits)                          */
/* ------------------------------------------------------------------ */

.page { max-width: 1040px; margin: 0 auto; padding: 72px 28px 64px; }
.page-hero { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
}
.page-title { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 48px); margin: 0 0 12px; }
.page-title em { font-style: italic; color: var(--accent); }
.page-sub { color: var(--text-secondary); font-size: 16px; margin: 0; }
.page .home-footer { margin-top: 72px; }

/* Témoignages */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.testimonial-card {
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.testimonial-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.testimonial-quote { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.testimonial-person { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testimonial-photo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial-photo.placeholder {
  display: grid;
  place-items: center;
  background: var(--sidebar);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.testimonial-name { font-size: 14px; font-weight: 600; }
.testimonial-role { font-size: 13px; color: var(--muted); }

/* Forfaits */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: start; }
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.plan-card.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.plan-name { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-amount { font-family: var(--serif); font-size: 34px; font-weight: 600; }
.plan-period { font-size: 14px; color: var(--muted); }
.plan-desc { margin: 0; font-size: 14px; color: var(--text-secondary); }
.plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.plan-features li { position: relative; padding-left: 22px; font-size: 14px; color: var(--text-secondary); }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plan-cta { margin-top: auto; justify-content: center; }

/* ------------------------------------------------------------------ */
/* Chat layout                                                         */
/* ------------------------------------------------------------------ */

.chat { display: flex; height: 100dvh; overflow: hidden; }

.sidebar {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.sidebar-brand img { width: 30px; height: 30px; border-radius: 8px; }
.sidebar-brand span { font-family: var(--serif); font-weight: 600; font-size: 20px; }
.sidebar-back { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.sidebar-back:hover { color: var(--text); }

.new-chat {
  margin: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.new-chat:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.new-chat svg { width: 14px; height: 14px; }

.conv-list { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.conv-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 12px; line-height: 1.6; }
.conv-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: left;
  transition: background 0.12s ease;
}
.conv-item:hover { background: var(--sidebar-active); }
.conv-item.active { background: var(--sidebar-active); color: var(--text); }
.conv-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-del {
  flex: none;
  width: 24px;
  height: 24px;
  display: none;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
.conv-item:hover .conv-del, .conv-item.active .conv-del { display: grid; }
.conv-del:hover { background: var(--border); color: var(--text); }

.sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------------ */
/* Chat main                                                           */
/* ------------------------------------------------------------------ */

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Barre supérieure : sélecteur de modèle (factice) + longueur de réponse. */
.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
}
.model-picker { position: relative; }
.model-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease;
}
.model-picker-btn:hover { background: var(--sidebar); }
.model-picker-btn svg { width: 14px; height: 14px; opacity: 0.7; }
.model-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  display: none;
  flex-direction: column;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.model-picker.open .model-menu { display: flex; }
.model-option {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
.model-option:hover { background: var(--sidebar-active); color: var(--text); }

.thread { flex: 1; overflow-y: auto; padding: 32px 0 24px; }
.thread-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; }

.center-hello { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px 40px; }
.center-hello img { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 20px; }
.center-hello h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 8px; }
.center-hello p { color: var(--muted); font-size: 15px; margin: 0; max-width: 420px; }
.center-hello .hw { font-family: var(--serif); font-style: italic; color: var(--accent); }

.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; max-width: 520px; }
.suggestion-chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.suggestion-chip:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }

.msg-row { display: flex; margin-bottom: 24px; }
.msg-row.user { justify-content: flex-end; }
.msg-bubble { max-width: 78%; padding: 12px 18px; border-radius: 18px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.msg-row.user .msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg-row.assistant .msg-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; box-shadow: 0 1px 1px rgba(31,30,28,0.03); }
.msg-row.assistant .msg-avatar { flex: none; margin-right: 12px; }
.msg-avatar img { width: 28px; height: 28px; border-radius: 8px; }

/* Apparition douce des nouveaux messages. */
.fade-in { animation: msg-in 0.3s ease both; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Curseur d'écriture pendant la génération. */
.caret {
  display: inline-block;
  width: 2.5px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.16em;
  border-radius: 1px;
  background: var(--accent);
  animation: caret-blink 1s steps(1, end) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* Bulle en cours de génération : le texte est révélé caractère par
   caractère, on garde les sauts de ligne visibles tant que le Markdown
   final n'est pas posé. */
.msg-bubble.streaming { white-space: pre-wrap; }
.msg-bubble.streaming #live-text { white-space: pre-wrap; }

/* Curseur de la machine à écrire maison. */
.stream-cursor {
  color: var(--accent);
  font-weight: 400;
  animation: caret-blink 1s steps(1, end) infinite;
}

/* « Le modèle réfléchit » — affiché pendant le préchauffage (prefill). */
.thinking { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; height: 1em; }
.thinking-label { color: var(--muted); font-size: 14px; margin-right: 8px; }
.thinking i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: think-bounce 1s ease-in-out infinite;
}
.thinking i:nth-child(2) { animation-delay: 0.15s; }
.thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes think-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* Markdown dans les bulles assistant. */
.msg-bubble.markdown { white-space: normal; }
.msg-bubble.markdown > :first-child { margin-top: 0; }
.msg-bubble.markdown > :last-child { margin-bottom: 0; }
.msg-bubble.markdown p { margin: 0 0 0.7em; }
.msg-bubble.markdown h1, .msg-bubble.markdown h2, .msg-bubble.markdown h3,
.msg-bubble.markdown h4, .msg-bubble.markdown h5, .msg-bubble.markdown h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  margin: 0.9em 0 0.4em;
}
.msg-bubble.markdown h1 { font-size: 1.5em; }
.msg-bubble.markdown h2 { font-size: 1.3em; }
.msg-bubble.markdown h3 { font-size: 1.15em; }
.msg-bubble.markdown h4, .msg-bubble.markdown h5, .msg-bubble.markdown h6 { font-size: 1em; }
.msg-bubble.markdown ul, .msg-bubble.markdown ol { margin: 0 0 0.7em; padding-left: 1.4em; }
.msg-bubble.markdown li { margin: 0.15em 0; }
.msg-bubble.markdown li > ul, .msg-bubble.markdown li > ol { margin: 0.15em 0; }
.msg-bubble.markdown a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.msg-bubble.markdown blockquote {
  margin: 0 0 0.7em;
  padding: 2px 0 2px 0.9em;
  border-left: 3px solid var(--border-strong);
  color: var(--text-secondary);
}
.msg-bubble.markdown hr { border: none; border-top: 1px solid var(--border); margin: 1em 0; }
.msg-bubble.markdown code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: #f1efe9;
  border: 1px solid var(--border);
  padding: 0.08em 0.36em;
  border-radius: 6px;
}
.msg-bubble.markdown pre {
  margin: 0 0 0.7em;
  padding: 12px 14px;
  background: #1f1e1c;
  border-radius: 10px;
  overflow-x: auto;
}
.msg-bubble.markdown pre code {
  background: none;
  border: none;
  padding: 0;
  color: #f3f1ea;
  font-size: 0.85em;
  line-height: 1.5;
}
.msg-bubble.markdown strong { font-weight: 700; }
.msg-bubble.markdown del { opacity: 0.6; }

/* Respecte les préférences de mouvement réduit. */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .caret, .typing i, .thinking i, .stream-cursor, .boot-logo { animation: none; }
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.composer {
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(250,249,245,0), var(--bg) 30%);
  padding: 12px 24px 24px;
}
.composer-inner { max-width: 720px; margin: 0 auto; }

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.18), var(--shadow); }
.chat-input-wrap textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.5;
  padding: 8px 0;
  max-height: 180px;
  color: var(--text);
}
.send-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, transform 0.05s ease;
}
.send-btn:hover:not(:disabled) { background: var(--accent-strong); }
.send-btn:active:not(:disabled) { transform: scale(0.96); }
.send-btn:disabled { background: var(--border-strong); color: var(--muted); cursor: not-allowed; }
.send-btn svg { width: 17px; height: 17px; }
/* Bouton « Arrêter » : remplace « Envoyer » pendant la génération. */
.send-btn.stop { background: var(--text); }
.send-btn.stop:hover:not(:disabled) { background: #000; }
.send-btn.stop svg { width: 15px; height: 15px; }
.composer-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }

/* Outils du composer : interrupteurs factices + compteur de contexte. */
.composer-tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tool-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tool-toggle svg { width: 14px; height: 14px; }
.tool-toggle:hover { border-color: var(--accent); color: var(--text); }
.tool-toggle.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.composer-meta { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------------ */
/* Demo banner                                                         */
/* ------------------------------------------------------------------ */

.demo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: #fdeedd;
  color: #8a5a24;
  border-bottom: 1px solid #f4d9b4;
  font-size: 13px;
  font-weight: 500;
}
.demo-banner b { font-weight: 700; }
.demo-banner code { background: rgba(138,90,36,0.1); padding: 1px 6px; border-radius: 6px; font-size: 12px; }

/* ------------------------------------------------------------------ */
/* Page Classement & benchmarks                                        */
/* ------------------------------------------------------------------ */
.bench-stack { display: grid; gap: 28px; }
.bench-note { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.bench-gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.bench-gauges svg { margin: 0 auto; }
.bench-perf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.bench-perf-grid svg { margin: 0; }

/* Colonne de tête figée pour les grands tableaux comparatifs. */
.ui-table--compare thead .ui-table__th:first-child,
.ui-table--compare tbody .ui-table__th--row {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.ui-table--compare thead .ui-table__th:first-child { background: var(--sidebar); }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 820px) {
  .nav { padding: 0 16px; gap: 12px; }
  .nav-right { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-link { padding: 8px 10px; white-space: nowrap; }

  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: 280px; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .chat { position: relative; }

  .menu-toggle {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 45;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
    font-size: 18px;
  }
  .menu-toggle.hidden { display: none; }
}

@media (min-width: 821px) {
  .menu-toggle { display: none; }
}