/* ============================================================
   lae-crm — base.css
   Brand guideline V4. Tokens identiques BENCHMARK.html
   ============================================================ */

:root {
  /* Couleurs */
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --ink-dark: #3a3a38;
  --paper: #fafaf9;
  --paper-warm: #f5f5f3;
  --grey-mid: #767676;
  --cream: #f0e8dd;
  --cream-border: #d9cbb6;
  --white: #ffffff;
  --off-white: #f8f7f3;
  --grey-50: #f4f3ee;
  --grey-100: #e8e6df;
  --grey-300: #bcb9af;
  --grey-500: #6b6960;
  --grey-700: #3a3934;
  --line: rgba(10, 10, 10, 0.08);
  --line-strong: rgba(10, 10, 10, 0.16);
  --r-ok: #00a84a;
  --r-warn: #ff9500;
  --r-ko: #d40000;
  --r-accent: #1a4ecc;
  --gold: #a68856;
  --gold-soft: rgba(166, 136, 86, 0.08);
  --plum: #6b3f5f;
  --teal: #2d7d7d;

  /* Tints par stage (subtle washes) */
  --stage-cold: rgba(108, 105, 96, 0.06);
  --stage-warm: rgba(255, 149, 0, 0.06);
  --stage-discovery: rgba(45, 125, 125, 0.06);
  --stage-proposal: rgba(26, 78, 204, 0.07);
  --stage-negociation: rgba(166, 136, 86, 0.10);
  --stage-started: rgba(0, 168, 74, 0.06);
  --stage-won: rgba(0, 168, 74, 0.12);
  --stage-lost: rgba(212, 0, 0, 0.04);

  /* Typographies */
  --display: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Layout iso luxeaeternai.com */
  --topbar-h: 89px;
  --side-w: 460px;
  --gap-1: 8px;
  --gap-2: 16px;
  --gap-3: 24px;
  --gap-4: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--cream); }
a { color: var(--ink); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select {
  font-family: inherit; font-size: 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 0;
  width: 100%;
  color: var(--ink);
  border-radius: 0;
  outline: none;
  transition: border-color .12s ease;
}
input:focus, textarea:focus, select:focus { border-bottom-color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }

/* — Mono labels — */
.label, .eyebrow, .mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--grey-500);
}

