:root {
  --bg: #0b0d14;
  --panel: #0f1218;
  --panel-2: #161b23;
  --border: #1e242e;
  --text: #dde3ec;
  --fg: #dde3ec;
  --muted: #7a8494;
  --accent: #00d4c4;
  --accent-2: #00b0a2;
  --user-bubble: #0a2422;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#app { display: flex; height: 100vh; overflow: hidden; }


/* Sidebar */
#sidebar {
  width: 240px; min-width: 160px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow: hidden; position: relative;
  transition: width 0.22s ease, opacity 0.18s ease;
}
#sidebar.collapsed { width: 0 !important; opacity: 0; pointer-events: none; border: none; }

.sidebar-resize-handle {
  position: absolute; top: 0; right: -3px; width: 6px; height: 100%;
  cursor: col-resize; z-index: 10; background: transparent;
}
.sidebar-resize-handle:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.sidebar-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-hamburger {
  width: 30px; height: 30px; background: none; border: none;
  color: var(--fg, var(--text)); opacity: 0.5; cursor: pointer;
  border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-hamburger:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.sidebar-brand { display: flex; align-items: center; gap: 7px; overflow: hidden; }
.brand-logo { width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0; }
.brand-name { font-size: 15px; font-weight: 700; white-space: nowrap; }
.brand-ai { color: var(--accent); }

.sidebar-search-wrap {
  display: flex; align-items: center; gap: 7px;
  margin: 10px 10px 4px; padding: 7px 10px;
  background: var(--panel-2); border-radius: 8px;
  border: 1px solid var(--border); flex-shrink: 0;
}
.search-icon { opacity: 0.4; flex-shrink: 0; }
.sidebar-search-wrap input {
  background: none; border: none; color: var(--text); font-size: 13px; outline: none; width: 100%;
}
.sidebar-search-wrap input::placeholder { opacity: 0.35; }

.sidebar-new-chat {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 10px 6px; padding: 8px 12px;
  background: none; border: 1px dashed var(--border);
  border-radius: 8px; color: var(--fg, var(--text)); font-size: 13px;
  cursor: pointer; transition: all 0.15s; flex-shrink: 0; opacity: 0.65;
}
.sidebar-new-chat:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

.nav-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.3; padding: 8px 14px 4px; flex-shrink: 0;
}
.sidebar-nav { display: flex; flex-direction: column; padding: 2px 8px; gap: 1px; flex-shrink: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  background: none; border: none;
  color: var(--fg, var(--text)); font-size: 13px;
  cursor: pointer; text-align: left; width: 100%;
  opacity: 0.45; transition: all 0.15s;
}
.nav-item:hover { opacity: 0.8; background: rgba(255,255,255,0.04); }
.nav-item.active {
  opacity: 1; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 8px;
}
.nav-item.active svg { stroke: var(--accent); }

/* Sous-panneaux (sessions, outils, notes, taches) */
.subpanel { overflow-y: auto; border-top: 1px solid var(--border); flex: 1; padding: 6px 4px; }
.subpanel.hidden { display: none; }
.subpanel-actions { display: flex; gap: 6px; padding: 4px 6px 6px; }

/* Section mini btns (shared with subpanels) */
.section-mini-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 0.65rem; padding: 2px 7px; border-radius: 4px; cursor: pointer;
}
.section-mini-btn:hover { border-color: var(--accent); color: var(--accent); }

