/* ============================================================
   Suivi amendes — design tokens & global styles
   Design v2 (2026-06-10, source mockup_redesign.html) :
   papier ivoire chaud, rouge cire à cacheter, mousse, ocre,
   Fraunces (display serif, voir --serif dans auth.css) + Geist (UI).
   ============================================================ */

:root {
  --rouge: #CE0500;
  --rouge-ink: #8A0300;
  --rouge-soft: #FEE9E9;
  /* surfaces — papier ivoire chaud (v2) */
  --paper: #F5EFE6;          /* fond global, ton papier ivoire */
  --paper-soft: #ECE4D5;     /* zones plus marquées (headers, paper deeper) */
  --surface: #FCFAF5;        /* cards */
  --surface-2: #F4EDDE;      /* cards nested ou hover */

  /* ink — presque noir chaud */
  --ink: #1C1614;            /* primary text */
  --ink-2: #4A423A;          /* secondary text */
  --ink-3: #8A7F73;          /* tertiary text */
  --ink-4: #A89C8C;          /* placeholders */

  /* lines — chaudes */
  --line: rgba(58, 46, 34, 0.14);
  --line-soft: rgba(58, 46, 34, 0.08);
  --line-strong: rgba(58, 46, 34, 0.24);

  /* accents — rouge cire à cacheter (remplace le bleu Marianne) */
  --terracotta: #A2202C;
  --terracotta-ink: #7E1822;
  --terracotta-soft: #F3E0DC;
  --terracotta-line: rgba(162, 32, 44, 0.20);

  --sage: #5C7A5C;
  --sage-ink: #3E5440;
  --sage-soft: #E4EDE0;
  --sage-line: rgba(92, 122, 92, 0.25);

  --amber: #B8842F;
  --amber-ink: #7A5314;
  --amber-soft: #F5E9D2;
  --amber-line: rgba(184, 132, 47, 0.30);

  --slate: #6F7689;
  --slate-soft: #E5E5EA;

  /* radius */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 18px;
  --r-4: 24px;

  /* shadow */
  --shadow-1: 0 1px 2px rgba(27, 31, 42, 0.04), 0 2px 6px rgba(27, 31, 42, 0.04);
  --shadow-2: 0 4px 12px rgba(27, 31, 42, 0.08), 0 16px 40px rgba(27, 31, 42, 0.10);
  --shadow-3: 0 12px 32px rgba(27, 31, 42, 0.14), 0 32px 80px rgba(27, 31, 42, 0.18);

  /* type — Geist (UI) + Geist Mono (codes). Fraunces via --serif (auth.css) */
  --font-display: "Geist", "Inter Tight", system-ui, -apple-system, sans-serif;
  --font-body: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #211B16;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 36px 24px 80px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #2A2A55 0%, #161635 60%, #0E0E22 100%);
}

button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* tabular nums for amounts/codes */
.tnum, .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ─── Phone frame ─────────────────────────────────────────── */
.phone {
  width: 412px;
  height: 880px;
  border-radius: 52px;
  background: var(--paper);
  box-shadow:
    0 0 0 11px #14110D,
    0 0 0 12px #2A2620,
    0 60px 120px rgba(0,0,0,0.55),
    0 24px 48px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.phone::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 32px; border-radius: 20px;
  background: #14110D;
  z-index: 100;
}

.phone-statusbar {
  height: 54px; flex-shrink: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 28px 6px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px;
  color: var(--ink);
  position: relative; z-index: 10;
}

.phone-statusbar .ico { display: flex; gap: 5px; align-items: center; }
.phone-statusbar svg { display: block; }

.phone-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.phone-content::-webkit-scrollbar { width: 4px; }
.phone-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

/* home indicator */
.phone::after {
  content: "";
  position: absolute;
  bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; border-radius: 3px;
  background: rgba(27,31,42,0.35);
  z-index: 100;
}

/* ─── Screen wrapper layout ─────────────────────────────── */
.screen {
  min-height: 100%;
  display: flex; flex-direction: column;
  padding-bottom: 96px; /* room for bottom nav + home indicator */
  position: relative;
}

/* ─── Top app bar ─────────────────────────────────────── */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px 4px;
  gap: 12px;
}
.appbar-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.appbar-icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: background .15s, border-color .15s;
}
.appbar-icon-btn:hover { background: var(--surface-2); }

/* page hero (display title) */
.hero {
  padding: 14px 24px 18px;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink-3); text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 34px; line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 4px 0 0;
}
.hero-sub {
  margin-top: 8px;
  font-size: 14px; color: var(--ink-2); line-height: 1.45;
}

