/* ==========================================================================
   MikhmonGN Cloud Pro — design system
   1. Police  2. Tokens (clair / sombre)  3. Base  4. Structure  5. Composants
   6. Modules métier  7. Authentification  8. Responsive et mouvement réduit
   Contrastes vérifiés WCAG 2.2 AA : texte ≥ 4,5:1, contours de champs ≥ 3:1.
   ========================================================================== */

/* 1. Police Inter (variable, hébergée localement — licence SIL OFL) -------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../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;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../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+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokens ------------------------------------------------------------------ */
:root {
  /* typographie */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-md: 15px; --fs-lg: 16px;
  --fs-xl: 18px; --fs-2xl: 22px; --fs-3xl: 28px; --fs-4xl: 36px;
  --lh-tight: 1.25; --lh: 1.55;
  /* espacements (base 4 px) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  /* rayons, durées, profondeur */
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 999px;
  --radius: var(--r-lg); --radius-sm: var(--r);
  --dur: 160ms; --dur-slow: 240ms; --ease: cubic-bezier(.2, .7, .3, 1);
  --z-sticky: 20; --z-backdrop: 40; --z-drawer: 50; --z-dropdown: 60; --z-modal: 80; --z-toast: 90;
  --sidebar-w: 260px; --sidebar-w-collapsed: 72px;

  /* couleurs fixes (identiques dans les deux thèmes) */
  --blue-600: #2563EB; --blue-700: #1D4ED8; --blue-400: #60A5FA;
  --success: #10B981; --warning: #F59E0B; --danger: #EF4444; --info: #3B82F6;

  /* thème clair (par défaut) */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --surface-3: #E2E8F0;
  --border: #E2E8F0;
  --border-strong: #848FA2;        /* contour des champs : 3,26:1 sur blanc */
  --text: #0F172A;
  --text-2: #475569;
  --muted: #64748B;                /* 4,76:1 sur blanc */
  --primary: #2563EB;              /* boutons : texte blanc 5,17:1 */
  --primary-hover: #1D4ED8;
  --primary-text: #1D4ED8;         /* liens et accents */
  --primary-soft: #EFF6FF;
  --primary-ring: rgba(37, 99, 235, .35);
  --success-text: #047857; --success-soft: #ECFDF5;
  --warning-text: #B45309; --warning-soft: #FFFBEB;
  --danger-text: #B91C1C;  --danger-soft: #FEF2F2;
  --info-text: #1D4ED8;    --info-soft: #EFF6FF;
  --field-bg: #FFFFFF;
  --sidebar-bg: #FFFFFF;
  --sidebar-border: #E2E8F0;
  --sidebar-text: #475569;
  --sidebar-text-strong: #0F172A;
  --sidebar-section: #64748B;
  --sidebar-hover: #F1F5F9;
  --sidebar-active-bg: #EFF6FF;
  --sidebar-active-text: #1D4ED8;
  --code-bg: #0F172A; --code-text: #E2E8F0;
  --overlay: rgba(15, 23, 42, .45);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  color-scheme: light;
}

/* thème sombre : préférence du système, sauf choix explicite du thème clair */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1220; --surface: #172236; --surface-2: #111B2D; --surface-3: #1F2C44;
    --border: #263246; --border-strong: #5A6A84;
    --text: #F8FAFC; --text-2: #CBD5E1; --muted: #94A3B8;
    --primary: #2563EB; --primary-hover: #1D4ED8; --primary-text: #60A5FA;
    --primary-soft: rgba(37, 99, 235, .16); --primary-ring: rgba(96, 165, 250, .45);
    --success-text: #34D399; --success-soft: rgba(16, 185, 129, .14);
    --warning-text: #FBBF24; --warning-soft: rgba(245, 158, 11, .14);
    --danger-text: #F87171;  --danger-soft: rgba(239, 68, 68, .14);
    --info-text: #60A5FA;    --info-soft: rgba(59, 130, 246, .14);
    --field-bg: #0F192B;
    --sidebar-bg: #111827; --sidebar-border: #1F2937; --sidebar-text: #CBD5E1; --sidebar-text-strong: #F8FAFC;
    --sidebar-section: #7C8BA1; --sidebar-hover: #1A2335; --sidebar-active-bg: rgba(37, 99, 235, .18); --sidebar-active-text: #93C5FD;
    --code-bg: #0B1220; --code-text: #E2E8F0;
    --overlay: rgba(2, 6, 15, .65);
    --shadow-sm: none; --shadow: none;
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1220; --surface: #172236; --surface-2: #111B2D; --surface-3: #1F2C44;
  --border: #263246; --border-strong: #5A6A84;
  --text: #F8FAFC; --text-2: #CBD5E1; --muted: #94A3B8;
  --primary: #2563EB; --primary-hover: #1D4ED8; --primary-text: #60A5FA;
  --primary-soft: rgba(37, 99, 235, .16); --primary-ring: rgba(96, 165, 250, .45);
  --success-text: #34D399; --success-soft: rgba(16, 185, 129, .14);
  --warning-text: #FBBF24; --warning-soft: rgba(245, 158, 11, .14);
  --danger-text: #F87171;  --danger-soft: rgba(239, 68, 68, .14);
  --info-text: #60A5FA;    --info-soft: rgba(59, 130, 246, .14);
  --field-bg: #0F192B;
  --sidebar-bg: #111827; --sidebar-border: #1F2937; --sidebar-text: #CBD5E1; --sidebar-text-strong: #F8FAFC;
  --sidebar-section: #7C8BA1; --sidebar-hover: #1A2335; --sidebar-active-bg: rgba(37, 99, 235, .18); --sidebar-active-text: #93C5FD;
  --code-bg: #0B1220; --code-text: #E2E8F0;
  --overlay: rgba(2, 6, 15, .65);
  --shadow-sm: none; --shadow: none;
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* 3. Base -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: var(--lh);
  color: var(--text); background: var(--bg);
  font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary-text); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); letter-spacing: -.01em; color: var(--text); }
p { margin: 0 0 var(--sp-3); }
img, svg { max-width: 100%; }
code, kbd, pre { font-family: var(--font-mono); }
code { font-size: .86em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: var(--r-sm); }
kbd { font-size: var(--fs-xs); padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-sm); background: var(--surface); }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }
.muted { color: var(--muted); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* focus visible commun à tous les éléments interactifs */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary-text); outline-offset: 2px; border-radius: var(--r-sm);
}
.skip-link { position: absolute; left: var(--sp-4); top: -60px; z-index: var(--z-toast); background: var(--primary); color: #fff; padding: var(--sp-2) var(--sp-4); border-radius: var(--r); font-weight: 600; }
.skip-link:focus { top: var(--sp-3); text-decoration: none; }

/* Icônes */
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 14px; height: 14px; }
.icon-lg { width: 32px; height: 32px; }

