/* ===================================================
   DASHBOARD.CSS — Client workspace
   Layout: fixed header + sidebar left + content right
   =================================================== */

/* ---- Shell ---- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 72px;
  background: #f5f4f1;
}

/* ============================================
   SIDEBAR
   ============================================ */
.dash-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  position: fixed;
  top: 72px; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

/* User card */
.dash-user-card {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-user-initial {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #8a6fd4 100%);
  color: #fff; font-size: .88rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-user-details { min-width: 0; }
.dash-user-name {
  font-size: .88rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.25;
}
.dash-user-badge {
  display: inline-block; margin-top: 4px;
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--primary);
  background: rgba(94,74,208,.08); padding: 2px 9px; border-radius: 50px;
}

/* Nav section */
.dash-nav { padding: 16px 10px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.dash-nav-section-label {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--muted);
  padding: 0 10px; margin: 12px 0 6px;
}
.dash-nav-section-label:first-child { margin-top: 4px; }

.dash-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 10px;
  font-size: .88rem; font-weight: 500; color: var(--text);
  cursor: pointer; user-select: none; position: relative;
  transition: background .14s ease, color .14s ease;
  text-decoration: none;
}
.dash-nav-item:hover { background: rgba(0,0,0,.04); }
.dash-nav-item.active {
  background: rgba(94,74,208,.07);
  color: var(--primary);
  font-weight: 600;
}
.dash-nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 3px; background: var(--primary); border-radius: 0 3px 3px 0;
}
.dash-nav-item svg {
  width: 18px; height: 18px; flex-shrink: 0; opacity: .55;
}
.dash-nav-item.active svg { opacity: 1; }

/* ============================================
   CONTENT AREA
   ============================================ */
.dash-content {
  flex: 1;
  margin-left: 248px;
  min-height: calc(100vh - 72px);
  padding: 44px 52px;
}

/* Page header */
.dash-page-header { margin-bottom: 40px; }
.dash-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 500; color: var(--text);
  letter-spacing: -.03em; line-height: 1.15;
  margin-bottom: 8px;
}
.dash-page-desc { font-size: .9rem; color: var(--muted); line-height: 1.65; }

/* ============================================
   EMPTY STATE
   ============================================ */
.dash-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 72px 40px; gap: 14px;
}
.dash-empty-icon {
  width: 60px; height: 60px; border-radius: 18px;
  background: rgba(94,74,208,.07);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.dash-empty-icon svg { width: 28px; height: 28px; color: var(--primary); opacity: .65; }
.dash-empty-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.dash-empty-text {
  font-size: .88rem; color: var(--muted);
  max-width: 360px; line-height: 1.7;
}

/* ============================================
   ACCOUNT PAGE
   ============================================ */
.dash-account-wrap { max-width: 680px; }
.dash-account-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 28px;
}
.dash-field { display: flex; flex-direction: column; gap: 6px; }
.dash-field--full { grid-column: 1 / -1; }
.dash-field-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
}
.dash-field-value {
  font-size: .93rem; color: var(--text); font-weight: 500;
  padding: 11px 15px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  min-height: 44px; display: flex; align-items: center;
}
.dash-active-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--primary);
  background: rgba(94,74,208,.08); padding: 5px 14px;
  border-radius: 50px; border: 1px solid rgba(94,74,208,.14);
}
.dash-active-badge::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: #22c55e;
}
.dash-contact-note {
  padding: 18px 22px;
  background: rgba(94,74,208,.04);
  border: 1px solid rgba(94,74,208,.1);
  border-radius: 12px;
  font-size: .85rem; color: var(--muted); line-height: 1.7;
}
.dash-contact-note a { color: var(--primary); font-weight: 600; }

/* ============================================
   DASHBOARD HEADER — minimal (logo + avatar)
   ============================================ */
.dash-hdr-right {
  display: flex; align-items: center;
}

.dash-hdr-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #8a6fd4 100%);
  color: #fff; font-size: .8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: default; flex-shrink: 0; position: relative;
}
.dash-hdr-avatar::after {
  content: ''; position: absolute; bottom: 1px; right: 1px;
  width: 9px; height: 9px; background: #22c55e;
  border-radius: 50%; border: 1.5px solid var(--bg);
}

/* Sidebar footer — retour au site */
.dash-nav-footer {
  margin-top: auto;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}
.dash-back-link {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 10px; border-radius: 10px;
  font-size: .86rem; font-weight: 500; color: var(--muted);
  transition: background .14s ease, color .14s ease;
  text-decoration: none;
}
.dash-back-link:hover { background: rgba(0,0,0,.04); color: var(--text); }
.dash-back-link svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .6; }

/* ============================================
   ADMIN — Badge & sidebar badge
   ============================================ */
.dash-user-badge--admin {
  background: rgba(94,74,208,.12);
  color: var(--primary);
  border: 1px solid rgba(94,74,208,.18);
}

/* ============================================
   ADMIN — Vue d'ensemble : stat cards
   ============================================ */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 44px;
}
.dash-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
}
.dash-stat-num {
  font-family: var(--font-display);
  font-size: 2.1rem; font-weight: 600; line-height: 1;
  margin-bottom: 8px;
}
.dash-stat-label {
  font-size: .8rem; font-weight: 500; color: var(--muted); line-height: 1.4;
}

/* ============================================
   ADMIN — Vue d'ensemble
   ============================================ */
.dash-stat-card--loading { opacity: .5; }
.dash-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: dashSkeleton 1.4s infinite;
  border-radius: 6px; height: 2.1rem; margin-bottom: 8px;
}
@keyframes dashSkeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.dash-overview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 0;
}
.dash-overview-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
}
.dash-panel-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .11em; color: var(--muted);
  margin-bottom: 18px;
}
.dash-panel-loading, .dash-panel-empty {
  font-size: .88rem; color: var(--muted); text-align: center;
  padding: 24px 0;
}

/* Recent users */
.dash-recent-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.dash-recent-row:last-child { border-bottom: none; }
.dash-recent-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #8a6fd4 100%);
  color: #fff; font-size: .76rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.dash-recent-info { flex: 1; min-width: 0; }
.dash-recent-name {
  font-size: .85rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-recent-meta { font-size: .75rem; color: var(--muted); }
.dash-recent-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0;
}
.dash-recent-date { font-size: .72rem; color: var(--muted); }

