/* ═══════════════════════════════════════════════════════════════
   ConsultPro — Design System v2 (Dark)
   Fonts : Plus Jakarta Sans + DM Mono (Google Fonts)
═══════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:          #0E1117;
  --bg-card:     #161B27;
  --bg-raised:   #1C2333;
  --bg-hover:    #202840;
  --border:      rgba(255,255,255,0.07);
  --border-md:   rgba(255,255,255,0.13);
  --border-lg:   rgba(255,255,255,0.20);

  --teal:        #0ABDE3;
  --teal-dim:    rgba(10,189,227,0.12);
  --teal-text:   #38D4F0;
  --amber:       #FFA500;
  --amber-dim:   rgba(255,165,0,0.12);
  --violet:      #8B5CF6;
  --violet-dim:  rgba(139,92,246,0.12);
  --emerald:     #10B981;
  --emerald-dim: rgba(16,185,129,0.12);
  --red:         #F87171;
  --red-dim:     rgba(248,113,113,0.12);
  --blue:        #60A5FA;
  --blue-dim:    rgba(96,165,250,0.12);
  --yellow:      #FBBF24;
  --yellow-dim:  rgba(251,191,36,0.12);

  --primary:     var(--teal);
  --primary-dim: var(--teal-dim);
  --danger:      var(--red);
  --success:     var(--emerald);
  --warning:     var(--amber);
  --info:        var(--blue);

  --text:        #E8EAF0;
  --text-2:      #8892A4;
  --text-3:      #3D4A5C;
  --muted:       #8892A4;

  --font:        'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono:        'DM Mono', 'Fira Mono', monospace;

  --r:           10px;
  --r-sm:        6px;
  --r-lg:        14px;
  --sidebar-w:   220px;
  --topbar-h:    52px;
  --bottom-h:    64px;

  --surface:     var(--bg-card);
  --surface-raised: var(--bg-raised);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--bottom-h);
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ── Layout ── */
.layout {
  display: block;
  min-height: 100vh;
}
.main-area {
  min-height: 100vh;
}
.container {
  padding: .85rem;
  max-width: 100%;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  z-index: 400;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .25s;
}
.sidebar.open { transform: translateX(0); }

.sidebar__logo {
  padding: 1.1rem 1.1rem .9rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: -.2px;
}
.sidebar__logo span.logo-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), #0078B7);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; flex-shrink: 0;
}
.sidebar__logo span.logo-name { color: var(--text); }
.sidebar__logo span.logo-pro  { color: var(--teal); }
.sidebar__logo sub {
  font-size: 9px; color: var(--text-3); letter-spacing: .1em;
  text-transform: uppercase; display: block; margin-top: 1px;
  font-weight: 500;
}

