/* The Warehouse — Espace Pro · Van-optimized dark theme
   - Mobile-first, one-handed, outdoor visibility
   - Tap targets ≥ 56px
   - Sticky header + bottom nav (thumb zone)
*/
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
:root{
  --bg:#0A0A0B;
  --surface:#161618;
  --surface-2:#1E1E21;
  --surface-3:#26262A;
  --line:rgba(255,255,255,.08);
  --line-2:rgba(255,255,255,.14);
  --text:#FAFAFA;
  --text-2:#B8B8BD;
  --text-3:#7E7E85;
  --text-4:#5A5A60;
  --accent:#FFFFFF;
  --ok:#1D1D1F;
  --warn:#86868B;
  --err:#1D1D1F;
  --info:#1D1D1F;
  /* Aliases for admin sub-pages migrated from espace-client/_app.css.
     Map "light theme" variable names → dark equivalents. */
  --gray-50:var(--surface-2);
  --gray-100:var(--surface-2);
  --gray-200:var(--line);
  --gray-300:var(--line-2);
  --brand:var(--text);
}
/* ── Thème JOUR (clair) — activé via body.tw-light (toggle dans le header) ── */
body.tw-light{
  --bg:#FBFBFD;
  --surface:#FFFFFF;
  --surface-2:#F5F5F7;
  --surface-3:#EDEDF0;
  --line:rgba(0,0,0,.09);
  --line-2:rgba(0,0,0,.14);
  --text:#1D1D1F;
  --text-2:#4B5563;
  --text-3:#6E6E73;
  --text-4:#86868B;
  --accent:#1D1D1F;
  --ok:#1D1D1F;
  --warn:#86868B;
  --err:#1D1D1F;
  --info:#1D1D1F;
  --gray-50:#F5F5F7;
  --gray-100:#EDEDF0;
  --gray-200:#E8E8ED;
  --gray-300:rgba(0,0,0,.12);
  --brand:#1D1D1F;
}
html,body{background:var(--bg);color:var(--text);transition:background .25s ease,color .25s ease}
/* Toggle thème dans le header */
.hdr-theme{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:transparent;border:1px solid var(--line-2);color:var(--text);cursor:pointer;margin-right:8px}
.hdr-theme .material-icons-outlined{font-size:19px}
html{scroll-behavior:smooth;background:var(--bg);height:100%}
body{
  font-family:'Space Grotesk',system-ui,-apple-system,'Segoe UI',sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  min-height:100dvh;
  padding-bottom:88px;
  padding-bottom:calc(88px + env(safe-area-inset-bottom));
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
button{cursor:pointer;border:0;background:none;font-family:inherit;color:inherit;font-size:inherit}
input,select,textarea{font-family:inherit}
::selection{background:var(--text);color:var(--bg)}
.material-icons-outlined{font-feature-settings:'liga';user-select:none}

/* ── HEADER (sticky) ─────────────────────────────────── */
.hdr{
  position:sticky;top:0;z-index:50;
  background:rgba(10,10,11,.85);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid var(--line);
  padding-top:env(safe-area-inset-top);
}
.hdr-in{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;gap:12px}
.hdr-brand{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--text);text-decoration:none}
.hdr-brand img{height:22px;width:auto;filter:brightness(0) invert(1)}
.hdr-home{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:9999px;font-size:12.5px;font-weight:700;color:var(--text);text-decoration:none;transition:all .15s ease}
.hdr-home:hover{background:var(--text);color:var(--bg);border-color:var(--text)}
.hdr-home .material-icons-outlined{font-size:16px}
@media(max-width:540px){.hdr-home-label{display:none}.hdr-home{padding:8px;width:36px;height:36px;justify-content:center}.hdr-in{padding:14px 14px}}
.hdr-chip{
  display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:50%;
  background:var(--surface-2);border:1px solid var(--line-2);
  font-size:13px;font-weight:800;color:var(--text);
}