/* 4. Structure -------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--sidebar-bg); color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  transition: width var(--dur-slow) var(--ease);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-5) var(--sp-5) var(--sp-4); color: var(--sidebar-text-strong); min-height: 72px; }
.brand:hover { text-decoration: none; }
.brand img { flex: none; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.015em; color: var(--sidebar-text-strong); white-space: nowrap; }
.brand-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-text); }
.brand strong { color: var(--primary-text); font-weight: 700; }
.brand-lg { padding: 0; min-height: 0; }
.brand-lg .brand-name { font-size: var(--fs-xl); color: #F8FAFC; }
.brand-lg .brand-tag { color: #93C5FD; }

.nav { padding: var(--sp-1) var(--sp-3) var(--sp-4); flex: 1; }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--sidebar-section); padding: var(--sp-5) var(--sp-3) var(--sp-2); white-space: nowrap; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: var(--sp-3); min-height: 38px; padding: 8px var(--sp-3);
  border-radius: var(--r); color: var(--sidebar-text); font-weight: 500; margin-bottom: 2px; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); text-decoration: none; }
.nav-link.is-active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); font-weight: 600; }
.nav-link.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-link .icon { width: 18px; height: 18px; }
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.sidebar-foot { padding: var(--sp-3) var(--sp-4) var(--sp-5); border-top: 1px solid var(--sidebar-border); }
.tenant-chip { display: flex; align-items: center; gap: var(--sp-2); padding: 10px var(--sp-3); border-radius: var(--r); background: var(--sidebar-hover); color: var(--sidebar-text-strong); font-size: var(--fs-sm); font-weight: 600; }
.tenant-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-chip.is-admin { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); }

.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding-right: var(--sp-3); }
.sidebar-head .brand { flex: 1; min-width: 0; }
.collapse-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: var(--sp-3); width: 100%; margin-top: var(--sp-2); min-height: 38px; padding: 8px var(--sp-3); border-radius: var(--r); color: var(--sidebar-text); font-weight: 500; cursor: pointer; white-space: nowrap; }
.collapse-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.collapse-btn:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; }
.collapse-btn .icon { width: 18px; height: 18px; transition: transform var(--dur-slow) var(--ease); }
.sidebar-collapsed .collapse-btn { justify-content: center; padding: 8px; }
.sidebar-collapsed .collapse-btn span { display: none; }
.sidebar-collapsed .collapse-btn .icon { transform: rotate(180deg); }
/* menu réduit : libellé en info-bulle au survol et au clavier */
.sidebar-collapsed .sidebar { overflow: visible; }
.sidebar-collapsed .sidebar .nav-link[data-tooltip-nav]:hover::after,
.sidebar-collapsed .sidebar .nav-link[data-tooltip-nav]:focus-visible::after {
  content: attr(data-tooltip-nav); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 5px 9px; border-radius: var(--r-sm); background: #0F172A; color: #F8FAFC; font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; z-index: var(--z-dropdown); pointer-events: none;
}
.sidebar-collapsed .sidebar .nav-link .nav-count { display: block; position: absolute; top: 2px; right: 4px; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }

/* barre latérale réduite (ordinateur) */
.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.sidebar-collapsed .sidebar .brand-text,
.sidebar-collapsed .sidebar .nav-link span,
.sidebar-collapsed .sidebar .nav-section,
.sidebar-collapsed .sidebar .tenant-chip span { display: none; }
.sidebar-collapsed .sidebar .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar-collapsed .sidebar .nav-link { justify-content: center; padding: 8px; }
.sidebar-collapsed .sidebar .nav { padding-top: var(--sp-4); }
.sidebar-collapsed .sidebar .tenant-chip { justify-content: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: var(--sp-3); min-height: 64px; padding: var(--sp-3) var(--sp-8);
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: var(--z-sticky);
}
.page-heading { flex: 1; min-width: 0; }
.page-title { font-size: var(--fs-xl); font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-subtitle { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: var(--sp-2); }
.user-menu { display: flex; align-items: center; gap: var(--sp-2); padding-left: var(--sp-3); margin-left: var(--sp-1); border-left: 1px solid var(--border); }
.user-menu form { margin: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 650; font-size: var(--fs-xs); letter-spacing: .02em; flex: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.user-meta small { color: var(--muted); font-size: var(--fs-xs); }
.user-link { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: var(--sp-2); color: inherit; border-radius: var(--r); padding: 3px 8px 3px 3px; cursor: pointer; text-align: left; }
.user-link:hover, .user-link[aria-expanded="true"] { text-decoration: none; background: var(--surface-2); }
.user-link:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; }
.user-chevron { color: var(--muted); }
.dropdown-user { display: flex; flex-direction: column; padding: var(--sp-2) var(--sp-3); min-width: 0; }
.dropdown-user strong { font-size: var(--fs-base); }
.dropdown-user span { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.notif-menu { width: min(360px, calc(100vw - 24px)); }
.notif-item { align-items: flex-start; white-space: normal; line-height: 1.4; }
.notif-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.notif-icon .icon { color: inherit !important; }
.notif-empty { display: flex; align-items: center; gap: var(--sp-2); margin: 0; padding: var(--sp-3); color: var(--muted); font-size: var(--fs-sm); }
.notif-empty .icon { color: var(--success-text); }
.alert > span { flex: 1; min-width: 0; }
.alert-icon { margin-top: 2px; flex: none; }
.content { padding: var(--sp-6) var(--sp-8) var(--sp-12); display: flex; flex-direction: column; gap: var(--sp-5); max-width: 1440px; width: 100%; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r);
  border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.icon-btn .dot-alert { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }
.show-dark { display: none; }
[data-theme="dark"] .show-dark { display: inline; }
[data-theme="dark"] .show-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .show-dark { display: inline; }
  :root:not([data-theme="light"]) .show-light { display: none; }
}
.show-light, .show-dark { line-height: 0; }
.only-mobile { display: none; }
.sidebar-backdrop { display: none; }

/* 5. Composants ------------------------------------------------------------ */

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-5); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.card-head h2 { font-size: var(--fs-lg); font-weight: 650; }
.card-head > div { display: flex; flex-direction: column; gap: 2px; }
.card-head .muted { font-size: var(--fs-sm); }
.card-narrow { max-width: 680px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.grid-3-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); align-items: start; }
.content > .grid-2 { gap: var(--sp-5); }
.grid-top { align-items: start; }
.section-title { font-size: var(--fs-lg); font-weight: 650; margin: var(--sp-1) 0 var(--sp-3); }

/* Cartes de statistiques */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { display: flex; gap: var(--sp-4); align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-5); box-shadow: var(--shadow); min-width: 0; }
.stat-icon { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; flex: none; }
.stat-icon .icon { width: 20px; height: 20px; }
.stat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.stat-value { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat-foot { color: var(--muted); font-size: var(--fs-xs); }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: var(--fs-xs); }
.stat-trend.is-up { color: var(--success-text); }
.stat-trend.is-down { color: var(--danger-text); }
.tone-primary { background: var(--primary-soft); color: var(--primary-text); }
.tone-success { background: var(--success-soft); color: var(--success-text); }
.tone-warning { background: var(--warning-soft); color: var(--warning-text); }
.tone-info { background: var(--info-soft); color: var(--info-text); }
.tone-danger { background: var(--danger-soft); color: var(--danger-text); }

/* Graphiques SVG (rendus côté serveur) */
.chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-bar rect:first-child { fill: var(--primary); opacity: .9; transition: opacity var(--dur) var(--ease); }
.chart-bar:hover rect:first-child { opacity: 1; fill: var(--blue-700); }
.chart-hit { fill: transparent; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }

/* Barre de répartition */
.stacked { display: flex; flex-direction: column; gap: var(--sp-4); }
.stacked-bar { width: 100%; height: 12px; display: block; border-radius: var(--r-full); overflow: hidden; background: var(--surface-2); }
.stacked-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.stacked-legend li { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-base); }
.stacked-legend strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.stacked-legend .muted { width: 44px; text-align: right; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.seg-success { fill: var(--success); background: var(--success); }
.seg-danger { fill: var(--danger); background: var(--danger); }
.seg-warning { fill: var(--warning); background: var(--warning); }
.seg-info { fill: var(--info); background: var(--info); }
.seg-primary { fill: var(--primary); background: var(--primary); }
.seg-muted { fill: var(--surface-3); background: var(--surface-3); }

/* En-tête des tableaux de bord et actions rapides */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.dash-head h2 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; }
.dash-head p { margin: 4px 0 0; color: var(--muted); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }
.quick-action { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); }
.quick-action:hover { border-color: var(--primary-text); text-decoration: none; transform: translateY(-1px); }
.quick-action .stat-icon { width: 36px; height: 36px; }
.quick-action small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.grid-halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); align-items: start; }
.sub-progress { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; margin: var(--sp-3) 0 var(--sp-2); }
.sub-progress svg { display: block; width: 100%; height: 8px; }
.sub-progress rect { fill: var(--primary); }
.sub-progress.is-low rect { fill: var(--warning); }
.watch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.watch-list a { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r); color: var(--text); }
.watch-list a:hover { background: var(--surface-2); text-decoration: none; }
.live-value .skeleton { display: inline-block; width: 64px; height: 24px; vertical-align: middle; }