.sidebar__section-label {
  font-size: 10px; font-weight: 600;
  color: var(--text-3); letter-spacing: .1em;
  text-transform: uppercase;
  padding: .65rem 1.1rem .2rem;
}
.sidebar__sep {
  height: 1px; background: var(--border);
  margin: .4rem 1.1rem;
}
.sidebar__nav {
  flex: 1; padding: .5rem 0;
}
.sidebar__nav a {
  display: flex; align-items: center; gap: 9px;
  padding: .5rem 1.1rem;
  color: var(--text-2); text-decoration: none;
  font-size: 13.5px; font-weight: 400;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.sidebar__nav a svg {
  width: 16px; height: 16px; flex-shrink: 0;
  opacity: .7; transition: opacity .15s;
}
.sidebar__nav a:hover {
  background: var(--bg-raised); color: var(--text);
  text-decoration: none;
}
.sidebar__nav a:hover svg { opacity: 1; }
.sidebar__nav a.active {
  color: var(--teal);
  border-left-color: var(--teal);
  background: var(--teal-dim);
  font-weight: 500;
}
.sidebar__nav a.active svg { opacity: 1; }

/* Couleurs actives par module */
.sidebar__nav a[href*="recovery"].active,
.sidebar__nav a.nav-recovery.active { color:var(--amber); border-left-color:var(--amber); background:var(--amber-dim); }
.sidebar__nav a[href*="tasks"].active,
.sidebar__nav a.nav-tasks.active    { color:var(--violet); border-left-color:var(--violet); background:var(--violet-dim); }
.sidebar__nav a[href*="prospect"].active,
.sidebar__nav a.nav-prospect.active { color:var(--emerald); border-left-color:var(--emerald); background:var(--emerald-dim); }

.sidebar__footer {
  padding: .85rem 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.sidebar__footer strong { display: block; color: var(--text); font-size: 13px; font-weight: 600; }

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 300;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  gap: .75rem;
}
.topbar__logo {
  font-size: 15px; font-weight: 700; color: var(--text);
  text-decoration: none; display: flex; align-items: center; gap: 7px;
}
.topbar__logo:hover { text-decoration: none; color: var(--text); }
.topbar__logo-icon {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--teal), #0078B7);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
}
.topbar__right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.topbar__badge {
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 20px;
  font-family: var(--mono);
}
.topbar__title { font-size: 16px; font-weight: 700; }
.topbar__sub   { font-size: 11px; color: var(--text-2); }

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  gap: .75rem; margin-bottom: 1rem;
}
.page-title    { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.page-subtitle { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: .75rem;
}
.card-header {
  padding: .75rem 1rem .65rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
.card-title {
  font-size: 12px; font-weight: 600;
  color: var(--text-2); letter-spacing: .06em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.card-body { padding: .85rem 1rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .45rem .9rem; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  transition: all .15s; text-decoration: none; white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--teal); color: #0a0a0a; border-color: var(--teal); }
.btn-primary:hover { filter: brightness(1.1); color: #0a0a0a; }
.btn-outline  { background: transparent; color: var(--text-2); border-color: var(--border-md); }
.btn-outline:hover { background: var(--bg-raised); color: var(--text); }
.btn-secondary{ background: var(--bg-raised); color: var(--text-2); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text); }
.btn-success  { background: var(--emerald); color: #0a0a0a; border-color: var(--emerald); }
.btn-success:hover { filter: brightness(1.1); color: #0a0a0a; }
.btn-danger   { background: var(--red); color: #0a0a0a; border-color: var(--red); }
.btn-danger:hover { filter: brightness(1.1); color: #0a0a0a; }
.btn-warning  { background: var(--amber); color: #0a0a0a; border-color: var(--amber); }
.btn-warning:hover { filter: brightness(1.1); color: #0a0a0a; }
.btn-sm       { padding: .3rem .65rem; font-size: 12px; }
.btn-xs       { padding: .2rem .5rem; font-size: 11px; border-radius: 4px; }
.btn-lg       { padding: .6rem 1.2rem; font-size: 14px; }
.btn-full     { width: 100%; justify-content: center; }
.btn svg      { width: 14px; height: 14px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── FORMS ── */
.form-group    { margin-bottom: 1rem; }
.form-label    { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: .35rem; letter-spacing: .02em; }
.form-label.required::after,
.req           { content: ' *'; color: var(--red); font-size: .75em; }
.form-control {
  display: block; width: 100%;
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--border-md); border-radius: var(--r-sm);
  padding: .5rem .75rem; font-size: 13.5px;
  font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}
.form-control::placeholder { color: var(--text-3); }
.form-control option { background: var(--bg-raised); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint  { font-size: 11.5px; color: var(--text-3); margin-top: .3rem; }
.form-error { font-size: 11.5px; color: var(--red); margin-top: .3rem; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── BADGES ── */
.badge {
  display: inline-block; padding: 2px 7px;
  border-radius: 20px; font-size: 10.5px; font-weight: 600;
  letter-spacing: .03em;
}
.badge-primary   { background: var(--teal-dim);    color: var(--teal); }
.badge-success   { background: var(--emerald-dim); color: var(--emerald); }
.badge-danger    { background: var(--red-dim);     color: var(--red); }
.badge-warning   { background: var(--amber-dim);   color: var(--amber); }
.badge-info      { background: var(--blue-dim);    color: var(--blue); }
.badge-secondary { background: rgba(255,255,255,.07); color: var(--text-2); }
.badge-purple    { background: var(--violet-dim);  color: var(--violet); }

/* ── ALERTS ── */
.alert {
  padding: .75rem 1rem; border-radius: var(--r-sm);
  margin-bottom: .75rem; font-size: 13px;
  border: 1px solid transparent;
}
.alert-success { background: var(--emerald-dim); border-color: rgba(16,185,129,.25); color: var(--emerald); }
.alert-danger  { background: var(--red-dim);     border-color: rgba(248,113,113,.25); color: var(--red); }
.alert-warning { background: var(--amber-dim);   border-color: rgba(255,165,0,.25); color: var(--amber); }
.alert-info    { background: var(--blue-dim);    border-color: rgba(96,165,250,.25); color: var(--blue); }

/* ── TABLES ── */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--bg-raised); color: var(--text-2);
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: .6rem .85rem;
  border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
tbody td { padding: .6rem .85rem; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-raised); }

/* ── LIST ITEMS ── */
.list-item {
  display: flex; align-items: center;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: .75rem; transition: background .12s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-raised); }
.list-item__meta    { flex: 1; min-width: 0; font-size: 13px; }
.list-item__actions { display: flex; gap: .35rem; flex-shrink: 0; }

/* ── STATS / KPI ── */
.stats-row,
.kpi-grid {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: .6rem; margin-bottom: .75rem;
}
.stat-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: .9rem;
  position: relative; overflow: hidden;
}
.stat-box::after {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, var(--teal), transparent);
}
.stat-box__label { font-size:10px; color:var(--text-2); font-weight:600; letter-spacing:.05em; text-transform:uppercase; margin-bottom:.35rem; }
.stat-box__val   { font-size:22px; font-weight:700; font-family:var(--mono); letter-spacing:-.5px; line-height:1; color:var(--teal); }

/* Variantes stat-box */
.stat-box.amber::after { background:linear-gradient(90deg,var(--amber),transparent); }
.stat-box.amber .stat-box__val { color:var(--amber); }
.stat-box.red::after   { background:linear-gradient(90deg,var(--red),transparent); }
.stat-box.red .stat-box__val   { color:var(--red); }
.stat-box.violet::after{ background:linear-gradient(90deg,var(--violet),transparent); }
.stat-box.violet .stat-box__val{ color:var(--violet); }
.stat-box.emerald::after{ background:linear-gradient(90deg,var(--emerald),transparent); }
.stat-box.emerald .stat-box__val{ color:var(--emerald); }

.kpi-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--r); padding:.9rem; position:relative; overflow:hidden; }
.kpi-card::after { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:linear-gradient(90deg,var(--teal),transparent); }
.kpi-card__label { font-size:10px; color:var(--text-2); font-weight:600; letter-spacing:.06em; text-transform:uppercase; margin-bottom:.35rem; }
.kpi-card__value { font-size:24px; font-weight:700; font-family:var(--mono); letter-spacing:-.5px; color:var(--teal); }
.kpi-card__sub   { font-size:11px; color:var(--text-2); margin-top:.35rem; }

/* ── PROGRESS ── */
.progress { height:4px; background:rgba(255,255,255,.05); border-radius:2px; overflow:hidden; }
.progress-bar { height:100%; border-radius:2px; background:var(--teal); transition:width .8s; }
.progress-bar.danger  { background:var(--red); }
.progress-bar.warning { background:var(--amber); }
.progress-bar.success { background:var(--emerald); }
.progress-bar.info    { background:var(--blue); }
.progress-bar.violet  { background:var(--violet); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.65);
  display: flex; align-items: flex-end;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  width: 100%; max-height: 90vh;
  overflow-y: auto; padding: 1.25rem 1rem;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 700;
}
.modal-close {
  background: var(--bg-raised); border: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--text-2); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* ── DETAIL GRID ── */
.detail-grid  { display: grid; gap: .15rem; }
.detail-row   { display: flex; align-items: baseline; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 11.5px; color: var(--text-2); font-weight: 500; min-width: 130px; flex-shrink: 0; }
.detail-value { font-size: 13px; color: var(--text); font-weight: 400; }

/* ── EISENHOWER ── */
.eisenhower-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden;
}
.eq-cell {
  padding: .65rem; border: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.eq-cell:hover { background: var(--bg-raised); }
.eq-cell.selected { border-color: currentColor; }
.eq-label { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .2rem; }
.eq-action{ font-size: 11px; color: var(--text-2); }

/* ── TASK ROW ── */
.task-row {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .6rem 1rem; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--bg-raised); }
.task-cb {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--border-md); flex-shrink: 0;
  appearance: none; -webkit-appearance: none;
  cursor: pointer; margin-top: 2px;
  background: transparent; transition: all .15s;
}
.task-cb:checked { background: var(--teal); border-color: var(--teal); }

/* ── PAY MODE PILLS ── */
.pill-choice { display: flex; flex-wrap: wrap; gap: .4rem; }
.pay-mode-pill, .proj-mode-pill {
  padding: .3rem .75rem; border-radius: 20px;
  border: 1px solid var(--border-md); cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  background: transparent; transition: all .15s;
}
.pay-mode-pill.selected, .proj-mode-pill.selected,
.pay-mode-pill:hover,    .proj-mode-pill:hover {
  background: var(--teal-dim); border-color: var(--teal); color: var(--teal);
}

/* ── SCHEDULE ROWS ── */
.schedule-row {
  display: grid; align-items: center;
  gap: .5rem; padding: .55rem .85rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.schedule-new-row { display: flex; gap: .5rem; padding: .65rem; flex-wrap: wrap; }

/* ── PLAN ROW ── */
.plan-row-item {
  display: grid;
  grid-template-columns: 60px 1fr 72px 80px 46px;
  align-items: center; gap: .4rem;
  padding: .45rem .85rem; border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.plan-row-item:hover { background: var(--bg-raised); }

/* ── KANBAN ── */
.kanban-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 1rem; }
.kanban-board  { display: flex; gap: .65rem; min-width: max-content; padding-bottom: .5rem; align-items: flex-start; }

.kanban-col {
  width: 255px; flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex; flex-direction: column;
}

/* Header colonne — couleur en bande fine, pas en plein fond */
.kanban-col__header {
  padding: .6rem .85rem .55rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
  font-size: 12px; font-weight: 600; color: var(--text);
}
.kanban-col__header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: currentColor; opacity: .8;
  border-radius: 0;
}
.kanban-col__count {
  background: rgba(255,255,255,.09);
  color: var(--text-2);
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  padding: 1px 8px;
  font-family: var(--mono);
}

.kanban-col__body { padding: .6rem .5rem; min-height: 80px; flex: 1; }

/* Carte prospect */
.kanban-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .7rem .8rem;
  margin-bottom: .45rem;
  cursor: grab;
  transition: border-color .15s, background .15s;
}
.kanban-card:hover {
  border-color: var(--border-md);
  background: var(--bg-hover);
}
.kanban-card.dragging  { opacity: .45; }
.kanban-card.alerte    { border-left: 3px solid var(--amber); }

