/* =============================================
   nano banana — chatbot.css  ("Nano", style Claude)
   DA : noir + néon lime #d4f000
   ============================================= */
.cb-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 120px); min-height: 600px;
  max-width: 1040px; margin: 0 auto; width: 100%;
  background: #0c0c0e; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; overflow: hidden;
}
.cb-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(212,240,0,0.06), transparent);
}
.cb-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: rgba(212,240,0,0.12); border: 1px solid rgba(212,240,0,0.4);
  box-shadow: 0 0 14px rgba(212,240,0,0.25);
}
.cb-head-info { flex: 1; min-width: 0; }
.cb-title { font-weight: 800; font-size: 1.05rem; color: #f0f0f0; }
.cb-sub { font-size: .78rem; color: #888; }
.cb-model {
  background: #141416; color: #d4f000; border: 1px solid rgba(212,240,0,0.3);
  border-radius: 8px; padding: 5px 8px; font-size: .78rem; cursor: pointer; max-width: 150px;
}
.cb-model:focus { outline: none; border-color: rgba(212,240,0,0.6); }
.cb-clear { background: none; border: none; color: #777; cursor: pointer; font-size: 1.1rem; }
.cb-clear:hover { color: #fff; }

.cb-messages {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}
.cb-msg { display: flex; gap: 10px; max-width: 100%; align-items: flex-start; }
.cb-msg-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.cb-msg.bot .cb-msg-av { background: rgba(212,240,0,0.14); border: 1px solid rgba(212,240,0,0.4); }
.cb-msg.me { flex-direction: row-reverse; }
.cb-msg.me .cb-msg-av { background: rgba(255,255,255,0.08); }
.cb-bubble {
  padding: 10px 14px; border-radius: 14px; font-size: .92rem; line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word; max-width: 78%;
}
.cb-msg.bot .cb-bubble { background: #16170f; border: 1px solid rgba(212,240,0,0.18); color: #eaeaea; border-top-left-radius: 4px; }
.cb-msg.me .cb-bubble { background: #1c1c20; color: #f0f0f0; border-top-right-radius: 4px; }
.cb-typing .cb-bubble { color: #888; font-style: italic; }

.cb-input-bar {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.06); background: #0a0a0c;
}
#cb-input {
  flex: 1; resize: none; max-height: 140px;
  background: #141416; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  color: #f0f0f0; font-family: inherit; font-size: .92rem; padding: 11px 14px; outline: none;
}
#cb-input:focus { border-color: rgba(212,240,0,0.5); box-shadow: 0 0 0 2px rgba(212,240,0,0.12); }
.cb-send {
  width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 12px; cursor: pointer;
  background: #d4f000; color: #000; font-size: 1.1rem; font-weight: 700;
  box-shadow: 0 0 14px rgba(212,240,0,0.35);
}
.cb-send:hover { transform: translateY(-1px); box-shadow: 0 0 22px rgba(212,240,0,0.6); }
.cb-send:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

@media (max-width: 600px) { .cb-wrap { height: calc(100vh - 150px); border-radius: 0; } .cb-bubble { max-width: 85%; } }

/* ── DM (messagerie privée) ── */
.dm-box { width: 100%; max-width: 480px; height: 70vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dm-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); font-weight: 700; }
.dm-header #dm-title { flex: 1; }
.dm-iconbtn { background: none; border: none; color: #ccc; font-size: 1.2rem; cursor: pointer; }
.dm-inbox { flex: 1; overflow-y: auto; }
.dm-thread { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 12px 16px; color: #f0f0f0; cursor: pointer; }
.dm-thread:hover { background: rgba(255,255,255,0.04); }
.dm-thread-av { font-size: 1.5rem; }
.dm-thread-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dm-thread-last { color: #888; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-thread-dot { width: 9px; height: 9px; border-radius: 50%; background: #d4f000; }
.dm-conv { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dm-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.dm-msg { display: flex; }
.dm-msg.me { justify-content: flex-end; }
.dm-bubble { max-width: 75%; padding: 9px 13px; border-radius: 14px; font-size: .9rem; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.dm-msg.me .dm-bubble { background: #d4f000; color: #000; border-bottom-right-radius: 4px; }
.dm-msg.them .dm-bubble { background: #1c1c20; color: #f0f0f0; border-bottom-left-radius: 4px; }
.dm-input-bar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
#dm-input { flex: 1; background: #141416; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: #f0f0f0; padding: 11px 14px; outline: none; }
#dm-input:focus { border-color: rgba(212,240,0,0.5); }
.dm-send { width: 44px; border: none; border-radius: 12px; background: #d4f000; color: #000; font-size: 1.1rem; cursor: pointer; }
