/* ==========================================================================
   Para Nouvelle — Outils · shared design system
   One stylesheet for every page. Colours live ONLY in the tokens below,
   so a future re-theme is a one-block edit.
   ========================================================================== */

@font-face {
  font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/ui/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations'), url(/ui/fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/ui/fonts/inter-latin-wght-normal.woff2) format('woff2-variations'), url(/ui/fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* Brand (unchanged from the previous interface) */
  --brand: #2f627d;  --brand-hover: #26526a;  --brand-active: #1f4458;
  --brand-solid: #2f627d;  --brand-solid-hover: #26526a;  --brand-on: #ffffff;
  --brand-soft: #eef4f7;  --brand-soft-2: #dbe9f0;
  --accent: #f48b22;
  --ink: #282928;

  /* Neutrals */
  --bg: #f4f6f8;  --surface: #ffffff;  --surface-muted: #f8f9fb;  --surface-hover: #f1f4f7;
  --border: #e2e6ea;  --border-strong: #c9d0d8;
  --text: #282928;  --text-2: #4a525c;  --text-3: #5f6b79;  --text-disabled: #9aa3ae;

  /* Status (all text/background pairs meet WCAG AA) */
  --success: #17703f;  --success-soft: #e8f6ee;  --success-border: #b7e2c8;
  --warning: #96580a;  --warning-soft: #fff3df;  --warning-border: #f5d49b;
  --danger:  #b42318;  --danger-soft:  #fdecea;  --danger-border:  #f1b9b3;
  --info: var(--brand);  --info-soft: var(--brand-soft);  --info-border: #bcd4e0;
  --pink: #a3185f;  --pink-soft: #fde8f2;

  /* Shape & depth */
  --r-xs: 4px;  --r-sm: 6px;  --r-md: 8px;  --r-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 8px 24px rgba(16,24,40,.12), 0 2px 6px rgba(16,24,40,.06);
  --shadow-lg: 0 24px 56px rgba(16,24,40,.22);
  --focus-ring: 0 0 0 3px rgba(47,98,125,.28);
  color-scheme: light;

  /* Layout */
  --bar-h: 56px;
  --ctl-h: 36px;
  --page-pad: 24px;
}
@media (max-width: 900px) { :root { --bar-h: 52px; --page-pad: 16px; } }
@media (pointer: coarse)  { :root { --ctl-h: 44px; } }


/* ── Dark theme: only when chosen in the account menu (light is the default; data-theme on <html>) ── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #6fb0d0;  --brand-hover: #8cc1dc;  --brand-active: #a9d2e6;
  --brand-solid: #2f627d;  --brand-solid-hover: #3a7596;
  --brand-soft: #1e2f39;  --brand-soft-2: #28414f;
  --ink: #0d0f11;
  --bg: #111417;  --surface: #1a1e22;  --surface-muted: #161a1d;  --surface-hover: #242a30;
  --border: #2a3036;  --border-strong: #3b444d;
  --text: #e8eaed;  --text-2: #b9c0c8;  --text-3: #98a2ad;  --text-disabled: #667078;
  --success: #4cc38a;  --success-soft: #14291f;  --success-border: #1f4a35;
  --warning: #e8b84a;  --warning-soft: #2d2410;  --warning-border: #5a4614;
  --danger: #ff8077;  --danger-soft: #331a18;  --danger-border: #63302c;
  --info-border: #2f5163;
  --pink: #f08ab8;  --pink-soft: #33192a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 56px rgba(0,0,0,.65);
  --focus-ring: 0 0 0 3px rgba(111,176,208,.35);
}
/* two logo files, one per theme: the teal wordmark is unreadable on dark surfaces, so dark gets a light-wordmark version (see _ui.html logo()) */
.logo-d { display: none; }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: .875rem; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh;
}
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .8125rem; }
.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-soft-2); }

/* iOS Safari zooms the page when an input under 16px is focused: never let that happen on touch devices */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),
  select, textarea { font-size: max(16px, 1em) !important; }
}

/* ── Icons ──────────────────────────────────────────────────────────────── */
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i-sm { width: 14px; height: 14px; vertical-align: -2px; }
.i-lg { width: 20px; height: 20px; vertical-align: -4px; }
.i-xl { width: 24px; height: 24px; vertical-align: -6px; }
.i-spin { animation: ui-spin 1s linear infinite; }
button .i, a .i, label .i { pointer-events: none; }
@keyframes ui-spin { to { transform: rotate(360deg); } }

/* ── App bar (the one navbar) ───────────────────────────────────────────── */
.app-bar {
  position: sticky; top: 0; z-index: 200; height: var(--bar-h);
  display: flex; align-items: center; gap: 4px; padding: 0 var(--page-pad);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; height: 100%; margin-right: 16px; flex: none; }
