/* =====================================================================
   NAMOBI — Design System (identité « n. » : encre + menthe)
   Gestion de flotte VTC — feuille de style unique (vanilla CSS)
   ===================================================================== */

/* Inter (licence OFL), servie depuis le site : aucune requête vers un service tiers. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}

/* ---------------------------------------------------------------------
   1. TOKENS — couleurs, ombres, rayons, typo
   --------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* ====== Surfaces — LIGHT ======
     Palette neutre inspirée d'apple.com / samsung.com : gris très clair
     de fond, blanc pur pour les surfaces posées dessus, encre presque
     noire pour le texte. Plus de teinte de marque dans les surfaces. */
  --panel: #f5f5f7;
  --header: #ffffff;
  --color: #1d1d1f;
  --content: #ffffff;
  --box: #f5f5f7;
  --hover: #ececee;
  --shimmer: #e8e8ea;
  --theme-bg: #0a0e0d;
  --theme-color: #f5f5f7;
  --border-color: #d2d2d7;
  --text-secondary: #6e6e73;

  /* ====== Marque & sémantique ======
     Un seul accent, utilisé uniquement pour signaler l'interactif
     (boutons, liens, focus, sélection) — jamais en décoration. */
  --primary: #047a66;
  --primary-hover: #03604f;
  --primary-active: #024d40;
  --primary-soft: #e2f7f2;
  --accent: #0ef6cc;                /* menthe namobi — réservée aux surfaces sombres (menu, logo) */
  --primary-contrast: #ffffff;

  --secondary: #6e6e73;            /* gris neutre — variante d'icône, non colorée */
  --secondary-soft: #f0f0f2;

  --success: #1d9a6c;
  --success-soft: #e6f6ef;
  --warning: #c8791a;
  --warning-soft: #faf0e1;
  --danger: #d5372f;
  --danger-soft: #fbeae9;
  --info: #0a84ae;
  --info-soft: #e6f4f8;

  --pro-accent: #48484a;           /* badge Pro — gris graphite constant (visible sur clair et sombre), pas de couleur dédiée */
  --pro-soft: #f0f0f2;

  /* ====== Rayons, ombres, transitions ====== */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .03);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .04);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, .09);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: .18s;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --sidebar-w: 264px;
  --sidebar-w-collapsed: 84px;
  --topbar-h: 68px;
}

/* ====== DARK (préférence système) ====== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color: #f5f5f7;
    --hover: #2c2c2e;
    --shimmer: #2c2c2e;
    --panel: #000000;
    --box: #1c1c1e;
    --content: #1c1c1e;
    --header: #000000;
    /* --theme-bg / --theme-color stay constant across themes on purpose:
       the sidebar, footer, auth panel and dark CTA blocks are an "inverted"
       chrome surface with hardcoded light foreground colors, in both
       light and dark mode — flipping these here left that chrome
       unreadable (light-on-light) whenever the site itself went dark. */
    --border-color: #38383a;
    --text-secondary: #98989d;

    --primary: #19c9a8; --primary-hover: #3ad8ba; --primary-active: #0ef6cc; --primary-contrast: #04221c;
    --primary-soft: #0a2e28;
    --secondary-soft: #232325;
    --success-soft: #0e2a20;
    --warning-soft: #33260f;
    --danger-soft: #34140f;
    --info-soft: #0b2a32;
    --pro-soft: #232325;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, .5);
  }
}

/* ====== DARK (toggle manuel) ====== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color: #f5f5f7;
  --hover: #2c2c2e;
  --shimmer: #2c2c2e;
  --panel: #000000;
  --box: #1c1c1e;
  --content: #1c1c1e;
  --header: #000000;
  /* --theme-bg / --theme-color intentionally not redefined here — see note above. */
  --border-color: #38383a;
  --text-secondary: #98989d;

  --primary: #19c9a8; --primary-hover: #3ad8ba; --primary-active: #0ef6cc; --primary-contrast: #04221c;
  --primary-soft: #0a2e28;
  --secondary-soft: #232325;
  --success-soft: #0e2a20;
  --warning-soft: #33260f;
  --danger-soft: #34140f;
  --info-soft: #0b2a32;
  --pro-soft: #232325;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, .5);
}

:root[data-theme="light"] { color-scheme: light; }

/* ---------------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--panel);
  color: var(--color);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100vh;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 32px; letter-spacing: -.025em; }
h2 { font-size: 25px; letter-spacing: -.02em; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }

p { color: var(--text-secondary); line-height: 1.6; }

::selection { background: var(--primary-soft); color: var(--primary-active); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------------
   3. UTILITAIRES
   --------------------------------------------------------------------- */
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }

.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }

.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.mb-4{margin-bottom:4px}.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}

.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11.5px; }
.text-lg { font-size: 17px; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius-md); }
.hidden { display: none !important; }

.only-mobile { display: none; }
@media (max-width: 960px) {
  .only-mobile { display: block; }
  .only-desktop { display: none !important; }
}

/* ---------------------------------------------------------------------
   4. BOUTONS
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: var(--radius-pill);
  border: 0; background: var(--box); color: var(--color);
  font-size: 14px; font-weight: 590; white-space: nowrap; letter-spacing: -.005em;
  transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-sm { height: 33px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 28px; font-size: 16px; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 33px; }
.btn-block { width: 100%; }
.btn-pill { border-radius: var(--radius-pill); }
.btn:not(.btn-pill) { border-radius: var(--radius-md); }

.btn-primary { background: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-active); }

.btn-dark { background: var(--theme-bg); color: var(--theme-color); }
.btn-dark:hover { filter: brightness(1.25); }

.btn-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-color); color: var(--color); }
.btn-outline:hover { background: var(--hover); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--hover); color: var(--color); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.btn-danger-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-soft); }

.btn-white { background: #fff; color: #1d1d1f; }
.btn-white:hover { background: #f3f3f3; }

/* ---------------------------------------------------------------------
   5. LAYOUT APPLICATIF — sidebar + topbar
   --------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: var(--theme-bg); color: var(--theme-color);
  display: flex; flex-direction: column;
  transition: width var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 3px; height: var(--topbar-h);
  padding: 0 20px; flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .logo-text { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.sidebar-brand .logo-text .accent { color: var(--primary); }
.logo-swoosh { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-group { margin-bottom: 18px; }
.nav-group-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: rgba(207,211,214,.45); padding: 0 12px; margin-bottom: 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; color: rgba(207,211,214,.8); margin-bottom: 2px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-item svg { flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item { position: relative; }
.nav-item.active { background: rgba(14,246,204,.13); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-item .badge-count {
  margin-left: auto; font-size: 10.5px; font-weight: 700; background: rgba(255,255,255,.14);
  color: #fff; border-radius: var(--radius-pill); padding: 2px 7px;
}
.nav-item.locked { opacity: .55; }
.nav-item.locked .pro-tag {
  margin-left: auto; font-size: 9.5px; font-weight: 800; background: var(--pro-accent);
  color: #fff; border-radius: 5px; padding: 2px 5px; letter-spacing: .03em;
}

.sidebar-footer { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.plan-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-md);
  padding: 12px; font-size: 12.5px;
}
.plan-card .plan-name { font-weight: 700; color: #fff; margin-bottom: 4px; display:flex; align-items:center; gap:6px; }
.plan-card p { color: rgba(207,211,214,.65); margin-bottom: 10px; font-size: 12px; }

.main-area { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; transition: margin var(--dur) var(--ease); }

.topbar {
  height: var(--topbar-h); background: color-mix(in srgb, var(--header) 82%, transparent); backdrop-filter: blur(16px) saturate(1.6);
  display: flex; align-items: center; justify-content: space-between; padding: 0 32px;
  position: sticky; top: 0; z-index: 30; gap: 16px;
}
.topbar-search {
  display: flex; align-items: center; gap: 8px; background: var(--box);
  border-radius: var(--radius-pill); padding: 0 14px; height: 40px; width: 320px; max-width: 40vw; color: var(--text-secondary);
}
.topbar-search input { background: transparent; border: 0; outline: 0; width: 100%; color: var(--color); font-size: 13.5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md);
  background: transparent; border: 1px solid transparent; color: var(--text-secondary); position: relative;
}
.icon-btn:hover { background: var(--hover); color: var(--color); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--header); }

.theme-toggle { display: flex; align-items: center; gap: 6px; padding: 3px; background: var(--box); border-radius: var(--radius-pill); }
.theme-toggle button { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); background: transparent; }
.theme-toggle button.active { background: var(--content); color: var(--primary); box-shadow: var(--shadow-sm); }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: var(--radius-pill); background: var(--box); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.user-chip .name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-chip .role { font-size: 11px; color: var(--text-secondary); }

.page-wrap { padding: 40px 32px 72px; flex: 1; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.page-header .eyebrow { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.page-header p { margin-top: 6px; max-width: 640px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; }
.breadcrumb a:hover { color: var(--color); }
.breadcrumb .sep { opacity: .5; }

.menu-toggle { display: none; }
@media (max-width: 1080px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .menu-toggle { display: flex; }
  .topbar-search { display: none; }
}
.sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(10,14,18,.5); z-index: 39; }
.sidebar-scrim.show { display: block; }

/* Sidebar repliée (desktop uniquement) — déclenchée par le bouton [data-menu-toggle] */
@media (min-width: 1081px) {
  body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
  body.sidebar-collapsed .main-area { margin-left: var(--sidebar-w-collapsed); }
  body.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0 10px; }
  body.sidebar-collapsed .sidebar-brand .logo-text,
  body.sidebar-collapsed .sidebar .nav-group-label,
  body.sidebar-collapsed .sidebar .nav-label,
  body.sidebar-collapsed .nav-item .badge-count,
  body.sidebar-collapsed .nav-item .pro-tag,
  body.sidebar-collapsed .sidebar-footer { display: none; }
  body.sidebar-collapsed .nav-item { justify-content: center; padding: 10px 0; gap: 0; }
  body.sidebar-collapsed .nav-item.active::before { left: -10px; }
}