/* Distribution bars */
.dash-distrib-total {
  font-size: .82rem; color: var(--muted); margin-bottom: 18px;
}
.dash-distrib-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 13px;
}
.dash-distrib-row:last-child { margin-bottom: 0; }
.dash-distrib-label { font-size: .82rem; color: var(--text); width: 100px; flex-shrink: 0; }
.dash-distrib-bar-wrap {
  flex: 1; height: 7px; background: #f1f1f0; border-radius: 50px; overflow: hidden;
}
.dash-distrib-bar {
  height: 100%; border-radius: 50px; min-width: 3px;
  transition: width .4s ease;
}
.dash-distrib-val {
  font-size: .82rem; font-weight: 700; color: var(--text);
  width: 28px; text-align: right; flex-shrink: 0;
}

/* ============================================
   ADMIN — Agent marketing (chat IA)
   ============================================ */
.agent-wrap {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 820px; height: calc(100vh - 200px); min-height: 480px;
}

/* Raccourcis rapides */
.agent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-chip {
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; font-size: .82rem; font-weight: 500; color: var(--text);
  cursor: pointer; transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.agent-chip:hover {
  background: rgba(94,74,208,.06); border-color: rgba(94,74,208,.3); color: var(--primary);
}

/* Zone chat */
.agent-chat-box {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden;
}
.agent-messages {
  flex: 1; overflow-y: auto; padding: 24px 20px; display: flex;
  flex-direction: column; gap: 18px;
}

/* Messages */
.agent-msg { display: flex; gap: 12px; max-width: 88%; }
.agent-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.agent-msg--assistant { align-self: flex-start; }

.agent-msg-avatar {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(94,74,208,.1), rgba(138,111,212,.1));
  border: 1px solid rgba(94,74,208,.15);
  display: flex; align-items: center; justify-content: center;
}
.agent-msg-avatar svg { width: 16px; height: 16px; color: var(--primary); }

.agent-msg-bubble {
  padding: 12px 16px; border-radius: 16px;
  font-size: .88rem; line-height: 1.65; color: var(--text);
}
.agent-msg--user .agent-msg-bubble {
  background: var(--primary); color: #fff; border-bottom-right-radius: 4px;
}
.agent-msg--assistant .agent-msg-bubble {
  background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 4px;
}

/* Markdown dans les réponses IA */
.agent-md-h  { font-weight: 600; font-size: .92rem; margin: 10px 0 4px; }
.agent-md-p  { margin: 0 0 8px; }
.agent-md-p:last-child { margin-bottom: 0; }
.agent-md-list { margin: 6px 0 8px 16px; padding: 0; }
.agent-md-list li { margin-bottom: 4px; }
.agent-md-code {
  background: rgba(94,74,208,.08); color: var(--primary);
  padding: 1px 5px; border-radius: 4px; font-size: .82rem; font-family: monospace;
}

/* Animation de chargement (trois points) */
.agent-msg-loading {
  display: flex; align-items: center; gap: 5px; padding: 14px 16px;
}
.agent-msg-loading span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted); opacity: .5;
  animation: agentDot 1.2s ease-in-out infinite;
}
.agent-msg-loading span:nth-child(2) { animation-delay: .2s; }
.agent-msg-loading span:nth-child(3) { animation-delay: .4s; }
@keyframes agentDot {
  0%, 80%, 100% { transform: scale(0.7); opacity: .4; }
  40%           { transform: scale(1);   opacity: 1;  }
}

/* Zone de saisie */
.agent-input-row {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--border);
}
.agent-input {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; font-size: .9rem; color: var(--text);
  font-family: var(--font-body); line-height: 1.5; outline: none;
  background: var(--bg); max-height: 140px; overflow-y: auto;
  transition: border-color .15s;
}
.agent-input:focus { border-color: var(--primary); }
.agent-send-btn {
  width: 40px; height: 40px; border-radius: 12px; border: none;
  background: var(--primary); color: #fff; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.agent-send-btn:hover   { opacity: .85; }
.agent-send-btn:disabled { opacity: .5; cursor: not-allowed; }
.agent-send-btn svg { width: 16px; height: 16px; }

/* Footer */
.agent-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.agent-clear-btn {
  font-size: .8rem; color: var(--muted); background: none; border: none;
  cursor: pointer; padding: 0; text-decoration: underline;
  text-underline-offset: 3px;
}
.agent-clear-btn:hover { color: var(--text); }
.agent-footer-note { font-size: .78rem; color: var(--muted); }

/* ============================================
   ADMIN — Gestion utilisateurs
   ============================================ */
.dash-users-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.dash-users-search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
}
.dash-users-search-wrap svg {
  position: absolute;
  left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.dash-users-search {
  width: 100%;
  padding: 10px 14px 10px 40px;
  font-size: .88rem; color: var(--text);
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.dash-users-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94,74,208,.1);
}
.dash-users-count {
  font-size: .8rem; color: var(--muted); white-space: nowrap;
  margin-left: auto;
}
.dash-users-loading {
  font-size: .9rem; color: var(--muted); padding: 40px 0; text-align: center;
}

