@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg-base:        #080B12;
  --bg-surface:     #101624;
  --bg-card:        #101624;
  --bg-card-hover:  #141C2D;
  --bg-elevated:    #151D2E;
  --border:         rgba(255,255,255,0.08);
  --border-hover:   rgba(255,255,255,0.16);

  --accent:         #635BFF;
  --accent-light:   #8B85FF;
  --accent-glow:    rgba(99,91,255,0.22);

  --success:        #22C55E;
  --success-bg:     rgba(34,197,94,0.12);
  --warning:        #F59E0B;
  --warning-bg:     rgba(245,158,11,0.12);
  --error:          #EF4444;
  --error-bg:       rgba(239,68,68,0.12);
  --info:           #38BDF8;
  --info-bg:        rgba(56,189,248,0.12);

  --text-primary:   #F8FAFC;
  --text-secondary: #A8B3C7;
  --text-muted:     #667085;

  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      20px;

  --shadow-card:    0 12px 32px rgba(0,0,0,0.28);
  --shadow-glow:    0 0 0 1px rgba(255,255,255,0.03);

  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.18s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset & base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ─── Background mesh ────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 260px);
  pointer-events: none;
  z-index: 0;
}

/* ─── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(10,11,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0;
}

.navbar-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ─── Stats grid ─────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.05), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.stat-card:hover::before { opacity: 1; }

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text-primary);
  line-height: 1;
}

.stat-icon {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.5rem;
  opacity: 0.3;
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body { padding: 1.5rem; }

/* ─── Dashboard filters ─────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(99,102,241,0.13);
}

.filter-count {
  min-width: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  text-align: center;
  font-size: 0.7rem;
}

/* ─── Besoin list item ───────────────────────────────────────────────────────── */
.besoin-list { display: flex; flex-direction: column; gap: 0.75rem; }

.besoin-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  display: block;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.besoin-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), #8b5cf6);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 0 2px 2px 0;
}

.besoin-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
  transform: translateX(4px);
}
.besoin-item:hover::after { opacity: 1; }

.besoin-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.besoin-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.besoin-item-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.besoin-item-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.besoin-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.meta-chip span { font-weight: 600; color: var(--text-primary); }

/* ─── Status badges ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-info    { background: var(--info-bg);    color: var(--info);    }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error   { background: var(--error-bg);   color: var(--error);   }
.badge-neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.badge-purple  { background: rgba(139,92,246,0.15); color: #a78bfa; }

/* Dot colors */
.badge-info    .badge-dot { background: var(--info);    box-shadow: 0 0 6px var(--info);    }
.badge-success .badge-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.badge-warning .badge-dot { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.badge-error   .badge-dot { background: var(--error);   box-shadow: 0 0 6px var(--error);   }
.badge-neutral .badge-dot { background: var(--text-muted); }
.badge-purple  .badge-dot { background: #a78bfa; box-shadow: 0 0 6px #a78bfa; }

/* ─── Consultants table ──────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--transition);
}
tbody tr:hover { background: rgba(255,255,255,0.03); }

.rang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(99,102,241,0.15);
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 700;
}

.consultant-name {
  font-weight: 600;
  color: var(--text-primary);
}
.consultant-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Consultant profile cards ──────────────────────────────────────────────── */
.consultant-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.consultant-profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 1rem;
  min-width: 0;
}

.consultant-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.consultant-card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
  font-weight: 800;
  min-width: 0;
}

.consultant-card-title span:last-child {
  overflow-wrap: anywhere;
}