.brand img { height: 40px; width: auto; }
.brand .logo-l { display: block; }
.brand:hover { text-decoration: none; }
.nav-main { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text-2); font-size: .875rem; font-weight: 500; white-space: nowrap; text-decoration: none;
}
.nav-link:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.nav-link.is-active, .nav-group.has-active > .nav-link { color: var(--brand); background: var(--brand-soft); }
.nav-group { position: relative; }
.nav-trigger .i { color: var(--text-3); transition: transform .15s; }
.nav-group.is-open > .nav-trigger .i, .user-menu.is-open .user-caret { transform: rotate(180deg); }
.bar-spacer { flex: 1; }
.bar-title, .bar-menu-btn { display: none; }

.menu-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 300; min-width: 288px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md); display: none;
}
.menu-panel.menu-right { left: auto; right: 0; min-width: 236px; }
.nav-group.is-open > .menu-panel, .user-menu.is-open > .menu-panel { display: block; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--text); text-decoration: none;
}
.menu-item:hover { background: var(--surface-hover); text-decoration: none; }
.menu-item.is-active { background: var(--brand-soft); }
.menu-ico { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--surface-muted); color: var(--text-2); border: 1px solid var(--border); }
.menu-item.is-active .menu-ico { background: var(--surface); color: var(--brand); border-color: var(--info-border); }
.menu-txt { display: flex; flex-direction: column; min-width: 0; }
.menu-title { font-weight: 500; color: var(--text); line-height: 1.3; }
.menu-desc { font-size: .75rem; color: var(--text-3); line-height: 1.3; }
.menu-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

.user-menu { position: relative; }
.user-trigger { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 4px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); }
.user-trigger:hover, .user-menu.is-open .user-trigger { background: var(--surface-hover); }
.avatar { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-soft-2); color: var(--brand); font-size: .8125rem; font-weight: 600; }
.user-name { font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Theme switch (account menu + drawer) */
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; color: var(--text-2); font-size: .8125rem; }
.theme-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.theme-seg button { border: 0; background: transparent; color: var(--text-2); padding: 0 10px; height: 28px; font-size: .75rem; font-weight: 500; }
.theme-seg button + button { border-left: 1px solid var(--border-strong); }
.theme-seg button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }

/* Drawer (narrow screens) */
.drawer-scrim { position: fixed; inset: 0; z-index: 400; background: rgba(16,24,40,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 410; width: min(86vw, 340px); display: flex; flex-direction: column;
  background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .22s ease; visibility: hidden;
}
.nav-open .drawer-scrim { opacity: 1; pointer-events: auto; }
.nav-open .drawer { transform: none; visibility: visible; }
.nav-open body { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border); }
.drawer-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-who { display: flex; flex-direction: column; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 8px 16px; overscroll-behavior: contain; }
.drawer-foot { padding: 8px; border-top: 1px solid var(--border); }
.drawer-group { padding: 16px 10px 6px; font-size: .75rem; font-weight: 600; color: var(--text-3); letter-spacing: .02em; }
.drawer-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--text); font-weight: 500; text-decoration: none; }
.drawer-link:hover { background: var(--surface-hover); text-decoration: none; }
.drawer-link.is-active { background: var(--brand-soft); color: var(--brand-active); }
.drawer-link.is-active .menu-ico { background: var(--surface); color: var(--brand); border-color: var(--info-border); }

@media (max-width: 900px) {
  .nav-main, .user-menu { display: none; }
  .brand { margin-right: 12px; }
  .brand img, .public-bar img { height: 36px; }
  .bar-title { display: block; flex: 1; min-width: 0; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bar-spacer { display: none; }
  .bar-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: transparent; border-radius: var(--r-md); color: var(--text); }
  .bar-menu-btn:hover { background: var(--surface-hover); }
}
@media (min-width: 901px) { .drawer, .drawer-scrim { display: none; } }

/* ── Page frame ─────────────────────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 24px var(--page-pad) 64px; }
.page.page-narrow { max-width: 760px; }
.page.page-mid { max-width: 960px; }
.page.page-wide { max-width: 1440px; }
.page.page-full { max-width: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head > :first-child { min-width: 0; flex: 1 1 320px; }
.page-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.page-sub { margin-top: 4px; color: var(--text-3); font-size: .875rem; max-width: 70ch; }
.crumb { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--text-3); font-size: .8125rem; font-weight: 500; text-decoration: none; }
.crumb:hover { color: var(--brand); text-decoration: none; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .page { padding-top: 16px; padding-bottom: 48px; }
  .page-title { font-size: 1.25rem; }
  .page-actions { width: 100%; }
  .page-actions > .btn:not(.btn-icon) { flex: 1 1 auto; }
}

/* Full-height "app" pages (inventaire, rapprochement, remises, promo…) sit under the app bar */
.shell-main { height: calc(100vh - var(--bar-h)); height: calc(100dvh - var(--bar-h)); display: flex; flex-direction: column; min-height: 0; }