/* Table wrapper */
.dash-table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.dash-table thead tr {
  background: #fafaf9;
  border-bottom: 1px solid var(--border);
}
.dash-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: .67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
  white-space: nowrap;
}
.dash-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.dash-table tbody tr:last-child { border-bottom: none; }
.dash-table tbody tr:hover { background: #fafaf9; }
.dash-table td { padding: 13px 16px; vertical-align: middle; }
.dash-tcell-muted { color: var(--muted); font-size: .82rem; }

/* User row */
.dash-urow { display: flex; align-items: center; gap: 11px; }
.dash-urow-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #8a6fd4 100%);
  color: #fff; font-size: .8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.dash-urow-name { font-weight: 600; color: var(--text); line-height: 1.3; }
.dash-urow-email { font-size: .8rem; color: var(--muted); }
.dash-urow-name mark, .dash-urow-email mark {
  background: rgba(94,74,208,.15); color: inherit; border-radius: 3px;
}

/* Role select */
.dash-role-select {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; padding: 4px 10px;
  border-radius: 50px; border: 1.5px solid transparent;
  cursor: pointer; outline: none; appearance: none;
  -webkit-appearance: none; background-image: none;
  transition: opacity .15s;
}
.dash-role-select:disabled { opacity: .5; cursor: default; }
.dash-role-select--admin  { color: var(--primary); background: rgba(94,74,208,.1);  border-color: rgba(94,74,208,.2); }
.dash-role-select--client { color: #0ea5e9;         background: rgba(14,165,233,.1); border-color: rgba(14,165,233,.2); }
.dash-role-select--user   { color: #64748b;         background: rgba(100,116,139,.1); border-color: rgba(100,116,139,.2); }

/* Status badge */
.dash-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: .06em;
}
.dash-status-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.dash-status-badge--active   { color: #166534; background: #dcfce7; }
.dash-status-badge--active::before { background: #22c55e; }
.dash-status-badge--inactive { color: #991b1b; background: #fee2e2; }
.dash-status-badge--inactive::before { background: #ef4444; }
.dash-status-badge--pending  { color: #92400e; background: #fef3c7; }
.dash-status-badge--pending::before { background: #f59e0b; }

/* Create button */
.dash-create-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 10px;
  font-size: .85rem; font-weight: 600; color: #fff;
  background: var(--primary); border: none;
  cursor: pointer; white-space: nowrap;
  transition: opacity .15s, transform .1s;
  flex-shrink: 0;
}
.dash-create-btn:hover { opacity: .88; }
.dash-create-btn svg { width: 15px; height: 15px; }

/* Row clickable */
.dash-tr-clickable { cursor: pointer; }

/* ============================================
   ADMIN — Modals utilisateurs
   ============================================ */
.dash-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: dashModalIn .15s ease;
}
@keyframes dashModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.dash-modal {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 520px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  overflow: hidden;
  animation: dashModalSlide .18s ease;
}
@keyframes dashModalSlide {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.dash-modal-header {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.dash-modal-header--simple { gap: 0; }
.dash-modal-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #8a6fd4 100%);
  color: #fff; font-size: .95rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.dash-modal-name {
  font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.25;
  margin-bottom: 5px;
}
.dash-modal-title {
  font-size: 1rem; font-weight: 700; color: var(--text); flex: 1;
}
.dash-modal-close {
  margin-left: auto; width: 30px; height: 30px;
  border: none; background: none; cursor: pointer;
  color: var(--muted); font-size: .9rem; border-radius: 8px;
  transition: background .12s;
}
.dash-modal-close:hover { background: rgba(0,0,0,.06); color: var(--text); }

.dash-modal-body { padding: 22px 24px; }
.dash-modal-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dash-modal-field { display: flex; flex-direction: column; gap: 5px; }
.dash-modal-field--full { grid-column: 1 / -1; }
.dash-modal-label {
  font-size: .67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
}
.dash-modal-val {
  font-size: .9rem; color: var(--text); font-weight: 500;
  padding: 9px 13px;
  background: #fafaf9; border: 1px solid var(--border); border-radius: 9px;
  min-height: 38px; display: flex; align-items: center;
}
.dash-modal-input {
  padding: 9px 13px; font-size: .88rem; color: var(--text);
  background: #fff; border: 1px solid var(--border);
  border-radius: 9px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.dash-modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94,74,208,.1);
}
.dash-modal-error {
  margin-top: 12px; padding: 10px 14px;
  background: #fee2e2; border: 1px solid rgba(239,68,68,.2);
  border-radius: 9px; color: #991b1b; font-size: .84rem;
}

.dash-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #fafaf9;
}
.dash-modal-self-note { font-size: .82rem; color: var(--muted); margin-right: auto; }
.dash-mfooter-close {
  padding: 8px 18px; border-radius: 9px;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  background: none; border: 1.5px solid var(--border);
  cursor: pointer; transition: background .12s;
}
.dash-mfooter-close:hover { background: rgba(0,0,0,.04); color: var(--text); }
.dash-mfooter-submit {
  padding: 8px 20px; border-radius: 9px;
  font-size: .85rem; font-weight: 600; color: #fff;
  background: var(--primary); border: none;
  cursor: pointer; transition: opacity .15s;
}
.dash-mfooter-submit:hover   { opacity: .88; }
.dash-mfooter-submit:disabled { opacity: .5; cursor: default; }
.dash-mfooter-delete {
  padding: 8px 18px; border-radius: 9px;
  font-size: .85rem; font-weight: 600; color: #991b1b;
  background: #fee2e2; border: 1.5px solid rgba(239,68,68,.2);
  cursor: pointer; transition: background .12s;
}
.dash-mfooter-delete:hover { background: #fecaca; }

/* Filter pills */
.dash-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.dash-filter-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 50px;
  font-size: .8rem; font-weight: 600; color: var(--muted);
  background: #fff; border: 1.5px solid var(--border);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.dash-filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.dash-filter-pill.active {
  background: rgba(94,74,208,.08);
  border-color: rgba(94,74,208,.25);
  color: var(--primary);
}
.dash-filter-count {
  font-size: .72rem; font-weight: 700;
  background: rgba(0,0,0,.06); color: inherit;
  padding: 1px 6px; border-radius: 50px;
}
.dash-filter-pill.active .dash-filter-count { background: rgba(94,74,208,.12); }

/* Sortable headers */
.dash-th-sortable {
  cursor: pointer; user-select: none;
  transition: color .13s;
}
.dash-th-sortable:hover { color: var(--primary); }
.dash-sort-icon {
  font-size: .7rem; margin-left: 4px; opacity: .35; font-style: normal;
}
.dash-sort-icon.active { opacity: 1; color: var(--primary); }

/* Toggle button */
.dash-toggle-btn {
  font-size: .78rem; font-weight: 600;
  padding: 5px 13px; border-radius: 8px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: opacity .15s, background .15s;
}
.dash-toggle-btn:disabled { opacity: .45; cursor: default; }
.dash-toggle-btn--suspend  { color: #991b1b; background: #fee2e2; border-color: rgba(239,68,68,.2); }
.dash-toggle-btn--suspend:hover  { background: #fecaca; }
.dash-toggle-btn--activate { color: #166534; background: #dcfce7; border-color: rgba(34,197,94,.2); }
.dash-toggle-btn--activate:hover { background: #bbf7d0; }

/* ============================================
   ADMIN — Collaborations : badges statut
   ============================================ */
.collab-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .73rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; padding: 3px 10px; border-radius: 50px;
}
.collab-status::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.collab-s--pending   { color: #92400e; background: #fef3c7; }
.collab-s--pending::before   { background: #f59e0b; }
.collab-s--active    { color: #166534; background: #dcfce7; }
.collab-s--active::before    { background: #22c55e; }
.collab-s--completed { color: #1e3a5f; background: #dbeafe; }
.collab-s--completed::before { background: #3b82f6; }
.collab-s--cancelled { color: #6b7280; background: #f3f4f6; }
.collab-s--cancelled::before { background: #9ca3af; }

/* ============================================
   CLIENT COLLABORATIONS — DASHBOARD
   ============================================ */

/* Stats row */
.ccc-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 4px;
}
.ccc-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.ccc-stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 5px;
}
.ccc-stat-label {
  font-size: .77rem;
  color: var(--muted);
  font-weight: 500;
}
/* Cards list */
.ccc-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Card shell */
.ccc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.ccc-card:hover {
  box-shadow: 0 6px 22px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
/* Card body with colored left border */
.ccc-card-body {
  padding: 18px 20px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 4px solid transparent;
}
.ccc-card--pending   .ccc-card-body { border-left-color: #f59e0b; }
.ccc-card--active    .ccc-card-body { border-left-color: #22c55e; }
.ccc-card--completed .ccc-card-body { border-left-color: #3b82f6; }
.ccc-card--cancelled .ccc-card-body { border-left-color: #d1d5db; }
/* Header row: title + status badge */
.ccc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.ccc-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
/* Party + chips row */
.ccc-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ccc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #7c6fe0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
  letter-spacing: .01em;
}
.ccc-info { flex: 1; min-width: 0; }
.ccc-role {
  font-size: .69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--primary);
  margin-bottom: 2px;
}
.ccc-name {
  font-size: .87rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ccc-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ccc-chip {
  font-size: .78rem;
  border-radius: 7px;
  padding: 4px 11px;
  font-weight: 500;
  white-space: nowrap;
}
.ccc-chip--budget { background: #fef9ec; color: #92400e; }
.ccc-chip--date   { background: #f0f4ff; color: #1e40af; }
/* Description */
.ccc-card-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Footer: progress or cancelled */
.ccc-card-footer {
  border-top: 1px solid var(--border);
  padding: 11px 22px 11px 28px;
  background: #fafaf9;
}
.ccc-card-footer--cancelled {
  font-size: .78rem;
  color: #9ca3af;
  text-align: center;
  font-style: italic;
}
/* Progress steps */
.ccc-progress { display: flex; align-items: center; }
.ccc-step { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.ccc-step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  transition: background .2s, border-color .2s;
}
.ccc-step--done   .ccc-step-dot { background: var(--primary); border-color: var(--primary); }
.ccc-step--active .ccc-step-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.18); }
.ccc-step-label { font-size: .67rem; color: #9ca3af; white-space: nowrap; }
.ccc-step--done   .ccc-step-label { color: var(--primary); font-weight: 600; }
.ccc-step--active .ccc-step-label { color: var(--primary); font-weight: 700; }
.ccc-step-line {
  flex: 1; height: 2px; background: #e5e7eb;
  margin-bottom: 15px; min-width: 28px;
}
.ccc-step-line--done { background: var(--primary); }

/* Stat sub-label (admin overview) */
.dash-stat-sub {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 3px;
}

/* ============================================
   CONTRACTS — status badges
   ============================================ */
.contract-s--pending,
.contract-s--signed,
.contract-s--rejected {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .74rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 3px 11px;
  white-space: nowrap;
}
.contract-s--pending  { background: #fef3c7; color: #92400e; }
.contract-s--signed   { background: #dcfce7; color: #166534; }
.contract-s--rejected { background: #fee2e2; color: #991b1b; }

/* Email badge (admin contracts table) */
.contract-email-badge {
  display: inline-block;
  font-size: .72rem;
  padding: 2px 9px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 500;
}
.contract-email-badge--sent {
  background: #dcfce7;
  color: #166534;
}

/* File input label (admin upload modal) */
.contract-file-label {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  font-size: .88rem;
  color: var(--text-light);
  transition: border-color .15s, background .15s;
}
.contract-file-label:hover {
  border-color: var(--primary);
  background: #faf5ff;
  color: var(--primary);
}
.contract-file-label svg {
  flex-shrink: 0;
}

/* ============================================
   CONTRACTS — client sign zone
   ============================================ */
.contract-sign-zone {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
}
.contract-sign-info {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 12px;
}
.contract-sign-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Contract action buttons */
.contract-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.contract-btn:hover { opacity: .85; transform: translateY(-1px); }
.contract-btn:active { transform: translateY(0); }

.contract-btn--download {
  background: #f0f4ff;
  color: #1e40af;
}
.contract-btn--upload {
  background: var(--primary);
  color: #fff;
}
.contract-btn--signed {
  background: #dcfce7;
  color: #166534;
}

/* ============================================
   SIDEBAR BADGE (non-lus)
   ============================================ */
.dash-nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================
   DESCRIPTION EXPAND / TOGGLE
   ============================================ */
.ccc-card-desc--expanded {
  -webkit-line-clamp: unset;
  display: block;
}
.ccc-desc-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  line-height: 1.4;
}
.ccc-desc-toggle:hover { text-decoration: underline; }

/* ============================================
   ADMIN ICON BUTTONS (download dans tableau)
   ============================================ */
.dash-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  text-decoration: none;
  background: #f0f4ff;
  color: #1e40af;
  white-space: nowrap;
  transition: opacity .15s;
}
.dash-icon-btn:hover { opacity: .8; }
.dash-icon-btn--green {
  background: #dcfce7;
  color: #166534;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.dash-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1a1a2e;
  color: #fff;
  font-size: .88rem;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  white-space: nowrap;
}
.dash-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.dash-toast--success { border-left: 4px solid #22c55e; }
.dash-toast--error   { border-left: 4px solid #ef4444; }

/* ============================================
   TASK BOARD — Monday.com style
   ============================================ */

/* ── Overlay ── */
.tb-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,.6);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 12px;
  overflow-y: auto;
}

/* ── Fenêtre ── */
.tb-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 1300px;
  min-height: 560px;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,.35);
}

/* ── Header ── */
.tb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 16px;
}
.tb-header-left  { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.tb-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.tb-header-icon-wrap {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tb-header-icon-wrap svg { width: 20px; height: 20px; color: #fff; }

.tb-header-title {
  font-weight: 700; font-size: 1rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-header-sub { font-size: .75rem; color: var(--muted); margin-top: 1px; }

.tb-role-badge {
  font-size: .73rem; font-weight: 600;
  padding: 4px 10px; border-radius: 99px;
  border: 1px solid; white-space: nowrap;
}

.tb-add-btn {
  display: flex; align-items: center; gap: 6px;
  background: #6366f1; color: #fff;
  border: none; border-radius: 8px;
  padding: 8px 14px; font-size: .83rem; font-weight: 600;
  cursor: pointer; transition: background .15s; white-space: nowrap;
}
.tb-add-btn:hover { background: #4f46e5; }

.tb-close-btn {
  background: none; border: none; font-size: 1rem;
  color: var(--text-muted); cursor: pointer;
  padding: 6px 9px; border-radius: 7px; transition: background .15s;
  line-height: 1;
}
.tb-close-btn:hover { background: var(--surface-alt); color: var(--text); }

/* ── Toolbar ── */
.tb-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  flex-shrink: 0; flex-wrap: wrap;
}

.tb-search-wrap {
  position: relative; flex: 1; min-width: 160px; max-width: 300px;
}
.tb-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-muted); pointer-events: none;
}
.tb-search {
  width: 100%; padding: 7px 10px 7px 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; font-size: .83rem; color: var(--text);
  font-family: inherit; outline: none; transition: border-color .15s;
  box-sizing: border-box;
}
.tb-search:focus { border-color: #6366f1; }
.tb-search::placeholder { color: var(--text-muted); }

.tb-filter-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px;
  font-size: .83rem; color: var(--text); font-family: inherit;
  outline: none; cursor: pointer; transition: border-color .15s;
}
.tb-filter-select:focus { border-color: #6366f1; }

/* Progress inline (toolbar) */
.tb-progress-inline {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0;
}
.tb-progress-inline-bar {
  width: 80px; height: 6px;
  background: var(--border); border-radius: 99px; overflow: hidden;
}
.tb-progress-inline-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #6366f1);
  border-radius: 99px; transition: width .5s ease;
}
.tb-progress-inline-label { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

/* ── Body / Board ── */
.tb-body {
  flex: 1; padding: 18px 20px;
  overflow-x: auto; overflow-y: hidden;
}

.tb-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 0;
  color: var(--text-muted); font-size: .88rem; gap: 12px;
}
.tb-loading-dots { display: flex; gap: 6px; }
.tb-loading-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: #6366f1;
  animation: tbDot .9s ease-in-out infinite;
}
.tb-loading-dots span:nth-child(2) { animation-delay: .15s; }
.tb-loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes tbDot { 0%,80%,100%{opacity:.2;transform:scale(.8)} 40%{opacity:1;transform:scale(1)} }

.tb-error {
  text-align: center; color: #ef4444;
  padding: 60px 0; font-size: .9rem;
}

/* ── Kanban Board ── */
.tb-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  min-height: 400px;
  align-items: start;
}

/* ── Colonne ── */
.tb-col {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column;
  min-height: 200px; max-height: calc(100vh - 280px);
}

.tb-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--col-color, #94a3b8);
  border-radius: 10px 10px 0 0;
  background: var(--surface);
}
.tb-col-header-left { display: flex; align-items: center; gap: 8px; }
.tb-col-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.tb-col-title { font-weight: 700; font-size: .82rem; color: var(--text); }
.tb-col-count {
  font-size: .7rem; font-weight: 700;
  background: var(--border); color: var(--text-muted);
  padding: 1px 6px; border-radius: 99px;
}

.tb-col-add-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; line-height: 1;
  color: var(--text-muted); padding: 2px 5px;
  border-radius: 5px; transition: background .15s, color .15s;
}
.tb-col-add-btn:hover { background: var(--border); color: var(--text); }

.tb-col-tasks {
  flex: 1; padding: 10px 8px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
}
/* Custom scrollbar inside columns */
.tb-col-tasks::-webkit-scrollbar { width: 4px; }
.tb-col-tasks::-webkit-scrollbar-track { background: transparent; }
.tb-col-tasks::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.tb-col-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 28px 0;
  color: var(--text-muted); font-size: .78rem;
}

/* ── Carte ── */
.tb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 12px 8px;
  cursor: default;
  transition: box-shadow .18s, transform .18s;
}
.tb-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  transform: translateY(-1px);
}
.tb-card--overdue  { border-left: 3px solid #ef4444; }
.tb-card--validated { border-left: 3px solid #6366f1; }

.tb-card-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 6px;
  margin-bottom: 7px;
}
.tb-card-title {
  font-weight: 600; font-size: .83rem; color: var(--text);
  line-height: 1.4; flex: 1; cursor: pointer;
}
.tb-card-title:hover { color: #6366f1; }

.tb-card-actions {
  display: flex; gap: 3px; flex-shrink: 0;
  opacity: 0; transition: opacity .15s;
}
.tb-card:hover .tb-card-actions { opacity: 1; }

.tb-card-btn {
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 6px;
  color: var(--text-muted); transition: background .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
}
.tb-card-btn:hover              { background: var(--surface-alt); color: var(--text); }
.tb-card-btn--del:hover         { background: #fee2e2; color: #ef4444; }

/* Chips */
.tb-card-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.tb-chip-platform, .tb-chip-type {
  font-size: .68rem; padding: 2px 8px;
  border-radius: 99px; font-weight: 600; white-space: nowrap;
}
.tb-chip-type { background: #f3e8ff; color: #7c3aed; }

/* Notes */
.tb-card-notes {
  font-size: .76rem; color: var(--text-muted);
  line-height: 1.45; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Footer: due + url */
.tb-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-top: 4px;
}
.tb-card-due {
  display: flex; align-items: center; gap: 4px;
  font-size: .7rem; color: var(--text-muted);
}
.tb-card-due--late { color: #ef4444; font-weight: 700; }

.tb-card-url {
  display: flex; align-items: center; gap: 4px;
  font-size: .7rem; color: #6366f1;
  text-decoration: none; white-space: nowrap;
}
.tb-card-url:hover { text-decoration: underline; }

/* Drag & drop */
.tb-card[draggable="true"] { cursor: grab; }
.tb-card[draggable="true"]:active { cursor: grabbing; }
.tb-card--dragging { opacity: .35; box-shadow: none !important; transform: none !important; }
.tb-col-tasks--drag-over {
  background: rgba(99,102,241,.06);
  outline: 2px dashed rgba(99,102,241,.4);
  outline-offset: -4px;
  border-radius: 8px;
}

/* Status select (remplace les boutons ← →) */
.tb-card-status-row {
  margin-top: 9px; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.tb-status-select {
  width: 100%; padding: 5px 8px;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 7px; font-size: .75rem; color: var(--text-muted);
  font-family: inherit; cursor: pointer; outline: none;
  transition: border-color .15s, color .15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  padding-right: 24px;
}
.tb-status-select:hover, .tb-status-select:focus { border-color: #6366f1; color: var(--text); }

/* Boutons valider/invalider (brand) */
.tb-card-move {
  display: flex; justify-content: space-between; gap: 6px;
  margin-top: 9px; padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Valider / Invalider (brand) */
.tb-validate-btn {
  flex: 1;
  background: #ecfdf5; color: #15803d;
  border: 1px solid #86efac; border-radius: 6px;
  padding: 5px 10px; font-size: .75rem; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.tb-validate-btn:hover   { background: #dcfce7; }
.tb-unvalidate-btn {
  flex: 1;
  background: #fafafa; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px; font-size: .75rem;
  cursor: pointer; transition: background .15s;
}
.tb-unvalidate-btn:hover { background: var(--border); }

/* Bouton Valider grand format (dans détail) */
.tb-validate-btn-lg {
  background: #16a34a; color: #fff;
  border: none; border-radius: 8px;
  padding: 9px 20px; font-size: .85rem; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.tb-validate-btn-lg:hover { background: #15803d; }

/* ── Formulaire ── */
.tb-form-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.tb-form-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.tb-form-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.tb-form-title  { font-weight: 700; font-size: .95rem; color: var(--text); }
.tb-form-body   { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tb-form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tb-form-field  { display: flex; flex-direction: column; gap: 5px; }
.tb-form-field--full { grid-column: 1/-1; }
.tb-form-label  { font-size: .75rem; font-weight: 700; color: var(--text-muted); letter-spacing: .02em; text-transform: uppercase; }
.tb-form-input  {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
  color: var(--text); font-size: .85rem; font-family: inherit;
  transition: border-color .15s; width: 100%; box-sizing: border-box;
  outline: none;
}
.tb-form-input:focus { border-color: #6366f1; }
textarea.tb-form-input { resize: vertical; }
.tb-form-error  { color: #ef4444; font-size: .8rem; }
.tb-form-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--border);
  position: sticky; bottom: 0; background: var(--surface);
}
.tb-form-cancel {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 8px;
  padding: 8px 16px; font-size: .85rem; cursor: pointer;
  transition: background .15s;
}
.tb-form-cancel:hover { background: var(--surface-alt); }
.tb-form-submit {
  background: #6366f1; color: #fff;
  border: none; border-radius: 8px;
  padding: 8px 20px; font-size: .85rem; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.tb-form-submit:hover    { background: #4f46e5; }
.tb-form-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Détail lecture seule ── */
.tb-detail-row {
  display: flex; align-items: baseline; gap: 10px;
  font-size: .85rem; color: var(--text);
}
.tb-detail-label {
  font-size: .73rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; white-space: nowrap; min-width: 80px;
}
.tb-detail-badge {
  font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
}
.tb-detail-notes {
  background: var(--surface-alt); border-radius: 8px;
  padding: 10px 12px; font-size: .82rem; color: var(--text);
  line-height: 1.5; white-space: pre-wrap;
}

/* ── Bouton modale admin ── */
.dash-mfooter-board {
  background: #eef2ff; color: #4f46e5;
  border: 1px solid #c7d2fe; border-radius: 8px;
  padding: 8px 14px; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.dash-mfooter-board:hover { background: #e0e7ff; }

/* ── Header right: status + board button ── */
.ccc-card-head-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.ccc-board-icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #6366f1; border: none;
  color: #fff; border-radius: 7px;
  padding: 6px 13px; font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.ccc-board-icon-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.ccc-board-icon-btn:hover { background: #4f46e5; }

/* ── Role badges (user table) ── */
.dash-role-select--influencer { color: #15803d; }
.dash-role-select--brand      { color: #b45309; }

/* ============================================
   PAGE ACCUEIL — KPI + résumé
   ============================================ */
.accueil-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.accueil-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  transition: box-shadow .15s, transform .15s;
}
.accueil-kpi:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.07);
  transform: translateY(-1px);
}
.accueil-kpi--alert { border-color: #fcd34d; background: #fffbeb; }
.accueil-kpi-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -.04em;
}
.accueil-kpi-label { font-size: .82rem; color: var(--muted); font-weight: 500; }

.accueil-alert {
  display: flex; align-items: center; gap: 14px;
  background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: 12px; padding: 14px 18px;
  margin-bottom: 28px;
}
.accueil-alert svg { width: 20px; height: 20px; stroke: #d97706; flex-shrink: 0; }
.accueil-alert-text { flex: 1; font-size: .88rem; color: #92400e; line-height: 1.55; }
.accueil-alert-text strong { font-weight: 700; }
.accueil-alert-btn {
  background: #d97706; color: #fff; border: none;
  padding: 7px 16px; border-radius: 8px;
  font-size: .82rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: opacity .15s; flex-shrink: 0;
}
.accueil-alert-btn:hover { opacity: .88; }

.accueil-section { margin-bottom: 32px; }
.accueil-section-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted);
  margin-bottom: 14px;
}
.accueil-collabs-list { display: flex; flex-direction: column; }
.accueil-collab-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  cursor: pointer; transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.accueil-collabs-list .accueil-collab-row:last-child { border-bottom: none; }
.accueil-collab-row:hover { background: rgba(0,0,0,.03); }
.accueil-collab-info { flex: 1; min-width: 0; }
.accueil-collab-title { font-size: .9rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accueil-collab-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accueil-more-btn {
  margin-top: 12px; background: none; border: 1px solid var(--border);
  color: var(--primary); border-radius: 8px;
  padding: 8px 16px; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: background .12s;
}
.accueil-more-btn:hover { background: rgba(94,74,208,.04); }

/* ============================================
   PAGE STATS — groupes et lignes
   ============================================ */
.stats-group { margin-bottom: 28px; }
.stats-group-header {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 10px;
}
.stats-group-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.stats-group-label { font-size: .82rem; font-weight: 700; color: var(--text); }
.stats-group-count {
  font-size: .72rem; font-weight: 700;
  background: rgba(0,0,0,.06); color: var(--muted);
  padding: 1px 8px; border-radius: 50px;
}
.stats-collab-list {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.stats-collab-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.stats-collab-list .stats-collab-row:last-child { border-bottom: none; }

/* ============================================
   PAGE COMPTE — champs éditables
   ============================================ */
.dash-account-edit-section {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  margin-top: 8px;
}
.dash-account-edit-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
  margin-bottom: 18px;
}
.dash-account-edit-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 16px;
}
.dash-edit-input {
  padding: 11px 14px; font-size: .9rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; outline: none; width: 100%;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.dash-edit-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94,74,208,.1);
}
.dash-save-btn {
  display: inline-flex; align-items: center;
  padding: 10px 22px; border-radius: 10px;
  font-size: .88rem; font-weight: 600; color: #fff;
  background: var(--primary); border: none;
  cursor: pointer; transition: opacity .15s;
}
.dash-save-btn:hover { opacity: .88; }
.dash-save-btn:disabled { opacity: .5; cursor: default; }

/* ============================================
   HAMBURGER — mobile only
   ============================================ */
.dash-hdr-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 8px; color: var(--text);
  transition: background .12s; margin-right: 6px;
}
.dash-hdr-hamburger:hover { background: rgba(0,0,0,.05); }
.dash-hdr-hamburger svg { width: 22px; height: 22px; display: block; }

/* Sidebar overlay backdrop (mobile) */
.dash-sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,.35);
}
.dash-sidebar-overlay.active { display: block; }

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
@keyframes dashPageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dash-content--in {
  animation: dashPageIn 160ms ease forwards;
}

/* ============================================
   STATS ADMIN — section titles + two-col layout
   ============================================ */
.stats-section-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted);
  margin: 0 0 14px;
}
.stats-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 768px) {
  .stats-two-col { grid-template-columns: 1fr; }
}

/* ── Responsive ── */
/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .dash-sidebar { width: 210px; }
  .dash-content { margin-left: 210px; padding: 36px 36px; }
  .tb-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .dash-hdr-hamburger { display: flex; }
  .dash-sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    width: 248px;
    z-index: 200;
  }
  .dash-sidebar.dash-sidebar--open { transform: translateX(0); }
  .dash-content { margin-left: 0; padding: 24px 16px; }
  .accueil-kpis { grid-template-columns: 1fr; }
  .dash-account-edit-grid { grid-template-columns: 1fr; }
  .tb-board     { grid-template-columns: 1fr; }
  .tb-form-row  { grid-template-columns: 1fr; }
  .tb-toolbar   { flex-direction: column; align-items: stretch; }
  .tb-progress-inline { margin-left: 0; }
  .ac-body      { grid-template-columns: 1fr; }
  .ac-hero-content { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ac-kpis      { grid-template-columns: 1fr 1fr; }
  .ac-kpis .ac-kpi:last-child { grid-column: span 2; }
}

/* ============================================
   ACCUEIL CLIENT — redesign
   ============================================ */

/* Hero banner */
.ac-hero {
  position: relative;
  background: linear-gradient(135deg, #1a1726 0%, #2e2257 55%, #1a1726 100%);
  border-radius: 18px;
  padding: 30px 32px 26px;
  margin-bottom: 20px;
  overflow: hidden;
  color: #fff;
}
.ac-hero-glow {
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(148,117,255,.22) 0%, transparent 68%);
  pointer-events: none;
}
.ac-hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
}
.ac-greeting {
  font-size: 1.5rem; font-weight: 400;
  letter-spacing: -.025em; line-height: 1.2;
  margin-bottom: 5px;
}
.ac-greeting strong { font-weight: 700; }
.ac-date { font-size: .8rem; color: rgba(255,255,255,.5); font-weight: 500; }
.ac-hero-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.ac-action-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.88);
  font-size: .8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.ac-action-btn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.26); }
.ac-action-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* To-do block (home page) */
.ac-todo-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; margin-bottom: 20px; overflow: hidden;
}
.ac-todo-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-size: .84rem; font-weight: 700; color: var(--text);
}
.ac-todo-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--primary); color: #fff;
  border-radius: 10px; font-size: .7rem; font-weight: 700;
}
.ac-todo-list { display: flex; flex-direction: column; }
.ac-todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: background .12s;
}
.ac-todo-item:last-child { border-bottom: none; }
.ac-todo-item:hover { background: rgba(94,74,208,.04); }
.ac-todo-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.todo-s--todo     { background: #d1d5db; }
.todo-s--progress { background: #f59e0b; }
.ac-todo-info { flex: 1; min-width: 0; }
.ac-todo-title {
  font-size: .84rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-todo-meta { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.ac-todo-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0;
}
.ac-todo-due {
  font-size: .72rem; color: var(--muted); font-weight: 500;
}
.ac-todo-due--late { color: #ef4444; font-weight: 700; }
.ac-todo-status {
  font-size: .68rem; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 6px;
}
.ac-todo-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 22px 18px; text-align: center;
}
.ac-todo-empty p { font-size: .8rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* KPI grid */
.ac-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 20px;
}
.ac-kpi {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 18px 16px;
  cursor: pointer; display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.ac-kpi:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transform: translateY(-2px);
  border-color: rgba(94,74,208,.25);
}
.ac-kpi--loading { pointer-events: none; opacity: .7; }
.ac-kpi-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 14px;
}
.ac-kpi-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ac-kpi-icon svg { width: 20px; height: 20px; }
.ac-kpi-icon--purple { background: rgba(94,74,208,.1);  color: var(--primary); }
.ac-kpi-icon--amber  { background: rgba(245,158,11,.1); color: #f59e0b; }
.ac-kpi-icon--red    { background: rgba(239,68,68,.1);  color: #ef4444; }
.ac-kpi-caret { width: 15px; height: 15px; color: var(--muted); transition: transform .15s, color .15s; }
.ac-kpi:hover .ac-kpi-caret { transform: translateX(3px); color: var(--primary); }
.ac-kpi-num {
  font-size: 1.95rem; font-weight: 700;
  letter-spacing: -.04em; line-height: 1;
  margin-bottom: 5px; color: var(--text);
}
.ac-kpi-num--alert  { color: #f59e0b; }
.ac-kpi-num--urgent { color: #ef4444; }
.ac-kpi-label { font-size: .78rem; color: var(--muted); font-weight: 500; }

/* Alert strip */
.ac-alert {
  background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: 12px; padding: 13px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.ac-alert svg { width: 20px; height: 20px; stroke: #d97706; flex-shrink: 0; }
.ac-alert-text { flex: 1; font-size: .84rem; color: #92400e; line-height: 1.5; }
.ac-alert-text strong { font-weight: 700; }
.ac-alert-btn {
  background: #d97706; color: #fff; border: none;
  padding: 7px 16px; border-radius: 8px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: opacity .15s; white-space: nowrap;
}
.ac-alert-btn:hover { opacity: .88; }

/* 2-column layout */
.ac-body { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.ac-body--full { grid-template-columns: 1fr; }

/* Section header */
.ac-section-head {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.ac-section-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted);
}
.ac-section-link {
  font-size: .78rem; font-weight: 600; color: var(--primary);
  background: none; border: none; cursor: pointer; transition: opacity .15s;
}
.ac-section-link:hover { opacity: .75; }

/* Collab cards */
.ac-collab-list { display: flex; flex-direction: column; gap: 10px; }
.ac-collab-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 15px 16px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .12s;
}
.ac-collab-card:hover {
  box-shadow: 0 3px 16px rgba(0,0,0,.07);
  border-color: rgba(94,74,208,.22);
  transform: translateY(-1px);
}
.ac-cc-header { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.ac-cc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: #fff; font-weight: 700; font-size: .82rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ac-cc-info { flex: 1; min-width: 0; }
.ac-cc-title {
  font-size: .9rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.ac-cc-partner { font-size: .76rem; color: var(--muted); }
.ac-cc-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.ac-cc-budget { font-size: .8rem; font-weight: 700; color: var(--text); }
.ac-cc-budget--none { font-weight: 400; color: var(--muted); }
.ac-cc-date { font-size: .72rem; color: var(--muted); }

/* Messages card */
.ac-msg-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ac-msg-list {}
.ac-msg-row {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px; cursor: pointer; transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.ac-msg-list .ac-msg-row:last-child { border-bottom: none; }
.ac-msg-row:hover { background: rgba(0,0,0,.025); }
.ac-msg-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ac-msg-info { flex: 1; min-width: 0; }
.ac-msg-name { font-size: .84rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.ac-msg-preview {
  font-size: .74rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-msg-preview--unread { font-weight: 600; color: var(--text); }
.ac-msg-meta { text-align: right; flex-shrink: 0; }
.ac-msg-time { font-size: .68rem; color: var(--muted); margin-bottom: 4px; }
.ac-msg-badge {
  background: var(--primary); color: #fff;
  font-size: .65rem; font-weight: 700;
  padding: 2px 6px; border-radius: 50px; display: inline-block;
}

/* Empty state */
.ac-empty {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 48px 28px;
  text-align: center;
}
.ac-empty-emoji { font-size: 2.4rem; margin-bottom: 14px; line-height: 1; }
.ac-empty-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ac-empty-desc {
  font-size: .86rem; color: var(--muted); max-width: 360px;
  margin: 0 auto 22px; line-height: 1.65;
}
.ac-empty-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px;
  background: var(--primary); color: #fff;
  font-size: .86rem; font-weight: 600;
  border: none; cursor: pointer; transition: opacity .15s;
}
.ac-empty-cta:hover { opacity: .88; }

@media (max-width: 900px) {
  .ac-body { grid-template-columns: 1fr; }
  .ac-hero-content { flex-direction: column; align-items: flex-start; gap: 16px; }
}


/* ============================================
   ONBOARDING TOUR
   ============================================ */

/* Flash nav item lors de la navigation du tour */
@keyframes tour-nav-flash {
  0%,100% { background: transparent; }
  30%,70% { background: rgba(94,74,208,.18); color: var(--primary); }
}
.tour-nav-active {
  animation: tour-nav-flash 1.4s ease forwards;
}

/* Overlay — uniquement pour les étapes sans cible (modal centré) */
.tour-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(10,8,20,0); pointer-events: none;
  transition: background .3s ease;
}
.tour-overlay--in { background: rgba(10,8,20,.65); pointer-events: all; }

/* Spotlight — box-shadow masque tout sauf l'élément ciblé */
.tour-spot {
  position: fixed; z-index: 9010;
  border-radius: 12px; pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease, top .35s cubic-bezier(.4,0,.2,1),
              left .35s cubic-bezier(.4,0,.2,1),
              width .35s cubic-bezier(.4,0,.2,1),
              height .35s cubic-bezier(.4,0,.2,1);
}
.tour-spot--in { opacity: 1; }

@keyframes tour-pulse {
  0%,100% { box-shadow: 0 0 0 9999px rgba(10,8,20,.7), 0 0 0 3px var(--primary); }
  50%      { box-shadow: 0 0 0 9999px rgba(10,8,20,.7), 0 0 0 6px rgba(94,74,208,.45); }
}
.tour-spot--in {
  animation: tour-pulse 2.2s ease-in-out infinite;
}

/* Bulle */
.tour-bubble {
  position: fixed; z-index: 9100; width: 380px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,.24), 0 0 0 1px rgba(0,0,0,.05);
  padding: 22px 24px 18px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: all;
}
.tour-bubble--in { opacity: 1; transform: translateY(0); }

/* Centré (étapes sans cible) */
.tour-bubble--center {
  top: 50% !important; left: 50% !important;
  transform: translate(-50%, -46%);
}
.tour-bubble--center.tour-bubble--in {
  transform: translate(-50%, -50%);
}

/* Flèches directionnelles */
.tour-bubble::before {
  content: ''; position: absolute;
  width: 0; height: 0; border: 9px solid transparent;
}
.tour-bubble--arrow-top::before {
  bottom: 100%; left: 50%;
  transform: translateX(-50%);
  border-bottom-color: #fff;
}
.tour-bubble--arrow-left::before {
  right: 100%; top: 22px;
  border-right-color: #fff;
}
.tour-bubble--arrow-right::before {
  left: 100%; top: 22px;
  border-left-color: #fff;
}

/* Contenu bulle */
.tour-bubble-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.tour-dots { display: flex; gap: 5px; align-items: center; }
.tour-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #e5e7eb; transition: all .2s;
}
.tour-dot--active { background: var(--primary); width: 20px; border-radius: 4px; }
.tour-dot--done   { background: #c4b5fd; }

.tour-skip {
  background: none; border: none; cursor: pointer;
  font-size: .72rem; color: #9ca3af; padding: 2px 4px;
  transition: color .15s; white-space: nowrap;
}
.tour-skip:hover { color: #6b7280; }

.tour-icon {
  font-size: 2rem; margin-bottom: 10px; line-height: 1;
}
.tour-title {
  font-size: 1.05rem; font-weight: 800; color: #1a1a2e;
  margin-bottom: 8px; line-height: 1.3;
}
.tour-text {
  font-size: .84rem; color: #4b5563; line-height: 1.65; margin-bottom: 16px;
}
.tour-text strong { color: #1a1a2e; font-weight: 700; }
.tour-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.tour-btn {
  padding: 8px 16px; border-radius: 9px; font-size: .8rem;
  font-weight: 700; cursor: pointer; border: none; transition: all .15s;
}
.tour-btn--primary { background: var(--primary); color: #fff; flex: 1; }
.tour-btn--primary:hover { background: #4d3ab0; }
.tour-btn--ghost {
  background: none; color: #6b7280; border: 1px solid #e5e7eb;
}
.tour-btn--ghost:hover { background: #f9fafb; }