/* ---------------------------------------------------------------------
   6. CARDS / KPI
   --------------------------------------------------------------------- */
.card { background: var(--content); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 26px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; gap: 12px; }
.card-header h3 { font-size: 17px; letter-spacing: -.01em; }
.card-header .subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.card-body { padding: 26px; }
.card-body.no-pad { padding: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--border-color); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
@media (max-width: 1180px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card { background: var(--content); border-radius: 0; padding: 26px; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.kpi-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.kpi-icon.orange { color: var(--primary); }
.kpi-icon.blue { color: var(--secondary); }
.kpi-icon.green { color: var(--success); }
.kpi-icon.purple { color: var(--pro-accent); }
.kpi-icon.red { color: var(--danger); }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -.025em; }
.kpi-label { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-pill); }
.kpi-delta.up { color: var(--success); background: var(--success-soft); }
.kpi-delta.down { color: var(--danger); background: var(--danger-soft); }

/* ---------------------------------------------------------------------
   7. TABLES
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; font-size: 13.8px; }
.table thead th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary); font-weight: 600; padding: 16px 20px 12px;
  white-space: nowrap; position: sticky; top: 0; background: var(--content);
  border-bottom: 1px solid var(--border-color);
}
.table tbody td { padding: 16px 20px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: var(--hover); }
.table .cell-main { font-weight: 600; }
.table .cell-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.row-check { width: 18px; height: 18px; }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--border-color); }
.table-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border-color); flex-wrap: wrap; gap: 10px; }

.pagination { display: flex; align-items: center; gap: 6px; }
.pagination button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--box); color: var(--color); font-size: 12.5px; font-weight: 600; }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination button:hover:not(.active) { background: var(--hover); }

/* ---------------------------------------------------------------------
   8. BADGES / STATUTS / TAGS
   --------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); line-height: 1.4; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.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.info { background: var(--info-soft); color: var(--info); }
.badge.neutral { background: var(--box); color: var(--text-secondary); }
.badge.purple { background: var(--pro-soft); color: var(--pro-accent); }
.badge.no-dot::before { display: none; }

.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--box); color: var(--color); }
.pro-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .05em; background: var(--pro-accent); color: #fff; padding: 3px 8px; border-radius: 5px; }

/* ---------------------------------------------------------------------
   9. FORMULAIRES
   --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--text-secondary); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 16px; border-radius: var(--radius-md); border: 0;
  background: var(--box); color: var(--color); font-size: 14px; transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-secondary); opacity: .8; }
.input:focus { outline: none; box-shadow: 0 0 0 2px var(--primary); background: var(--content); }
textarea.input { height: auto; padding: 12px 14px; min-height: 96px; resize: vertical; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .input { padding-left: 40px; }
.input-icon-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.input-icon-wrap .toggle-visibility { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-secondary); padding: 6px; }

.select-wrap { position: relative; }
.select-wrap::after { content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-wrap select { appearance: none; padding-right: 34px; }

.checkbox-row, .radio-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.checkbox-row input, .radio-row input { width: 17px; height: 17px; accent-color: var(--primary); }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-color); border-radius: var(--radius-pill); transition: background var(--dur) var(--ease); }
.switch .track::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::before { transform: translateX(18px); }

.form-section { padding: 22px; border-bottom: 1px solid var(--border-color); }
.form-section:last-child { border-bottom: 0; }
.form-section h4 { margin-bottom: 4px; }
.form-section .desc { font-size: 12.5px; margin-bottom: 16px; }

.upload-box { border: 1.5px dashed var(--border-color); border-radius: var(--radius-md); padding: 24px; text-align: center; color: var(--text-secondary); background: var(--box); }
.upload-box svg { margin: 0 auto 8px; color: var(--text-secondary); }

/* ---------------------------------------------------------------------
   10. MODALS
   --------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 25, .55); display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(2px);
}
.modal-overlay.show { display: flex; }
.modal { background: var(--content); border-radius: var(--radius-lg); width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); max-height: 88vh; display: flex; flex-direction: column; animation: modal-in .18s var(--ease); }
.modal.modal-lg { max-width: 760px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--border-color); flex-shrink: 0; }

/* ---------------------------------------------------------------------
   11. ALERTS / BANNERS / EMPTY STATES
   --------------------------------------------------------------------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid transparent; font-size: 13.5px; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert.success { background: var(--success-soft); color: var(--success); }
.alert.warning { background: var(--warning-soft); color: var(--warning); }
.alert.danger { background: var(--danger-soft); color: var(--danger); }
.alert strong { color: var(--color); display: block; margin-bottom: 2px; }

.empty-state { text-align: center; padding: 60px 24px; color: var(--text-secondary); }
.empty-state .icon-wrap { width: 64px; height: 64px; border-radius: 50%; background: var(--box); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: var(--text-secondary); }
.empty-state h4 { color: var(--color); margin-bottom: 6px; }

/* ---------------------------------------------------------------------
   12. TABS
   --------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-color); padding: 0 22px; overflow-x: auto; }
.tab-btn { padding: 14px 6px; margin-right: 22px; font-size: 13.8px; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-btn.active { color: var(--primary); border-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--color); }

/* ---------------------------------------------------------------------
   13. LANDING PAGE
   --------------------------------------------------------------------- */
.public-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--header) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); }
.public-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.public-nav { display: flex; align-items: center; gap: 32px; }
.public-nav a:not(.btn) { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.public-nav a:not(.btn):hover { color: var(--color); }
.brand { display: flex; align-items: center; gap: 3px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.brand .accent { color: var(--primary); }
.brand .logo-swoosh { width: 26px; height: 26px; }

.hero { padding: 160px 0 120px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -320px; right: -260px; width: 780px; height: 780px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 7%, transparent), transparent 70%); z-index: 0;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
@media (max-width: 980px) { .hero .container { grid-template-columns: 1fr; } .hero { padding: 72px 0 48px; } }
.eyebrow-pill {
  display: inline-flex; align-items: center; color: var(--text-secondary); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 22px;
}
.hero h1 { font-size: 76px; line-height: 1.02; letter-spacing: -.045em; margin-bottom: 28px; font-weight: 700; }
@media (max-width: 980px) { .hero h1 { font-size: 52px; } }
@media (max-width: 640px) { .hero h1 { font-size: 38px; } }
.hero h1 .accent { color: var(--primary); }
.hero p.lead { font-size: 21px; line-height: 1.5; color: var(--text-secondary); max-width: 480px; margin-bottom: 40px; font-weight: 400; }
.hero-cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-cta .link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--color); border-bottom: 1px solid var(--border-color); padding-bottom: 2px; }
.hero-cta .link-arrow:hover { border-color: var(--color); }
.hero-trust { color: var(--text-secondary); font-size: 13.5px; }
.hero-trust strong { color: var(--color); font-weight: 600; }

.hero-visual { position: relative; }
.hero-visual .float-card { position: absolute; background: var(--content); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 12.5px; display: flex; align-items: center; gap: 10px; z-index: 2; }
.hero-visual .float-card.c1 { top: -18px; left: -18px; }
.hero-visual .float-card.c2 { bottom: 20px; right: -24px; }
@media (max-width: 980px) { .hero-visual .float-card { display: none; } }

.logos-strip { padding: 34px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.logos-strip .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.logos-strip .label { font-size: 12px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.logos-row { display: flex; gap: 36px; flex-wrap: wrap; align-items: center; color: var(--text-secondary); font-weight: 700; font-size: 15px; opacity: .7; }

.section { padding: 140px 0; }
@media (max-width: 640px) { .section { padding: 80px 0; } }
.section-head { text-align: center; max-width: 600px; margin: 0 auto 64px; }
.section-head h2 { font-size: 44px; letter-spacing: -.03em; }
@media (max-width: 640px) { .section-head h2 { font-size: 32px; } }
.section-head p { margin-top: 16px; font-size: 18px; line-height: 1.6; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { background: transparent; border: 0; border-top: 1px solid var(--border-color); border-radius: 0; padding: 28px 4px 0; transition: border-color var(--dur) var(--ease); }
.feature-card:hover { border-top-color: var(--primary); }
.feature-icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; color: var(--text-secondary); transition: color var(--dur) var(--ease); }
.feature-card:hover .feature-icon { color: var(--primary); }
.feature-card h3 { font-size: 16px; margin-bottom: 8px; letter-spacing: -.005em; }
.feature-card p { font-size: 13.8px; line-height: 1.6; }

.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .how-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .how-steps { grid-template-columns: 1fr; } }
.step-card { position: relative; padding: 24px 20px 20px; }
.step-card .step-num { width: 38px; height: 38px; border-radius: 50%; background: var(--theme-bg); color: var(--theme-color); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step-card h4 { font-size: 15px; margin-bottom: 6px; }
.step-card p { font-size: 13.3px; }

.pricing-toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 44px; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 860px; margin: 0 auto; }
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card { background: var(--content); border-radius: var(--radius-lg); padding: 40px; position: relative; box-shadow: var(--shadow-sm); }
.price-card.featured { box-shadow: var(--shadow-lg); }
.price-card .plan-badge { position: absolute; top: -13px; left: 36px; background: var(--color); color: var(--content); font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 5px 12px; border-radius: var(--radius-pill); }
.price-card h3 { font-size: 19px; margin-bottom: 6px; }
.price-card .price { font-size: 42px; font-weight: 700; margin: 20px 0 4px; letter-spacing: -.03em; }
.price-card .price span { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.price-list { margin: 24px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.price-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.8px; }
.price-list li svg { flex-shrink: 0; margin-top: 2px; color: var(--success); }
.price-list li.disabled { color: var(--text-secondary); opacity: .55; }
.price-list li.disabled svg { color: var(--text-secondary); }

.testimonial { max-width: 720px; margin: 0 auto; text-align: center; }
.testimonial .avatar.lg { margin: 0 auto 24px; }
.testimonial p.quote { font-size: 26px; font-weight: 600; color: var(--color); margin-bottom: 20px; line-height: 1.4; letter-spacing: -.015em; }

.cta-banner { background: var(--theme-bg); color: var(--theme-color); border-radius: var(--radius-lg); padding: 56px; text-align: center; }
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: rgba(207,211,214,.75); max-width: 480px; margin: 0 auto 28px; }

.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--box); border-radius: var(--radius-md); overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; font-weight: 600; font-size: 14.5px; }
.faq-q svg { transition: transform var(--dur) var(--ease); flex-shrink: 0; color: var(--text-secondary); }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease); font-size: 13.8px; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a-inner { padding: 0 20px 20px; color: var(--text-secondary); }