.consultant-headline {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.consultant-card-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.profile-metric {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  background: rgba(255,255,255,0.03);
  min-width: 0;
}

.profile-metric .detail-meta-value {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.profile-section {
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.profile-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.profile-pill {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(99,102,241,0.12);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.22);
  font-size: 0.74rem;
  font-weight: 700;
}

.profile-summary,
.profile-line {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ─── Canal icons ────────────────────────────────────────────────────────────── */
.canal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}
.canal-email     { background: rgba(56,189,248,0.1);  color: var(--info);    }
.canal-whatsapp  { background: rgba(34,197,94,0.1);   color: var(--success); }
.canal-none      { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ─── Timeline ───────────────────────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 2.5rem;
  bottom: -0.75rem;
  width: 2px;
  background: var(--border);
}
.timeline-item:last-child::before { display: none; }

.timeline-dot {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 1;
  position: relative;
  margin-top: 2px;
}

.timeline-dot-info    { background: var(--info-bg);    border: 2px solid rgba(56,189,248,0.3);  }
.timeline-dot-success { background: var(--success-bg); border: 2px solid rgba(34,197,94,0.3);  }
.timeline-dot-warning { background: var(--warning-bg); border: 2px solid rgba(245,158,11,0.3); }
.timeline-dot-error   { background: var(--error-bg);   border: 2px solid rgba(239,68,68,0.3);  }

.timeline-body { flex: 1; min-width: 0; }

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline-action {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ─── Besoin detail header ───────────────────────────────────────────────────── */
.detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.detail-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.detail-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text-primary);
}

.detail-id {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.2rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.detail-meta-item { }

.detail-meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.detail-meta-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Progress bar ───────────────────────────────────────────────────────────── */
.progress-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-top: 0.4rem;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Two-col layout ─────────────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-compact {
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ─── Back link ──────────────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--text-primary); }

/* ─── Section heading ────────────────────────────────────────────────────────── */
.section-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Competences pills ──────────────────────────────────────────────────────── */
.competences-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.competence-pill {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(99,102,241,0.12);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.2);
}

/* ─── Questions Hermes ─────────────────────────────────────────────────────── */
.questions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.question-list {
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
}
.question-list li {
  margin-bottom: 0.55rem;
}
.question-list li:last-child { margin-bottom: 0; }

.reply-questions {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.reply-question-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: rgba(255,255,255,0.03);
}
.reply-question-title {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.form-section {
  margin-bottom: 1.25rem;
}
.form-section .form-group:last-child {
  margin-bottom: 0;
}
.form-section-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

@media (max-width: 768px) {
  .questions-grid { grid-template-columns: 1fr; }
  .consultant-card-header { flex-direction: column; }
  .consultant-card-status { align-items: flex-start; }
  .profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ─── Reply form (consultant public page) ────────────────────────────────────── */
.reply-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.reply-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.reply-card-header {
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), transparent);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.reply-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}

.reply-mission-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0;
  margin-bottom: 0.4rem;
}

.reply-tjm {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.reply-tjm strong {
  color: var(--success);
  font-weight: 700;
}

.reply-card-body { padding: 1.75rem 2rem; }

/* Form fields */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: var(--font);
  transition: all var(--transition);
  outline: none;
  appearance: none;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
  background: rgba(99,102,241,0.05);
}
.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
  resize: vertical;
  min-height: 90px;
}

/* Toggle row */
.toggle-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toggle-btn {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  font-family: var(--font);
}
.toggle-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}
.toggle-btn.active-yes {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}
.toggle-btn.active-maybe {
  border-color: var(--warning);
  background: var(--warning-bg);
  color: var(--warning);
}
.toggle-btn.active-no {
  border-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
}

/* Submit btn full width */
.btn-full {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

/* ─── Success/already state ──────────────────────────────────────────────────── */
.reply-success {
  text-align: center;
  padding: 3rem 2rem;
}
.reply-success .success-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reply-success h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.reply-success p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ─── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.4; }