.kanban-card__name {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kanban-card__meta {
  font-size: 11px; color: var(--text-3);
  margin-bottom: .4rem;
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
}
.kanban-card__amount {
  font-family: var(--mono);
  font-size: 14px; font-weight: 700; color: var(--emerald);
  margin-bottom: .5rem;
}
.kanban-card__actions {
  display: flex; gap: .3rem; margin-top: .4rem;
  padding-top: .4rem;
  border-top: 1px solid var(--border);
}

.kanban-add {
  display: flex; align-items: center; gap: 5px;
  padding: .4rem .5rem;
  font-size: 12px; color: var(--text-3);
  text-decoration: none; border-radius: var(--r-sm);
  transition: background .15s, color .15s;
}
.kanban-add:hover { background: var(--bg-hover); color: var(--teal); text-decoration: none; }

/* ── TABS ── */
.lien-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.ac-item {
  padding: .55rem 1rem; font-size: 13px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: all .15s; font-weight: 500;
  text-decoration: none;
}
.ac-item:hover { color: var(--text); text-decoration: none; }
.ac-item.active { color: var(--teal); border-bottom-color: var(--teal); }

/* ── LOGIN ── */
.login-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 2rem 1.5rem;
  max-width: 380px; width: 100%;
}
.login-logo  { text-align: center; margin-bottom: .75rem; font-size: 32px; }
.login-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: .25rem; }
.login-sub   { font-size: 13px; color: var(--text-2); text-align: center; margin-bottom: 1.5rem; }