/* ─── Bottom nav ───────────────────────────────────────── */
.tabbar {
  position: absolute; left: 12px; right: 12px; bottom: 16px;
  height: 64px; border-radius: 22px;
  /* P0-css 13/05/2026 : backdrop-filter retiré (crash GPU Aw Snap erreur 5
     en regular Chrome authentifié). Fond plus opaque pour compenser. */
  background: rgba(255,255,255,0.97);
  /* backdrop-filter: blur(18px) saturate(160%); */
  /* -webkit-backdrop-filter: blur(18px) saturate(160%); */
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: grid; grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  z-index: 50;
}
.tab {
  border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 0;
  color: var(--ink-3);
  position: relative;
  font-family: var(--font-display);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0;
}
.tab[aria-current="page"] { color: var(--terracotta); }
.tab[aria-current="page"]::before {
  content: "";
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 2px;
  background: var(--terracotta);
}
.tab svg { display: block; }

/* big floating + button */
.fab {
  position: absolute; right: 22px; bottom: 96px;
  width: 56px; height: 56px; border-radius: 18px;
  background: var(--ink);
  color: #fff;
  border: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(27,31,42,0.32), 0 4px 8px rgba(27,31,42,0.18);
  z-index: 60;
  transition: transform .15s ease;
}
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: translateY(0); }

/* ─── Cards / surfaces ─────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-3);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-1);
}

.list-card {
  background: var(--surface);
  border-radius: var(--r-3);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.list-card > * + * { border-top: 1px solid var(--line-soft); }

/* ─── Status pill ─────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  white-space: nowrap;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.pill.urgent      { background: var(--rouge-soft); color: var(--rouge-ink); }
.pill.urgent  .pill-dot { background: var(--rouge); }
.pill.todo        { background: var(--terracotta-soft); color: var(--terracotta-ink); }
.pill.todo .pill-dot { background: var(--terracotta); }
.pill.waiting     { background: var(--amber-soft); color: var(--amber-ink); }
.pill.waiting .pill-dot { background: var(--amber); }
.pill.paid        { background: var(--sage-soft); color: var(--sage-ink); }
.pill.paid .pill-dot { background: var(--sage); }
.pill.archived    { background: #ECECEE; color: var(--slate); }
.pill.archived .pill-dot { background: var(--slate); }

/* ─── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600; font-size: 14px;
  transition: background .12s, border-color .12s, transform .08s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink); color: #fff;
  border-color: var(--ink);
}
.btn-primary:hover { background: #2A3040; border-color: #2A3040; }

.btn-terracotta {
  background: var(--terracotta); color: #fff;
  border-color: var(--terracotta);
}
.btn-terracotta:hover { background: #B14E36; border-color: #B14E36; }

.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

.btn-block { width: 100%; }
.btn-lg { padding: 16px 22px; font-size: 15px; border-radius: 16px; }
.btn-sm { padding: 8px 12px; font-size: 12.5px; border-radius: 10px; }

/* ─── Drawer ───────────────────────────────────────────── */
.drawer-backdrop {
  position: absolute; inset: 0;
  /* P0-css 13/05/2026 : fond opaque légèrement renforcé, backdrop-filter retiré (crash GPU). */
  background: rgba(20, 17, 13, 0.45);
  /* backdrop-filter: blur(2px); */
  z-index: 90;
  animation: fadeIn .2s ease;
}
.drawer {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92%;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  z-index: 91;
  box-shadow: 0 -16px 40px rgba(0,0,0,0.18);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp .26s cubic-bezier(.2,.8,.2,1);
}
.drawer-handle {
  width: 38px; height: 4px; border-radius: 2px;
  background: rgba(27,31,42,0.22);
  margin: 8px auto 0;
  flex-shrink: 0;
}
.drawer-content { overflow-y: auto; padding: 6px 0 24px; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes flashCopy {
  0%   { background: var(--surface); }
  20%  { background: var(--amber-soft); }
  60%  { background: var(--sage-soft); }
  100% { background: var(--surface); }
}
.flash-copy { animation: flashCopy 1.4s ease; }

/* ─── Code box (for paiement) ──────────────────────────── */
.codebox {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.codebox-segments {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.codebox-seg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
  transition: background .15s, border-color .15s;
  cursor: pointer;
}
.codebox-seg:hover { border-color: var(--line-strong); background: var(--surface-2); }
.codebox-seg.copied { border-color: var(--sage); background: var(--sage-soft); }
.codebox-seg .label {
  font-family: var(--font-display);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-3);
}
.codebox-seg .val {
  font-family: var(--font-mono);
  font-size: 17px; font-weight: 600;
  color: var(--ink);
}

/* segmented switch */
.segmented {
  display: inline-flex;
  background: var(--paper-soft);
  border-radius: 12px; padding: 3px;
  gap: 2px;
}
.segmented button {
  border: 0; background: transparent;
  padding: 7px 12px; border-radius: 9px;
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
}
.segmented button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* form fields */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field-label {
  font-family: var(--font-display);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-3); text-transform: uppercase;
}
.field-input, .field-select, .field-textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px; color: var(--ink);
  outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(27,31,42,0.08);
}
.field-input::placeholder { color: var(--ink-4); }