/* ── PAGE HEADER ─────────────────────────────────────── */
main{padding:0 18px;max-width:560px;margin:0 auto}
.page-hdr{padding:24px 0 18px}
.page-hdr h1{font-size:28px;font-weight:800;letter-spacing:-.03em;margin-bottom:4px}
.page-hdr .sub{font-size:14px;color:var(--text-3);font-weight:500}
.page-hdr .stats{display:flex;gap:10px;margin-top:16px}
.stat{flex:1;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px 12px}
.stat-val{font-size:22px;font-weight:800;letter-spacing:-.02em;line-height:1}
.stat-lbl{font-size:10.5px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.08em;margin-top:6px}

/* ── INTERVENTION CARD ───────────────────────────────── */
.section-lbl{
  font-size:11px;font-weight:800;color:var(--text-3);
  text-transform:uppercase;letter-spacing:.1em;
  margin:22px 4px 12px;
  display:flex;align-items:center;gap:8px;
}
.section-lbl::after{content:"";flex:1;height:1px;background:var(--line);margin-left:6px}

.iv{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  margin-bottom:10px;
  overflow:hidden;
  transition:border-color .2s ease;
}
.iv.open{border-color:var(--line-2)}
.iv-top{display:flex;align-items:center;gap:12px;padding:16px 16px;min-height:64px;cursor:pointer}
.iv-time{
  flex-shrink:0;width:54px;text-align:center;
  font-family:'Space Grotesk',ui-monospace,monospace;
  font-weight:700;font-size:13px;letter-spacing:.02em;
  color:var(--text-2);
}
.iv-time .h{font-size:18px;color:var(--text);display:block;line-height:1}
.iv-time .ampm{font-size:10px;color:var(--text-4);margin-top:2px;display:block}
.iv-body{flex:1;min-width:0}
.iv-client{font-size:15px;font-weight:700;color:var(--text);margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iv-svc{font-size:12.5px;color:var(--text-3);line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iv-status{
  flex-shrink:0;
  font-size:10.5px;font-weight:800;
  padding:4px 9px;border-radius:9999px;
  text-transform:uppercase;letter-spacing:.05em;
  background:var(--surface-3);color:var(--text-2);
}
.iv-status.pending{background:rgba(29,29,31,.18);color:#D2D2D7}
.iv-status.confirmed{background:rgba(29,29,31,.16);color:#D2D2D7}
.iv-status.assigned{background:rgba(29,29,31,.16);color:#D2D2D7}
.iv-status.en_route{background:rgba(29,29,31,.18);color:#D2D2D7}
.iv-status.on_site{background:rgba(29,29,31,.22);color:#E8E8ED}
.iv-status.in_progress{background:rgba(29,29,31,.22);color:#E8E8ED}
.iv-status.completed{background:rgba(29,29,31,.16);color:#D2D2D7}
.iv-status.paid{background:rgba(29,29,31,.25);color:#E8E8ED}
.iv-status.cancelled{background:rgba(29,29,31,.16);color:#D2D2D7}
.iv-status-new{
  background:#FAFAFA !important;color:#0A0A0B !important;
  animation:newPulse 1.6s ease-in-out infinite;
  font-weight:800 !important;
}
@keyframes newPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(250,250,250,.5)}
  50%{box-shadow:0 0 0 6px rgba(250,250,250,0)}
}

.iv-detail{display:none;border-top:1px solid var(--line);padding:14px 16px 18px}
.iv.open .iv-detail{display:block}

/* address row */
.iv-addr{
  display:flex;align-items:flex-start;gap:10px;
  font-size:13.5px;color:var(--text-2);line-height:1.45;
  padding:10px 12px;background:var(--surface-2);border-radius:12px;margin-bottom:12px;
}
.iv-addr .material-icons-outlined{font-size:18px;color:var(--text-3);flex-shrink:0;margin-top:1px}

/* quick action buttons */
.iv-quick{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}
.iv-quick-btn{
  display:flex;align-items:center;justify-content:center;gap:8px;
  min-height:56px;
  background:var(--surface-2);border:1px solid var(--line-2);
  border-radius:14px;
  font-size:14px;font-weight:700;color:var(--text);
  transition:background .15s ease, transform .1s ease;
}
.iv-quick-btn:active{background:var(--surface-3);transform:scale(.97)}
.iv-quick-btn .material-icons-outlined{font-size:20px}
.iv-quick-btn.tel{background:#1D1D1F;border-color:#1D1D1F33;color:#D2D2D7}
.iv-quick-btn.tel:active{background:#1D1D1F}
.iv-quick-btn.map{background:#1D1D1F;border-color:#1D1D1F33;color:#D2D2D7}
.iv-quick-btn.map:active{background:#1D1D1F}

/* meta KV */
.iv-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}
.iv-meta-row{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:8px 12px}
.iv-meta-row .k{font-size:10px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.iv-meta-row .v{font-size:13px;font-weight:700;color:var(--text);font-feature-settings:'tnum';line-height:1.2;word-break:break-word}

/* status action buttons */
.iv-actions{display:flex;flex-direction:column;gap:8px}
.iv-action{
  display:flex;align-items:center;justify-content:center;gap:8px;
  min-height:56px;
  background:var(--text);color:var(--bg);
  border-radius:14px;font-size:15px;font-weight:800;letter-spacing:.01em;
  transition:transform .1s ease, opacity .15s ease;
}
.iv-action:active{transform:scale(.98);opacity:.92}
.iv-action.secondary{background:var(--surface-3);color:var(--text);border:1px solid var(--line-2)}
.iv-action.danger{background:#1D1D1F;color:#D2D2D7;border:1px solid #1D1D1F33}
.iv-action .material-icons-outlined{font-size:20px}
.iv-action[disabled]{opacity:.4;pointer-events:none}
.iv-action.is-tracking{background:#fff;color:#000;border:1px solid #fff;position:relative}
.iv-action.is-tracking::before{content:'';position:absolute;top:50%;left:14px;transform:translateY(-50%);width:8px;height:8px;border-radius:50%;background:#000;animation:tw-pulse 1.4s ease infinite}
@keyframes tw-pulse{0%,100%{opacity:1;transform:translateY(-50%) scale(1)}50%{opacity:.4;transform:translateY(-50%) scale(1.3)}}
.iv-action.is-tracking .material-icons-outlined{visibility:hidden}

/* checklist */
.iv-checklist{margin-top:14px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.iv-checklist h5{font-size:11px;font-weight:800;color:var(--text-3);text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.iv-checklist-progress{
  font-family:'Space Grotesk',ui-monospace,monospace;
  font-size:11px;font-weight:700;
  background:var(--surface-3);color:var(--text-2);
  padding:3px 8px;border-radius:9999px;
  transition:all .2s ease;
}
.iv-checklist-progress-full{background:#1D1D1F;color:#E8E8ED}
.iv-check{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:13.5px;color:var(--text-2);border-bottom:1px solid var(--line)}
.iv-check:last-child{border-bottom:0}
.iv-check input[type=checkbox]{
  appearance:none;-webkit-appearance:none;
  width:22px;height:22px;border-radius:6px;
  border:1.5px solid var(--text-4);background:transparent;
  flex-shrink:0;cursor:pointer;position:relative;
}
.iv-check input[type=checkbox]:checked{background:var(--ok);border-color:var(--ok)}
.iv-check input[type=checkbox]:checked::after{
  content:"";position:absolute;left:6px;top:2px;width:6px;height:11px;
  border:solid #0A0A0B;border-width:0 2.5px 2.5px 0;transform:rotate(45deg);
}
.iv-check input[type=checkbox]:checked + span{color:var(--text-4);text-decoration:line-through}

/* empty state */
.empty{
  text-align:center;padding:60px 24px;
  background:var(--surface);border:1px dashed var(--line-2);
  border-radius:18px;margin-bottom:16px;
}
.empty .material-icons-outlined{font-size:44px;color:var(--text-4);margin-bottom:12px}
.empty .t{font-size:16px;font-weight:700;color:var(--text);margin-bottom:6px}
.empty .s{font-size:13.5px;color:var(--text-3);line-height:1.5}

/* loading */
.skel{height:80px;background:linear-gradient(90deg,var(--surface) 0%,var(--surface-2) 50%,var(--surface) 100%);background-size:200% 100%;border-radius:18px;margin-bottom:10px;animation:shimmer 1.4s linear infinite}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ── BOTTOM NAV ──────────────────────────────────────── */
.bnav{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  background:rgba(10,10,11,.92);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);
}
.bnav-in{display:flex;gap:2px;max-width:780px;margin:0 auto;padding:8px 8px 6px;overflow-x:auto;scrollbar-width:none}
.bnav-in::-webkit-scrollbar{display:none}
.bnav a{
  flex:0 0 auto;min-width:62px;display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:8px 4px;border-radius:12px;
  font-size:10.5px;font-weight:700;color:var(--text-3);
  letter-spacing:.02em;
  transition:color .15s ease;
}
.bnav a .material-icons-outlined{font-size:24px}
.bnav a.active{color:var(--text)}
.bnav a:active{background:var(--surface-2)}

/* ── TOAST (override _app.js default) ────────────────── */
.tw-toast-container{position:fixed;bottom:96px;left:0;right:0;padding:0 18px;z-index:80;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.tw-toast{
  background:var(--surface-3);color:var(--text);
  border:1px solid var(--line-2);border-radius:12px;
  padding:12px 14px;font-size:13.5px;font-weight:600;
  display:flex;align-items:center;gap:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.5);
  transform:translateY(8px);opacity:0;
  animation:toastIn .25s forwards;
  max-width:560px;margin:0 auto;
}
.tw-toast.ok{border-color:rgba(29,29,31,.4);color:#E8E8ED}
.tw-toast.err{border-color:rgba(29,29,31,.4);color:#D2D2D7}
.tw-toast.fade{animation:toastOut .25s forwards}
@keyframes toastIn{to{transform:translateY(0);opacity:1}}
@keyframes toastOut{to{transform:translateY(8px);opacity:0}}

/* ── DESKTOP fallback ────────────────────────────────── */
@media(min-width:640px){
  .page-hdr h1{font-size:32px}
  .iv-top{padding:18px 20px}
  .iv-detail{padding:16px 20px 20px}
}

/* ── A11y / Motion ───────────────────────────────────── */
*:focus-visible{outline:2px solid var(--text);outline-offset:3px;border-radius:6px}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* ═══════════════════════════════════════════════════════
   ADMIN SUB-PAGES (pipeline, clients, stats, audit)
   Variante "desktop dashboard" du dark theme.
   ═══════════════════════════════════════════════════════ */

/* App header (sticky top bar admin) */
.app-hdr,.admin-hdr{
  position:sticky;top:0;z-index:50;
  background:rgba(10,10,11,.92);
  backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid var(--line);
  color:var(--text);
}
.app-hdr-in{max-width:1400px;margin:0 auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.hdr-brand{display:inline-flex;align-items:center;gap:10px;font-family:'Space Grotesk',ui-monospace,monospace;font-size:13px;font-weight:700;letter-spacing:.1em;color:var(--text);text-decoration:none}
.hdr-right{display:flex;align-items:center;gap:10px}
.hdr-back{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:9999px;font-size:12.5px;font-weight:600;color:var(--text);transition:all .15s ease}
.hdr-back:hover{background:var(--text);color:var(--bg);border-color:var(--text)}
.hdr-back .material-icons-outlined{font-size:16px}
.hdr-user{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;background:transparent;border:1px solid var(--line-2);border-radius:9999px;color:var(--text);font-family:inherit;font-size:12.5px;font-weight:600}
.hdr-user-avatar{width:26px;height:26px;border-radius:50%;background:var(--text);color:var(--bg);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800}

/* App nav (sub-page tabs) */
.app-nav{background:rgba(10,10,11,.7);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--line);position:sticky;top:64px;z-index:49}
.app-nav-in{max-width:1400px;margin:0 auto;padding:0 24px;display:flex;gap:4px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.app-nav a{display:inline-flex;align-items:center;gap:7px;padding:14px 14px;font-size:12.5px;font-weight:600;color:var(--text-3);border-bottom:2px solid transparent;white-space:nowrap;transition:color .15s ease;text-decoration:none}
.app-nav a:hover{color:var(--text)}
.app-nav a.active{color:var(--text);border-bottom-color:var(--text)}
.app-nav a .material-icons-outlined{font-size:16px}

/* Main + page header */
main{max-width:1400px;margin:0 auto;padding:24px}
.page-hdr{margin-bottom:22px}
.page-hdr h1{font-size:28px;font-weight:800;letter-spacing:-.025em;color:var(--text);margin-bottom:4px}
.page-hdr .lead,.lead{font-size:13.5px;color:var(--text-3);line-height:1.5}

/* KPI grid */
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}
@media(max-width:980px){.kpi-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.kpi-grid{grid-template-columns:1fr}}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px;position:relative;overflow:hidden}
.kpi-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-3);margin-bottom:6px}
.kpi-value{font-size:28px;font-weight:800;letter-spacing:-.02em;color:var(--text);line-height:1}
.kpi-meta{font-size:11.5px;color:var(--text-3);margin-top:6px;font-family:'Space Grotesk',ui-monospace,monospace}

/* Panels (sections) */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:22px;margin-bottom:14px}
.panel h2{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-3);margin-bottom:16px}
.section-2col{display:grid;grid-template-columns:1.4fr 1fr;gap:14px;margin-bottom:14px}
@media(max-width:900px){.section-2col{grid-template-columns:1fr}}

/* Bar charts */
.bar-chart{display:flex;flex-direction:column;gap:7px}
.bar-row{display:grid;grid-template-columns:110px 1fr 50px;gap:10px;align-items:center;font-size:12px}
.bar-label{color:var(--text-3);font-family:'Space Grotesk',ui-monospace,monospace;font-size:10.5px}
.bar-track{height:16px;background:var(--surface-2);border-radius:6px;overflow:hidden}
.bar-fill{height:100%;background:var(--text);border-radius:6px;transition:width .5s ease}
.bar-val{font-weight:700;text-align:right;font-family:'Space Grotesk',ui-monospace,monospace;color:var(--text);font-size:11.5px}

/* Leaderboard list */
.list-leaderboard{display:flex;flex-direction:column;gap:6px}
.lb-row{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--surface-2);border-radius:8px}
.lb-rank{width:24px;height:24px;background:var(--text);color:var(--bg);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;font-family:'Space Grotesk',monospace;flex-shrink:0}
.lb-rank.rank-other{background:var(--surface-3);color:var(--text-3)}
.lb-name{flex:1;font-size:13px;font-weight:700;color:var(--text)}
.lb-meta{font-size:11px;color:var(--text-3);font-family:'Space Grotesk',monospace}

/* Status breakdown */
.status-breakdown{display:flex;border-radius:10px;overflow:hidden;height:28px;background:var(--surface-2);margin-bottom:12px}
.status-seg{font-size:10px;font-weight:700;color:#fff;display:flex;align-items:center;justify-content:center;text-transform:uppercase;letter-spacing:.04em}
.status-legend{display:flex;flex-wrap:wrap;gap:10px;font-size:11px;font-family:'Space Grotesk',monospace;color:var(--text-3)}
.status-legend > div{display:flex;align-items:center;gap:5px}
.status-legend .dot{width:8px;height:8px;border-radius:2px;display:inline-block}

/* Refresh bar */
.refresh-bar{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--text-3);font-family:'Space Grotesk',monospace}
.refresh-bar button{background:none;border:1px solid var(--line-2);color:var(--text);font-weight:600;cursor:pointer;font-family:inherit;font-size:11px;text-transform:uppercase;letter-spacing:.05em;padding:6px 10px;border-radius:6px}
.refresh-bar button:hover{background:var(--surface-2)}

/* Period selector */
.period-btn{padding:7px 14px;border-radius:9999px;font-size:12px;font-weight:600;cursor:pointer;background:transparent;color:var(--text-3);border:0;font-family:inherit;transition:all .15s ease}
.period-btn:hover{color:var(--text)}
.period-btn.active{background:var(--text)!important;color:var(--bg)!important}

/* Audit rows */
.audit-list{display:flex;flex-direction:column;gap:6px;margin-top:14px}
.audit-row{display:grid;grid-template-columns:120px 1fr 1fr 90px;gap:12px;padding:8px 12px;background:var(--surface-2);border:1px solid var(--line);border-radius:8px;font-size:12.5px;align-items:center}
.audit-when{font-family:'Space Grotesk',monospace;font-size:10.5px;color:var(--text-3)}
.audit-actor{font-weight:700;color:var(--text);font-size:12px}
.audit-action{color:var(--text-2);font-size:12px}
.audit-target{font-family:'Space Grotesk',monospace;font-size:10px;color:var(--text-4);text-align:right}
@media(max-width:780px){.audit-row{grid-template-columns:1fr 1fr;gap:6px}.audit-when,.audit-target{grid-column:span 2;font-size:10px}}

/* Kanban (pipeline) */
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.search{flex:1;min-width:200px;padding:10px 14px;background:var(--surface);border:1px solid var(--line-2);border-radius:9999px;font-size:14px;color:var(--text);font-family:inherit}
.search:focus{outline:0;border-color:var(--text)}
.kanban{display:grid;grid-template-columns:repeat(5,minmax(240px,1fr));gap:14px;overflow-x:auto;padding-bottom:20px}
@media(max-width:980px){.kanban{grid-template-columns:repeat(5,260px)}}
@media(max-width:520px){.kanban{grid-template-columns:repeat(5,80vw);gap:10px}}
.col{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px;min-height:60vh}
.col-hdr{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.col-title{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--text-2)}
.col-count{font-family:'Space Grotesk',monospace;font-size:11px;font-weight:700;background:var(--surface-2);color:var(--text);padding:2px 8px;border-radius:9999px;border:1px solid var(--line-2)}
.col-total{font-family:'Space Grotesk',monospace;font-size:10px;color:var(--text-3);margin-top:2px;text-align:right;margin-bottom:8px}
.card{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:8px;cursor:grab;transition:transform .15s ease;color:var(--text)}
.card:hover{transform:translateY(-2px);border-color:var(--line-2)}
.card.dragging{opacity:0.4}
.card-code{font-family:'Space Grotesk',monospace;font-size:10px;font-weight:700;color:var(--text-3);letter-spacing:.04em;margin-bottom:4px}
.card-client{font-size:13.5px;font-weight:700;color:var(--text);margin-bottom:2px}
.card-svc{font-size:11.5px;color:var(--text-3);line-height:1.4;margin-bottom:8px}
.card-meta{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--text-3);font-family:'Space Grotesk',monospace}
.card-amount{font-weight:800;color:var(--text)}
.col.drag-over{background:var(--surface-3);outline:2px dashed var(--text-3);outline-offset:-8px}
.empty-col{padding:32px 12px;text-align:center;font-size:11px;color:var(--text-4);font-family:'Space Grotesk',monospace}

/* Force light surfaces on .admin-hdr legacy class to NOT override our dark base */
.admin-hdr .hdr-brand{color:var(--text)}
.admin-hdr .hdr-back{background:var(--surface-2);border-color:var(--line-2);color:var(--text)}
.admin-hdr .hdr-back:hover{background:var(--text);color:var(--bg)}
.admin-hdr .hdr-user-avatar{background:var(--text);color:var(--bg)}

/* JWT-Mono small util used by admin pages */
.mono{font-family:'Space Grotesk',ui-monospace,monospace}

/* ═══════════════════════════════════════════════════════════
   LIQUID GLASS — style Apple iOS 26/27 (pilote espace pro)
   Monochrome + verre teinté : translucidité, profondeur, vibrancy,
   coins continus, mouvements ressort. Couche additive (override).
   ═══════════════════════════════════════════════════════════ */
:root{
  --glass:rgba(255,255,255,.055);
  --glass-hi:rgba(255,255,255,.10);
  --glass-line:rgba(255,255,255,.12);
  --glass-shadow:0 10px 34px rgba(0,0,0,.45);
  --r-lg:22px;
  --spring:cubic-bezier(.34,1.56,.64,1);
}
body.tw-light{
  --glass:rgba(255,255,255,.62);
  --glass-hi:rgba(255,255,255,.9);
  --glass-line:rgba(0,0,0,.07);
  --glass-shadow:0 10px 34px rgba(15,23,42,.12);
}

/* Typo SF (vraie police Apple sur iPhone/Mac, Inter en repli) */
body{font-family:-apple-system,"SF Pro Display","SF Pro Text",'Space Grotesk',system-ui,'Segoe UI',sans-serif;letter-spacing:-.01em}
.page-hdr h1,.kpi-value,.stat-val,.iv-time .h{letter-spacing:-.035em}

/* Profondeur de fond → donne de la matière à réfracter au verre */
body{background-image:radial-gradient(125% 80% at 50% -12%,rgba(255,255,255,.06),transparent 60%);background-attachment:fixed}
body.tw-light{background-image:radial-gradient(125% 80% at 50% -12%,rgba(0,0,0,.045),transparent 55%)}

/* Header + bottom nav : verre prononcé + filet lumineux supérieur */
.hdr,.app-hdr,.admin-hdr{
  background:var(--glass);
  backdrop-filter:blur(30px) saturate(200%);-webkit-backdrop-filter:blur(30px) saturate(200%);
  border-bottom:1px solid var(--glass-line);
  box-shadow:inset 0 1px 0 var(--glass-hi);
}
.bnav{
  background:var(--glass);
  backdrop-filter:blur(30px) saturate(200%);-webkit-backdrop-filter:blur(30px) saturate(200%);
  border-top:1px solid var(--glass-line);
  box-shadow:inset 0 1px 0 var(--glass-hi),0 -10px 34px rgba(0,0,0,.3);
}
body.tw-light .bnav{box-shadow:inset 0 1px 0 var(--glass-hi),0 -10px 34px rgba(15,23,42,.08)}
.bnav a{transition:color .2s ease,background .2s ease,transform .25s var(--spring)}
.bnav a.active{transform:translateY(-1px)}
.bnav a:active{transform:scale(.92)}

/* Cartes en verre : translucides, filet lumineux, ombre douce, coins continus, ressort */
.iv,.stat,.kpi,.panel,.empty,.col{
  background:var(--glass);
  backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);
  border:1px solid var(--glass-line);
  border-radius:var(--r-lg);
  box-shadow:inset 0 1px 0 var(--glass-hi),var(--glass-shadow);
  transition:transform .35s var(--spring),box-shadow .3s ease,border-color .2s ease;
}
.iv:hover,.kpi:hover{transform:translateY(-2px)}
.iv.open{box-shadow:inset 0 1px 0 var(--glass-hi),0 16px 48px rgba(0,0,0,.5)}
body.tw-light .iv.open{box-shadow:inset 0 1px 0 var(--glass-hi),0 16px 48px rgba(15,23,42,.16)}

/* Boutons : ressort + reflet + coins plus doux */
.iv-action,.iv-quick-btn{border-radius:16px;transition:transform .25s var(--spring),opacity .15s ease,box-shadow .25s ease}
.iv-action{box-shadow:0 6px 18px rgba(0,0,0,.28)}
.iv-action:active,.iv-quick-btn:active{transform:scale(.96)}

/* Pills / chips : léger reflet de verre */
.hdr-chip,.hdr-home,.hdr-theme,.iv-status,.col-count{box-shadow:inset 0 1px 0 var(--glass-hi)}
.stat{border-radius:18px}

/* Apparition douce des cartes (entrée style iOS) */
@keyframes glassIn{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:no-preference){
  .iv,.kpi,.stat{animation:glassIn .4s var(--spring) both}
}