/* ── TOAST / AI ── */
#toast-container {
  position: fixed; top: calc(var(--topbar-h) + .75rem); right: 1rem;
  z-index: 2000; display: flex; flex-direction: column; gap: .5rem;
  max-width: 320px;
}
.toast {
  background: var(--bg-raised); border: 1px solid var(--border-md);
  border-radius: var(--r); padding: .75rem 1rem;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: slideIn .2s ease;
}
.toast.success { border-color: rgba(16,185,129,.3); color: var(--emerald); }
.toast.error   { border-color: rgba(248,113,113,.3); color: var(--red); }
@keyframes slideIn { from { opacity:0; transform:translateX(1rem); } to { opacity:1; transform:translateX(0); } }

.ai-panel { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--r); }
.ai-panel__header { padding:.75rem 1rem; border-bottom:1px solid var(--border); font-weight:600; font-size:13px; }
.ai-panel__content { padding:1rem; }

/* ── TEXT UTILITIES ── */
.text-muted    { color: var(--text-2) !important; }
.text-danger   { color: var(--red) !important; }
.text-success  { color: var(--emerald) !important; }
.text-warning  { color: var(--amber) !important; }
.text-primary  { color: var(--teal) !important; }
.text-info     { color: var(--blue) !important; }
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.text-sm       { font-size: 12.5px; }
.text-xs       { font-size: 11px; }