/* ─── Login pavés ──────────────────────────────────────── */
.login-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 0 24px;
}
.login-tile {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.login-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.login-tile .avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: #fff;
}
.login-tile .name {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  color: var(--ink);
}
.login-tile .role {
  font-size: 12px; color: var(--ink-3); margin-top: 2px;
}
.login-tile .stat {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  color: var(--ink-3);
}
.login-tile .stat.hot { color: var(--terracotta); }

/* PIN pad */
.pinpad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 24px;
}
.pin-key {
  height: 60px; border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600;
  color: var(--ink);
  transition: background .1s, transform .08s;
}
.pin-key:hover { background: var(--surface-2); }
.pin-key:active { transform: scale(0.96); }

.pin-dots {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 8px;
}
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  background: transparent;
  transition: background .15s;
}
.pin-dot.filled { background: var(--ink); border-color: var(--ink); }

/* ─── KPI cards ───────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.kpi-label {
  font-family: var(--font-display);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--ink-3); text-transform: uppercase;
}
.kpi-value {
  font-family: var(--font-display);
  font-weight: 700; font-size: 26px; line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.kpi-foot {
  font-size: 12px; color: var(--ink-3); margin-top: 2px;
}

/* hero KPI: Surcoût retards */
.kpi-hero {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #FDEFE6 0%, #F8DCCB 100%);
  border-color: var(--terracotta-line);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.kpi-hero .kpi-label { color: var(--terracotta-ink); }
.kpi-hero .kpi-value {
  font-size: 38px; color: var(--terracotta-ink);
  display: flex; align-items: baseline; gap: 6px;
}
.kpi-hero .kpi-value .emo { font-size: 28px; line-height: 1; }
.kpi-hero .kpi-foot { color: var(--terracotta-ink); opacity: 0.78; }

/* ─── Section heading ─────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 26px 24px 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ink-3); text-transform: uppercase;
}
.section-link {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}

/* ─── Fine row ────────────────────────────────────────── */
.fine-list { padding: 0 16px; }

.fine-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  /* .fine-row est un <button> : sans width 100%, il se réduit à son contenu
     et chaque carte de la liste a une largeur différente */
  width: 100%;
  padding: 14px 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  margin-bottom: 8px;
  transition: background .15s, transform .12s;
  cursor: pointer;
}
.fine-row:hover { background: var(--surface-2); }
.fine-row:active { transform: scale(0.99); }