/* Tableaux */
/* position: relative : les éléments .sr-only (absolus) restent dans la zone défilante au lieu d'élargir la page */
.table-wrap { position: relative; overflow-x: auto; margin: 0 calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5)); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.table th {
  text-align: left; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--surface-2); padding: 10px var(--sp-5);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table th.num { text-align: right; }
.table td { padding: 12px var(--sp-5); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table td strong { font-weight: 600; }
/* tri côté client : <th data-sort> */
.table th[data-sort] { padding: 0; }
.th-sort { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 4px; width: 100%; padding: 10px var(--sp-5); cursor: pointer; }
.table th.num .th-sort { justify-content: flex-end; }
.th-sort:hover { color: var(--text); }
.th-sort:focus-visible { outline: 2px solid var(--primary-text); outline-offset: -2px; }
.th-sort .icon { width: 12px; height: 12px; opacity: .4; }
.table th[aria-sort] .th-sort { color: var(--text); }
.table th[aria-sort] .th-sort .icon { opacity: 1; }
.table th[aria-sort="descending"] .th-sort .icon { transform: rotate(180deg); }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .muted { font-size: var(--fs-sm); flex: 1 1 auto; }
.mini-list .badge { margin-left: auto; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-3) var(--sp-5); margin: 0; }
.kv dt { color: var(--muted); font-size: var(--fs-sm); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.kv-center { margin-top: var(--sp-3); text-align: left; }

/* Badges : la couleur est toujours doublée d'un texte (et d'une pastille) */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 600; line-height: 18px; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-info { background: var(--info-soft); color: var(--info-text); }
.badge-muted { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-plain::before { display: none; }
.badge .icon { width: 12px; height: 12px; }
.check small { display: block; color: var(--muted); font-weight: 400; font-size: var(--fs-sm); margin-top: 2px; }
.check strong { color: var(--text); }
.table-note { padding-top: var(--sp-4); margin: 0; }

/* Alertes, bannières, notifications */
.alert { position: relative; display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) 44px var(--sp-3) var(--sp-4); border-radius: var(--r); font-size: var(--fs-base); border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success-text); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.alert-error { background: var(--danger-soft); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info-text); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.alert-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; background: none; border: 0; border-radius: var(--r-sm); color: inherit; cursor: pointer; opacity: .75; }
.alert-close:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.auth-card .alert { padding-right: var(--sp-4); margin-bottom: var(--sp-3); }
.banner { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); border: 1px solid transparent; }
.banner > div { flex: 1; }
.banner-warning { background: var(--warning-soft); color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.banner-danger { background: var(--danger-soft); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.banner-info { background: var(--info-soft); color: var(--info-text); border-color: color-mix(in srgb, var(--info) 30%, transparent); }

.toast-region { position: fixed; z-index: var(--z-toast); right: var(--sp-5); bottom: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: toast-in var(--dur-slow) var(--ease); }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: var(--success-text); }
.toast-error .icon { color: var(--danger-text); }
.toast-info .icon { color: var(--info-text); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all var(--dur) var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 38px; padding: 8px var(--sp-4);
  border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: var(--fs-base); line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 80ms;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: #DC2626; border-color: #DC2626; color: #fff; }
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; }
.btn-danger-ghost { color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { min-height: 32px; padding: 5px var(--sp-3); font-size: var(--fs-sm); }
.btn-lg { min-height: 46px; padding: 11px var(--sp-5); font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn:not(.btn-primary):not(.btn-danger).is-loading::after { border-color: var(--border); border-top-color: var(--primary-text); }
.btn-group { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; }

/* Formulaires */
.form { display: flex; flex-direction: column; gap: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
label .muted { font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-height: 40px; padding: 8px var(--sp-3); border: 1px solid var(--border-strong); border-radius: var(--r);
  background: var(--field-bg); color: var(--text); font: inherit; font-size: var(--fs-base);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--text-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-text); box-shadow: 0 0 0 3px var(--primary-ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
select {
  appearance: none; padding-right: 36px; 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='%2364748B' 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;
}
textarea { resize: vertical; min-height: 96px; line-height: var(--lh); }
.is-invalid, input[aria-invalid="true"] { border-color: var(--danger-text) !important; }
.is-invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 30%, transparent) !important; }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--danger-text); font-size: var(--fs-sm); font-weight: 500; }
.hint { color: var(--muted); font-size: var(--fs-sm); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.check input, .choice input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.check-inline { align-self: end; padding-bottom: 10px; }
.link-sm { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; min-height: 24px; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); align-items: center; }
.form-actions form { margin: 0; }
.input-group { display: flex; gap: var(--sp-2); }
.input-group input { flex: 1; min-width: 0; }
.input-group select { width: auto; }
.input-sm { width: 96px !important; }
.fieldset { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); margin: 0; display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.fieldset legend { font-weight: 650; font-size: var(--fs-base); padding: 0 6px; }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.choice { display: flex; gap: var(--sp-3); align-items: flex-start; border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); cursor: pointer; font-weight: 500; transition: border-color var(--dur), background var(--dur); }
.choice:hover { border-color: var(--text-2); }
.choice:has(input:checked) { border-color: var(--primary-text); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary-text); }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice strong { color: var(--text); font-size: var(--fs-base); }
.choice small { color: var(--muted); font-weight: 400; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: var(--sp-3); }
.form-inline input { flex: 1 1 320px; width: auto; font-family: var(--font-mono); font-size: var(--fs-sm); }

/* Barres d'outils, recherche, pagination */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-4); }
.toolbar select { width: auto; min-width: 160px; }
.toolbar-flat { margin: 0; }
.toolbar-end { margin-left: auto; font-size: var(--fs-sm); }
.search { position: relative; }
.toolbar .search { flex: 1 1 260px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; }
.page-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); flex-wrap: wrap; }
.pager { display: flex; gap: var(--sp-1); justify-content: center; padding-top: var(--sp-6); flex-wrap: wrap; }
.pager a { min-width: 36px; height: 36px; padding: 0 var(--sp-2); display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.pager a:hover { background: var(--surface-2); text-decoration: none; }
.pager a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Onglets */
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-4); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab { all: unset; box-sizing: border-box; cursor: pointer; padding: 10px var(--sp-3); font-weight: 600; font-size: var(--fs-base); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"], .tab.is-active { color: var(--primary-text); border-bottom-color: var(--primary); }
a.tab:hover { text-decoration: none; }
.tab:focus-visible { outline: 2px solid var(--primary-text); outline-offset: -2px; }
[role="tabpanel"][hidden] { display: none; }

/* Menu déroulant */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: var(--z-dropdown); min-width: 220px; padding: var(--sp-1);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; pointer-events: none; visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.dropdown-menu.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.dropdown-menu-left { left: 0; right: auto; transform-origin: top left; }
.dropdown-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: 8px var(--sp-3); border-radius: var(--r); font-size: var(--fs-base); color: var(--text); cursor: pointer; }
.dropdown-item:hover, .dropdown-item:focus-visible { background: var(--surface-2); text-decoration: none; outline: none; }
.dropdown-item:focus-visible { outline: 2px solid var(--primary-text); outline-offset: -2px; }
.dropdown-item .icon { width: 16px; height: 16px; color: var(--muted); }
.dropdown-item.is-danger, .dropdown-item.is-danger .icon { color: var(--danger-text); }
.dropdown-sep { height: 1px; background: var(--border); margin: var(--sp-1) 0; }
.dropdown-head { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.dropdown form { margin: 0; }
/* un menu ouvert dans un tableau défilant ne doit pas être rogné */
.table-wrap:has(.dropdown-menu.is-open) { overflow: visible; }
summary { padding-block: 2px; line-height: 20px; }
/* liens des cellules : zone cliquable d'au moins 24 px */
.table td > a:not(.btn), .mini-list li > a { display: inline-flex; align-items: center; min-height: 24px; }
tr[hidden], .empty-filter[hidden] { display: none !important; }
.empty-filter { margin: 0; padding: var(--sp-6) var(--sp-5); text-align: center; color: var(--muted); }

/* Info-bulle : data-tooltip="…" (complément visuel ; le libellé accessible reste aria-label) */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  padding: 5px 9px; border-radius: var(--r-sm); background: #0F172A; color: #F8FAFC; font-size: var(--fs-xs); font-weight: 500;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); z-index: var(--z-dropdown);
}
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
[data-tooltip-pos="bottom"]::after { bottom: auto; top: calc(100% + 8px); }