.site-footer { background: var(--theme-bg); color: rgba(207,211,214,.7); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 44px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.footer-socials a:hover { background: rgba(255,255,255,.16); }

/* ---------------------------------------------------------------------
   14. AUTH PAGES
   --------------------------------------------------------------------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 940px) { .auth-shell { grid-template-columns: 1fr; } }
.auth-side { background: var(--theme-bg); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
@media (max-width: 940px) { .auth-side { display: none; } }
.auth-side::before { content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(14,246,204,.13), transparent 70%); top: -160px; right: -160px; }
.auth-side-content { position: relative; z-index: 1; max-width: 420px; }
.auth-side-content h2 { color: #fff; font-size: 28px; margin-bottom: 14px; }
.auth-side-content p { color: rgba(207,211,214,.75); margin-bottom: 28px; }
.auth-stat-row { display: flex; gap: 28px; }
.auth-stat-row .num { font-size: 24px; font-weight: 800; color: #fff; }
.auth-stat-row .lab { font-size: 12px; color: rgba(207,211,214,.6); }
.auth-quote { position: relative; z-index: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-md); padding: 18px; font-size: 13.5px; color: rgba(255,255,255,.85); }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--panel); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .brand { margin-bottom: 36px; }
.auth-card h1 { font-size: 25px; margin-bottom: 6px; }
.auth-card > p.text-secondary { margin-bottom: 30px; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 12.5px; margin: 22px 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
.social-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.plan-choice label { border: 1.5px solid var(--border-color); border-radius: var(--radius-md); padding: 14px; cursor: pointer; position: relative; background: var(--box); }
.plan-choice input { position: absolute; opacity: 0; }
.plan-choice input:checked + .plan-choice-body { color: var(--primary); }
.plan-choice input:checked ~ .check-dot { border-color: var(--primary); background: var(--primary); }
.plan-choice label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.plan-choice-body .t { font-weight: 700; font-size: 13.8px; color: var(--color); }
.plan-choice-body .s { font-size: 11.5px; color: var(--text-secondary); }

/* ---------------------------------------------------------------------
   15. CHARTS / STATISTIQUES helpers
   --------------------------------------------------------------------- */
.chart-card canvas { width: 100% !important; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; }
.chart-legend .item { display: flex; align-items: center; gap: 8px; font-size: 12.8px; color: var(--text-secondary); }
.chart-legend .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.segmented { display: inline-flex; background: var(--box); border-radius: var(--radius-pill); padding: 3px; }
.segmented button { padding: 7px 14px; font-size: 12.8px; font-weight: 600; color: var(--text-secondary); border-radius: var(--radius-pill); }
.segmented button.active { background: var(--content); color: var(--color); box-shadow: var(--shadow-sm); }

.two-col-charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 980px) { .two-col-charts { grid-template-columns: 1fr; } }

.progress { height: 8px; border-radius: var(--radius-pill); background: var(--box); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--primary); }