.fine-thumb {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--paper-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.fine-thumb .initials {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: #fff;
}
.fine-thumb img { width: 100%; height: 100%; object-fit: cover; }

.fine-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fine-title {
  font-family: var(--font-display);
  font-weight: 600; font-size: 14.5px;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fine-sub {
  font-size: 12px; color: var(--ink-3);
  display: flex; gap: 6px; align-items: center;
}
.fine-sub .dot { width: 2.5px; height: 2.5px; border-radius: 50%; background: var(--ink-4); }

.fine-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex-shrink: 0;
}
.fine-amount {
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.fine-amount .strike {
  font-weight: 500; font-size: 12px;
  color: var(--ink-4);
  text-decoration: line-through;
  margin-right: 5px;
}
.fine-amount.danger { color: var(--terracotta); }

/* group header */
.group-head {
  padding: 18px 24px 8px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.group-head .label {
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
}
.group-head .label .count {
  background: var(--paper-soft);
  color: var(--ink-3);
  font-size: 11px;
  padding: 1px 7px; border-radius: 8px;
}
.group-head .total {
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* filter chip row */
.chip-row {
  display: flex; gap: 6px; padding: 4px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 7px 12px; border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip .ct {
  background: rgba(0,0,0,0.07);
  color: inherit;
  padding: 0 6px; border-radius: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .ct {
  background: rgba(255,255,255,0.18);
}

/* ─── Detail drawer body ──────────────────────────────── */
.detail-head {
  padding: 18px 24px 8px;
}
.detail-meta {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 6px;
}
.detail-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.15;
}
.detail-amount-row {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 12px;
}
.detail-amount-row .price {
  font-family: var(--font-display);
  font-weight: 700; font-size: 36px;
  color: var(--ink);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.detail-amount-row .price.danger { color: var(--terracotta); }
.detail-amount-row .strike {
  font-family: var(--font-display);
  font-weight: 500; font-size: 17px;
  color: var(--ink-4); text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.detail-sec {
  background: var(--surface);
  margin: 12px 16px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  padding: 14px 16px;
}
.detail-sec-title {
  font-family: var(--font-display);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.detail-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; gap: 16px;
}
.detail-row + .detail-row { border-top: 1px dashed var(--line-soft); }
.detail-row .lbl { color: var(--ink-3); font-size: 13px; }
.detail-row .val {
  color: var(--ink); font-size: 14px; font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* portal selector */
.portal-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 4px;
  background: var(--paper-soft);
  border-radius: 14px;
}
.portal-tab {
  border: 0; background: transparent;
  padding: 10px 8px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center;
}
.portal-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.portal-tab .lbl-sub { font-size: 10.5px; font-weight: 500; color: var(--ink-3); }

/* attachments grid */
.docs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 10px;
}
.doc-tile {
  aspect-ratio: 1;
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  position: relative;
  overflow: hidden;
}
.doc-tile.add {
  border-style: dashed;
  background: transparent;
}

/* ─── Timeline ────────────────────────────────────────── */
.tl { display: flex; flex-direction: column; gap: 0; }
.tl-row { display: grid; grid-template-columns: 22px 1fr; gap: 12px; min-height: 56px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tl-line { flex: 1; width: 2px; background: var(--line); margin-top: 6px; min-height: 18px; }
.tl-body { padding: 2px 0 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tl-label { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); }
.tl-delta {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  padding: 2px 8px; border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.tl-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.tl-meta .dot { width: 2.5px; height: 2.5px; border-radius: 50%; background: var(--ink-4); }
.tl-doc {
  margin-top: 6px;
  display: grid; grid-template-columns: 40px 1fr 28px; gap: 10px; align-items: center;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.tl-doc-thumb {
  width: 40px; height: 40px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.tl-doc-thumb svg { width: 22px; height: 22px; }
.tl-doc-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tl-doc-label {
  font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-doc-sub { font-size: 11px; color: var(--ink-3); }
.tl-doc-btn {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
}

/* sticky CTA bar in drawer */
.cta-bar {
  position: sticky; bottom: 0;
  background: linear-gradient(180deg, rgba(244,239,229,0) 0%, var(--paper) 24%);
  padding: 18px 16px 18px;
  display: flex; gap: 8px;
}

/* ─── Modale nouvelle amende ──────────────────────────── */
.modal-backdrop {
  position: absolute; inset: 0;
  /* P0-css 13/05/2026 : fond opaque, backdrop-filter retiré (crash GPU). */
  background: rgba(20, 17, 13, 0.60);
  /* backdrop-filter: blur(2px); */
  z-index: 90;
  animation: fadeIn .2s ease;
}
.modal {
  position: absolute; left: 0; right: 0; bottom: 0; top: 32px;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  z-index: 91;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp .26s cubic-bezier(.2,.8,.2,1);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 4px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 17px;
}
.modal-body { flex: 1; overflow-y: auto; padding: 0 20px 24px; }

/* OCR viewfinder — polished version */
.scan-stage {
  margin: 8px 16px 16px;
  border-radius: 22px;
  background: #14110D;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
/* Fake camera "feed" — papery letter shape behind viewfinder */
.scan-stage::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(244,239,229,0.10), transparent 70%),
    radial-gradient(ellipse 30% 20% at 30% 30%, rgba(255,255,255,0.05), transparent),
    #1A1612;
}
.scan-paper {
  position: absolute;
  top: 8%; left: 14%; right: 14%; bottom: 8%;
  background: #fdfaf3;
  padding: 14px 16px 12px;
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  color: #2a2a2a;
  transform: perspective(700px) rotateX(8deg) rotateY(-4deg) rotate(-1.4deg);
  box-shadow: 0 18px 36px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.25);
  display: flex; flex-direction: column; gap: 6px;
  overflow: hidden;
}
.scan-paper::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, transparent 40%, rgba(0,0,0,0.08) 100%);
  pointer-events: none;
}
.scan-paper-banner {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #d8d0c2;
  padding-bottom: 5px;
}
.scan-paper-rf { display: flex; align-items: center; gap: 6px; }
.rf-mark {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(180deg, #1F3D7A 50%, #C9302C 50%);
  color: #fff; font-weight: 700; font-size: 7px;
  display: flex; align-items: center; justify-content: center;
}
.scan-paper-stamp { text-align: right; line-height: 1.2; }
.scan-paper-title {
  font-weight: 700; font-size: 12px; letter-spacing: 0.04em;
  color: #1B1F2A; text-align: center;
  border: 1.2px solid #1B1F2A;
  padding: 4px 8px; margin: 2px 18px;
}
.scan-paper-subtitle {
  font-size: 6.5px; color: #555; text-align: center; font-style: italic;
  margin-top: 2px;
}
.scan-paper-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; font-size: 7.5px;
  border-bottom: 1px dotted #ccc1a8;
  padding: 2px 0;
}
.scan-paper-row .k { color: #6a6a6a; }
.scan-paper-row .v { color: #1B1F2A; font-weight: 600; font-variant-numeric: tabular-nums; }
.scan-paper-amount {
  display: flex; justify-content: space-between; align-items: center;
  background: #f4ecd9; border: 1px solid #d8c896;
  padding: 6px 10px; margin: 4px 0 2px;
}
.scan-paper-tele {
  border: 1px dashed #1B1F2A;
  padding: 5px 8px; margin-top: 2px;
}
.tele-segs {
  display: flex; gap: 4px; align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 600; color: #1B1F2A;
  letter-spacing: 0.04em; justify-content: center;
}
.scan-paper-bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: auto; padding-top: 4px; gap: 8px;
}
.scan-paper-barcode {
  display: flex; gap: 1px; height: 22px; align-items: stretch; flex: 1;
}
.scan-paper-qr {
  width: 28px; height: 28px; padding: 2px;
  background: #fff; border: 1px solid #1B1F2A;
}
.qr-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 1px; width: 100%; height: 100%;
}
.qr-grid > span { display: block; }

/* Viewfinder corner brackets */
.scan-viewfinder {
  position: absolute;
  top: 14%; left: 10%; right: 10%; bottom: 14%;
  pointer-events: none;
  z-index: 2;
}
.vf-corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2.5px solid #fff;
}
.vf-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.vf-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.vf-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.vf-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }

/* OCR scan line */
.vf-scanline {
  position: absolute;
  left: 4px; right: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--terracotta), transparent);
  box-shadow: 0 0 16px 4px rgba(201,87,60,0.6);
  animation: scanline 2.6s ease-in-out infinite;
}
@keyframes scanline {
  0%   { top: 6%; opacity: 0; }
  10%  { opacity: 1; }
  50%  { top: 90%; opacity: 1; }
  60%  { opacity: 0; }
  100% { top: 90%; opacity: 0; }
}

/* Detected fields — pulse pills over the paper */
.vf-detected {
  position: absolute;
  background: rgba(92,138,110,0.92);
  color: #fff;
  border-radius: 6px;
  padding: 3px 7px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 9.5px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  animation: detectPop 2.6s ease-in-out infinite;
  white-space: nowrap;
}
.vf-detected::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1.5px solid rgba(92,138,110,0.7);
  border-radius: 8px;
  animation: detectRing 2.6s ease-in-out infinite;
}
@keyframes detectPop {
  0%, 30% { opacity: 0; transform: scale(0.6); }
  45%, 95% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes detectRing {
  0%, 30% { opacity: 0; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.05); }
  55% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1); }
}
.vf-detected.d1 { top: 18%; left: 12%; animation-delay: 0s; }
.vf-detected.d2 { top: 32%; right: 14%; animation-delay: 0.25s; background: rgba(201,144,36,0.92); }
.vf-detected.d2::before { border-color: rgba(201,144,36,0.7); }
.vf-detected.d3 { bottom: 22%; left: 16%; animation-delay: 0.5s; }
.vf-detected.d4 { bottom: 8%; right: 20%; animation-delay: 0.75s; background: var(--terracotta); }
.vf-detected.d4::before { border-color: var(--terracotta); }