.section-add-row { display: flex; gap: 4px; padding: 4px 6px 6px; }
.section-add-row input {
  flex: 1; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--fg, var(--text)); font-size: 0.78rem; padding: 4px 8px; outline: none;
}
.section-add-row input:focus { border-color: var(--accent); }
.section-add-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 4px 9px; border-radius: 6px; cursor: pointer; font-size: 0.9rem;
}
.section-add-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Session list */
.session-list { display: flex; flex-direction: column; gap: 2px; }
.session-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px; border-radius: 7px; cursor: pointer;
  color: var(--muted); font-size: 13px; gap: 6px; transition: background 0.1s, color 0.1s;
}
.session-item:hover { background: var(--panel-2); color: var(--text); }
.session-item.active { background: var(--panel-2); color: var(--text); }
.session-item .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.session-item .del { opacity: 0; font-size: 12px; flex-shrink: 0; }
.session-item:hover .del { opacity: .6; }
.session-item .del:hover { opacity: 1; color: #ff7b7b; }

/* Pied de sidebar */
.sidebar-foot {
  display: flex; align-items: center; justify-content: space-around;
  padding: 10px 8px; border-top: 1px solid var(--border); flex-shrink: 0; margin-top: auto;
}
.foot-btn {
  width: 34px; height: 34px; background: none; border: none;
  color: var(--fg, var(--text)); opacity: 0.4; cursor: pointer;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.foot-btn:hover { opacity: 1; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.foot-danger:hover { color: #e05555 !important; background: rgba(224,85,85,0.1) !important; }

/* Buttons */
.btn-primary {
  background: var(--accent-2); color: white; border: none;
  padding: 10px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 550;
}
.btn-primary:hover { background: var(--accent); }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  padding: 9px; border-radius: 9px; cursor: pointer; font-size: 13px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent-2); }
.icon-btn {
  background: transparent; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.icon-btn:hover { color: var(--text); background: var(--panel-2); }

/* Main */
/* Main */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.selectors { display: flex; gap: 8px; flex: 1; }
select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; max-width: 220px; min-width: 100px;
}

/* Messages */
.messages { flex: 1; overflow-y: auto; padding: 24px 0; }
.msg-row { max-width: 760px; margin: 0 auto; padding: 8px 20px; display: flex; }
.msg-row.user { justify-content: flex-end; }
.bubble {
  padding: 12px 16px; border-radius: var(--radius); line-height: 1.55;
  font-size: 15px; white-space: pre-wrap; word-wrap: break-word; max-width: 90%;
}
.msg-row.user .bubble { background: var(--user-bubble); }
.msg-row.assistant .bubble { background: transparent; padding-left: 0; }
.role-tag { font-size: 11px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }

.empty-state { max-width: 520px; margin: 12vh auto; text-align: center; color: var(--muted); }
.empty-state h1 { color: var(--text); font-size: 34px; margin-bottom: 8px; letter-spacing: .5px; }

/* Composer */
#composer {
  padding: 0 20px 16px;
  border-top: none;
  background: transparent;
  position: relative;
}
.composer-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px 12px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.4);
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
}
.composer-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.composer-model-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--muted); opacity: 0.65;
}
.composer-model-label svg { opacity: 0.5; }
#composer-collapse { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 2px; opacity: 0.4; }
#composer-collapse:hover { opacity: 1; }
.composer-row {
  display: flex; align-items: flex-end; gap: 10px;
  padding-top: 4px;
}
.composer-row textarea {
  flex: 1;
  min-height: 52px;
  max-height: 220px;
  font-size: 14px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: none;
  overflow-y: auto;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg, var(--text));
  font-family: inherit;
}

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  width: 560px; max-width: 92vw; max-height: 86vh; overflow-y: auto; padding: 22px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; position: sticky; top: 0; background: var(--panel); z-index: 1; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 19px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.provider-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.provider-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel-2); padding: 10px 12px; border-radius: 9px; font-size: 14px;
}
.provider-row .meta { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.provider-form { display: flex; flex-direction: column; gap: 8px; }
.provider-form input {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font-size: 14px;
}
.provider-form input:focus { outline: none; border-color: var(--accent-2); }

.typing::after { content: ""; display: none; }
.typing .thinking-dots { display: inline-flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing .thinking-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: thinking-bounce 1.2s ease-in-out infinite;
}
.typing .thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing .thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinking-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.status-bar {
  font-size: 0.72rem; color: var(--muted, #666);
  padding: 2px 8px; min-height: 18px;
  transition: opacity 0.3s;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Mobile ---------- */
#overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
#overlay.show { opacity: 1; pointer-events: auto; }

@media (max-width: 760px) {
  /* Hauteur reelle qui tient compte des barres mobiles (dvh) */
  #app { height: 100dvh; }

  /* Sidebar en drawer coulissant depuis la gauche */

  #sidebar {
    position: fixed; top: 0; left: 0; z-index: 100; height: 100dvh;
    width: 80vw !important; max-width: 300px;
    transform: translateX(0); transition: transform .25s ease;
    padding-top: max(0px, env(safe-area-inset-top));
    box-shadow: 2px 0 18px rgba(0,0,0,.35);
  }
  #sidebar.collapsed { transform: translateX(-110%); }


  /* Topbar : safe-area + bouton menu bien visible */
  #topbar {
    padding-top: max(10px, env(safe-area-inset-top));
    gap: 8px;
  }
  .selectors { gap: 6px; }
  select { max-width: none; flex: 1; font-size: 14px; padding: 9px 10px; }

  /* Messages : pleine largeur, marges resserrees */
  .msg-row { padding: 7px 14px; }
  .bubble { max-width: 100%; font-size: 15px; }
  .tool-line { padding: 4px 14px; }
  .empty-state { margin: 8vh auto; padding: 0 18px; }
  .empty-state h1 { font-size: 28px; }

  /* Composer : safe-area iOS + cibles tactiles confortables */
  #composer {
    padding: 10px 12px max(12px, env(safe-area-inset-bottom));
    gap: 8px;
  }
  #input { font-size: 16px; padding: 12px 14px; }   /* 16px = pas de zoom iOS */
  .btn-send { width: 40px; height: 40px; }
  .agent-toggle {
  display:flex; align-items:center; gap:4px; font-size:12px;
  cursor:pointer; user-select:none; color:var(--muted);
  background: none; border: 1px solid var(--border); border-radius: 7px;
  padding: 4px 8px;
}

  /* Modal plein ecran sur petit ecran */
  .modal-box {
    width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh;
    border-radius: 0; padding: max(20px, env(safe-area-inset-top)) 18px 24px;
  }
  .provider-form input, .provider-form button { font-size: 16px; padding: 12px 14px; }

  /* Sessions : items plus hauts pour le doigt */
  .session-item { padding: 12px 12px; }
  .session-item .del { opacity: .6; }   /* visible sans hover sur tactile */
}