.list-ranking { display: flex; flex-direction: column; gap: 16px; }
.rank-row { display: flex; align-items: center; gap: 12px; }
.rank-row .rank-num { width: 22px; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.rank-row .rank-info { flex: 1; min-width: 0; }
.rank-row .rank-info .t { font-size: 13.3px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.rank-row .rank-info .t span:last-child { color: var(--text-secondary); font-weight: 600; }

/* ---------------------------------------------------------------------
   16. TIMELINE (Affectations)
   --------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border-color); }
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -28px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--content); border: 3px solid var(--primary); }
.timeline-item.past::before { border-color: var(--border-color); }
.timeline-item .date { font-size: 11.5px; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

/* ---------------------------------------------------------------------
   17. LOGIN/SIGNUP responsive tweaks + misc
   --------------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--content); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); min-width: 220px; padding: 8px; display: none; z-index: 60; }
.dropdown-menu.show { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--hover); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border-color); margin: 6px 0; }
.dropdown-header { padding: 10px; border-bottom: 1px solid var(--border-color); margin-bottom: 6px; }
.dropdown-section-label { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); }
.dropdown-menu [data-role-switch] { justify-content: space-between; }
.dropdown-menu [data-role-switch] .role-check { width: 14px; height: 14px; color: var(--primary); opacity: 0; flex-shrink: 0; }
.dropdown-menu [data-role-switch].active { color: var(--primary); }
.dropdown-menu [data-role-switch].active .role-check { opacity: 1; }

.skeleton { background: linear-gradient(90deg, var(--shimmer) 25%, var(--hover) 50%, var(--shimmer) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.lock-overlay { position: relative; }
.lock-overlay .lock-shield { position: absolute; inset: 0; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(2px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; border-radius: inherit; z-index: 5; }
.lock-overlay .lock-shield svg { color: var(--pro-accent); }

/* ---------------------------------------------------------------------
   18. COOKIE CONSENT
   --------------------------------------------------------------------- */
.cookie-consent {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 500;
  max-width: 480px; margin: 0 auto;
  background: var(--content); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 24px;
  transform: translateY(140%); opacity: 0; transition: transform .38s var(--ease), opacity .38s var(--ease);
}
.cookie-consent.show { transform: translateY(0); opacity: 1; }
.cookie-consent-icon { width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--box); color: var(--color); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.cookie-consent-text { font-size: 13.3px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 18px; }
.cookie-consent-text strong { color: var(--color); display: block; margin-bottom: 4px; font-size: 14.5px; font-weight: 600; }
.cookie-consent-text a { color: var(--color); text-decoration: underline; text-underline-offset: 2px; }
.cookie-consent-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cookie-consent-actions .btn { flex: 1; }
@media (max-width: 560px) {
  .cookie-consent { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
}

.cookie-prefs-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.cookie-prefs-row:last-child { border-bottom: 0; }
.cookie-prefs-row .t { font-weight: 600; font-size: 13.8px; margin-bottom: 3px; }
.cookie-prefs-row .s { font-size: 12.3px; color: var(--text-secondary); line-height: 1.5; }
.cookie-prefs-row .switch { margin-top: 2px; }

@media print {
  .sidebar, .topbar, .no-print, .cookie-consent { display: none !important; }
  .main-area { margin-left: 0 !important; }
}

/* ---------------------------------------------------------------------
   PAGES PUBLIQUES DE CONTENU (CGU, confidentialité, à propos, contact, blog)
   --------------------------------------------------------------------- */
.content-hero { padding: 76px 0 8px; text-align: center; }
.content-hero .eyebrow-pill { margin-inline: auto; }
.content-hero h1 { margin-top: 18px; }
.content-hero p { max-width: 580px; margin: 16px auto 0; font-size: 17px; }

.prose { max-width: 720px; margin: 0 auto; padding: 56px 0 130px; }
.prose .updated { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 44px; }
.prose h2 { margin-top: 46px; margin-bottom: 14px; }
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose li { color: var(--text-secondary); font-size: 15.5px; line-height: 1.75; margin-bottom: 14px; }
.prose ul { padding-left: 22px; margin-bottom: 14px; }
.prose strong { color: var(--color); font-weight: 600; }

.about-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 8px 0 120px; }
@media (max-width: 900px) { .about-values { grid-template-columns: 1fr; } }
.about-value { padding: 30px; background: var(--content); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.about-value .icon-badge { width: 42px; height: 42px; border-radius: 11px; background: var(--hover); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.about-value h3 { margin-bottom: 8px; }
.about-value p { margin-bottom: 0; font-size: 14.5px; }

.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 880px; margin: 0 auto; padding: 8px 0 100px; text-align: center; }
@media (max-width: 760px) { .about-stats { grid-template-columns: repeat(2, 1fr); } }
.about-stats .stat-value { font-size: 40px; font-weight: 800; letter-spacing: -.02em; color: var(--color); }
.about-stats .stat-label { margin-top: 6px; font-size: 13.5px; color: var(--text-secondary); }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 8px 0 130px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { background: var(--content); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.blog-card-img { height: 150px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card .tag { margin-bottom: 14px; align-self: flex-start; }
.blog-card h3 { margin-bottom: 8px; }
.blog-card p { font-size: 14px; margin-bottom: 0; flex: 1; }
.blog-card .meta { margin-top: 18px; font-size: 12.5px; color: var(--text-secondary); }

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; padding: 8px 0 130px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-info-item .icon-badge { width: 38px; height: 38px; border-radius: 10px; background: var(--hover); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); }
.contact-info-item .t { font-weight: 600; font-size: 14.5px; margin-bottom: 2px; }
.contact-info-item .s { font-size: 13.5px; color: var(--text-secondary); }

/* ---------------------------------------------------------------------
   19. AJOUTS SaaS — logo « n. », messages, états
   --------------------------------------------------------------------- */
.logo-mark { height: 26px; width: 26px; flex-shrink: 0; display: block; }
.logo-word { height: 26px; width: auto; flex-shrink: 0; display: block; margin-left: 2px; }
.logo-dot { fill: var(--accent); }
.brand, .sidebar-brand { color: var(--color); }
.sidebar-brand, .auth-side .brand, .site-footer .brand { color: #fff; }
.public-header .brand .logo-dot, .auth-card .brand .logo-dot { fill: var(--primary); }
@media (min-width: 1081px) { body.sidebar-collapsed .sidebar-brand .logo-word { display: none; } }

.field .error { font-size: 12.5px; font-weight: 600; color: var(--danger); }
.input.is-invalid { box-shadow: 0 0 0 2px var(--danger); }
.flash { margin-bottom: 24px; }
.fleet-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--box); font-size: 13px; font-weight: 600; max-width: 38vw; }
.fleet-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip { border: 0; }
.dropdown-menu form { margin: 0; }
.usage { font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.steps-list { display: flex; flex-direction: column; }
.steps-list li { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.steps-list li:last-child { border-bottom: 0; }
.steps-list .n { width: 30px; height: 30px; border-radius: 50%; background: var(--box); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.steps-list .t { font-weight: 600; font-size: 14.5px; color: var(--color); }
.steps-list .s { font-size: 13px; color: var(--text-secondary); }
.steps-list .go { margin-left: auto; }
@media (max-width: 640px) { .page-wrap { padding: 28px 18px 56px; } .topbar { padding: 0 16px; } .theme-toggle { display: none; } }

/* ---------------------------------------------------------------------
   20. AJOUTS SaaS lot 2 — tableaux de flotte, groupes, formulaires
   --------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.plate { font-variant-numeric: tabular-nums; letter-spacing: .02em; font-weight: 600; white-space: nowrap; }
.table .tag, .table .cell-sub, .table td.num { white-space: nowrap; }
.label-optional { font-weight: 400; color: var(--text-secondary); }
.field[hidden] { display: none; }
.field .hint { font-size: 12.5px; color: var(--text-secondary); }

.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.table td:has(> .row-actions) { padding-left: 4px; padding-right: 12px; }
.row-actions form { margin: 0; display: flex; }
.row-actions .icon-btn { width: 34px; height: 34px; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.cell-person { display: flex; align-items: center; gap: 10px; }
.cell-person .avatar { flex-shrink: 0; }
.table td a.text-secondary { text-decoration: underline; text-underline-offset: 3px; }

.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--color); }
.pagination a:hover { background: var(--box); }
.pagination span.active { background: var(--box); }
.pagination span.disabled { color: var(--text-secondary); opacity: .45; }

.groups-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.group-add { display: flex; gap: 8px; align-items: center; margin: 0; }
.group-add .input { width: 240px; }
.group-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--box); font-size: 13px; font-weight: 600; color: var(--color); }
.chip a { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.chip .count { font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.chip.active { background: var(--primary); color: var(--primary-contrast, #fff); }
.chip.active .count { color: inherit; opacity: .8; }
.chip form { margin: 0; display: flex; }
.chip form button { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: inherit; opacity: .6; background: transparent; border: 0; cursor: pointer; }
.chip form button:hover { opacity: 1; background: rgba(120,130,140,.25); }

.locked-line { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.locked-line .lock-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--box); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-secondary); }
.locked-line .t { font-weight: 600; font-size: 14.5px; color: var(--color); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.locked-line .s { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.locked-line .btn { margin-left: auto; flex-shrink: 0; }

.steps-list li.done .n { background: var(--primary-soft); color: var(--primary); }
.fleet-chip.as-button { border: 0; cursor: pointer; color: var(--color); font-family: inherit; }
.fleet-chip.as-button:hover { background: var(--border-color); }
.dropdown-menu.left { left: 0; right: auto; }
.alert a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.modal form { display: contents; }

@media (max-width: 640px) {
  .locked-line { flex-wrap: wrap; }
  .locked-line .btn { margin-left: 52px; }
  .group-add { width: 100%; flex-wrap: wrap; }
  .group-add .input { width: 100%; }
  .group-add .btn { width: 100%; }
  .table-filters .input-icon-wrap, .table-filters .select-wrap, .table-filters select { width: 100% !important; }
}

/* ---------------------------------------------------------------------
   21. AJOUTS SaaS lot 3 — journal de caisse
   --------------------------------------------------------------------- */
.kpi-value .unit { font-size: 14px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0; }
.table td.amount { font-weight: 700; }
.table td.amount.in { color: var(--success); }
.table td.amount.out { color: var(--danger); }
.table .cell-sub.note { white-space: normal; max-width: 320px; }
.pagination button[wire\:click] { min-width: 34px; width: auto; height: 34px; padding: 0 10px; border-radius: 8px; background: transparent; font-size: 13px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--color); }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-switch label { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 12px; background: var(--box); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-secondary); border: 2px solid transparent; }
.type-switch input { position: absolute; opacity: 0; pointer-events: none; }
.type-switch label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.type-switch label.active.in { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.type-switch label.active.out { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.segmented button { border: 0; background: transparent; cursor: pointer; font-family: inherit; }

/* ---------------------------------------------------------------------
   22. AJOUTS SaaS lots 4 à 6 — graphiques, tableau de bord, réglages
   --------------------------------------------------------------------- */
:root { --chart-1: #0a8f78; --chart-2: #d2691e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart-1: #12a88c; --chart-2: #d9763a; } }
:root[data-theme="dark"] { --chart-1: #12a88c; --chart-2: #d9763a; }

.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 240px; }
.progress > span.c2 { background: var(--chart-2); }
.progress > span.c1 { background: var(--chart-1); }
.progress > span.ok { background: var(--success); }
.progress > span.mid { background: var(--warning); }
.progress > span.low { background: var(--danger); }
.rank-row .rank-info .sub { font-size: 12px; color: var(--text-secondary); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; }
.kpi-sub { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.fleet-line { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--text-secondary); margin: -8px 0 24px; }
.fleet-line strong { color: var(--color); font-weight: 600; }
.alert-list { display: flex; flex-direction: column; gap: 12px; }
.alert-list .alert { margin: 0; }
.alert-list .alert a.more { display: inline-block; margin-top: 4px; }
.card-header .btn { flex-shrink: 0; }
.nav-item .badge-count.warn { background: var(--warning); color: #1d1d1f; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.note-line { font-size: 12.5px; color: var(--text-secondary); margin-top: 12px; }
.segmented a { padding: 7px 14px; font-size: 12.8px; font-weight: 600; color: var(--text-secondary); border-radius: var(--radius-pill); white-space: nowrap; }
.segmented a.active { background: var(--content); color: var(--color); box-shadow: var(--shadow-sm); }
.segmented { max-width: 100%; overflow-x: auto; }
.filter-bar .table-filters { margin: 0; }
.duration-list { display: grid; gap: 8px; }
.duration-list label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--box); border: 2px solid transparent; cursor: pointer; font-size: 14px; }
.duration-list label.active { border-color: var(--primary); background: var(--primary-soft); }
.duration-list input { position: absolute; opacity: 0; pointer-events: none; }
.duration-list label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.duration-list .d { font-weight: 600; color: var(--color); display: inline-flex; align-items: center; gap: 8px; }
.duration-list .p { font-weight: 700; color: var(--color); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-wait { text-align: center; padding: 20px 8px; }
.pay-wait .t { font-weight: 600; color: var(--color); margin-top: 14px; }
.pay-wait .s { font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-color); border-top-color: var(--primary); margin: 0 auto; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.price-card .checkout { text-align: left; }
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .sim-grid { grid-template-columns: 1fr; } }
.plain-list { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-secondary); padding-left: 18px; list-style: disc; }
.plain-list li { padding-left: 2px; }
a.tab-btn { display: inline-block; }
.day-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.day-picker label { position: relative; cursor: pointer; }
.day-picker input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.day-picker span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--box); font-size: 13.5px; font-weight: 600; color: var(--text-secondary); border: 2px solid transparent; }
.day-picker input:checked + span { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.day-picker input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- Site public ---- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--content); color: var(--color); padding: 10px 14px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 12px; }
.public-nav a[aria-current="page"] { color: var(--color); }
.hero-preview { background: var(--content); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px; }
.hero-preview .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.hero-preview .head .t { font-weight: 700; color: var(--color); }
.hero-preview .big { font-size: 44px; font-weight: 700; letter-spacing: -.03em; color: var(--color); line-height: 1; }
.hero-preview .big-label { font-size: 13px; color: var(--text-secondary); margin: 6px 0 22px; }
.about-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 880px; margin: 0 auto; padding: 8px 0 100px; }
.about-facts .f { border-top: 1px solid var(--border-color); padding-top: 18px; }
.about-facts .f h3 { font-size: 16px; margin-bottom: 6px; }
.about-facts .f p { font-size: 14px; }
@media (max-width: 760px) { .about-facts { grid-template-columns: 1fr; } }
.blog-card { color: inherit; }
.blog-card-img { background: var(--theme-bg); color: var(--accent); }
.blog-card:hover h3 { color: var(--primary); }
.article-meta { font-size: 13.5px; color: var(--text-secondary); margin-top: 14px; }
.prose h3 { margin-top: 30px; margin-bottom: 10px; font-size: 18px; }
.prose ol { padding-left: 22px; margin-bottom: 14px; list-style: decimal; }
.prose ul { list-style: disc; }
.prose a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose .callout { background: var(--box); border-radius: var(--radius-md); padding: 18px 20px; margin: 24px 0; }
.prose .callout p:last-child { margin-bottom: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.price-durations { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.price-durations span { font-size: 12.5px; font-weight: 600; background: var(--box); border-radius: var(--radius-pill); padding: 5px 11px; color: var(--color); }
.faq-q { width: 100%; text-align: left; background: transparent; border: 0; color: inherit; font-family: inherit; font-size: inherit; cursor: pointer; }

/* ---- Tenue sur petit écran : un enfant de grille ne doit jamais élargir la page ---- */
.two-col-charts > *, .pricing-grid > *, .kpi-grid > *, .contact-grid > *, .blog-grid > *, .hero .container > * { min-width: 0; }
.card-header { flex-wrap: wrap; gap: 8px 12px; }
.card-header .badge { white-space: normal; text-align: right; }
@media (max-width: 640px) {
  .price-card { padding: 28px 22px; }
  .hero-preview { padding: 20px; }
  .hero-preview .big { font-size: 36px; }
  .page-header h1 { overflow-wrap: anywhere; }
  .table-toolbar { align-items: stretch; }
}
.checkbox-row a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.page-wrap p a:not(.btn), .note-line a, .hint a, .empty-state p a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
#simulator .kpi-value { font-size: 26px; }
.footer-grid ul { list-style: none; padding-left: 0; }
body[data-site="public"] .hero h1 { font-size: clamp(38px, 5.2vw, 64px); line-height: 1.05; }
.table.wrap .cell-sub { white-space: normal; }
.table.wrap td { padding-left: 16px; padding-right: 16px; }
.dropdown-menu button { border: 0; background: transparent; color: var(--color); font-family: inherit; cursor: pointer; }
.dropdown-menu .fleet-current { display: flex; align-items: center; gap: 10px; padding: 9px 10px; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.dropdown-menu .fleet-current span, .dropdown-menu form button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-menu { max-width: min(320px, calc(100vw - 32px)); }
.input[readonly] { color: var(--text-secondary); cursor: not-allowed; }

/* ---- Import (4 étapes) ---- */
.import-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 980px; margin-bottom: 16px; counter-reset: none; }
.import-stepper li > a, .import-stepper li > span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--content); border: 1px solid var(--border-color); color: var(--color); min-width: 0; height: 100%; }
.import-stepper li > a:hover { border-color: var(--primary); }
.import-stepper .n { width: 28px; height: 28px; border-radius: 50%; background: var(--box); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.import-stepper .t { display: flex; flex-direction: column; min-width: 0; }
.import-stepper .t strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-stepper .t small { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-stepper .is-current > span { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.import-stepper .is-current .n { background: var(--primary); color: var(--primary-contrast); }
.import-stepper .is-done .n { background: var(--primary-soft); color: var(--primary); }
.import-stepper .is-locked { opacity: .55; }
.import-card { max-width: 980px; }
.import-card .pt-0 { padding-top: 0; }
.import-card .pb-0 { padding-bottom: 0; }
.import-step-head { display: flex; gap: 14px; align-items: flex-start; }
.import-step-head .n { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--primary-contrast); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px; flex-shrink: 0; }
.import-step-head .n.is-ok { background: var(--primary-soft); color: var(--primary); }
.import-step-head h3 { margin-bottom: 2px; }
.import-step-head p { max-width: 70ch; }
.import-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.import-inline .field { flex: 1; min-width: 240px; margin-bottom: 0; }
.import-inline .btn { height: 46px; }
.import-inline .field .error { position: static; }
.import-columns { margin-top: 20px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--box); }
.import-columns h4 { margin-bottom: 8px; font-size: 14px; }
.import-columns ul { margin: 0 0 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; font-size: 13.5px; }
.import-columns .badge { margin-left: 4px; padding: 1px 8px; font-size: 11px; }
.import-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.import-actions > form { margin: 0; }
.import-actions > div { margin-left: auto; }
.import-file { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; }
.import-ok { font-size: 14px; color: var(--text-secondary); }
.import-errors { margin: 8px 0; padding-left: 18px; list-style: disc; font-size: 13px; }
.import-table td.pick, .import-table th.pick { width: 44px; padding-right: 0; }
.import-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.import-table input[type="checkbox"]:disabled { cursor: not-allowed; }
.import-table label { cursor: pointer; }
.import-kpis { border-radius: 0; box-shadow: none; }
.import-summary { margin-top: 18px; border-top: 1px solid var(--border-color); }
.import-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.import-summary li span { color: var(--text-secondary); }
.file-input { padding: 9px 12px; height: auto; cursor: pointer; }
.file-input::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 6px 12px; border-radius: 8px; border: 0; background: var(--content); color: var(--color); cursor: pointer; box-shadow: var(--shadow-sm); }
@media (max-width: 760px) {
  .import-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .import-inline .btn, .import-actions .btn { width: 100%; }
  .import-actions > div, .import-actions > form { width: 100%; }
}

/* ---- Accueil : vraies captures de l'application ---- */
.hero-shots { position: relative; margin: 0; padding: 0 0 34px; }
.hero-shots .desk { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); background: var(--content); }
.hero-shots .phone { position: absolute; right: -10px; bottom: 54px; width: 27%; height: auto; border-radius: 18px; border: 5px solid #0a0e0d; box-shadow: 0 18px 40px rgba(10,14,13,.28); background: #0a0e0d; }
.hero-shots figcaption { margin-top: 14px; font-size: 12.5px; color: var(--text-secondary); text-align: center; }
body[data-site="public"] .hero .container { grid-template-columns: .9fr 1.1fr; gap: 48px; }
@media (max-width: 980px) {
  body[data-site="public"] .hero .container { grid-template-columns: 1fr; }
  .hero-shots .phone { right: 4px; }
}

/* ---- Accueil : hero resserré sous la barre de navigation ---- */
body[data-site="public"] .hero { padding: 48px 0 72px; }
body[data-site="public"] .hero .container { align-items: center; }
body[data-site="public"] .hero .eyebrow-pill { margin-bottom: 14px; }
body[data-site="public"] .hero h1 { margin-bottom: 20px; }
body[data-site="public"] .hero p.lead { margin-bottom: 28px; }
body[data-site="public"] .hero-cta { margin-bottom: 24px; }
@media (max-width: 980px) { body[data-site="public"] .hero { padding: 32px 0 48px; } }

/* ---- Affectations : remplacer ou ajouter un conducteur ---- */
.asg-mode { border: 0; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--box); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.asg-mode[hidden] { display: none; }
.asg-mode legend { float: left; width: 100%; padding: 0; margin-bottom: 2px; }
.asg-mode .radio-row { align-items: flex-start; cursor: pointer; }
.asg-mode .radio-row input { margin-top: 1px; flex-shrink: 0; }
.cash-duty { margin-top: 6px; font-size: 12.5px; color: var(--warning); }
.card .card-body.pt-0 { padding-top: 0; }

/* ---- Mot de passe oublié : saisie du code ---- */
.code-input { font-size: 22px; font-weight: 700; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: .35em; }
/* Pages de connexion : le logo du formulaire ne s'affiche que lorsque le panneau de gauche est masqué. */
.brand.only-mobile { display: none; }
@media (max-width: 940px) { .brand.only-mobile { display: flex; } }

/* ================================================================
   Téléphone : passe complète
   ================================================================ */
/* Barres de filtres : elles restent dans l'écran, les pastilles défilent. */
.table-toolbar > *, .table-filters { min-width: 0; max-width: 100%; }
.segmented { scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }

@media (max-width: 760px) {
  /* 16 px au moins dans les champs : sinon l'iPhone zoome à chaque saisie. */
  .input, select.input, textarea.input, .table-filters select, .table-filters input { font-size: 16px; }
}

@media (max-width: 560px) {
  /* Indicateurs : deux par ligne au lieu d'une grande carte chacun. */
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { padding: 16px 14px; }
  .kpi-value { font-size: 21px; overflow-wrap: anywhere; }
  .kpi-value .unit { font-size: 11px; }
  .kpi-label { font-size: 12px; }
  .kpi-sub { font-size: 11.5px; }
  .kpi-card .badge { font-size: 11px; padding: 3px 8px; }
  #simulator .kpi-value { font-size: 20px; }
}

/* Tableaux : sur téléphone, chaque ligne devient une fiche (libellés posés par app.js). */
@media (max-width: 640px) {
  .table-wrap > .table.stacked thead { display: none; }
  .table-wrap > .table.stacked, .table-wrap > .table.stacked tbody { display: block; width: 100%; }
  .table-wrap > .table.stacked tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--border-color); }
  .table-wrap > .table.stacked tbody tr:last-child { border-bottom: 0; }
  /* Chaque cellule : le libellé à gauche (40 %), la valeur à droite, sur plusieurs lignes si besoin. */
  .table-wrap > .table.stacked tbody td { display: block; position: relative; padding: 4px 0 4px 42%; border: 0; text-align: right; min-height: 26px; width: auto !important; overflow-wrap: anywhere; }
  .table-wrap > .table.stacked tbody td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 40%; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); text-align: left; overflow-wrap: normal; }
  .table-wrap > .table.stacked tbody td[data-label=""]::before { content: none; }
  .table-wrap > .table.stacked tbody td .cell-sub, .table-wrap > .table.stacked tbody td .cell-main { text-align: right; }
  /* Première colonne : le titre de la fiche, sans libellé. */
  .table-wrap > .table.stacked tbody td:first-child { padding: 0 0 6px; text-align: left; min-height: 0; }
  .table-wrap > .table.stacked tbody td:first-child::before { content: none; }
  .table-wrap > .table.stacked tbody td:first-child .cell-sub, .table-wrap > .table.stacked tbody td:first-child .cell-main { text-align: left; }
  /* Colonne d'actions : les boutons à droite, assez grands pour le doigt. */
  .table-wrap > .table.stacked tbody td[data-label=""]:last-child:not(:first-child) { padding: 8px 0 0; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  .table-wrap > .table.stacked .row-actions { justify-content: flex-end; gap: 6px; }
  .table-wrap > .table.stacked .row-actions .icon-btn { width: 42px; height: 42px; background: var(--box); }
  .table-wrap > .table.stacked tbody td[colspan] { padding: 12px 0; text-align: center; }
  .table-wrap > .table.stacked tbody td[colspan]::before { content: none; }
}