/* Scan status / hint bar */
.scan-status {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  z-index: 3;
  /* P0-css 13/05/2026 : fond plus opaque, backdrop-filter retiré (crash GPU). */
  background: rgba(20,17,13,0.92);
  /* backdrop-filter: blur(12px); */
  /* -webkit-backdrop-filter: blur(12px); */
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  display: flex; align-items: center; gap: 8px;
}
.scan-status .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 0 rgba(92,138,110,0.7);
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(92,138,110,0.7); }
  70% { box-shadow: 0 0 0 8px rgba(92,138,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(92,138,110,0); }
}
.scan-status .lbl { font-family: var(--font-display); font-weight: 600; }
.scan-status .meta { opacity: 0.7; font-family: var(--font-mono); font-size: 11px; margin-left: auto; }

/* Top hint badge */
.scan-hint {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  z-index: 3;
  display: flex; gap: 8px;
}
.scan-hint .badge {
  /* P0-css 13/05/2026 : fond plus opaque, backdrop-filter retiré (crash GPU). */
  background: rgba(20,17,13,0.90);
  /* backdrop-filter: blur(10px); */
  /* -webkit-backdrop-filter: blur(10px); */
  color: #fff;
  border-radius: 9px;
  padding: 5px 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 11px;
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; gap: 5px;
}

.scan-actions {
  display: flex; gap: 8px;
  padding: 4px 20px 0;
  align-items: center; justify-content: center;
}
.scan-shutter {
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff;
  border: 4px solid var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform .08s;
}
.scan-shutter:active { transform: scale(0.94); }
.scan-side {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}

/* OCR field-by-field reveal in form (used after scan) */
@keyframes ocrFill {
  0% { background: var(--surface); }
  20% { background: var(--sage-soft); }
  100% { background: var(--surface); }
}
.ocr-just-filled { animation: ocrFill 1.6s ease-out; }

/* ─── Reminders / Échéancier ─────────────────────────── */
.reminder-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 14px;
  align-items: center;
  position: relative;
}
.reminder-card .rail {
  width: 4px; align-self: stretch;
  border-radius: 2px;
  background: var(--slate-soft);
}
.reminder-card.danger .rail { background: var(--terracotta); }
.reminder-card.warn .rail { background: var(--amber); }
.reminder-card.ok .rail { background: var(--sage); }
.reminder-card .when {
  font-family: var(--font-display);
  font-weight: 700; font-size: 13px;
  color: var(--ink);
}
.reminder-card .when .days {
  display: block;
  font-size: 22px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.reminder-card.danger .when, .reminder-card.danger .when .days { color: var(--terracotta); }
.reminder-card.warn .when, .reminder-card.warn .when .days { color: var(--amber-ink); }
.reminder-card .body { min-width: 0; }
.reminder-card .body .ttl {
  font-family: var(--font-display);
  font-weight: 600; font-size: 14px;
  color: var(--ink);
}
.reminder-card .body .sub {
  font-size: 12.5px; color: var(--ink-3);
  margin-top: 2px;
}
.reminder-card .body .meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 11.5px; color: var(--ink-3);
  margin-top: 4px;
}