/* ─── Flash / toast ──────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast-success { background: rgba(34,197,94,0.85);  border: 1px solid rgba(34,197,94,0.3); }
.toast-error   { background: rgba(239,68,68,0.85);  border: 1px solid rgba(239,68,68,0.3); }

/* ─── Modal ─────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
}
.modal-panel {
  width: min(92vw, 520px);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}
.modal-panel-wide {
  width: min(92vw, 760px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.modal-header h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form-span {
  grid-column: 1 / -1;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.sourcing-result {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.sourcing-result code {
  color: var(--accent-light);
}

@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { justify-content: center; }
}

/* ─── Spinner ────────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
.loading .spinner { display: block; }
.loading .btn-text { opacity: 0.5; }

/* ─── Keyframes ──────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pop {
  0%   { transform: scale(0.5); opacity: 0; }
  80%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.4s ease both;
}
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }

/* ─── Vague chip ─────────────────────────────────────────────────────────────── */
.vague-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.25);
}

/* ─── Scrollable timeline ────────────────────────────────────────────────────── */
.timeline-scroll {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* ─── Product cockpit refresh ───────────────────────────────────────────────── */
.app-shell-nav {
  gap: 1rem;
  height: 68px;
  background: rgba(11,15,23,0.88);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.nav-left,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-logo {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.nav-sections {
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-actions {
  justify-content: flex-end;
}

.mode-badge,
.hermes-status,
.last-sync {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  font-size: 0.75rem;
  font-weight: 700;
}

.mode-badge {
  color: var(--warning);
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.22);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--text-muted);
}
.status-dot-online { background: var(--success); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
.status-dot-offline { background: var(--error); box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }
.status-dot-muted { background: var(--text-muted); }

.cockpit-page {
  max-width: 1440px;
}

.cockpit-hero,
.detail-commandbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.eyebrow,
.section-kicker {
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.detail-primary-actions,
.profile-toolbar,
.need-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.kpi-card {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
}

.kpi-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.kpi-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.kpi-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 850;
  line-height: 1;
}

.kpi-success .kpi-value { color: var(--success); }
.kpi-warning .kpi-value { color: var(--warning); }
.kpi-danger .kpi-value { color: var(--error); }
.kpi-primary .kpi-value,
.kpi-info .kpi-value { color: var(--info); }

.cockpit-controls,
.besoin-board,
.mission-card,
.profiles-panel,
.comparison-panel,
.side-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(17,24,39,0.82);
  box-shadow: var(--shadow-glow);
}

.cockpit-controls {
  padding: 1rem;
  margin-bottom: 1rem;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) repeat(3, minmax(170px, 1fr));
  gap: 0.8rem;
}

.control-field span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.board-header,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.board-header h2,
.panel-heading h2 {
  font-size: 1rem;
  color: var(--text-primary);
}

.board-header p,
.panel-heading p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.besoin-board {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.besoin-board .board-header {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(17,24,39,0.74);
  margin-bottom: 0.85rem;
}

.besoin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 0.85rem;
  padding: 0;
}

.need-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: linear-gradient(180deg, rgba(26,34,53,0.75), rgba(17,24,39,0.96));
  min-height: 260px;
  transition: all var(--transition);
}

.need-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.need-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.need-card-header > div {
  min-width: 0;
}

.need-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.source-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(56,189,248,0.08);
  color: #bae6fd;
  font-size: 0.72rem;
  font-weight: 750;
}

.need-card-header h3 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0.55rem 0 0.25rem;
}

.need-card-header p,
.need-description,
.muted-copy {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.need-source-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
}

.need-source-row span {
  overflow-wrap: anywhere;
}

.need-source-row span:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
  margin-left: 0.55rem;
}

.need-id-row,
.need-stats,
.profile-contact-line,
.profile-score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.need-id-row span,
.need-stats span,
.profile-contact-line span,
.profile-score-row span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  background: rgba(255,255,255,0.035);
}

.need-card-body {
  flex: 1;
}

.need-client {
  color: var(--text-primary);
  font-weight: 750;
  margin-bottom: 0.65rem;
}

.need-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-chip {
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  color: #c7d2fe;
  background: rgba(99,102,241,0.11);
  font-size: 0.74rem;
  font-weight: 700;
}