/* — Badge — */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  line-height: 1;
  border-radius: 0;
}
.badge.ok    { color: var(--r-ok); border-color: var(--r-ok); }
.badge.warn  { color: var(--r-warn); border-color: var(--r-warn); }
.badge.ko    { color: var(--r-ko); border-color: var(--r-ko); }
.badge.accent{ color: var(--r-accent); border-color: var(--r-accent); }
.badge.fill  { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.badge.ghost { color: var(--grey-500); border-color: var(--line-strong); }

/* — Button hierarchy : primary / secondary / tertiary / destructive — */
.btn {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  border-radius: 0;
  transition: background .14s ease, color .14s ease, border-color .14s ease, transform .08s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn:hover { background: var(--ink-soft); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Secondary : outline ink */
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.ghost:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* Tertiary : underline mono, no border */
.btn.text {
  background: transparent;
  color: var(--ink);
  border: none;
  padding: 6px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
}
.btn.text:hover {
  background: transparent;
  text-decoration-color: var(--ink);
}

/* Destructive */
.btn.danger {
  background: transparent;
  color: var(--r-ko);
  border-color: var(--r-ko);
}
.btn.danger:hover {
  background: var(--r-ko);
  color: var(--white);
}

/* Sizes */
.btn.tiny { padding: 6px 12px; font-size: 9px; gap: 6px; }
.btn.lg { padding: 14px 24px; font-size: 11px; }

/* Inline kbd hint */
.btn kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  padding: 1px 5px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 2px;
  letter-spacing: 0;
  color: inherit;
}
.btn.ghost kbd, .btn.text kbd {
  background: var(--off-white);
  border-color: var(--line);
  color: var(--grey-500);
}

/* — Topbar — */
/* Topbar utilise la grid master canonique du site */
.topbar {
  position: sticky; top: 0; z-index: 40;
  min-height: var(--topbar-h);
  background: rgba(250, 250, 249, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  column-gap: var(--grid-gutter);
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  align-items: center;
  box-sizing: border-box;
}
.topbar > .brand-area { grid-column: 1 / span 3; align-self: center; display: flex; align-items: center; gap: 18px; }
.topbar > .nav-area   { grid-column: 5 / span 4; display: flex; gap: 28px; justify-content: center; }
.topbar > .actions-area { grid-column: 10 / span 3; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
@media (max-width: 1023px) {
  .topbar > .brand-area   { grid-column: 1 / span 2; }
  .topbar > .nav-area     { display: none; }
  .topbar > .actions-area { grid-column: 3 / span 4; }
}
@media (max-width: 639px) {
  .topbar { min-height: 77px; }
  .topbar > .brand-area   { grid-column: 1 / span 2; gap: 12px; }
  .topbar > .actions-area { grid-column: 3 / span 2; gap: 6px; }
}

/* Conteneur de vue calé sur la grille — pleine largeur par défaut */
.view {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  column-gap: var(--grid-gutter);
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  padding-top: 32px;
  padding-bottom: 64px;
  box-sizing: border-box;
}
/* Enfants pleine largeur PAR DÉFAUT — uniquement ceux sans classe col-* explicite */
.view > *:not([class*="col-"]) { grid-column: 1 / -1; }
.view .view-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.topbar .brand {
  display: flex; align-items: center; gap: 14px;
}
.topbar .brand .mark {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 500;
}
.topbar .brand .mark span { color: var(--grey-500); }
.topbar nav { display: flex; gap: 28px; }
.topbar nav a {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey-500);
  padding: 18px 0;
  border-bottom: 1px solid transparent;
  position: relative;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.topbar nav a .count {
  display: inline-block;
  font-size: 9px;
  background: var(--ink);
  color: var(--cream);
  padding: 1px 6px;
  margin-left: 6px;
}

/* — App shell — */
.shell {
  display: flex; flex-direction: column;
  min-height: 100vh;
}
/* .view styles supplémentaires (positionnement) — padding géré par grid master plus haut */
.view {
  flex: 1;
  position: relative;
}
.view h1 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.view h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
}
.view .sub {
  font-size: 14px; color: var(--grey-500); margin: 0 0 24px;
}

/* — Toolbar — */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.toolbar .search {
  flex: 1;
  border: none; border-bottom: 1px solid transparent;
  font-size: 14px; padding: 6px 0;
}
.toolbar .search:focus { border-bottom-color: var(--ink); }
.toolbar select {
  border: 1px solid var(--line-strong);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  background: var(--white);
  cursor: pointer;
}

/* — Liste contacts (grid 6 cols proportionnelles, totalent 12 fr = 12-col master) — */
.list {
  display: grid;
  grid-template-columns: 3fr 3fr 2fr 1fr 1fr 2fr;
  column-gap: var(--grid-gutter);
  grid-column: 1 / -1;
}
/* Reset des col-* spans pour les cells de la liste (elles s'ordonnent automatiquement) */
.list > .col-name,
.list > .col-company,
.list > .col-status,
.list > .col-tier,
.list > .col-followup,
.list > .col-actions { grid-column: auto; }

/* — Responsive : col-N qui dépassent --grid-cols se rabattent sur le max — */
/* Tablet : 6 cols max */
@media (max-width: 1023px) {
  .col-12, .col-11, .col-10, .col-9, .col-8, .col-7 { grid-column: span 6 !important; }
}
/* Mobile : 4 cols max */
@media (max-width: 639px) {
  .col-12, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
    grid-column: span 4 !important;
  }
  .col-2 { grid-column: span 2 !important; }
  /* Liste en mobile : stack vertical (chaque cellule pleine ligne) */
  .list { grid-template-columns: 1fr !important; column-gap: 0; }
}
.list > div {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  cursor: default;
}
.list .head {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey-500);
  border-bottom: 1px solid var(--ink);
  cursor: default;
}

/* Hover-actions inline (Folk pattern) */
.list .actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity .12s ease;
}
.list .row:hover .actions { opacity: 1; }
.list .row .actions button {
  background: var(--white);
  border: 1px solid var(--line);
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-500);
  cursor: pointer;
  transition: all .1s ease;
}
.list .row .actions button:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.list .row .actions svg { width: 14px; height: 14px; }

/* Filter chips — modernes, dismissables */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  color: var(--grey-700);
  cursor: pointer;
  transition: all .1s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.chip .x { font-size: 14px; line-height: 1; opacity: .7; }