/* Fenêtre modale (élément <dialog> natif : focus piégé et touche Échap) */
.modal { border: 1px solid var(--border); border-radius: var(--r-xl); padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: var(--overlay); }
.modal[open] { animation: modal-in var(--dur-slow) var(--ease); }
.modal[open]::backdrop { animation: fade-in var(--dur-slow) var(--ease); }
.modal-body { display: flex; gap: var(--sp-4); padding: var(--sp-6) var(--sp-6) var(--sp-4); }
.modal-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.modal-title { font-size: var(--fs-lg); font-weight: 650; margin-bottom: 6px; }
.modal-text { color: var(--text-2); margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-4) var(--sp-6) var(--sp-5); background: var(--surface-2); border-top: 1px solid var(--border); border-radius: 0 0 var(--r-xl) var(--r-xl); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Squelettes de chargement */
.skeleton { display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-title { height: 20px; width: 40%; margin-bottom: 12px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Étapes (assistant) */
.steps { list-style: none; display: flex; gap: var(--sp-2); padding: 0; margin: 0 0 var(--sp-5); counter-reset: step; overflow-x: auto; }
.steps li { flex: 1 1 0; min-width: 96px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); counter-increment: step; }
.steps li::before { content: ""; grid-column: 1 / -1; height: 4px; border-radius: var(--r-full); background: var(--surface-3); }
.steps li.is-done::before, .steps li.is-current::before { background: var(--primary); }
.steps li.is-current { color: var(--primary-text); }
.steps li.is-done { color: var(--text-2); }
.step-num { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.steps li.is-current .step-num { background: var(--primary); color: #fff; }
.steps li.is-done .step-num { background: var(--primary-soft); color: var(--primary-text); }
.step-num .icon { width: 12px; height: 12px; }

/* Code, spinner, attente */
.code-box { position: relative; }
.code-box pre { margin: 0; padding: var(--sp-4); padding-top: 48px; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--border); border-radius: var(--r-lg); font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; max-height: 440px; }
.code-copy { position: absolute; top: 8px; right: 8px; }
.code-copy.is-done, [data-copy].is-done { background: var(--success-text); border-color: var(--success-text); color: #fff; }
/* code d'une ligne à coller dans le MikroTik : lisible et entièrement visible sur téléphone */
.one-line { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--code-bg); border: 1px solid var(--border); margin-bottom: var(--sp-5); }
.one-line code { display: block; background: none; border: 0; padding: 0; color: var(--code-text); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.howto { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); line-height: 1.55; }
.mode-form { margin-top: var(--sp-5); }
.mode-form .alert-inline { margin-top: 0; }
/* étape 2 : deux grandes cartes, faciles à toucher sur téléphone */
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.type-alert { margin: 0 0 var(--sp-4); }
.type-card { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5); border: 2px solid var(--border); border-radius: var(--r-xl); color: var(--text); background: var(--surface); transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); }
.type-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; }
.type-card:focus-visible { outline: 3px solid var(--primary-text); outline-offset: 2px; }
.type-card strong { font-size: var(--fs-xl); font-weight: 700; margin-top: var(--sp-2); }
.type-card .muted { font-size: var(--fs-base); line-height: 1.55; }
.type-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; }
.type-icon .icon { width: 26px; height: 26px; }
.type-badge { align-self: flex-start; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary-text); background: var(--primary-soft); padding: 3px 10px; border-radius: var(--r-full); }
.type-go { margin-top: auto; padding-top: var(--sp-3); display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--primary-text); }
@media (max-width: 640px) { .type-grid { grid-template-columns: minmax(0, 1fr); } }
.mode-form .choice strong { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary-text); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.waiting { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-2); font-weight: 600; margin: var(--sp-4) 0 0; }

/* États vides et listes à cocher */
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); text-align: center; padding: var(--sp-10) var(--sp-4); color: var(--muted); }
.empty > .icon { width: 44px; height: 44px; padding: 10px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--text-2); }
.empty p { margin: 0; max-width: 440px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.checklist li { display: flex; align-items: center; gap: var(--sp-3); }
.check-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); flex: none; }
.checklist li.is-done .check-dot { background: var(--success-text); border-color: var(--success-text); color: #fff; }
.checklist li.is-done a { color: var(--muted); text-decoration: line-through; }

/* Utilitaires */
.stack { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack form { margin: 0; }
.stack-gap { margin-bottom: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.inline { display: inline; margin: 0; }
.nowrap { white-space: nowrap; }
.nowrap .btn, .nowrap form { vertical-align: middle; }
.text-danger { color: var(--danger-text); }
.text-success { color: var(--success-text); }

/* 6. Modules métier ------------------------------------------------------- */

/* VPN */
.step-list { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); display: flex; flex-direction: column; gap: 6px; }
.manual { margin-top: var(--sp-5); border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.manual summary { cursor: pointer; font-weight: 600; color: var(--text-2); font-size: var(--fs-base); }
.manual[open] summary { margin-bottom: var(--sp-3); }

/* Assistants (VPN, génération de tickets) */
.wizard { max-width: 880px; margin-inline: auto; width: 100%; }
.wizard-head { margin-bottom: var(--sp-5); }
.wizard-head h2 { font-size: var(--fs-xl); font-weight: 650; margin: 0 0 var(--sp-1); }
.wizard-head p { margin: 0; max-width: 640px; }
.wizard-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; align-items: center; margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.wizard-actions:empty { display: none; }
.wizard-actions form { margin: 0; }
.wizard-actions .btn-ghost:first-child { margin-right: auto; }
.wizard-actions-center { justify-content: center; }
.wizard-note { font-size: var(--fs-sm); margin-right: auto; }
.wizard-foot { margin: var(--sp-4) 0 0; }
.wizard-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); padding: var(--sp-6) 0 0; }
.wizard-done h2 { font-size: var(--fs-xl); margin: 0; }
.wizard-done p { margin: 0; max-width: 480px; }
.done-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--success-soft); color: var(--success-text); margin-bottom: var(--sp-2); }
.done-icon .icon { width: 32px; height: 32px; }
.pick-list, .req-list, .check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.pick { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); transition: border-color .15s, background-color .15s; }
.pick:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.pick:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; }
.pick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-body .muted { font-size: var(--fs-sm); }
.req-list { gap: var(--sp-4); }
.req-list li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.req-list li > div { display: flex; flex-direction: column; gap: 2px; }
.req-list .muted { font-size: var(--fs-sm); }
.check-list li { display: flex; gap: var(--sp-2); align-items: flex-start; }
.check-list .icon { color: var(--success-text); margin-top: 2px; flex: none; }
.waiting-box { display: flex; gap: var(--sp-3); align-items: flex-start; margin-top: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--info-soft); color: var(--text); }
.waiting-box .spinner { margin-top: 2px; }
.waiting-box > div { display: flex; flex-direction: column; gap: 2px; }
.waiting-box .muted { font-size: var(--fs-sm); }
.alert-inline { padding-right: var(--sp-4); margin-top: var(--sp-4); }
.page-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.page-bar .page-actions form { margin: 0; }