/* ── Surfaces ───────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-title { font-size: .9375rem; font-weight: 600; }
.section-title { font-size: .9375rem; font-weight: 600; margin: 0 0 12px; }
.divider { height: 1px; background: var(--border); border: 0; margin: 16px 0; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--ctl-h); padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  font-size: .875rem; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s, color .12s;
}
.btn:hover { background: var(--surface-hover); text-decoration: none; }
.btn:active { background: var(--surface-hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--brand-on); }
.btn-primary:hover { background: var(--brand-solid-hover); border-color: var(--brand-solid-hover); }
.btn-primary:active { background: var(--brand-solid-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #9a1c12; border-color: #9a1c12; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-sm { height: calc(var(--ctl-h) - 6px); padding: 0 10px; font-size: .8125rem; }
.btn-icon { width: var(--ctl-h); padding: 0; }
.btn-sm.btn-icon { width: calc(var(--ctl-h) - 6px); }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label, .field > label { font-size: .8125rem; font-weight: 500; color: var(--text-2); }
.help { font-size: .75rem; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: var(--ctl-h); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font-size: .875rem; line-height: 1.4; transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 84px; padding: 8px 12px; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6b79' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: .75; }
.input:hover, .select:hover, .textarea:hover { border-color: #aab3be; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-muted); color: var(--text-disabled); cursor: not-allowed; }
.input-error { border-color: var(--danger); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
.input-icon { position: relative; }
.input-icon > .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 34px; }

/* Every native <select> gets the same chevron (page CSS must use background-color, not the shorthand) */
select:not([multiple]):not([size]) {
  appearance: none; -webkit-appearance: none; padding-right: 30px; text-overflow: ellipsis; background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6b79' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-xs);
  background: var(--surface-hover); color: var(--text-2); font-size: .75rem; font-weight: 500; line-height: 1; white-space: nowrap;
}
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-brand { background: var(--brand-soft); color: var(--brand-active); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-pink { background: var(--pink-soft); color: var(--pink); }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(16,24,40,.16), rgba(16,24,40,0)) left center / 10px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(16,24,40,.16), rgba(16,24,40,0)) right center / 10px 100% no-repeat scroll;
}
.tbl { width: 100%; font-size: .8125rem; }
.tbl th { padding: 10px 12px; text-align: left; font-size: .75rem; font-weight: 600; color: var(--text-3); background: var(--surface-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--surface-muted); }
.tbl .num, .tbl th.num { text-align: right; }

/* Phones: a simple table becomes a list of cards (cells need data-label) instead of scrolling sideways */
@media (max-width: 640px) {
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody, .tbl-stack tr, .tbl-stack td { display: block; width: 100%; }
  .tbl-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .tbl-stack tbody tr:last-child { border-bottom: 0; }
  .tbl-stack td { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; border: 0; text-align: right; }
  .tbl-stack td::before { content: attr(data-label); flex: none; color: var(--text-3); font-size: .75rem; font-weight: 500; text-align: left; }
  .tbl-stack td[data-label=""]::before, .tbl-stack td:not([data-label])::before { content: none; }
  .tbl-stack tbody tr:hover td { background: transparent; }
}

/* ── Feedback ───────────────────────────────────────────────────────────── */
.alert { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--info-border); border-radius: var(--r-md); background: var(--info-soft); color: var(--text); font-size: .8125rem; }
.alert-warning { border-color: var(--warning-border); background: var(--warning-soft); }
.alert-danger { border-color: var(--danger-border); background: var(--danger-soft); }
.alert-success { border-color: var(--success-border); background: var(--success-soft); }
.empty { padding: 48px 16px; text-align: center; color: var(--text-3); }
.empty .i { width: 28px; height: 28px; margin-bottom: 8px; color: var(--text-disabled); }

/* ── "Afficher plus" pagination footer ── */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; color: var(--text-3); font-size: .8125rem; border-top: 1px solid var(--border); }
.pager[hidden] { display: none; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--text-3); font-size: .875rem; font-weight: 500; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active, .tab[aria-selected="true"], .tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* ── Public / bare pages (login, lab calendar, shared stock) ─────────────── */
.public-bar { height: var(--bar-h); display: flex; align-items: center; gap: 14px; padding: 0 var(--page-pad); background: var(--surface); border-bottom: 1px solid var(--border); }
.public-bar img { height: 40px; width: auto; }
.public-bar .logo-l { display: block; }
.public-bar .public-title { padding-left: 14px; border-left: 1px solid var(--border); font-weight: 500; color: var(--text-2); }
.public-bar .public-meta { margin-left: auto; font-size: .8125rem; color: var(--text-3); }

@media print { .app-bar, .drawer, .drawer-scrim, .public-bar { display: none !important; } body { background: #fff; } }

/* ── Masquer les chiffres (demo mode) ──────────────────────────────────────────
   ui.js wraps every figure in <span class="sb"> (or tags the SVG <text> / <input>);
   the blur only applies while <html data-hide-stats> is set, so toggling is instant. */
html[data-hide-stats] .sb { filter: blur(.42em); user-select: none; -webkit-user-select: none; pointer-events: none; }
html[data-hide-stats] input.sb { filter: blur(5px); }
html[data-sb-pending] body { visibility: hidden; }   /* no flash of real numbers before ui.js has run */

.sb-switch { position: relative; flex: none; width: 34px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s; }
.sb-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.3); transition: transform .15s; }
.sb-switch[aria-checked="true"] { background: var(--brand-solid); }
.sb-switch[aria-checked="true"] .sb-knob { transform: translateX(14px); }
.sb-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