.chip:hover .x { opacity: 1; }
.chip-group {
  display: inline-flex;
  border: 1px solid var(--line-strong);
}
.chip-group .chip {
  border: none;
  border-right: 1px solid var(--line);
}
.chip-group .chip:last-child { border-right: none; }
.list .row { cursor: pointer; transition: background .08s ease; position: relative; }
.list .row:hover { background: var(--gold-soft); }
.list .row:hover::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--gold);
}
.list .row.active { background: var(--cream); }
.list .row.active::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--ink);
}
.list .chevron { color: var(--grey-300); transition: color .12s ease, transform .12s ease; }
.list .row:hover .chevron { color: var(--gold); transform: translateX(2px); }
.list .name { font-weight: 500; }
.list .role { font-size: 11px; color: var(--grey-500); margin-top: 2px; }
.list .followup.late { color: var(--r-ko); font-weight: 500; }
.list .followup.soon { color: var(--r-warn); font-weight: 500; }

/* — KPI cards — */
.kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin: 24px 0 32px;
}
.kpi {
  border: 1px solid var(--line);
  padding: 20px 20px 20px 22px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ink);
}
.kpi.gold::before    { background: var(--gold); }
.kpi.accent::before  { background: var(--r-accent); }
.kpi.ok::before      { background: var(--r-ok); }
.kpi.plum::before    { background: var(--plum); }
.kpi .lbl {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--grey-500);
  display: block; margin-bottom: 10px;
}
.kpi .val {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.kpi.gold .val   { color: var(--gold); }
.kpi.accent .val { color: var(--r-accent); }
.kpi.ok .val     { color: var(--r-ok); }
.kpi.plum .val   { color: var(--plum); }
.kpi .delta {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .1em;
  margin-top: 8px; display: inline-block;
  color: var(--grey-500);
}
.kpi .delta.up { color: var(--r-ok); }
.kpi .delta.down { color: var(--r-ko); }

/* — Section block — */
.block {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 20px;
  margin-bottom: 16px;
}
.block h3 {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey-500);
  margin: 0 0 14px;
}
.block .empty { color: var(--grey-500); font-size: 13px; font-style: italic; }

/* — Kanban — */
.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  min-height: calc(100vh - 220px);
}
.kanban .col {
  background: var(--off-white);
  padding: 12px;
  min-height: 200px;
}
.kanban .col[data-stage="cold"]        { background: var(--stage-cold); }
.kanban .col[data-stage="warm"]        { background: var(--stage-warm); }
.kanban .col[data-stage="discovery"]   { background: var(--stage-discovery); }
.kanban .col[data-stage="proposal"]    { background: var(--stage-proposal); }
.kanban .col[data-stage="negociation"] { background: var(--stage-negociation); }
.kanban .col[data-stage="started"]     { background: var(--stage-started); }
.kanban .col[data-stage="won"]         { background: var(--stage-won); }
.kanban .col-head {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 12px;
  display: flex; justify-content: space-between;
}
.kanban .col-head .sum {
  color: var(--ink);
  font-weight: 500;
}
.kanban .card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.4;
  cursor: grab;
}
.kanban .card.dragging { opacity: .5; }
.kanban .card .title { display: block; font-weight: 500; font-size: 12px; margin-bottom: 4px; color: var(--ink); }
.kanban .card .sub { color: var(--grey-500); font-size: 10px; }
.kanban .card .val { font-family: var(--mono); font-size: 10px; margin-top: 6px; color: var(--ink); }
.kanban .card .stale {
  display: inline-block;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--r-warn);
  border: 1px solid var(--r-warn);
  padding: 2px 5px;
  margin-top: 4px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* — Side panel (Attio-style sticky header + footer) — */
.side {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--side-w);
  max-width: 90vw;
  background: var(--white);
  border-left: 1px solid var(--line-strong);
  box-shadow: -8px 0 24px rgba(10, 10, 10, .04);
  z-index: 50;
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.side.open { transform: translateX(0); }
.side .head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky; top: 0; z-index: 2;
}
.side .footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line-strong);
  position: sticky; bottom: 0; z-index: 2;
}
.side .footer button {
  background: var(--white);
  border: none;
  padding: 14px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey-700);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: background .1s ease, color .1s ease;
}
.side .footer button:hover { background: var(--ink); color: var(--cream); }
.side .footer button svg { width: 16px; height: 16px; }
.side .footer button.primary { background: var(--cream); }
.side .footer button.primary:hover { background: var(--ink); color: var(--cream); }
.side .close {
  background: transparent; border: none; padding: 4px;
  font-size: 22px; font-family: var(--mono); color: var(--grey-500);
  line-height: 1;
}
.side .body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.side .body h2 {
  font-size: 22px; font-weight: 500; margin: 0 0 4px;
}
.side .body .role {
  font-size: 13px; color: var(--grey-500); margin-bottom: 16px;
}
.side .body .tags { margin-bottom: 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.side .field {
  margin-bottom: 16px;
}
.side .field label {
  display: block;
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 4px;
}
.side .timeline { margin-top: 20px; border-left: 1px solid var(--line); padding-left: 14px; }
.side .timeline .ev { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.side .timeline .when {
  display: block;
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey-500); margin-bottom: 4px;
}
.side .saved {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--r-ok);
  opacity: 0; transition: opacity .18s ease;
}
.side .saved.show { opacity: 1; }