.need-description {
  margin-top: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.need-card-footer {
  display: grid;
  gap: 0.75rem;
}

.need-stats strong {
  color: var(--text-primary);
}

.badge-primary { background: rgba(99,102,241,0.16); color: #c7d2fe; }
.badge-primary .badge-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.badge-soft-success { background: rgba(34,197,94,0.1); color: #86efac; }
.badge-soft-purple { background: rgba(139,92,246,0.13); color: #c4b5fd; }

.btn-danger-ghost {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.22);
}

.btn-disabled {
  opacity: 0.62;
  cursor: not-allowed;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.detail-workspace {
  max-width: 1440px;
}

.detail-commandbar {
  position: sticky;
  top: 78px;
  z-index: 20;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: rgba(11,15,23,0.86);
  backdrop-filter: blur(18px);
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.detail-title-row h1 {
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.2;
}

.detail-heading p {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1rem;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.mission-card,
.profiles-panel,
.comparison-panel,
.side-panel {
  padding: 1rem;
}

.mission-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.mission-summary-grid div,
.metric-stack div,
.source-list div {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  background: rgba(255,255,255,0.03);
}

.mission-summary-grid span,
.metric-stack span,
.source-list span,
.timing-row span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.mission-summary-grid strong,
.metric-stack strong,
.source-list strong,
.timing-row strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.mission-skills,
.mission-description {
  margin-top: 0.9rem;
}

.mission-description {
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 8rem;
  overflow: auto;
}

.profile-toolbar {
  align-items: stretch;
}

.profile-toolbar .form-input {
  min-width: 220px;
}

.profile-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 0 1rem;
}

.premium-profiles {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.profile-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.profile-identity h3 {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.profile-identity p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.profile-badges {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  flex-shrink: 0;
}

.status-contact-contacted { border-color: rgba(56,189,248,0.18); }
.status-contact-answered { border-color: rgba(34,197,94,0.24); }
.status-contact-to_contact { border-color: var(--border); }

.score-pill,
.money-pill {
  font-weight: 800;
}

.score-high { color: var(--success); border-color: rgba(34,197,94,0.25) !important; }
.score-mid { color: var(--info); border-color: rgba(56,189,248,0.25) !important; }
.score-low { color: var(--warning); border-color: rgba(245,158,11,0.25) !important; }
.score-muted { color: var(--text-muted); }

.comparison-summary,
.json-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: rgba(255,255,255,0.035);
  color: var(--text-secondary);
  line-height: 1.6;
}

.shortlist-list {
  display: grid;
  gap: 0.65rem;
}

.shortlist-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  background: rgba(255,255,255,0.03);
}

.shortlist-row strong {
  color: var(--text-primary);
}

.shortlist-row p {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.detail-side {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 164px;
}

.metric-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.timing-list,
.source-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.timing-row {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.55rem;
}

.timing-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timing-row em {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: normal;
  margin-top: 0.1rem;
}

.source-list a {
  color: var(--accent-light);
  font-size: 0.84rem;
  text-decoration: none;
}

.timeline-dot {
  color: var(--text-primary);
  font-weight: 850;
}

.timeline-dot-info { color: var(--info); }
.timeline-dot-success { color: var(--success); }
.timeline-dot-warning { color: var(--warning); }
.timeline-dot-error { color: var(--error); }

.compact-question-list {
  margin-top: 0.8rem;
  font-size: 0.82rem;
}

.modal-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.modal-row span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.modal-row strong {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.json-preview {
  max-height: 60vh;
  overflow: auto;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  .nav-sections { display: none; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

@media (max-width: 760px) {
  .app-shell-nav,
  .cockpit-hero,
  .detail-commandbar,
  .board-header,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .nav-actions { flex-wrap: wrap; justify-content: flex-start; }
  .kpi-grid,
  .control-grid,
  .besoin-card-grid,
  .mission-summary-grid,
  .premium-profiles {
    grid-template-columns: 1fr;
  }
  .detail-commandbar { position: static; }
}

/* ════════════════════════════════════════════════════════════════════════════
   COCKPIT REDESIGN — Priorités 2-9 (cards riches, hiérarchie, états vides)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Command bar (page détail) ─────────────────────────────────────────────── */
.detail-workspace { display: flex; flex-direction: column; gap: 1.1rem; }
.back-link { color: var(--text-muted); font-size: 0.82rem; text-decoration: none; }
.back-link:hover { color: var(--text-secondary); }

.detail-commandbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1.25rem; flex-wrap: wrap;
}
.detail-id-row {
  margin-top: 0.4rem; color: var(--text-muted); font-size: 0.82rem; line-height: 1.5;
}
.detail-id-row strong { color: var(--text-secondary); font-weight: 600; }
.detail-primary-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.btn-icon-only { color: var(--text-muted); }

/* ── Barre cockpit ─────────────────────────────────────────────────────────── */
.cockpit-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}
.cockpit-stat {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.cockpit-value { font-size: 1.5rem; font-weight: 750; color: var(--text-primary); line-height: 1.1; }
.cockpit-value-sm { font-size: 1rem; font-weight: 650; }
.cockpit-label { font-size: 0.74rem; color: var(--text-muted); }
.cockpit-stat-accent { border-color: rgba(34,197,94,0.3); }
.cockpit-stat-accent .cockpit-value { color: var(--success); }
.cockpit-stat-ready { border-color: rgba(99,91,255,0.35); background: rgba(99,91,255,0.06); }
.cockpit-stat-ready .cockpit-value { color: var(--accent-light); }

/* ── Cards profils enrichies ───────────────────────────────────────────────── */
.consultant-profile-card { display: flex; flex-direction: column; gap: 0.65rem; }
.consultant-profile-card:hover { border-color: var(--border-hover); }

.profile-identity-text { min-width: 0; }
.profile-identity-text h3 { color: var(--text-primary); font-size: 1rem; font-weight: 650; line-height: 1.25; }
.profile-identity-text p { color: var(--text-secondary); font-size: 0.83rem; margin-top: 0.15rem; }

.score-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 52px; padding: 0.35rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); flex-shrink: 0;
}
.score-badge-value { font-size: 1.15rem; font-weight: 750; line-height: 1; }
.score-badge-label { font-size: 0.62rem; color: var(--text-muted); text-transform: lowercase; margin-top: 0.1rem; }
.score-badge.score-high { border-color: rgba(34,197,94,0.35); }
.score-badge.score-high .score-badge-value { color: var(--success); }
.score-badge.score-mid { border-color: rgba(56,189,248,0.32); }
.score-badge.score-mid .score-badge-value { color: var(--info); }
.score-badge.score-low { border-color: rgba(245,158,11,0.3); }
.score-badge.score-low .score-badge-value { color: var(--warning); }

.profile-badges { flex-direction: row !important; align-items: center !important; flex-wrap: wrap; }

.profile-subheader { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; }
.profile-meta { font-size: 0.82rem; color: var(--text-secondary); }
.profile-meta-strong { color: var(--text-primary); font-weight: 600; }
.profile-meta-muted { color: var(--text-muted); font-size: 0.78rem; }

.consultant-profile-card .profile-summary {
  font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.profile-exp {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding-top: 0.55rem; border-top: 1px solid var(--border);
}
.profile-exp-title { font-size: 0.84rem; color: var(--text-primary); font-weight: 600; }
.profile-exp-company { font-size: 0.78rem; color: var(--text-muted); }
.profile-classification { font-size: 0.76rem; color: var(--text-muted); font-style: italic; }

.profile-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.4rem; }
.btn-link {
  background: transparent !important; border-color: transparent !important;
  color: var(--text-muted) !important; padding-left: 0.4rem; padding-right: 0.4rem;
}
.btn-link:hover { color: var(--text-secondary) !important; }

/* ── Résumé mission repliable ──────────────────────────────────────────────── */
.mission-collapsible { padding: 0; }
.mission-collapsible > summary {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.9rem 1rem; cursor: pointer; list-style: none;
}
.mission-collapsible > summary::-webkit-details-marker { display: none; }
.mission-summary-inline { color: var(--text-secondary); font-size: 0.85rem; flex: 1; min-width: 0; }
.mission-toggle-hint { color: var(--text-muted); font-size: 0.76rem; }
.mission-collapsible[open] > summary { border-bottom: 1px solid var(--border); }
.mission-collapsible > *:not(summary) { padding-left: 1rem; padding-right: 1rem; }
.mission-collapsible .mission-summary-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.mission-collapsible .mission-description { padding-bottom: 1rem; }

/* ── États vides ───────────────────────────────────────────────────────────── */
.empty-state-cta, .empty-state-soft {
  text-align: center; padding: 2rem 1rem;
  border: 1px dashed var(--border); border-radius: var(--radius-md);
  background: rgba(255,255,255,0.015);
  display: flex; flex-direction: column; gap: 0.4rem; align-items: center;
}
.empty-title { color: var(--text-primary); font-weight: 600; font-size: 0.95rem; }
.empty-copy { color: var(--text-secondary); font-size: 0.86rem; }
.empty-hint { color: var(--text-muted); font-size: 0.8rem; }
.empty-state-cta .btn { margin-top: 0.6rem; }

/* ════════════════════════════════════════════════════════════════════════════
   DASHBOARD — Priorité 5 (3 sections, recommended actions, pagination)
   ════════════════════════════════════════════════════════════════════════════ */
.cockpit-page { display: flex; flex-direction: column; gap: 1.4rem; }
.hero-search { min-width: 260px; }
.hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpi-card { cursor: default; }
.kpi-card:hover { transform: none; }
.kpi-value { font-size: 1.7rem; font-weight: 750; color: var(--text-primary); display: block; }
.kpi-label { font-size: 0.76rem; color: var(--text-muted); }

.board-section { display: flex; flex-direction: column; gap: 0.85rem; }
.board-section-head { display: flex; align-items: center; gap: 0.6rem; }
.board-section-head h2 { font-size: 1.05rem; font-weight: 650; color: var(--text-primary); }
.section-count {
  min-width: 24px; height: 24px; padding: 0 0.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(255,255,255,0.06);
  color: var(--text-secondary); font-size: 0.78rem; font-weight: 600;
}

.besoin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.85rem;
}
.hidden-extra { display: none !important; }
.board-more { display: flex; justify-content: center; }
.board-footnote { text-align: center; color: var(--text-muted); font-size: 0.8rem; }

.need-card { display: flex; flex-direction: column; gap: 0.75rem; }
.need-card:hover { border-color: var(--border-hover); }
.need-status-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.need-title-link { text-decoration: none; }
.need-title-link h3 { color: var(--text-primary); font-size: 1rem; font-weight: 650; line-height: 1.3; }
.need-title-link:hover h3 { color: var(--accent-light); }
.need-source-row { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; margin-top: 0.35rem; color: var(--text-muted); font-size: 0.8rem; }
.need-source-row span:first-child { color: var(--text-secondary); }

.need-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;
  padding: 0.7rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.need-stat { display: flex; flex-direction: column; gap: 0.05rem; }
.need-stat strong { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.need-stat span { font-size: 0.7rem; color: var(--text-muted); }
.need-stat-accent strong { color: var(--success); }

.need-card-footer { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; }
.need-card-footer .btn { flex: 1; min-width: 120px; }

/* ── Réglages sobriété (Priorité 6 : moins de violet, moins criard) ────────── */
.vague-chip {
  display: inline-flex; align-items: center; padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: var(--text-secondary);
  font-size: 0.74rem; font-weight: 600;
}
.section-kicker {
  color: var(--text-muted); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: none;
}
.cockpit-bar + .detail-layout { margin-top: 0; }

@media (max-width: 1024px) {
  .cockpit-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cockpit-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .need-stats-row { grid-template-columns: repeat(2, 1fr); }
}