/* Calendar strip */
.cal-strip {
  display: flex; gap: 6px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cal-strip::-webkit-scrollbar { display: none; }
.cal-day {
  flex-shrink: 0;
  min-width: 50px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
  position: relative;
}
.cal-day .dow {
  font-size: 10.5px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  font-family: var(--font-display); font-weight: 600;
}
.cal-day .dnum {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cal-day.has-due { border-color: var(--terracotta-line); background: var(--terracotta-soft); }
.cal-day.has-due .dnum { color: var(--terracotta-ink); }
.cal-day.today { background: var(--ink); border-color: var(--ink); }
.cal-day.today .dow, .cal-day.today .dnum { color: #fff; }
.cal-day .pip {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--terracotta);
}
.cal-day.today .pip { background: #fff; }
.cal-day.has-due .pip { background: var(--terracotta-ink); }

.toast {
  position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 12px;
  font-family: var(--font-display); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-2);
  z-index: 200;
  animation: toastIn .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ─── Justificatifs ───────────────────────────────────── */
.justif-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 0 20px;
}
.justif-tile {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s;
}
.justif-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.justif-thumb {
  aspect-ratio: 4/5;
  background: var(--paper-soft);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.justif-thumb svg { color: var(--ink-3); }
.justif-thumb .badge {
  position: absolute; top: 8px; left: 8px;
}
.justif-meta { padding: 10px 12px; }
.justif-meta .name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 13px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.justif-meta .meta {
  font-size: 11.5px; color: var(--ink-3); margin-top: 2px;
}

/* avatars */
.avatar-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.avatar-stack {
  display: flex;
}
.avatar-stack .avatar-circle {
  border: 2px solid var(--paper);
  margin-left: -8px;
}
.avatar-stack .avatar-circle:first-child { margin-left: 0; }

/* utility */
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11.5px; }
.semibold { font-weight: 600; }
.bold { font-weight: 700; }
.ink-3 { color: var(--ink-3); }

.divider-soft { height: 1px; background: var(--line-soft); margin: 8px 16px; }

/* page footer note */
.note-callout {
  margin: 10px 20px 0;
  padding: 12px 14px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  border-radius: 14px;
  font-size: 12.5px; color: var(--amber-ink);
  display: flex; gap: 10px; align-items: flex-start;
}
.note-callout svg { flex-shrink: 0; margin-top: 2px; }

/* === DESKTOP CANVAS LAYOUT ====================================== */
.canvas {
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.canvas-title {
  font-family: var(--font-display);
  color: rgba(255,255,255,0.96);
  text-align: center;
  margin: 0 0 4px;
}
.canvas-title .eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  display: block; margin-bottom: 8px;
}
.canvas-title h1 {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0; color: rgba(255,255,255,0.96);
}
.canvas-title p {
  font-size: 14px; color: rgba(255,255,255,0.6);
  max-width: 560px; margin: 8px auto 0;
}
.phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 412px);
  gap: 56px 36px;
  justify-content: center;
  align-items: start;
}
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone-caption {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.78);
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.phone-caption .ix {
  font-size: 11px; color: rgba(255,255,255,0.45);
  font-variant-numeric: tabular-nums;
}


/* ═══════ DESKTOP SHELL ═══════════════════════════════════════ */
.desktop-shell {
  width: 1280px;
  height: 820px;
  background: var(--paper);
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 60px 120px rgba(0,0,0,0.55), 0 24px 48px rgba(0,0,0,0.4);
  display: grid;
  grid-template-columns: 248px 1fr 380px;
  overflow: hidden;
  position: relative;
  font-family: var(--font-body);
}
.dt-sidebar {
  background: var(--paper-soft);
  border-right: 1px solid var(--line-soft);
  padding: 18px 14px 14px;
  display: flex; flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.dt-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 14px;
}
.dt-brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.dt-brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px;
  color: var(--ink); letter-spacing: -0.01em;
}
.dt-brand-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.dt-nav {
  display: flex; flex-direction: column; gap: 1px;
}
.dt-nav button {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  border: 0; background: transparent; color: var(--ink-2);
  font-family: var(--font-display); font-size: 13.5px; font-weight: 500;
  width: 100%; text-align: left;
  transition: background .12s;
}
.dt-nav button:hover { background: rgba(27,31,42,0.04); }
.dt-nav button[aria-current="page"] {
  background: var(--surface);
  color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.dt-nav button svg { color: var(--ink-3); }
.dt-nav button[aria-current="page"] svg { color: var(--terracotta); }
.dt-nav button span:nth-child(2) { flex: 1; }
.dt-nav-badge {
  background: var(--terracotta); color: #fff;
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 7px;
  font-variant-numeric: tabular-nums;
}

.dt-nav-section {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); padding: 18px 10px 6px;
}
.dt-members { display: flex; flex-direction: column; gap: 1px; }
.dt-member {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 8px;
}
.dt-member:hover { background: rgba(27,31,42,0.04); }
.dt-member-name {
  flex: 1; font-size: 13px; color: var(--ink-2);
  font-family: var(--font-display); font-weight: 500;
}
.dt-member-stat {
  font-size: 11.5px; color: var(--ink-3);
  font-family: var(--font-display); font-weight: 600;
}