/* Tickets */
.gen-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-5); align-items: start; }
.gen-main { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.gen-step { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-lg); font-weight: 650; margin: 0 0 var(--sp-4); }
.gen-step .step-num { width: 24px; height: 24px; font-size: var(--fs-xs); background: var(--primary); color: #fff; }
.gen-format { margin-top: var(--sp-4); }
.gen-empty { margin: 0; }
.profile-choice strong { display: flex; justify-content: space-between; gap: var(--sp-2); width: 100%; }
.profile-choice > span { flex: 1; min-width: 0; }
.profile-price { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.choice.is-blocked { cursor: not-allowed; opacity: .75; border-style: dashed; }
.choice[hidden] { display: none; }
.qty-presets { display: flex; gap: var(--sp-1); flex-wrap: wrap; margin-top: var(--sp-2); }
.gen-summary { position: sticky; top: calc(var(--topbar-h, 64px) + var(--sp-4)); display: flex; flex-direction: column; gap: var(--sp-4); }
.gen-summary h2 { font-size: var(--fs-lg); font-weight: 650; margin: 0; }
.gen-summary .hint { margin: 0; }
.gen-total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: var(--sp-3) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gen-total strong { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.gen-quota { display: flex; gap: var(--sp-2); align-items: flex-start; margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.gen-quota .icon { margin-top: 2px; flex: none; color: var(--muted); }
.gen-summary .alert-inline { margin: 0; }
@media (max-width: 1000px) {
  .gen-layout { grid-template-columns: minmax(0, 1fr); }
  .gen-summary { position: static; }
}
.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3); }
.batch-card { display: flex; flex-direction: column; gap: 4px; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); background: var(--surface); transition: border-color var(--dur), box-shadow var(--dur); }
.batch-card:hover { border-color: var(--primary-text); text-decoration: none; box-shadow: var(--shadow); }
.batch-card .muted { font-size: var(--fs-sm); }
.batch-code { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--primary-text); font-weight: 700; }
.batch-top { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-xs); }
.batch-foot .icon { vertical-align: -2px; margin-right: 3px; }
.stacked + .hint, .stacked + .form-actions { margin-top: var(--sp-4); }
.kv + .form-actions { margin-top: var(--sp-5); }
.code-strong { font-weight: 700; letter-spacing: .03em; }
.batch-foot { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-xs); margin-top: 6px; }
.voucher-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.voucher-chip { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); }
.voucher-chip code { border: 0; background: none; padding: 0; font-size: var(--fs-base); font-weight: 700; letter-spacing: .03em; }
.voucher-chip small { font-family: var(--font-mono); color: var(--muted); }
.voucher-chip.is-unused { border-color: color-mix(in srgb, var(--info) 50%, var(--border)); }
.voucher-chip.is-active { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 50%, var(--border)); }
.voucher-chip.is-expired, .voucher-chip.is-disabled { opacity: .55; }
.voucher-chip.is-expired code, .voucher-chip.is-disabled code { text-decoration: line-through; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-4); margin-top: var(--sp-4); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: -10px; border: 1px solid var(--border-strong); }
.dot.is-unused { background: var(--info-soft); border-color: var(--info); }
.dot.is-active { background: var(--success); border-color: var(--success); }
.dot.is-expired, .dot.is-disabled { background: var(--surface-2); }

/* Statistiques */
.bar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.bar-row { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-base); }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 6px; margin: 6px 0 2px; }
.bar-track svg { width: 100%; height: 6px; display: block; background: var(--surface-2); border-radius: 3px; }
.bar-track rect { fill: var(--primary); }

/* Abonnements et paiements */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); }
.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--sp-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6) var(--sp-5) var(--sp-5); box-shadow: var(--shadow); }
.plan-card.is-current, .plan-card.is-featured { border-color: var(--primary-text); box-shadow: 0 0 0 1px var(--primary-text), var(--shadow); }
.plan-card h3 { font-size: var(--fs-xl); }
.plan-card p { margin: 0; }
.plan-card form { margin-top: auto; }
.plan-flag { position: absolute; top: -11px; left: var(--sp-5); background: var(--primary); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 2px 10px; border-radius: var(--r-full); }
.plan-price { font-size: var(--fs-3xl); font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-features { list-style: none; margin: 0 0 var(--sp-2); padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-base); }
.plan-features li { display: flex; gap: var(--sp-2); align-items: flex-start; }
.plan-features .icon { color: var(--success-text); margin-top: 3px; }
.sub-dates { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2); margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.plan-grid + .hint { margin-top: var(--sp-3); }
.plan-month { font-size: var(--fs-sm); margin-top: 2px !important; }
.plan-flag .icon { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
.plan-card.is-featured:not(.is-current) .plan-flag { background: var(--primary); }
.usage-list .is-full .bar-track rect { fill: var(--warning); }
.usage-list .bar-row strong { white-space: nowrap; }
.sub-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-4); }
.sub-summary div { display: flex; flex-direction: column; gap: 2px; }
.sub-summary .muted { font-size: var(--fs-sm); }
.sub-summary strong { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.amount-big { font-size: var(--fs-2xl); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-options { display: flex; flex-direction: column; gap: var(--sp-3); }
.pay-option { display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-4); align-items: center; border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); margin: 0; }
.pay-option > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pay-option small { color: var(--muted); }
.pay-logo { width: 52px; height: 52px; border-radius: var(--r-lg); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-base); }
.pay-orange { background: #FF7900; color: #000; }
.pay-mtn { background: #FFCB05; color: #00577B; }
.pay-targets { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.pay-targets li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-lg); }
.pay-targets li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-targets .pay-logo { width: 40px; height: 40px; font-size: var(--fs-xs); flex: none; }
.pay-value { font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; }
.pay-bank { background: var(--surface-2); color: var(--text-2); }
.tech-details { margin-top: var(--sp-2); font-size: var(--fs-sm); }
.tech-details summary { cursor: pointer; font-weight: 600; }
.tech-details code { display: block; margin-top: var(--sp-1); white-space: normal; overflow-wrap: anywhere; }
.input-reveal { position: relative; }
.input-reveal input { padding-right: 104px; }
.input-reveal .btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.gw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-4); }
.gw-grid > div { display: flex; flex-direction: column; gap: 4px; }
.gw-grid .muted { font-size: var(--fs-sm); }
.copy-line { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.copy-line code { overflow-wrap: anywhere; }
.review-hint { margin: 0 0 var(--sp-4); }
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.review-item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg); }
.review-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.review-main .muted { font-size: var(--fs-sm); }
.review-amount { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.review-actions { display: flex; gap: var(--sp-2); align-items: center; }
.review-actions form { margin: 0; }
.refuse-menu { min-width: 300px; }
.refuse-menu .dropdown-item { white-space: normal; }
.grant-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); margin-bottom: var(--sp-5); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--border); }
.grant-form .field { flex: 0 1 220px; }
.text-warning { color: var(--warning-text); font-size: var(--fs-sm); }
.text-warning .icon { vertical-align: -2px; }
.pay-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.pay-head h2 { font-size: var(--fs-lg); margin: 2px 0 0; }
.pay-head .muted { font-size: var(--fs-sm); }
.pay-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pay-amount strong { font-size: var(--fs-2xl); font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-5); }
.pay-steps > li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.pay-steps > li > div { flex: 1; min-width: 0; }
.pay-steps > li > .step-num { width: 24px; height: 24px; background: var(--primary); color: #fff; font-size: var(--fs-xs); font-weight: 700; flex: none; }
.pay-declare .form { margin-top: var(--sp-3); }
.done-icon.is-danger { background: var(--danger-soft); color: var(--danger-text); }
.done-icon.is-warning { background: var(--warning-soft); color: var(--warning-text); }
.done-icon.is-info { background: var(--info-soft); color: var(--info-text); }
.done-icon .spinner { width: 28px; height: 28px; border-width: 3px; }
.payment-status { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); margin: 0 auto; }
.payment-status h2 { font-size: var(--fs-xl); }
.payment-status p { margin: 0; max-width: 460px; color: var(--text-2); }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.status-icon .spinner { width: 28px; height: 28px; border-width: 3px; }