/* ---- Relance WhatsApp depuis les alertes ---- */
.btn-whatsapp { background: #1a9e4b; color: #fff; }
.btn-whatsapp:hover { background: #158a40; color: #fff; }
.btn-whatsapp.is-muted { background: color-mix(in srgb, #1a9e4b 55%, var(--content)); }
.text-warning { color: var(--warning, #b7791f); font-weight: 600; }
.alert-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---- Site public : menu des petits écrans, en tiroir comme la barre latérale de l'application ---- */
.public-burger { display: none; }
@media (max-width: 960px) { .public-burger { display: inline-flex; } }
.public-scrim {
  position: fixed; inset: 0; z-index: 69; background: rgba(10,14,18,.5);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.public-drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(var(--sidebar-w), 86vw);
  background: var(--theme-bg); color: var(--theme-color); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(-100%); visibility: hidden;
  transition: transform 320ms cubic-bezier(.22,.8,.24,1), visibility 0s linear 320ms;
}
body.public-menu-open { overflow: hidden; }
body.public-menu-open .public-scrim { opacity: 1; visibility: visible; transition: opacity var(--dur) var(--ease); }
body.public-menu-open .public-drawer { transform: translateX(0); visibility: visible; transition: transform 320ms cubic-bezier(.22,.8,.24,1); }
.public-drawer-head {
  display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 12px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.public-drawer-head .brand { color: #fff; }
.public-drawer-head .brand .logo-dot { fill: var(--primary); }
.public-drawer-head .icon-btn { color: rgba(207,211,214,.8); }
.public-drawer-head .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.public-drawer-nav { flex: 1; overflow-y: auto; padding: 18px 12px; }
.public-drawer-nav .nav-item { font-size: 15px; padding: 12px; }
.public-drawer-foot { padding: 14px 12px 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.public-drawer-foot .plan-card .btn { height: 42px; }
.public-drawer-login { height: 44px; color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-pill); background: transparent; }
.public-drawer-login:hover { background: rgba(255,255,255,.08); color: #fff; }

@media (min-width: 961px) { .public-drawer, .public-scrim { display: none; } }
@media (max-width: 400px) {
  .public-header .container > .flex .btn-pill { padding: 0 14px; font-size: 13.5px; }
}

/* ================================================================
   Tiroirs : menu du site et barre latérale de l'application sur
   téléphone et tablette. Même entrée : le panneau glisse depuis la
   gauche, le fond s'assombrit, les liens arrivent l'un après l'autre
   (ordre posé par app.js dans --i).
   ================================================================ */
.public-header-start { display: flex; align-items: center; gap: 10px; min-width: 0; }
.public-header-start .public-burger { margin-left: -8px; }
.drawer-close { display: none; }
.drawer .nav-group-label, .drawer .nav-item, .drawer .sidebar-footer > *, .drawer .public-drawer-foot > * {
  transition: opacity 220ms var(--ease), transform 260ms var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.public-drawer .nav-group-label, .public-drawer .nav-item, .public-drawer-foot > * { opacity: 0; transform: translateX(-14px); }
body.public-menu-open .public-drawer .nav-group-label, body.public-menu-open .public-drawer .nav-item, body.public-menu-open .public-drawer-foot > * {
  opacity: 1; transform: none; transition-delay: calc(80ms + var(--i, 0) * 28ms);
}
@media (max-width: 1080px) {
  .sidebar.drawer {
    width: min(var(--sidebar-w), 86vw); transform: translateX(-100%); visibility: hidden;
    transition: transform 320ms cubic-bezier(.22,.8,.24,1), visibility 0s linear 320ms;
  }
  .sidebar.drawer.open { transform: none; visibility: visible; transition: transform 320ms cubic-bezier(.22,.8,.24,1); }
  .sidebar .drawer-close {
    display: inline-flex; position: absolute; top: calc((var(--topbar-h) - 40px) / 2); right: 12px; z-index: 1;
    color: rgba(207,211,214,.8);
  }
  .sidebar .drawer-close:hover { background: rgba(255,255,255,.08); color: #fff; }
  .sidebar-scrim, .sidebar-scrim.show { display: block; }
  .sidebar-scrim { opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur); }
  .sidebar-scrim.show { opacity: 1; visibility: visible; transition: opacity var(--dur) var(--ease); }
  body.sidebar-open { overflow: hidden; }
  .sidebar.drawer .nav-group-label, .sidebar.drawer .nav-item, .sidebar.drawer .sidebar-footer > * { opacity: 0; transform: translateX(-14px); }
  .sidebar.drawer.open .nav-group-label, .sidebar.drawer.open .nav-item, .sidebar.drawer.open .sidebar-footer > * {
    opacity: 1; transform: none; transition-delay: calc(80ms + var(--i, 0) * 22ms);
  }
  .sidebar.drawer.open .nav-item.locked { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer *, .public-scrim, .sidebar-scrim { transition: none !important; }
}

/* ---- Accueil : boutons du bandeau final, espacés en ligne comme empilés ---- */
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 16px; margin-top: 4px; }
.cta-actions .cta-secondary { border-color: rgba(255,255,255,.25); color: #fff; }
.cta-actions .cta-secondary:hover { background: rgba(255,255,255,.08); color: #fff; }
@media (max-width: 560px) {
  .cta-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .cta-actions .btn { width: 100%; }
}

/* ---- Tableau de bord « Toutes les flottes » ---- */
.alert-fleet { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; background: color-mix(in srgb, currentColor 14%, transparent); vertical-align: 1px; }
.fleet-menu-all { font-weight: 700; }

/* ---- Fiches véhicule et conducteur, reçu ---- */
.cell-link { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 28%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; display: inline-block; }
.cell-link:hover, .cell-link:focus-visible { color: var(--primary); text-decoration-color: currentColor; }
a.icon-btn { text-decoration: none; }
.back-link { margin-bottom: 8px; font-size: 13.5px; }
.back-link a { color: var(--text-secondary); font-weight: 600; }
.back-link a:hover { color: var(--color); }
.page-header h1 .badge { vertical-align: middle; margin-left: 8px; font-size: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.facts > div { min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 600; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.facts-total { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--box); display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-secondary); }
.facts-total strong { font-size: 20px; color: var(--color); }
.receipt-link { margin-left: 8px; font-size: 12.5px; font-weight: 600; }
.facts.facts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .facts.facts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .facts, .facts.facts-4 { grid-template-columns: 1fr; } }

/* ---- Accueil : comment ça marche, avec les écrans de l'application sur iPhone (thème neutre des autres sections) ---- */
.how-steps-phones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.how-step { min-width: 0; }
.how-step-text { margin-top: 26px; position: relative; padding-left: 46px; }
.how-step-n { position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--theme-bg); color: var(--theme-color); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.how-step h3 { font-size: 17px; margin: 0 0 6px; }
.how-step p { font-size: 14px; color: var(--text-secondary); margin: 0; }
.how-foot { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.how-note { margin: 0; font-size: 12.5px; color: var(--text-secondary); }

/* Cadre d'iPhone 16 Pro Max (écran 440 × 956 points), dessiné en CSS : bords fins, coins très arrondis, Dynamic Island. */
.phone-frame { position: relative; aspect-ratio: 440 / 956; max-width: 300px; margin: 0 auto; padding: 2.6%; border-radius: 15% / 7%;
  background: linear-gradient(145deg, #4a4a4c, #1d1d1f 40%, #2c2c2e); box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 24px 48px -22px rgba(10,14,13,.45); }
.phone-frame::after { content: ''; position: absolute; top: 3.1%; left: 50%; width: 29%; height: 3.3%; transform: translateX(-50%); border-radius: 999px; background: #000; }
.phone-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 12.6% / 5.8%; background: #f4f5f6; }

@media (max-width: 1080px) {
  .how-steps-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 28px; }
}
@media (max-width: 760px) {
  /* Sur téléphone, les étapes défilent à l'horizontale ; la suivante dépasse pour inviter à glisser. */
  .how-steps-phones { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 12px; scrollbar-width: none; }
  .how-steps-phones::-webkit-scrollbar { display: none; }
  .how-step { flex: 0 0 64%; scroll-snap-align: start; }
  .how-step .phone-frame { max-width: none; }
}
@media (max-width: 1100px) and (min-width: 961px) { .public-nav { gap: 22px; } }
body[data-site="public"] section[id] { scroll-margin-top: 84px; }


/* =====================================================================
   PAGES D'ACCÈS : Google, choix téléphone / e-mail, volet d'illustrations
   ===================================================================== */
.btn-google { background: var(--content); color: var(--color); border: 1px solid var(--border-color); gap: 10px; font-weight: 600; }
.btn-google:hover { background: var(--hover); color: var(--color); }
.auth-card .divider-text { margin: 20px 0; }
/* Champs des pages d'accès : posés en blanc sur le fond gris, sinon ils se confondent avec la page. */
.auth-main .input { background: var(--content); box-shadow: inset 0 0 0 1px var(--border-color); }
.auth-main .input:focus { box-shadow: 0 0 0 2px var(--primary); }
.auth-main .input.is-invalid { box-shadow: 0 0 0 2px var(--danger); }

.auth-method { border: 0; padding: 0; margin: 0; min-width: 0; }
.auth-method-switch { display: grid; grid-template-columns: 1fr 1fr; background: var(--box); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 18px; }
.auth-method-switch label { position: relative; cursor: pointer; margin: 0; }
.auth-method-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.auth-method-switch span { display: block; text-align: center; padding: 9px 10px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600; color: var(--text-secondary); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.auth-method-switch input:checked + span { background: var(--content); color: var(--color); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-method-switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-method:has(input[value="phone"]:checked) .only-method-email,
.auth-method:has(input[value="email"]:checked) .only-method-phone { display: none; }
.hint-line { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; line-height: 1.45; }

/* Volet gauche */
.auth-side { gap: 32px; }
.auth-side-content { max-width: 460px; width: 100%; margin: 0 auto; }
.auth-side-content h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 22px; }
.auth-side-foot { position: relative; z-index: 1; font-size: 12.5px; color: rgba(207,211,214,.5); margin: 0; }
@media (max-height: 760px) { .auth-side { padding: 32px 48px; gap: 20px; } .auth-side-content h2 { margin-bottom: 14px; } }

.showcase { position: relative; z-index: 1; }
.showcase-track { display: grid; }
.showcase-slide { grid-area: 1 / 1; margin: 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease), visibility 0s linear .5s; }
.showcase-slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease), visibility 0s; }
.showcase-slide figcaption { margin-top: 22px; display: grid; gap: 6px; }
.showcase-slide figcaption strong { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.showcase-slide figcaption span { color: rgba(207,211,214,.72); font-size: 14px; line-height: 1.5; }

.sc-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 300px; padding: 18px 0 26px; }
.sc-frame { position: relative; }
@media (max-height: 760px) { .sc-stage { min-height: 270px; padding: 8px 0 22px; } }
.sc-card { background: #151c1a; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; color: #e8ecea; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }
.sc-main { padding: 18px; font-size: 13px; }
.sc-float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 12.5px; background: #1b2422; }
.sc-float-br { right: -16px; bottom: -40px; }
.sc-float-tr { right: -16px; top: -38px; }
.sc-row { display: flex; align-items: center; gap: 12px; }
.sc-between { justify-content: space-between; }
.sc-gap { gap: 8px; margin-top: 14px; }
.sc-mb { margin-bottom: 12px; }
.sc-grow { flex: 1; min-width: 0; }
.sc-label { font-size: 12px; color: rgba(207,211,214,.7); font-weight: 600; }
.sc-big { font-size: 34px; font-weight: 750; letter-spacing: -.03em; color: #fff; margin: 2px 0; }
.sc-strong { font-weight: 650; color: #fff; font-size: 13px; }
.sc-muted { color: rgba(207,211,214,.6); font-size: 11.5px; }
.sc-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.sc-ring circle { fill: none; stroke-width: 7; }
.sc-ring-bg { stroke: rgba(255,255,255,.08); }
.sc-ring-val { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 163.4; }
.sc-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 84px; margin-top: 16px; align-items: end; }
.sc-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.sc-bar span { width: 100%; height: var(--h); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--accent), rgba(14,246,204,.35)); }
.sc-bar em { font-style: normal; font-size: 10.5px; color: rgba(207,211,214,.55); }
.sc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.sc-dot.danger { background: #ff6b5f; } .sc-dot.warn { background: #f2a93b; } .sc-dot.info { background: #52b6e0; } .sc-dot.ok { background: var(--accent); }
.sc-chip { font-size: 11.5px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: rgba(14,246,204,.12); color: var(--accent); }
.sc-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); }
.sc-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sc-ico.in { background: rgba(14,246,204,.12); color: var(--accent); }
.sc-ico.out { background: rgba(255,107,95,.12); color: #ff8a80; }
.sc-amount { font-weight: 700; font-size: 13px; white-space: nowrap; }
.sc-amount.in { color: var(--accent); } .sc-amount.out { color: #ff8a80; }
.sc-toast { gap: 8px; font-weight: 600; color: #fff; }
.sc-check { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #04221c; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.sc-avatar { width: 36px; height: 36px; border-radius: 50%; background: #24302d; color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.sc-pill { font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.sc-pill.warn { background: rgba(242,169,59,.14); color: #f5b65a; }
.sc-pill.danger { background: rgba(255,107,95,.14); color: #ff8a80; }
.sc-pill.info { background: rgba(82,182,224,.14); color: #7cc8ea; }
.sc-pill.ok { background: rgba(14,246,204,.12); color: var(--accent); }
.sc-bubble { position: relative; background: #1f3a2e; border-radius: 4px 14px 14px 14px; padding: 11px 13px 20px; font-size: 12.5px; line-height: 1.5; color: #e9f5ee; }
.sc-time { position: absolute; right: 10px; bottom: 5px; font-size: 10px; color: rgba(233,245,238,.55); }
.sc-btn { flex: 1; text-align: center; padding: 9px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; }
.sc-btn.ghost { border: 1px solid rgba(255,255,255,.14); color: #e8ecea; flex: 0 0 auto; padding-inline: 16px; }
.sc-btn.wa { background: #1a9e4b; color: #fff; }
.sc-file { width: 38px; height: 44px; border-radius: 8px; background: #1d6f42; color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: end center; padding-bottom: 6px; letter-spacing: .04em; flex-shrink: 0; }
.sc-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 14px; }
.sc-step { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: rgba(207,211,214,.65); text-align: center; }
.sc-step span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.08); color: #fff; }
.sc-step.done span { background: var(--accent); color: #04221c; }
.sc-step.now span { border: 2px solid var(--accent); background: transparent; }
.sc-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sc-counts div { background: rgba(255,255,255,.04); border-radius: 10px; padding: 10px; }
.sc-counts b { display: block; font-size: 20px; color: #fff; letter-spacing: -.02em; }
.sc-counts em { font-style: normal; font-size: 11px; color: rgba(207,211,214,.6); }

/* Entrée des cartes à chaque changement d'illustration : le seul mouvement du volet. */
.showcase-slide .sc-main { transform: translateY(10px); opacity: .0; transition: transform .6s var(--ease) .05s, opacity .6s var(--ease) .05s; }
.showcase-slide .sc-float { transform: translateY(10px) scale(.96); opacity: 0; transition: transform .6s var(--ease) .3s, opacity .6s var(--ease) .3s; }
.showcase-slide.is-active .sc-main, .showcase-slide.is-active .sc-float { transform: none; opacity: 1; }

.showcase-dots { display: flex; gap: 8px; margin-top: 24px; }
.showcase-dots button { border: 0; background: transparent; padding: 6px 0; cursor: pointer; }
.showcase-dots button span { display: block; width: 22px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; transition: width var(--dur) var(--ease); }
.showcase-dots button.is-active span { width: 40px; }
.showcase-dots button.is-active span::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: showcase-progress var(--showcase-delay, 6s) linear forwards; }
.showcase.is-paused .showcase-dots button.is-active span::after { animation-play-state: paused; }
.showcase-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@keyframes showcase-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .showcase-slide, .showcase-slide .sc-main, .showcase-slide .sc-float { transition: none; }
  .showcase-dots button.is-active span::after { animation: none; transform: none; }
}

/* reCAPTCHA : la mention remplace le badge flottant de la v3 (autorisé par Google si la mention est visible). */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; margin: 0 0 14px; }
.recaptcha-note a { color: inherit; text-decoration: underline; }
.recaptcha-field { display: flex; flex-direction: column; align-items: flex-start; }

/* Carte Premium : au-delà de la limite, sur demande. */
.price-more { margin: 14px 0 0; font-size: 13px; color: var(--text-secondary); }
.price-more a { color: var(--primary); font-weight: 600; }

/* Offre sur mesure : récapitulatif (carte encre, accent menthe) et paiement côte à côte. */
.bespoke-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .bespoke-layout { grid-template-columns: 1fr; } }
.bespoke { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.06); background: var(--theme-bg); color: #f5f5f7; border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg); }
.bespoke .fleet-lot {
  display: flex; gap: 4%; margin: 24px 0 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 34%, rgba(0,0,0,.1));
          mask-image: linear-gradient(90deg, #000 34%, rgba(0,0,0,.1));
}
.bespoke .fleet-lot img { flex: 0 0 39%; width: 39%; height: auto; display: block; }
.bespoke-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; }
.bespoke-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--primary); border-radius: 999px; padding: 6px 13px; }
.bespoke-state { font-size: 12.5px; color: rgba(245,245,247,.7); }
.bespoke-price { position: relative; margin: 20px 0 24px; font-size: 52px; font-weight: 750; letter-spacing: -.04em; line-height: 1; color: #fff; }
.bespoke-price small { margin-left: 10px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: rgba(245,245,247,.6); }
.bespoke-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.bespoke-stats > div { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 16px; min-width: 0; }
.bespoke-ico { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff; font-style: normal; }
.bespoke-stats dt { font-size: 12px; color: rgba(245,245,247,.6); font-weight: 600; }
.bespoke-stats dd { margin: 4px 0 2px; font-size: 28px; font-weight: 750; letter-spacing: -.03em; color: #fff; }
.bespoke-stats span { display: block; font-size: 11.5px; color: rgba(245,245,247,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bespoke-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.bespoke-feats li { font-size: 12.5px; padding: 7px 12px; border-radius: 999px; background: #030504; border: 1px solid rgba(255,255,255,.08); color: #eef1f0; }
.bespoke-feats li::before { content: '✓'; color: var(--accent); font-weight: 800; margin-right: 6px; }
.bespoke-note { margin-top: 20px; font-size: 14px; line-height: 1.6; color: #eef1f0; }
.bespoke-note p, .bespoke-note ul { margin: 0 0 6px; } .bespoke-note > :last-child { margin-bottom: 0; } .bespoke-note ul { padding-left: 18px; }
.bespoke-note p, .bespoke-note li { color: inherit; }
.bespoke-note strong { color: #fff; }
.bespoke-foot { margin: 20px 0 0; font-size: 12.5px; color: rgba(245,245,247,.55); }
@media (max-width: 560px) { .bespoke { padding: 22px; } .bespoke-price { font-size: 40px; } .bespoke-stats dd { font-size: 22px; } }
.renewal-alert a { font-weight: 600; }


/* =====================================================================
   Tableau de bord v2 : titres collants, tuiles, graphiques, puces
   ===================================================================== */
:root { --chart-3: #4f7cff; --chart-4: #a35bd6; --chart-5: #e0a21a; --chart-6: #8e979b; --chart-rest: #e3e6e8; }
:root[data-theme="dark"] { --chart-3: #7d97ff; --chart-4: #c07ee8; --chart-5: #f0b545; --chart-6: #6f797d; --chart-rest: #2e3335; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart-3: #7d97ff; --chart-4: #c07ee8; --chart-5: #f0b545; --chart-6: #6f797d; --chart-rest: #2e3335; } }

/* Titre de page collant : le premier en-tête de la page, y compris dans un composant Livewire (Journal de caisse…).
   Sélection en CSS seul (pas de classe ajoutée par JavaScript, que Livewire effacerait en redessinant la page) ;
   app.js pose seulement « page-scrolled » sur <html> quand on a défilé. data-sticky="off" sur un en-tête le désactive. */
.page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) {
  position: sticky; top: var(--topbar-h); z-index: 20; align-items: center;
  margin: -16px -32px 28px; padding: 16px 32px 14px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid transparent; transition: padding .2s var(--ease, ease), border-color .2s;
}
.page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) h1 { transition: font-size .2s var(--ease, ease); }
html.page-scrolled .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) { padding-top: 10px; padding-bottom: 10px; border-bottom-color: var(--border-color); }
html.page-scrolled .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) h1 { font-size: 21px; }
html.page-scrolled .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) .eyebrow,
html.page-scrolled .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) > div > p,
html.page-scrolled .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) .breadcrumb { display: none; }
@media (max-width: 640px) {
  .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) { margin: -12px -18px 22px; padding: 12px 18px 10px; }
  html.page-scrolled .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) h1 { font-size: 18px; }
  html.page-scrolled .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) .page-actions .btn { padding: 8px 12px; font-size: 13px; }
}
@media print { .page-wrap .page-header:not(.page-header ~ .page-header):not([data-sticky="off"]) { position: static; } }

/* Tuiles : cartes séparées, icône en pastille, tendance en bas */
.kpi-grid { gap: 16px; background: none; box-shadow: none; overflow: visible; border-radius: 0; }
.kpi-card {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 22px 22px 18px;
  border: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent);
  display: flex; flex-direction: column;
}
.kpi-top { margin-bottom: 14px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--box); }
.kpi-icon.green { background: var(--success-soft); }
.kpi-icon.red { background: var(--danger-soft); }
.kpi-icon.orange { background: var(--primary-soft); }
.kpi-icon.blue { background: var(--info-soft); color: var(--info); }
.kpi-icon.purple { background: var(--pro-soft); }
.kpi-value { font-size: 28px; font-weight: 750; line-height: 1.1; }
.kpi-label { font-size: 13px; font-weight: 500; }
.kpi-spark { position: relative; height: 46px; margin: 14px -8px -8px; }
.kpi-spark canvas { width: 100% !important; height: 100% !important; }
.kpi-ring {
  --p: 0; width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--ring-color, var(--chart-1)) calc(var(--p) * 1%), var(--chart-rest) 0);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 58%); mask: radial-gradient(circle, transparent 57%, #000 58%);
}
.kpi-ring.mid { --ring-color: var(--warning); }
.kpi-ring.low { --ring-color: var(--danger); }
.kpi-meter { height: 6px; border-radius: 99px; background: var(--chart-rest); overflow: hidden; margin-top: 16px; }
.kpi-meter span { display: block; height: 100%; border-radius: inherit; background: var(--chart-1); }
.kpi-meter span.mid { background: var(--warning); } .kpi-meter span.low { background: var(--danger); }
@media (max-width: 640px) { .kpi-grid { gap: 10px; } .kpi-card { padding: 14px 14px 12px; } .kpi-icon { width: 32px; height: 32px; border-radius: 9px; } .kpi-spark { height: 34px; margin-top: 10px; } .kpi-ring { width: 36px; height: 36px; } }

/* Puces de la flotte (remplacent la ligne de texte) */
.dash-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 22px; }
.dash-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: var(--radius-pill); background: var(--content); box-shadow: var(--shadow-sm); border: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent); font-size: 13px; color: var(--text-secondary); }
.dash-chip svg { color: var(--primary); }
.dash-chip strong { color: var(--color); font-weight: 650; }
.dash-chip.plan { background: var(--theme-bg); color: rgba(245,245,247,.75); border-color: transparent; }
.dash-chip.plan strong { color: #fff; } .dash-chip.plan svg { color: var(--accent); }

/* Cartes et graphiques */
.card { border: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent); }
.card-header h3 { font-size: 16px; }
.chart-card .card-body { padding-top: 6px; }
.chart-box.donut { height: 230px; }
.chart-box.bars { height: 260px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-bottom: 24px; }
.dash-grid.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .dash-grid, .dash-grid.even { grid-template-columns: minmax(0, 1fr); } }
.dash-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; color: var(--text-secondary); font-size: 13.5px; text-align: center; }
.dash-empty svg { color: var(--border-color); }

/* Dernières écritures, version compacte */
.entry-list { list-style: none; margin: 0; padding: 0 12px 12px; }
.entry-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-md); }
.entry-list li:hover { background: var(--hover); }
.entry-list .dir { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--success-soft); color: var(--success); }
.entry-list .dir.out { background: var(--danger-soft); color: var(--danger); }
.entry-list .what { flex: 1; min-width: 0; }
.entry-list .what b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-list .what span { display: block; font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-list .amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--success); }
.entry-list .amt.out { color: var(--danger); }