.dt-share {
  margin-top: auto;
  padding: 10px;
  background: rgba(27,31,42,0.04);
  border-radius: 12px;
}
.dt-share-label {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 6px;
}
.dt-share-row { display: flex; gap: 6px; align-items: center; }
.dt-share-link {
  flex: 1;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 8px; border-radius: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* List column */
.dt-list-col {
  overflow-y: auto;
  padding: 22px 26px 28px;
}
.dt-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.dt-header-eyebrow { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; font-family: var(--font-display); }
.dt-header-title {
  margin: 4px 0 0;
  font-family: var(--font-display); font-weight: 700; font-size: 28px;
  letter-spacing: -0.02em; color: var(--ink);
}
.dt-header-search {
  display: flex; align-items: center; gap: 8px;
  width: 360px; max-width: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink-3);
}
.dt-header-search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 14px; color: var(--ink);
}
.dt-kbd {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--paper-soft);
  padding: 2px 6px; border-radius: 5px;
  color: var(--ink-3);
}

.dt-home { display: flex; flex-direction: column; gap: 4px; }
.dt-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.dt-kpis .kpi-hero .kpi-value { font-size: 44px; }
.dt-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 0 10px;
}
.dt-section-head h2 {
  margin: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--ink); letter-spacing: -0.01em;
}