/* Support */
.thread { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.msg { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); background: var(--surface-2); max-width: 85%; }
.msg header { display: flex; justify-content: space-between; gap: var(--sp-3); margin-bottom: 6px; font-size: var(--fs-sm); }
.msg p { margin: 0; overflow-wrap: anywhere; }
.msg.is-staff { align-self: flex-end; background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.reply-form { gap: var(--sp-2); }

/* Administration */
.invite-card { border-color: var(--primary-text); }
.invite-card p { margin: 0 0 var(--sp-3); color: var(--text-2); }
.invite-card pre { white-space: pre-wrap; word-break: break-all; padding-top: var(--sp-4); padding-right: 120px; }

/* Guide de style */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
.swatch { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; font-size: var(--fs-xs); }
.swatch-color { height: 56px; border-bottom: 1px solid var(--border); }
.swatch-meta { padding: var(--sp-2) var(--sp-3); display: flex; flex-direction: column; }
.swatch-meta code { border: 0; background: none; padding: 0; color: var(--muted); }
.sw-bg { background: var(--bg); } .sw-surface { background: var(--surface); } .sw-surface-2 { background: var(--surface-2); }
.sw-sidebar { background: var(--sidebar-bg); } .sw-border { background: var(--border); } .sw-border-strong { background: var(--border-strong); }
.sw-text { background: var(--text); } .sw-text-2 { background: var(--text-2); } .sw-muted { background: var(--muted); }
.sw-primary { background: var(--primary); } .sw-primary-text { background: var(--primary-text); } .sw-primary-soft { background: var(--primary-soft); }
.sw-success { background: var(--success); } .sw-success-text { background: var(--success-text); }
.sw-warning { background: var(--warning); } .sw-warning-text { background: var(--warning-text); }
.sw-danger { background: var(--danger); } .sw-danger-text { background: var(--danger-text); }
.sw-info { background: var(--info); } .sw-info-text { background: var(--info-text); }
.guide-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.guide-nav a { padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-full); font-size: var(--fs-sm); color: var(--text-2); }
.guide-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.logo-row { display: flex; flex-wrap: wrap; gap: var(--sp-6); align-items: center; }
.logo-plate { padding: var(--sp-5); border-radius: var(--r-lg); border: 1px solid var(--border); background: #FFFFFF; }
.logo-plate-dark { background: #0B1220; border-color: #263246; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--sp-2); }
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-3) var(--sp-2); border: 1px solid var(--border); border-radius: var(--r); font-size: 11px; color: var(--muted); }
.icon-cell .icon { color: var(--text); }
.type-scale > * { margin: 0 0 var(--sp-3); }
.demo-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

/* 6 bis. Page d'accueil publique ----------------------------------------- */
.lp-body { background: var(--bg); }
.lp-container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--sp-6); }
.lp-body main:focus { outline: none; }
.lp-body section[id] { scroll-margin-top: 84px; }