/* — Backdrop — */
.backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, .12);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.backdrop.show { opacity: 1; pointer-events: auto; }

/* — Modal — */
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border: 1px solid var(--line-strong);
  padding: 28px;
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  z-index: 60;
  box-shadow: 0 24px 64px rgba(10, 10, 10, .12);
}
.modal.lg { width: 720px; }
.modal.xl { width: 900px; }

/* Generator preview pane */
.gen-preview {
  background: var(--off-white);
  border: 1px solid var(--line);
  padding: 18px 20px;
  margin: 14px 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 360px;
  overflow-y: auto;
  color: var(--ink);
}
.gen-preview .var {
  background: var(--gold-soft);
  padding: 1px 4px;
  border-radius: 2px;
  border-bottom: 1px dashed var(--gold);
}
.modal h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }
.modal .sub { font-size: 12px; color: var(--grey-500); margin: 0 0 20px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal label {
  display: block;
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey-500);
  margin-top: 14px; margin-bottom: 4px;
}

/* — Funnel SVG — */
.funnel { width: 100%; height: 60px; }
.funnel-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 12px; }
.funnel-row .lbl { flex: 0 0 90px; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-500); }
.funnel-row .bar-wrap { flex: 1; height: 14px; background: var(--off-white); border: 1px solid var(--line); position: relative; }
.funnel-row .bar { height: 100%; background: var(--ink); }
.funnel-row .v { flex: 0 0 90px; font-family: var(--mono); font-size: 10px; color: var(--ink); text-align: right; }

/* — Toast — */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: var(--cream);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 18px;
  z-index: 70;
  opacity: 0; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.error { background: var(--r-ko); color: var(--white); }

/* — Auth gate — */
.gate {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.gate-card {
  border: 1px solid var(--line); background: var(--white);
  padding: 36px; width: 380px; max-width: 100%;
}
.gate-card h1 {
  font-family: var(--display); font-weight: 300; font-size: 24px; margin: 0 0 8px; letter-spacing: -.01em;
}
.gate-card p { font-size: 13px; color: var(--grey-500); margin: 0 0 20px; }
.gate-card .err { color: var(--r-ko); font-size: 12px; margin-top: 10px; }

/* — Responsive layout adaptatif — */
.kanban { overflow-x: auto; }

/* Tablet */
@media (max-width: 1024px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(7, minmax(170px, 1fr)); }
  .list { grid-template-columns: 1.4fr 1.1fr 90px 60px 110px 24px; }
}

/* Mobile (padding-inline géré par var(--pad-x) du grid master) */
@media (max-width: 720px) {
  body { font-size: 13px; }
  .view h1 { font-size: 26px; line-height: 1.05; }
  .view { padding-top: 20px; padding-bottom: 80px; }
  .toolbar { flex-wrap: wrap; gap: 8px; padding: 10px 0; }
  .toolbar .search { flex: 1 0 100%; }
  .kpis { grid-template-columns: 1fr; gap: 10px; }
  .kpi .val { font-size: 32px; }
  .list { grid-template-columns: 1fr; gap: 0; }
  .list .head { display: none; }
  .list .row {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
  }
  /* Sur mobile : empile les 6 cellules en une card row */
  .list > div.row:nth-of-type(6n+1) { padding-top: 16px; }
  .list > div.row:nth-of-type(6n+6) { display: none; }
  .kanban {
    grid-template-columns: repeat(7, 260px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .side { width: 100vw; max-width: 100vw; }
  .modal { width: calc(100vw - 32px); padding: 20px; }
  /* Grid 2-col → 1-col mobile */
  .grid-2-col { grid-template-columns: 1fr !important; }
}

/* Burger mobile */
.burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  width: 36px; height: 32px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.burger svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .burger { display: inline-flex; }
}

/* Utilities 12-col grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.col-12 { grid-column: span 12; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-8  { grid-column: span 8; }
@media (max-width: 720px) {
  .col-6, .col-4, .col-3, .col-8 { grid-column: span 12; }
}
