/* Chat : fil de messages, streaming, sélecteur de projet, composeur, citations. */

.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chatbar {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--bg);
}
.chatbar label { font-size: 12px; color: var(--ink-muted); }
.chatbar select {
  min-height: 34px; padding: 4px 28px 4px 10px; border-radius: 9px;
  border: 1px solid var(--control-border); background: var(--bg); font-size: 13px; max-width: 260px;
}
.chatbar__credits { margin-left: auto; }

.msgs { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.msgs__col { max-width: 760px; margin: 0 auto; padding: 26px 20px 8px; }
.msg { margin-bottom: 26px; }
.msg--user { display: flex; justify-content: flex-end; }
.msg--user .bubble {
  max-width: 84%; padding: 11px 15px; border-radius: 16px 16px 4px 16px;
  background: var(--accent-soft); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg__who { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: 12px; color: var(--ink-muted); }
.msg__who .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.msg__body {
  font-size: 15.5px; line-height: 26px; white-space: pre-wrap;
  overflow-wrap: anywhere; min-height: 26px;
}
.msg__body .cursor {
  display: inline-block; width: 2px; height: 17px; margin-left: 1px;
  background: var(--accent); vertical-align: -3px; animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.msg__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.msg__foot:empty { display: none; }
.msg__error {
  margin-top: 8px; padding: 9px 12px; border-radius: 10px;
  background: var(--danger-soft); color: var(--danger); font-size: 13px; line-height: 19px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cites__label { font-size: 11.5px; color: var(--ink-muted); align-self: center; margin-right: 2px; }

.composer-wrap { flex: none; padding: 8px 20px 18px; background: var(--bg); }
.composer {
  max-width: 760px; margin: 0 auto; display: flex; flex-direction: column;
  border: 1px solid var(--control-border); border-radius: 20px; padding: 8px 8px 8px 14px;
  background: var(--bg);
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea {
  width: 100%; min-height: 46px; max-height: 190px; resize: none; border: 0;
  background: transparent; padding: 8px 0; font-size: 15px; line-height: 23px;
}
.composer textarea:focus { outline: none; }
.composer__bar { display: flex; align-items: center; gap: 8px; }
.composer__hint { font-size: 11.5px; color: var(--ink-muted); }
.composer__send {
  margin-left: auto; width: 38px; height: 38px; border-radius: 999px; flex: none;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  transition: filter .15s ease, transform .15s ease;
}
.composer__send:hover { filter: brightness(1.08); }
.composer__send[disabled] { opacity: .45; cursor: not-allowed; }
.composer__send svg { width: 18px; height: 18px; }
.composer__note { max-width: 760px; margin: 8px auto 0; text-align: center; font-size: 11.5px; color: var(--ink-muted); }

/* Accueil sans conversation */
.hero { max-width: 760px; margin: 0 auto; padding: 9vh 20px 20px; }
.hero__mark {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 20% 10%, #2C4270 0%, var(--logo-bg) 55%, var(--orb-deep) 100%);
  color: var(--mint); font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: 26px; line-height: 34px; margin-bottom: 8px; }
.hero p { color: var(--ink-muted); margin-bottom: 24px; max-width: 60ch; }
.hero__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.hero__card {
  text-align: left; padding: 13px 15px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface); font-size: 13.5px; line-height: 20px;
}
.hero__card:hover { border-color: var(--accent); background: var(--accent-soft); }
.hero__card b { display: block; font-weight: 600; margin-bottom: 3px; }
.hero__card span { color: var(--ink-muted); font-size: 12.5px; }