/* en-tête collant, sombre et translucide au-dessus du héros */
.lp-header { position: sticky; top: 0; z-index: 50; background: rgba(8, 13, 26, .72); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(148, 163, 184, .12); transition: background-color var(--dur), box-shadow var(--dur); }
.lp-header.is-scrolled { background: rgba(8, 13, 26, .92); box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.lp-nav { display: flex; align-items: center; gap: var(--sp-6); min-height: 68px; }
.lp-brand { padding: 0; min-height: 0; gap: 10px; }
.lp-brand .brand-name { color: #F8FAFC; }
.lp-brand .brand-tag { color: #93C5FD; }
.lp-links { display: flex; gap: var(--sp-1); margin-left: var(--sp-4); }
.lp-links a { color: #CBD5E1; font-weight: 500; font-size: var(--fs-base); padding: 8px 12px; border-radius: var(--r); min-height: 24px; }
.lp-links a:hover { color: #FFFFFF; background: rgba(148, 163, 184, .12); text-decoration: none; }
.lp-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.lp-theme { color: #CBD5E1; }
.lp-theme:hover { background: rgba(148, 163, 184, .14); color: #FFFFFF; }
.lp-login { color: #E2E8F0; }
.lp-login:hover { background: rgba(148, 163, 184, .14); color: #FFFFFF; }

/* héros */
.lp-hero { position: relative; overflow: hidden; background: #080D1A; color: #CBD5E1; padding: var(--sp-16, 72px) 0 var(--sp-10); margin-top: -69px; padding-top: calc(69px + 72px); isolation: isolate; }
.lp-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }
.lp-hero-glow { position: absolute; inset: -20% -10% auto; height: 760px; z-index: -1; background: radial-gradient(40% 50% at 28% 30%, rgba(37, 99, 235, .45), transparent 70%), radial-gradient(35% 45% at 78% 22%, rgba(14, 165, 233, .30), transparent 70%), radial-gradient(30% 40% at 60% 70%, rgba(16, 185, 129, .18), transparent 70%); filter: blur(10px); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--sp-10); align-items: center; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-full); background: rgba(37, 99, 235, .16); border: 1px solid rgba(96, 165, 250, .35); color: #BFDBFE; font-size: var(--fs-sm); font-weight: 600; }
.lp-hero h1 { color: #FFFFFF; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; margin: var(--sp-5) 0 var(--sp-5); }
.lp-gradient-text { background: linear-gradient(90deg, #60A5FA, #22D3EE 55%, #34D399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { font-size: 1.15rem; line-height: 1.65; color: #CBD5E1; max-width: 560px; margin: 0; }
.lp-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
.lp-cta .btn-primary { box-shadow: 0 10px 30px rgba(37, 99, 235, .45); }
.lp-cta .btn-primary:hover { transform: translateY(-1px); }
.lp-btn-glass { background: rgba(255, 255, 255, .06); border-color: rgba(148, 163, 184, .35); color: #F1F5F9; }
.lp-btn-glass:hover { background: rgba(255, 255, 255, .12); border-color: rgba(148, 163, 184, .55); color: #FFFFFF; }
.lp-trust { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); color: #94A3B8; }
.lp-trust li { display: flex; align-items: center; gap: 6px; }
.lp-trust .icon { color: #34D399; }

/* aperçu de l'interface (illustration, sans chiffres) */
.lp-visual { position: relative; padding: var(--sp-6) var(--sp-4) var(--sp-10); }
.lp-window { position: relative; border-radius: 18px; background: linear-gradient(180deg, #111A2E, #0C1424); border: 1px solid rgba(148, 163, 184, .18); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03) inset; transform: perspective(1400px) rotateY(-9deg) rotateX(4deg); overflow: hidden; }
.lp-window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(148, 163, 184, .12); }
.lp-window-bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.lp-window-bar span:nth-child(1) { background: #F87171; }
.lp-window-bar span:nth-child(2) { background: #FBBF24; }
.lp-window-bar span:nth-child(3) { background: #34D399; }
.lp-window-bar em { margin-left: 10px; font-style: normal; font-size: 12px; color: #94A3B8; }
.lp-window-body { display: grid; grid-template-columns: 56px 1fr; min-height: 300px; }
.lp-mini-side { display: flex; flex-direction: column; gap: 12px; padding: 18px 14px; border-right: 1px solid rgba(148, 163, 184, .1); }
.lp-mini-side i { display: block; height: 10px; border-radius: 5px; background: #1E293B; }
.lp-mini-side i.is-on { background: #2563EB; }
.lp-mini-main { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.lp-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lp-mini-stats b { height: 54px; border-radius: 10px; background: #152036; border: 1px solid rgba(148, 163, 184, .1); position: relative; }
.lp-mini-stats b::after { content: ""; position: absolute; left: 10px; top: 12px; width: 50%; height: 8px; border-radius: 4px; background: #2A3A56; box-shadow: 0 16px 0 -1px #3B82F6; }
.lp-mini-stats b:nth-child(2)::after { box-shadow: 0 16px 0 -1px #10B981; }
.lp-mini-stats b:nth-child(3)::after { box-shadow: 0 16px 0 -1px #F59E0B; }
.lp-mini-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 12px; border-radius: 12px; background: #101A2E; border: 1px solid rgba(148, 163, 184, .1); }
.lp-mini-chart span { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #60A5FA, #2563EB); transform-origin: bottom; animation: lp-grow 1s var(--ease) both; }
.lp-mini-chart span:nth-child(odd) { animation-delay: .1s; }
.lp-mini-chart .h-38 { height: 38%; } .lp-mini-chart .h-45 { height: 45%; } .lp-mini-chart .h-52 { height: 52%; } .lp-mini-chart .h-62 { height: 62%; } .lp-mini-chart .h-64 { height: 64%; }
.lp-mini-chart .h-70 { height: 70%; } .lp-mini-chart .h-78 { height: 78%; } .lp-mini-chart .h-82 { height: 82%; } .lp-mini-chart .h-88 { height: 88%; } .lp-mini-chart .h-95 { height: 95%; }
.lp-mini-rows { display: flex; flex-direction: column; gap: 8px; }
.lp-mini-rows i { display: block; height: 10px; border-radius: 5px; background: #1A2640; }
.lp-mini-rows i:nth-child(2) { width: 82%; }
.lp-mini-rows i:nth-child(3) { width: 64%; }
.lp-float { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: rgba(15, 23, 42, .86); backdrop-filter: blur(10px); border: 1px solid rgba(148, 163, 184, .22); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); color: #CBD5E1; font-size: 13px; animation: lp-float 6s ease-in-out infinite; }
.lp-float strong { color: #FFFFFF; }
.lp-float-ticket { right: -8px; bottom: 0; min-width: 210px; border-top: 3px solid #22D3EE; }
.lp-float-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #67E8F9; font-weight: 700; }
.lp-code { font-family: var(--font-mono); font-size: 22px; letter-spacing: .12em; margin: 2px 0; }
.lp-float-vpn { left: -10px; top: 0; flex-direction: row; align-items: center; gap: 12px; animation-delay: -3s; }
.lp-float-vpn div { display: flex; flex-direction: column; }
.lp-pulse { width: 12px; height: 12px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: lp-pulse 2s infinite; flex: none; }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes lp-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@keyframes lp-grow { from { transform: scaleY(.1); opacity: .3; } to { transform: none; opacity: 1; } }

/* faits clés */
.lp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: var(--sp-12, 56px) 0 0; border-radius: 18px; overflow: hidden; background: rgba(148, 163, 184, .14); border: 1px solid rgba(148, 163, 184, .14); }
.lp-facts div { background: rgba(8, 13, 26, .78); padding: var(--sp-5) var(--sp-6); }
.lp-facts dt { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; color: #FFFFFF; line-height: 1.1; }
.lp-facts dd { margin: 4px 0 0; color: #94A3B8; font-size: var(--fs-sm); }

/* sections */
.lp-section { padding: 96px 0; }
.lp-section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.lp-section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.lp-section-head-left { text-align: left; margin: 0; }
.lp-kicker { display: inline-block; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-text); margin-bottom: var(--sp-3); }
.lp-section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 var(--sp-4); }
.lp-section-head p { color: var(--text-2); font-size: 1.05rem; line-height: 1.6; margin: 0; }
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.lp-feature { position: relative; padding: var(--sp-6); border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur); }
.lp-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.lp-feature .stat-icon { width: 48px; height: 48px; border-radius: 14px; }
.lp-feature h3 { font-size: var(--fs-lg); font-weight: 700; margin: var(--sp-4) 0 var(--sp-2); }
.lp-feature p { margin: 0; color: var(--text-2); line-height: 1.6; }

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); counter-reset: none; position: relative; }
.lp-steps li { position: relative; padding: var(--sp-6); border-radius: 18px; background: var(--bg); border: 1px solid var(--border); }
.lp-steps li:not(:last-child)::after { content: ""; position: absolute; top: 46px; right: calc(-1 * var(--sp-6)); width: var(--sp-6); height: 2px; background: linear-gradient(90deg, var(--primary), transparent); }
.lp-step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, #2563EB, #22D3EE); color: #FFFFFF; font-weight: 800; font-size: 1.1rem; box-shadow: 0 10px 24px rgba(37, 99, 235, .35); }
.lp-steps h3 { font-size: var(--fs-lg); font-weight: 700; margin: var(--sp-4) 0 var(--sp-2); }
.lp-steps p { margin: 0; color: var(--text-2); line-height: 1.6; }

.lp-plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.lp-plans .plan-card { border-radius: 20px; padding: var(--sp-8) var(--sp-6) var(--sp-6); }
.lp-plans .plan-card.is-featured { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), var(--surface) 45%); transform: translateY(-8px); }
.lp-plans .plan-card .btn { margin-top: auto; }

.lp-faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--sp-10); align-items: start; }
.lp-faq { display: flex; flex-direction: column; gap: var(--sp-3); }
.lp-faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--bg); padding: 0 var(--sp-5); transition: border-color var(--dur); }
.lp-faq details[open] { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.lp-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: var(--sp-4) 0; font-weight: 650; line-height: 1.4; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--primary-text); transition: transform var(--dur); flex: none; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq summary:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; border-radius: var(--r-sm); }
.lp-faq details p { margin: 0 0 var(--sp-4); color: var(--text-2); line-height: 1.65; }

.lp-final { padding: 0 0 96px; }
.lp-final-inner { position: relative; overflow: hidden; text-align: center; padding: 72px var(--sp-6); border-radius: 28px; background: radial-gradient(60% 120% at 20% 0%, rgba(37, 99, 235, .55), transparent 60%), radial-gradient(50% 100% at 90% 100%, rgba(34, 211, 238, .35), transparent 60%), #0A1222; color: #CBD5E1; max-width: 1132px; border: 1px solid rgba(96, 165, 250, .28); box-shadow: 0 30px 80px rgba(2, 6, 23, .35); }
.lp-final h2 { color: #FFFFFF; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 var(--sp-3); }
.lp-final p { margin: 0; font-size: 1.1rem; }
.lp-cta-center { justify-content: center; }

.lp-footer { border-top: 1px solid var(--border); padding: var(--sp-10) 0 var(--sp-6); background: var(--surface); }
.lp-footer .brand-name { color: var(--text); }
.lp-footer .brand-tag { color: var(--primary-text); }
.lp-footer-grid { display: flex; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap; }
.lp-footer-text { color: var(--text-2); margin: var(--sp-3) 0 0; }
.lp-footer nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: center; }
.lp-footer nav a { color: var(--text-2); font-weight: 500; min-height: 24px; display: inline-flex; align-items: center; }
.lp-copy { margin-top: var(--sp-8); color: var(--muted); font-size: var(--fs-sm); }

@media (max-width: 1000px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .lp-window { transform: none; }
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .lp-links { display: none; }
}
@media (max-width: 760px) {
  .lp-container { padding-inline: var(--sp-4); }
  .lp-hero { padding-top: calc(69px + 40px); }
  .lp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-features, .lp-steps { grid-template-columns: minmax(0, 1fr); }
  .lp-steps li::after { display: none; }
  .lp-section { padding: 64px 0; }
  .lp-section-head { margin-bottom: 36px; }
  .lp-plans .plan-card.is-featured { transform: none; }
  .lp-login { display: none; }
  .lp-float-ticket { right: 0; }
  .lp-float-vpn { left: 0; }
  .lp-cta .btn { flex: 1 1 100%; }
  .lp-final-inner { padding: 48px var(--sp-4); border-radius: 20px; }
}
@media (max-width: 400px) {
  .lp-brand .brand-text { display: none; }
}

/* Application installable : page hors connexion, bouton d'installation */
.offline-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4); text-align: center; padding: var(--sp-6); max-width: 460px; margin: 0 auto; }
.offline-page h1 { font-size: var(--fs-2xl); margin: 0; }
.offline-page p { margin: 0; color: var(--text-2); line-height: 1.6; }
[data-install-app][hidden], [data-install-ios][hidden], [data-install-app-wrap][hidden] { display: none !important; }
.install-hint { font-size: var(--fs-sm); color: var(--text-2); margin: 0; padding: var(--sp-2) var(--sp-3); max-width: 260px; line-height: 1.45; }
.lp-install { margin-top: var(--sp-4); font-size: var(--fs-sm); color: #94A3B8; }
.lp-install .btn { margin-right: var(--sp-2); }

/* 7. Authentification ---------------------------------------------------- */
.auth-body { background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); min-height: 100vh; }
.auth-aside { position: relative; overflow: hidden; background: #0B1220; color: #CBD5E1; padding: var(--sp-10); display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-8); border-right: 1px solid #1F2937; }
.auth-aside::before { content: ""; position: absolute; inset: auto -120px -160px auto; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(96, 165, 250, .16); box-shadow: 0 0 0 60px rgba(96, 165, 250, .04), 0 0 0 120px rgba(96, 165, 250, .03); pointer-events: none; }
.auth-pitch { position: relative; }
.auth-pitch h2 { color: #F8FAFC; font-size: var(--fs-3xl); line-height: 1.25; letter-spacing: -.02em; margin-bottom: var(--sp-3); }
.auth-slogan { color: #93C5FD; font-weight: 500; margin: 0 0 var(--sp-6); }
.pitch-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.pitch-list li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.pitch-list .icon { color: #34D399; margin-top: 3px; }
.auth-foot { position: relative; margin: 0; font-size: var(--fs-sm); color: #94A3B8; }
.auth-main { display: grid; place-items: center; padding: var(--sp-8) var(--sp-4); position: relative; }
.auth-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-8); box-shadow: var(--shadow-lg); }
.auth-title { font-size: var(--fs-2xl); font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-2); margin: 0 0 var(--sp-6); }
.auth-switch { text-align: center; margin: var(--sp-5) 0 0; color: var(--text-2); font-size: var(--fs-base); }
.theme-floating { position: absolute; top: var(--sp-4); right: var(--sp-4); border: 1px solid var(--border); background: var(--surface); }
.error-page { text-align: center; display: flex; flex-direction: column; align-items: center; }
.error-code { font-size: 64px; font-weight: 800; color: var(--primary-text); line-height: 1; margin-bottom: var(--sp-2); letter-spacing: -.03em; }

/* 8. Responsive --------------------------------------------------------- */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .grid-main, .grid-3-cols, .grid-halves { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .sidebar, .sidebar-collapsed .sidebar {
    position: fixed; left: 0; top: 0; z-index: var(--z-drawer); width: min(300px, 86vw);
    transform: translateX(-100%); transition: transform var(--dur-slow) var(--ease); box-shadow: var(--shadow-lg);
  }
  .sidebar-collapsed .sidebar .brand-text, .sidebar-collapsed .sidebar .nav-link span,
  .sidebar-collapsed .sidebar .nav-section, .sidebar-collapsed .sidebar .tenant-chip span { display: revert; }
  .sidebar-collapsed .sidebar .nav-link { justify-content: flex-start; padding: 8px var(--sp-3); }
  .sidebar-collapsed .sidebar { overflow-y: auto; }
  .sidebar-collapsed .sidebar .nav-link::after { display: none; }
  .sidebar-collapsed .sidebar .nav-link .nav-count { position: static; margin-left: auto; font-size: 11px; line-height: 18px; }
  .sidebar-collapsed .sidebar .brand { justify-content: flex-start; padding: var(--sp-5) var(--sp-5) var(--sp-4); }
  .sidebar-collapsed .sidebar .tenant-chip { justify-content: flex-start; }
  .user-chevron { display: none; }
  .sidebar.is-open { transform: none; }
  .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: var(--z-backdrop); animation: fade-in var(--dur) var(--ease); }
  .only-mobile { display: inline-grid; }
  .only-desktop { display: none !important; }
  .topbar { padding: var(--sp-2) var(--sp-4); min-height: 56px; }
  .content { padding: var(--sp-4) var(--sp-4) var(--sp-10); gap: var(--sp-4); }
  .user-meta { display: none; }
  .user-menu { padding-left: var(--sp-2); }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { padding: var(--sp-5) var(--sp-4); border-right: 0; }
  .auth-aside::before, .auth-pitch, .auth-foot { display: none; }
}
@media (max-width: 640px) {
  .stat-grid, .stat-grid-3, .grid-2, .grid-3, .choice-row { grid-template-columns: minmax(0, 1fr); }
  .card { padding: var(--sp-4); }
  .table-wrap { margin: 0 calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)); }
  .table th, .table td { padding: 10px var(--sp-4); }
  .auth-card { padding: var(--sp-6) var(--sp-5); border-radius: var(--r-lg); }
  .toolbar-end { margin-left: 0; }
  .toolbar select { min-width: 0; flex: 1 1 140px; }
  /* champs à 16 px : évite le zoom automatique sur iPhone */
  input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"], input[type="number"], select, textarea { font-size: 16px; }
  /* tableaux marqués .table-stack : une carte par ligne (libellés via data-label) */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
  .table-stack td { padding: 3px 0; border: 0; text-align: left; display: flex; justify-content: space-between; gap: var(--sp-3); }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
  .table-stack td.num { white-space: normal; }
  .modal-body { padding: var(--sp-5) var(--sp-5) var(--sp-3); }
  .modal-actions { padding: var(--sp-3) var(--sp-5) var(--sp-4); flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .msg { max-width: 100%; }
  /* assistants : seule l'étape en cours garde son libellé */
  .steps { gap: 4px; overflow: visible; }
  .steps li { min-width: 0; grid-template-columns: auto; justify-items: center; }
  .steps li:not(.is-current) .step-label { display: none; }
  .steps li.is-current { flex: 3 1 0; grid-template-columns: auto 1fr; justify-items: start; }
  .wizard-actions { flex-direction: column-reverse; align-items: stretch; }
  .wizard-actions .btn, .wizard-actions form .btn { width: 100%; }
  .wizard-actions .btn-ghost:first-child { margin-right: 0; }
  .pick { flex-wrap: wrap; }
  .pick .badge { order: 3; margin-left: 52px; }
  .pick > .icon:last-child { display: none; }
  .page-bar .page-actions { width: 100%; justify-content: flex-start; }
  .pay-amount { align-items: flex-start; }
  .pay-option { grid-template-columns: auto 1fr; }
  .pay-option .btn { grid-column: 1 / -1; width: 100%; }
  .pay-targets li { flex-wrap: wrap; }
}

/* mouvement réduit : pas d'animations ni de transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .spinner, .btn.is-loading::after { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