/* ── SPACING ── */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.ml-1 { margin-left: .25rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }

/* ── FLEX ── */
.d-flex          { display: flex; }
.flex-wrap       { flex-wrap: wrap; }
.align-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap:.25rem; } .gap-2 { gap:.5rem; }

/* ── MISC ── */
.sep     { height: 1px; background: var(--border); margin: .75rem 0; }
.alerte  { border-left: 3px solid var(--red) !important; }
.row-alerte { background: var(--red-dim) !important; }
.hidden  { display: none !important; }
.required::after { content: ' *'; color: var(--red); font-size: .8em; }
.fw-bold { font-weight: 600; }
.fw-mono { font-family: var(--mono); }
.btn-ai  { background: var(--violet-dim); color: var(--violet); border-color: rgba(139,92,246,.3); }
.btn-ai:hover { background: rgba(139,92,246,.2); color: var(--violet); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex; z-index: 500;
}
.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); cursor: pointer;
  font-size: 10px; font-weight: 500;
  text-decoration: none; transition: color .15s;
  position: relative;
}
.bottom-nav__item::before {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%;
  height: 2px; border-radius: 0 0 2px 2px;
  background: currentColor; opacity: 0; transition: opacity .15s;
}
.bottom-nav__item.active::before { opacity: 1; }
.bottom-nav__item:hover { color: var(--text-2); text-decoration: none; }
.bottom-nav__item.active { color: var(--teal); }
.bottom-nav__item svg { width: 20px; height: 20px; }

/* Couleurs bottom nav par module */
.bottom-nav__item.nav-recovery.active { color: var(--amber); }
.bottom-nav__item.nav-tasks.active    { color: var(--violet); }
.bottom-nav__item.nav-prospect.active { color: var(--emerald); }

.bottom-nav__badge {
  position: absolute; top: 5px; right: calc(50% - 16px);
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-card);
  font-family: var(--mono);
}

/* ── FAB ── */
#fab-task {
  position: fixed;
  bottom: calc(var(--bottom-h) + .75rem); right: 1.1rem;
  z-index: 600;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal); color: #0a0a0a;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 400; line-height: 1;
  box-shadow: 0 4px 16px rgba(10,189,227,.35);
  transition: transform .15s, box-shadow .15s;
}
#fab-task:hover { transform: scale(1.05); }
#fab-task:active { transform: scale(.93); }

/* ── DESKTOP 768px+ ── */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  #fab-task { bottom: 1.5rem; }

  .layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
  }
  .sidebar {
    position: sticky; top: 0;
    transform: translateX(0) !important;
    height: 100vh;
    display: flex;
  }
  .main-area {
    min-width: 0; /* évite le dépassement dans la grille */
    overflow-x: hidden;
  }
  .container {
    padding: 1.25rem 1.5rem;
    width: 100%;
    max-width: none; /* pleine largeur dans main-area */
  }
  .page-title { font-size: 20px; }
  .stats-row, .kpi-grid { grid-template-columns: repeat(4,1fr); }
  .form-row  { grid-template-columns: 1fr 1fr; }
  .modal-overlay { align-items: center; justify-content: center; }
  .modal { border-radius: var(--r-lg); max-width: 520px; }
}

/* ── DESKTOP 1024px+ ── */
@media (min-width: 1024px) {
  .container { padding: 1.5rem 2rem; }
}

/* ── TRÈS GRANDS ÉCRANS 1600px+ — centrage avec max-width ── */
@media (min-width: 1600px) {
  .container {
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
