/* ============================================================
   Board IA — design chat sénior, theme-aware
   ============================================================ */

.board-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0;
  max-width: none;
}
.board-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 40px 0;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

/* ── Header ──────────────────────────────────────────────────── */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-shrink: 0;
  gap: 16px;
}
.chat-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chat-select {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s;
}
.chat-select:hover { border-color: var(--accent); }
.chat-select:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-glow); }

.primary-btn {
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.primary-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Resume banner ───────────────────────────────────────────── */
.resume-banner {
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  animation: slideDown 0.25s ease;
}
@keyframes slideDown { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.resume-banner-text { font-size: 13.5px; color: var(--text-primary); }
.resume-banner-text strong { color: var(--accent); font-weight: 600; }
.resume-banner-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.resume-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Chat zone (welcome + bubbles) ─────────────────────────── */
.chat-zone {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
}
.chat-zone::-webkit-scrollbar { width: 6px; }
.chat-zone::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.chat-zone::-webkit-scrollbar-track { background: transparent; }

.chat-welcome { display: flex; justify-content: center; padding: 48px 16px; }
.welcome-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  max-width: 580px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.welcome-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.welcome-card p {
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.55;
  font-size: 14px;
}
.welcome-card .experts-preview {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.welcome-card .experts-preview .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
}
.welcome-card .experts-preview .pill-avatar {
  font-size: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Bubbles ─────────────────────────────────────────────────── */
.bubble-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 760px;
  animation: bubbleIn 0.22s ease;
}
@keyframes bubbleIn { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.bubble-row.user { align-self: flex-end; flex-direction: row-reverse; }

.bubble-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--bg-overlay);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.bubble-row.assistant .bubble-avatar {
  background: var(--expert-color, var(--accent));
  border-color: transparent;
  color: white;
  font-weight: 600;
}
.bubble-row.user .bubble-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: white;
}

.bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: 14.5px;
  line-height: 1.6;
  word-wrap: break-word;
  max-width: 100%;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
.bubble-row.user .bubble {
  background: var(--accent-soft);
  border-color: var(--border-cyan);
  color: var(--text-primary);
}
.bubble-row.assistant .bubble {
  border-left: 3px solid var(--expert-color, var(--accent));
}
.bubble-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.bubble-row.assistant .bubble-meta {
  color: var(--expert-color, var(--text-muted));
}
.bubble-text { white-space: pre-wrap; color: var(--text-primary); }
.bubble-text strong { font-weight: 700; color: var(--text-primary); }
.bubble-text em { color: var(--text-secondary); }
.bubble-text code {
  background: var(--bg-overlay);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
}
.bubble-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--expert-color, var(--accent));
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Form ────────────────────────────────────────────────────── */
.chat-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 16px 8px 22px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  margin-top: 8px;
  position: relative;
}
.expert-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  height: 42px;
}
.chat-input {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  min-height: 42px;
  max-height: 200px;
  width: 100%;
  transition: all 0.12s;
}
.chat-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.chat-input::placeholder { color: var(--text-hint); }

/* ── Sidebar — experts list ──────────────────────────────────── */
.experts-list { display: flex; flex-direction: column; gap: 6px; }
.expert-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.expert-card:hover { border-color: var(--expert-color, var(--accent)); transform: translateX(2px); }
.expert-card-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--expert-color, var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.expert-card-name { font-weight: 600; color: var(--text-primary); font-size: 12.5px; }
.expert-card-role { color: var(--text-muted); font-size: 11px; margin-top: 1px; }

.sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 12px;
  margin: 8px 0 6px;
}

/* ── Engagements ─────────────────────────────────────────────── */
.engagements-list { display: grid; gap: 10px; padding-bottom: 32px; overflow-y: auto; }
.eng-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.eng-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; align-items: flex-start; }
.eng-titre { font-weight: 600; font-size: 14.5px; color: var(--text-primary); line-height: 1.45; }
.eng-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ── Meetings ────────────────────────────────────────────────── */
.meetings-list { display: grid; gap: 10px; padding-bottom: 32px; overflow-y: auto; }
.meeting-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.12s;
  box-shadow: var(--shadow-sm);
}
.meeting-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.meeting-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.meeting-date {
  font-family: 'DM Sans', monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.meeting-titre { font-weight: 600; font-size: 14.5px; margin-bottom: 6px; color: var(--text-primary); }
.meeting-synthese { color: var(--text-muted); font-size: 13px; line-height: 1.55; }

/* ── Profil ──────────────────────────────────────────────────── */
.profil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
  padding-bottom: 32px;
  overflow-y: auto;
}
.profil-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s;
}
.profil-card:hover { border-color: var(--border-strong); }
.profil-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.profil-value {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-wrap;
}
.profil-value.empty { color: var(--text-hint); font-style: italic; }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .board-pane { padding: 16px 14px 0; }
  .chat-header { flex-direction: column; align-items: stretch; }
  .chat-form { grid-template-columns: 1fr; gap: 8px; }
  .expert-chip { justify-self: start; }
  .resume-banner { flex-direction: column; align-items: stretch; }
}