.dt-rows {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 4px;
}
.dt-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.dt-row:hover { border-color: var(--line); background: var(--surface-2); }
.dt-row.active { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27,31,42,0.08); }
.dt-row-thumb {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.dt-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dt-row-title {
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink);
}
.dt-row-sub { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.dt-row-sub .dot { width: 2.5px; height: 2.5px; border-radius: 50%; background: var(--ink-4); }
.dt-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* Table view */
.dt-table { width: 100%; border-collapse: collapse; }
.dt-table thead th {
  text-align: left;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.dt-table tbody tr {
  cursor: pointer;
  transition: background .1s;
}
.dt-table tbody tr:hover { background: var(--surface); }
.dt-table tbody tr.active { background: var(--surface); box-shadow: inset 3px 0 0 var(--terracotta); }
.dt-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  vertical-align: middle;
}
.dt-cell-main { display: flex; flex-direction: column; gap: 2px; }
.dt-cell-title { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.dt-cell-sub { font-size: 12px; color: var(--ink-3); }
.dt-cell-mono { font-family: var(--font-display); color: var(--ink-2); font-size: 13px; }

/* Justifs grid */
.dt-justifs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dt-justif {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s;
}
.dt-justif:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.dt-justif-thumb {
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

/* Detail column */
.dt-detail-col {
  background: var(--surface-2);
  border-left: 1px solid var(--line-soft);
  overflow-y: auto;
}
.dt-detail-head {
  display: flex; align-items: center; padding: 14px 18px;
  position: sticky; top: 0; background: var(--surface-2);
  z-index: 5;
  border-bottom: 1px solid var(--line-soft);
}
.dt-detail .detail-sec {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
}

.dt-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  text-align: center;
  padding: 48px 32px;
  color: var(--ink-3);
}
.dt-empty-mark { font-size: 38px; margin-bottom: 12px; }
.dt-empty-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.dt-empty-sub { font-size: 13px; color: var(--ink-3); margin-top: 6px; max-width: 260px; line-height: 1.5; }

/* Desktop modal wrap */
.dt-modal-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.dt-modal-backdrop {
  position: absolute; inset: 0;
  /* P0-css 13/05/2026 : fond opaque, backdrop-filter retiré (crash GPU). */
  background: rgba(20,17,13,0.60);
  /* backdrop-filter: blur(2px); */
}
.dt-modal-shell {
  position: relative;
  width: 480px; height: 720px;
  background: var(--paper);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.4);
}
.dt-modal-shell .modal {
  position: absolute; inset: 0; top: 0; border-radius: 22px;
  animation: none;
}
.dt-modal-shell .modal-backdrop { display: none; }

/* Desktop wrap label */
.desktop-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   AUTH SAAS — écrans non-connectés (pivot 11/05/2026)
   ═══════════════════════════════════════════════════════════════════ */

/* Reset du body sombre + frame iPhone qui s'applique partout en mode démo */
/* Quand on est sur landing/auth, .phone-content prend tout l'écran */

.btn-link {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background .15s;
}
.btn-link:hover { background: var(--surface-2); color: var(--ink); }
.btn-link-primary {
  background: var(--marianne, #000091);
  color: white !important;
}
.btn-link-primary:hover { background: var(--marianne-ink, #00006B); color: white !important; }

.btn-saas {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s, transform .08s;
}
.btn-saas:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-strong); }
.btn-saas:active { transform: translateY(1px); }
.btn-saas:disabled { opacity: 0.55; cursor: wait; }
.btn-saas-block { width: 100%; }
.btn-saas-lg { padding: 16px 24px; font-size: 15px; }
.btn-saas-primary {
  background: var(--marianne, #000091); color: white;
  border-color: var(--marianne, #000091);
}
.btn-saas-primary:hover:not(:disabled) {
  background: var(--marianne-ink, #00006B);
  border-color: var(--marianne-ink, #00006B);
}

/* ─── Landing ─── */
.hero-saas {
  max-width: 1180px; margin: 0 auto;
  padding: 80px 24px 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-saas .hero-h1 {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 22px;
}
.hero-saas .hero-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 36px;
  max-width: 480px;
}
.hero-reassurance {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-3);
}
.hero-illustration {
  aspect-ratio: 4/3.4;
  background: linear-gradient(to bottom right, var(--paper-soft, #ECECFD), var(--surface-2, #F8F8FF));
  border-radius: 24px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  overflow: hidden;
}

/* ─── Piliers ─── */
.pillars-saas {
  max-width: 1180px; margin: 0 auto;
  padding: 56px 24px;
  border-top: 1px solid var(--line);
}
.pillars-saas h2 {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 36px;
}
.pillars-grid-saas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.pillar-saas {
  padding-top: 8px;
  border-top: 2px solid var(--ink);
}
.pillar-saas .pillar-num {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  color: var(--marianne, #000091);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.pillar-saas h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.2;
}
.pillar-saas p {
  font-size: 15px; line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}
.pillar-saas p strong { font-weight: 600; color: var(--ink); }

/* ─── Footer ─── */
.footer-saas {
  margin-top: 80px;
  padding: 36px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: var(--ink-3);
  max-width: 1180px;
  margin-left: auto; margin-right: auto;
}
.footer-saas nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-saas nav a { color: var(--ink-2); text-decoration: none; }
.footer-saas nav a:hover { color: var(--marianne, #000091); text-decoration: underline; }

/* ─── Auth pages (signup, login, reset, sent) ─── */
.auth-page-saas {
  min-height: 600px;
  padding: 56px 24px 80px;
  display: flex; flex-direction: column;
  align-items: center;
}
.auth-card-saas {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 1px 2px rgba(27, 31, 42, 0.04), 0 2px 6px rgba(27, 31, 42, 0.04);
  padding: 36px 32px;
}
.auth-brand-row {
  display: flex; justify-content: center;
  margin-bottom: 28px;
}
.auth-card-saas h1 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 6px;
  text-align: center;
}
.auth-card-saas .sub {
  font-size: 14.5px;
  color: var(--ink-3);
  text-align: center;
  margin: 0 0 28px;
  line-height: 1.5;
}
.field-saas { margin-bottom: 16px; }
.field-saas label {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field-saas input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field-saas input:hover { border-color: var(--line-strong); }
.field-saas input:focus {
  outline: none;
  border-color: var(--marianne, #000091);
  box-shadow: 0 0 0 3px var(--marianne-soft, #ECECFD);
}
.field-saas .help-saas {
  font-size: 12.5px; color: var(--ink-3);
  margin-top: 6px; line-height: 1.4;
}
.pwd-toggle {
  position: absolute;
  right: 10px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  border: 0; background: transparent;
  border-radius: 6px;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.pwd-toggle:hover { background: var(--surface-2); }

.divider-saas {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0;
  font-family: var(--font-display);
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.divider-saas::before, .divider-saas::after {
  content: ""; flex: 1; height: 1px;
  background: var(--line);
}
.error-saas {
  background: var(--rouge-soft);
  color: var(--rouge-ink);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 16px;
  font-weight: 500;
  border: 1px solid rgba(206, 5, 0, 0.18);
}
.tos-saas {
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.5;
}
.tos-saas a { color: var(--ink-2); text-decoration: underline; }
.auth-footer-saas {
  text-align: center;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.auth-footer-saas a {
  color: var(--marianne, #000091);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer-saas a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 880px) {
  .hero-saas {
    grid-template-columns: 1fr;
    padding: 56px 20px 32px;
    gap: 36px;
  }
  .hero-saas .hero-h1 { font-size: 44px; }
  .pillars-grid-saas { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .auth-card-saas { padding: 28px 22px; border-radius: 12px; }
  .hero-saas .hero-h1 { font-size: 36px; letter-spacing: -0.025em; }
}