/* Desktop : le bouton menu reste utile mais l'overlay ne sert pas */
@media (min-width: 761px) {
  #overlay { display: none; }
}

/* Agent & outils */
.sidebar-foot { display:flex; flex-direction:column; gap:6px; }
.agent-toggle {
  display:flex; align-items:center; gap:6px; color:var(--muted);
  font-size:13px; cursor:pointer; user-select:none; flex-shrink:0;
  border:1px solid var(--border); border-radius:10px; padding:10px 12px;
}
.agent-toggle:has(input:checked) { color:var(--accent); border-color:var(--accent-2); }
.agent-toggle input { accent-color: var(--accent-2); }
.tool-line {
  max-width:760px; margin:2px auto; padding:4px 20px;
  font-size:12.5px; color:var(--muted); font-family:var(--mono);
}
.tool-line .tool-name { color:var(--accent); }
.sep { border:none; border-top:1px solid var(--border); margin:20px 0 14px; }

/* Markdown dans les bulles */
.bubble { white-space: normal; }
.msg-row.user .bubble { white-space: pre-wrap; }
.bubble p { margin: 0 0 10px; } .bubble p:last-child { margin-bottom: 0; }
.bubble h1,.bubble h2,.bubble h3 { margin: 14px 0 8px; line-height: 1.25; }
.bubble h1 { font-size: 1.3em; } .bubble h2 { font-size: 1.18em; } .bubble h3 { font-size: 1.05em; }
.bubble ul,.bubble ol { margin: 6px 0 10px; padding-left: 22px; }
.bubble li { margin: 3px 0; }
.bubble code { background: var(--panel-2); padding: 2px 6px; border-radius: 5px; font-family: var(--mono); font-size: .9em; }
.bubble pre { position: relative; background: #0d1117; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 10px 0; }
.bubble pre code { background: transparent; padding: 0; font-size: 13px; line-height: 1.5; }
.code-copy { position: absolute; top: 8px; right: 8px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; font-size: 11px; padding: 3px 8px; cursor: pointer; }
.code-copy:hover { color: var(--text); }
.bubble table { border-collapse: collapse; margin: 10px 0; font-size: 14px; display: block; overflow-x: auto; }
.bubble th,.bubble td { border: 1px solid var(--border); padding: 6px 10px; }
.bubble th { background: var(--panel-2); }
.bubble blockquote { border-left: 3px solid var(--accent-2); margin: 10px 0; padding: 4px 12px; color: var(--muted); }
.bubble hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.bubble img { max-width: 100%; border-radius: 8px; }

.sub { font-size: 15px; margin: 16px 0 6px; color: var(--accent); }

/* Pieces jointes */
.attach-chips { display:flex; flex-wrap:wrap; gap:6px; max-width:800px; margin:0 auto; width:100%; padding:0 20px; }
.attach-chips:empty { display:none; }
.chip {
  display:inline-flex; align-items:center; gap:6px; background:var(--panel-2);
  border:1px solid var(--border); border-radius:16px; padding:5px 11px; font-size:12.5px; color:var(--muted);
}
.chip .x { cursor:pointer; font-weight:bold; } .chip .x:hover { color:#ff7b7b; }
.chip.uploading { opacity:.55; }
.icon-btn.attach { font-size:20px; flex-shrink:0; padding:9px; }
.ws-link { color:var(--accent); text-decoration:none; }
.ws-link:hover { text-decoration:underline; }

/* ---------- Panneau d'outils ---------- */
.agent-group { display:flex; align-items:stretch; flex-shrink:0; }
.agent-group .agent-toggle { border-radius:10px 0 0 10px; border-right:none; }
.tools-btn { border:1px solid var(--border); border-radius:0 10px 10px 0; font-size:13px; padding:0 9px; }
.tools-btn:hover { color: var(--accent); }
.tools-panel {
  position:absolute; bottom:74px; left:50%; transform:translateX(-50%);
  width:430px; max-width:92vw; max-height:46vh; overflow-y:auto;
  background:var(--panel); border:1px solid var(--border); border-radius:14px;
  padding:14px; z-index:30; box-shadow:0 8px 30px rgba(0,0,0,.45);
}
.tools-panel.hidden { display:none; }
.tools-panel-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.mini-btn { background:transparent; border:1px solid var(--border); color:var(--muted); border-radius:6px; font-size:11px; padding:3px 8px; cursor:pointer; margin-left:4px; }
.mini-btn:hover { color:var(--text); border-color:var(--accent-2); }
.tools-list { display:flex; flex-direction:column; gap:2px; }
.tool-opt { display:flex; align-items:flex-start; gap:9px; padding:7px 8px; border-radius:8px; cursor:pointer; }
.tool-opt:hover { background:var(--panel-2); }
.tool-opt input { margin-top:3px; accent-color:var(--accent-2); }
.tool-opt .t-name { font-family:var(--mono); font-size:13px; color:var(--text); }
.tool-opt .t-name .badge { font-size:10px; color:#e8b765; border:1px solid #e8b76555; border-radius:5px; padding:1px 5px; margin-left:6px; }
.tool-opt .t-name .badge.mcp { color:var(--accent); border-color:var(--accent-2); }
.tool-opt .t-desc { font-size:12px; color:var(--muted); margin-top:1px; }
.tools-sep { font-size:11px; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); margin:8px 4px 3px; }
#composer { position:relative; }

/* ---------- Cartes d'appels d'outils ---------- */
.tool-card {
  max-width:760px; margin:5px auto; padding:0 20px;
}
.tool-card-inner {
  background:var(--panel); border:1px solid var(--border); border-radius:10px;
  overflow:hidden;
}
.tool-card-head {
  display:flex; align-items:center; gap:9px; padding:8px 12px; cursor:pointer;
  font-family:var(--mono); font-size:12.5px; color:var(--muted); user-select:none;
}
.tool-card-head:hover { background:var(--panel-2); }
.tool-card-head .t-status { width:16px; text-align:center; }
.tool-card-head .t-status.spin { animation: spin 1s linear infinite; display:inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.tool-card-head .t-tool { color:var(--accent); }
.tool-card-head .t-preview { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; opacity:.75; }
.tool-card-head .t-chev { transition: transform .15s; }
.tool-card.open .t-chev { transform: rotate(90deg); }
.tool-card-body { display:none; border-top:1px solid var(--border); padding:10px 12px; }
.tool-card.open .tool-card-body { display:block; }
.tool-card-body .lbl { font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin:4px 0 3px; }
.tool-card-body pre {
  background:#0d1117; border:1px solid var(--border); border-radius:8px;
  padding:8px 10px; font-size:12px; overflow-x:auto; margin:0 0 8px;
  white-space:pre-wrap; word-break:break-word; font-family:var(--mono); color:var(--text);
}

/* ---------- Actions sur les messages ---------- */
.msg-actions { display:flex; gap:6px; margin-top:4px; opacity:0; transition:opacity .15s; }
.msg-row:hover .msg-actions { opacity:1; }
.msg-actions button {
  background:transparent; border:1px solid var(--border); color:var(--muted);
  border-radius:6px; font-size:11px; padding:3px 9px; cursor:pointer;
}
.msg-actions button:hover { color:var(--text); border-color:var(--accent-2); }

/* Bouton stop */
.btn-send {
  background: var(--accent); color: #0b0d14; border: none;
  border-radius: 10px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background 0.15s;
}
.btn-send:hover { background: var(--accent-2); }
.btn-send.stop { background:#a04444; }
.btn-send.stop:hover { background:#c25555; }

@media (max-width:760px) {
  .tools-panel { bottom:84px; }
  .msg-actions { opacity:1; }
}

.msg-row.user { flex-direction: column; align-items: flex-end; }
.msg-row.user .edit-bar { justify-content: flex-end; }


/* --- Outils dans la sidebar (style Odysseus) --- */
.side-section { margin: 10px 0 4px; }
.side-toggle { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.side-tools {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px;
  margin-top: 6px;
  max-height: 48vh;
  overflow-y: auto;
}
.side-tools .tools-list { max-height: none; }
.side-tools .tool-opt { padding: 6px 4px; }

/* ===========================================================
   Theme "Odysseus" : sombre profond + accent corail
   (les variables ci-dessous ecrasent celles du haut du fichier)
   =========================================================== */
:root {
  --bg: #131416;
  --panel: #18191c;
  --panel-2: #212226;
  --border: #27282d;
  --text: #e8e6e3;
  --muted: #8b8f98;
  --accent: #00d4c4;
  --accent-2: #c75f5d;
  --user-bubble: #34272a;
}

.brand-name { color: var(--accent); font-family: var(--mono); letter-spacing: .5px; }

/* Recherche */
.side-search input {
  width: 100%; padding: 9px 11px; border-radius: 9px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; outline: none;
}
.side-search input:focus { border-color: var(--accent); }

/* Navigation laterale (regles dans le bloc sidebar) */

/* Panneaux repliables (outils / notes / taches) */
.side-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  margin: 2px 0 6px;
  max-height: 44vh;
  overflow-y: auto;
}
.panel-add { display: flex; gap: 6px; margin-bottom: 8px; }
.panel-add input {
  flex: 1; padding: 7px 9px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; outline: none;
}
.panel-add input:focus { border-color: var(--accent); }
.panel-list { display: flex; flex-direction: column; gap: 4px; }
.panel-item {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 7px; border-radius: 7px; font-size: 13px;
  background: var(--panel-2);
}
.panel-item .p-text { flex: 1; overflow-wrap: anywhere; }
.panel-item.done .p-text { text-decoration: line-through; opacity: .55; }
.panel-item .p-del {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 12px; padding: 2px 4px;
}
.panel-item .p-del:hover { color: var(--accent); }

/* Etat vide : style Odysseus */
.empty-state h1 { color: var(--accent); font-family: var(--mono); letter-spacing: 1px; }
.empty-state .tagline { color: var(--muted); font-size: 15px; margin: 4px 0 2px; }
.empty-state .hint-line { color: var(--muted); opacity: .6; font-size: 12.5px; }

/* Composer flottant arrondi */
#composer {
  border-radius: 16px;
  margin: 0 14px 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}


/* --- Marque MaltaiAI deux tons --- */
.brand-name { color: var(--text); }
.brand-ai { color: #2bd4f0; }
.empty-state h1 { color: var(--text); }
.empty-state h1 .brand-ai { color: #2bd4f0; }

/* Deep Research Panel */
.dr-panel { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.dr-desc { font-size: 12px; color: var(--muted); opacity: 0.7; margin: 0; line-height: 1.5; }
.dr-status {
  font-size: 12px; color: var(--accent); padding: 6px 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 6px; display: flex; align-items: center; gap: 6px;
}
.dr-status.hidden { display: none; }
.dr-spinner {
  width: 12px; height: 12px; border: 2px solid var(--accent);
  border-top-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dr-result {
  font-size: 12.5px; color: var(--fg, var(--text)); line-height: 1.65;
  max-height: 480px; overflow-y: auto; padding: 8px 10px;
  background: var(--panel-2, var(--panel)); border: 1px solid var(--border);
  border-radius: 8px;
}
.dr-result.hidden { display: none; }
.dr-result h2 { font-size: 14px; margin: 10px 0 4px; color: var(--accent); }
.dr-result h3 { font-size: 13px; margin: 8px 0 3px; }
.dr-result h4 { font-size: 12px; margin: 6px 0 3px; opacity: 0.8; }
.dr-result ul { padding-left: 16px; margin: 4px 0; }
.dr-result li { margin: 2px 0; }