/* Alertes, version compacte */
.alert-mini { list-style: none; margin: 0; padding: 0 12px 12px; }
.alert-mini li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border-radius: var(--radius-md); }
.alert-mini li:hover { background: var(--hover); }
.alert-mini .lv { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--info); }
.alert-mini .lv.warning { background: var(--warning); } .alert-mini .lv.danger { background: var(--danger); }
.alert-mini .what { flex: 1; min-width: 0; font-size: 13.5px; }
.alert-mini .what b { display: block; font-weight: 600; }
.alert-mini .what span { color: var(--text-secondary); font-size: 12.5px; }
.alert-mini a.go { font-size: 12.5px; font-weight: 600; color: var(--primary); white-space: nowrap; }
/* Les cartes d'une même rangée prennent la même hauteur ; le graphique occupe la place disponible. */
.dash-grid > .card.chart-card { display: flex; flex-direction: column; }
.dash-grid > .card.chart-card > .card-body { flex: 1; display: flex; flex-direction: column; }
.dash-grid > .card.chart-card .chart-box { flex: 1; }

/* Sélecteur de période du tableau de bord */
.period-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: var(--radius-pill); background: var(--content); box-shadow: var(--shadow-sm); border: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent); }
.period-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.period-tabs a:hover { color: var(--color); background: var(--hover); }
.period-tabs a.on { background: var(--theme-bg); color: #fff; }
.period-tabs a.locked { color: var(--text-secondary); opacity: .6; }
.period-tabs a.locked:hover { opacity: 1; color: var(--primary); background: var(--primary-soft); }
@media (max-width: 640px) {
  .page-header .page-actions { min-width: 0; max-width: 100%; }
  .page-header .period-tabs { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .period-tabs a { padding: 6px 11px; font-size: 12.5px; }
}

/* Champs d'une fonction absente de l'offre : visibles, inactifs, avec le badge PREMIUM */
.input:disabled { opacity: .55; cursor: not-allowed; background: var(--box); }
.field label a.pro-pill { margin-left: 6px; text-decoration: none; vertical-align: 1px; }
.field label a.pro-pill:hover { filter: brightness(1.1); }

/* Aide à l'installation (iPhone / iPad, Samsung Internet) */
.install-modal { max-width: 420px; }
.install-lead { font-size: 14px; color: var(--text-secondary); margin: 0 0 16px; }
.install-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.install-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.45; }
.install-steps .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.install-steps .share-ico { display: inline-block; vertical-align: -3px; color: var(--info); margin: 0 2px; }
.install-note { margin: 18px 0 0; font-size: 13px; color: var(--text-secondary); }
