/* ==========================================================================
   Révizio 3.0 — interface
   Chargée après app.css et avant themes.css : elle redessine la coque (menu latéral sur ordinateur, rail sur
   tablette, barres en haut et en bas sur téléphone) et les composants, avec les variables de couleur des thèmes.
   Seuils : téléphone < 768 px, tablette 768 à 1199 px, ordinateur ≥ 1200 px.
   Aucune couleur de thème ici (sauf les couleurs d'état : rouge, orange, vert), pour que les 9 thèmes suivent.
   ========================================================================== */

/* ---------- Polices (hébergées sur le serveur, licence SIL OFL : fonts/OFL.txt) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

/* ---------- Variables communes ---------- */
:root {
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Barlow Semi Condensed", "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 264px;
  --rail-w: 84px;
  --topbar-h: 64px;
  --bottom-nav-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --r-xl: 22px;
  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  /* nuances déduites du thème choisi (le thème Révizio les fixe lui-même dans themes.css) */
  --surface-3: color-mix(in srgb, var(--card-2) 55%, var(--border-soft));
  --line: var(--border-soft);
  --line-strong: var(--border);
  --primary-ink: var(--accent);
  --shadow-1: var(--shadow);
  /* mode sombre (par défaut, comme app.css) */
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .55);
  --shadow-pop: 0 20px 50px -12px rgba(0, 0, 0, .7);
  --red: #f04438; --red-soft: rgba(240, 68, 56, .16); --red-ink: #ffa39b;
  --amber: #f5a524; --amber-soft: rgba(245, 165, 36, .16); --amber-ink: #fcc96f;
  --green: #22b864; --green-soft: rgba(34, 184, 100, .16); --green-ink: #74e2a8;
  --danger: #e5484d; --danger-soft: var(--red-soft);
  --tire: #3a465f; --hub: #9aa6ba;
}
:root[data-theme="light"] {
  --shadow-2: 0 1px 2px rgba(14, 26, 47, .04), 0 8px 24px -10px rgba(14, 26, 47, .16);
  --shadow-pop: 0 18px 48px -12px rgba(14, 26, 47, .32);
  --red: #d92d20; --red-soft: #fdecea; --red-ink: #b42318;
  --amber: #f59e0b; --amber-soft: #fff4e0; --amber-ink: #9a5606;
  --green: #12a150; --green-soft: #e6f6ed; --green-ink: #0b7a3e;
  --danger: #d92d20; --danger-soft: #fdecea;
  --tire: #1a2130; --hub: #c9d1dd;
}

/* ---------- Base ---------- */
.num, .amount, .stat-value, .entry-cost, .spec-value strong, .fuel-hl-value, .station-price b, .pick-price, .x-amount, .month-total, .ct-summary-count {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
}
.lede { color: var(--muted); margin: 5px 0 0; font-size: 15px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r-sm); background: var(--primary); color: var(--on-primary); font-weight: 600; }
.skip-link:focus { top: 12px; text-decoration: none; }
:root[data-theme="light"] a.skip-link { color: var(--on-primary); }
::selection { background: color-mix(in srgb, var(--primary) 28%, transparent); }

/* ---------- Marque ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand-link:hover { text-decoration: none; }
:root[data-theme="light"] a.brand-link { color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14); }
.brand-mark .icon { width: 20px; height: 20px; stroke-width: 2; }
.brand-name { font: 700 22px/1 var(--font-num); letter-spacing: -.01em; white-space: nowrap; }

/* ==========================================================================
   Coque : ordinateur (≥ 1200 px)
   ========================================================================== */
.shell { display: block; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: 14px; padding: 16px 14px 14px;
  background: var(--bg-elev); border-right: 1px solid var(--border-soft);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.main-col { min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 32px 56px; }
.scrim { display: none; }

/* Choix du véhicule (menu latéral, barre du haut) */
.vswitch { position: relative; min-width: 0; }
.vswitch > summary { list-style: none; }
.vswitch > summary::-webkit-details-marker { display: none; }
.vswitch-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px 7px 7px; border: 1px solid var(--border-soft); border-radius: 13px; background: var(--card-2); color: var(--text); cursor: pointer; text-align: left; }
.vswitch-btn:hover { border-color: var(--border); }
.vswitch[open] > .vswitch-btn { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.vswitch-thumb { position: relative; width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--surface-3); color: var(--muted); }
.vswitch-thumb > img, .vswitch-thumb > .placeholder { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.vswitch-thumb .ill { width: 94%; height: auto; }
.vswitch-thumb .icon { width: 19px; height: 19px; }
.vswitch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.vswitch-name { max-width: 100%; font-weight: 600; font-size: 14.5px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vswitch-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.2; color: var(--muted); }
.vs-short { display: none; }
.vswitch-caret { width: 16px; height: 16px; color: var(--muted); }
.vswitch-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; display: flex; flex-direction: column; gap: 2px; padding: 6px; max-height: min(64vh, 460px); overflow-y: auto; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.vswitch-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
.vswitch-item:hover { background: var(--card-2); text-decoration: none; }
:root[data-theme="light"] a.vswitch-item { color: var(--text); }
.vswitch-item.is-current { background: var(--primary-soft); }
.vswitch-item .vswitch-thumb { width: 36px; height: 36px; border-radius: 9px; }
.vswitch-check { width: 18px; height: 18px; color: var(--primary); }
.vswitch-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 8px 6px; border-top: 1px solid var(--border-soft); font-weight: 600; font-size: 14px; color: var(--accent); }
.vswitch-foot .icon { width: 18px; height: 18px; }

/* Nouvelle saisie */
.quick-cta { width: 100%; min-height: 42px; }
.quick-cta.active { box-shadow: 0 0 0 3px var(--primary-soft); }

/* Rubriques */
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { margin: 0; padding: 12px 10px 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 0 10px;
  border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 500 14.5px/1.2 var(--font); text-align: left; text-decoration: none; cursor: pointer;
}
.nav-link .icon { width: 19px; height: 19px; color: var(--muted); }
.nav-link:hover { background: var(--card-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--accent); font-weight: 600; }
.nav-link.active .icon { color: var(--accent); }
.nav-short { display: none; }
.nav-link .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font: 600 12px/20px var(--font-num); text-align: center; }

/* Compte (bas du menu) */
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.usermenu { position: relative; }
.usermenu > summary { list-style: none; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu-btn { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; cursor: pointer; }
.usermenu-btn:hover, .usermenu[open] > .usermenu-btn { background: var(--card-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 600 13.5px/1 var(--font); color: var(--accent); background: var(--primary-soft); }
.who { flex: 1; min-width: 0; line-height: 1.25; }
.who strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: 12.5px; color: var(--muted); }
.usermenu-caret { width: 16px; height: 16px; color: var(--muted); }
.usermenu-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 50; display: flex; flex-direction: column; gap: 1px; padding: 6px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.usermenu-pop form { margin: 0; }
.usermenu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 500 14.5px/1.2 var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.usermenu-item .icon { width: 18px; height: 18px; color: var(--muted); }
.usermenu-item:hover { background: var(--card-2); color: var(--text); text-decoration: none; }
:root[data-theme="light"] a.usermenu-item { color: var(--text-2); }
.usermenu-item.active, :root[data-theme="light"] a.usermenu-item.active { color: var(--accent); }
.usermenu-item.is-danger { color: var(--red-ink); }
.usermenu-item.is-danger .icon { color: currentColor; }
.usermenu-sep { height: 1px; margin: 4px 6px; background: var(--border-soft); }

/* Barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  min-height: var(--topbar-h); padding: 10px 32px; background: var(--bg); border-bottom: 1px solid var(--border-soft);
}
.topbar-brand { display: none; }
.topbar .vswitch.in-topbar { display: none; }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--card-2); color: var(--text); text-decoration: none; }
.icon-btn.active { color: var(--accent); }
.icon-btn .count { position: absolute; top: 3px; left: 22px; right: auto; margin: 0; min-width: 11px; height: 15px; padding: 0 3px; border-radius: 9px; background: var(--red); color: #fff; font: 600 10.5px/15px var(--font-num); text-align: center; border: 2px solid var(--bg); box-sizing: content-box; }
.topbar .search-open { display: none; width: 40px; height: 40px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); }
.topbar .search-open .icon { width: 20px; height: 20px; }

/* Recherche dans l'en-tête */
.search-inline { position: relative; flex: 0 1 480px; width: auto; min-width: 0; }
.search-inline .search-inline-field > .icon { left: 13px; width: 18px; height: 18px; }
.search-inline .search-inline-field input { min-height: 42px; padding-left: 40px; padding-right: 40px; border-radius: 11px; background-color: var(--card); }
.search-kbd { right: 10px; font: 600 12px/1.25 var(--font-num); border-radius: 6px; }
.search-pop { left: 0; right: auto; width: min(640px, calc(100vw - 2rem)); border-radius: var(--r); border-color: var(--border-soft); box-shadow: var(--shadow-pop); }
.search-pop.align-left { left: 0; right: auto; }
:root[data-theme="light"] .search-pop { box-shadow: var(--shadow-pop); }

/* Barre du bas (téléphone) */
.bottom-nav { display: none; }

/* ==========================================================================
   Coque : tablette (768 à 1199 px) — le menu devient un rail d'icônes
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1199px) {
  .sidebar { width: var(--rail-w); align-items: center; gap: 4px; padding: 14px 6px 12px; }
  .sidebar .brand { justify-content: center; padding: 0 0 8px; }
  .sidebar .brand-name { display: none; }
  .sidebar .vswitch { display: none; }
  .quick-cta { width: 52px; min-height: 52px; height: 52px; padding: 0; border-radius: 16px; margin: 0 0 10px; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
  .quick-cta .icon { width: 24px; height: 24px; stroke-width: 2.2; }
  .quick-cta span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .nav { width: 100%; align-items: center; gap: 2px; }
  .nav-label { width: 36px; height: 1px; margin: 6px 0; padding: 0; overflow: hidden; color: transparent; background: var(--border-soft); }
  .nav-link { width: 72px; min-height: 0; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 0 7px; border-radius: 12px; font: 600 11.5px/1.15 var(--font); text-align: center; }
  .nav-link .icon { width: 21px; height: 21px; }
  .nav-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .nav-short { display: block; }
  .nav-link .count { position: absolute; top: 3px; left: 42px; margin: 0; min-width: 12px; height: 16px; padding: 0 3px; font-size: 11px; line-height: 16px; border: 2px solid var(--bg-elev); box-sizing: content-box; }
  .side-foot { width: 100%; display: flex; justify-content: center; border-top: 0; }
  .usermenu-btn { padding: 4px; border-radius: 50%; }
  .usermenu-btn .who, .usermenu-caret { display: none; }
  .usermenu-pop { position: fixed; left: calc(var(--rail-w) + 8px); right: auto; bottom: 12px; width: 260px; }
  .main-col { margin-left: var(--rail-w); }
  .topbar { padding: 10px 24px; gap: 10px; }
  .topbar .vswitch.in-topbar { display: block; flex: none; max-width: 280px; }
  .vswitch.in-topbar .vswitch-btn { padding: 5px 10px 5px 5px; border-radius: 11px; background: var(--card); }
  .vswitch.in-topbar > .vswitch-btn .vswitch-thumb { width: 32px; height: 32px; border-radius: 8px; }
  .vswitch.in-topbar > .vswitch-btn .vswitch-sub { display: none; }
  .vswitch.in-topbar .vswitch-pop { right: auto; width: 300px; }
  .search-inline { flex: 1 1 auto; }
  .content { padding: 24px 24px 48px; }
}

/* ==========================================================================
   Coque : téléphone (< 768 px) — barre du haut, barre d'onglets en bas, menu en tiroir
   ========================================================================== */
@media (max-width: 767px) {
  :root { --topbar-h: 56px; --bottom-nav-h: 64px; }
  .sidebar {
    z-index: 60; width: min(86vw, 320px); visibility: hidden; transform: translateX(-102%);
    transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility .24s;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  }
  body.nav-open .sidebar { visibility: visible; transform: none; box-shadow: var(--shadow-pop); }
  body.nav-open { overflow: hidden; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: var(--dim); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .sidebar .quick-cta { display: none; }
  .main-col { margin-left: 0; padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .topbar { gap: 4px; min-height: calc(var(--topbar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6px 0 14px; background: var(--bg-elev); }
  .topbar-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; min-width: 0; flex: none; }
  .topbar-brand:hover { text-decoration: none; }
  :root[data-theme="light"] a.topbar-brand { color: var(--text); }
  .topbar-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .topbar-brand .brand-mark .icon { width: 18px; height: 18px; }
  .topbar-brand .brand-name { font-size: 20px; }
  .search-inline { display: none; }
  .topbar .search-open { display: inline-grid; }
  .topbar-end { gap: 0; margin-left: 0; }
  .topbar .vswitch.in-topbar { display: block; margin-left: auto; flex: 0 1 auto; }
  .topbar .vswitch.in-topbar.is-home { display: none; }
  .topbar .vswitch.in-topbar.is-home + .search-inline + .topbar-end { margin-left: auto; }
  .vswitch.in-topbar .vswitch-btn { gap: 6px; min-height: 36px; padding: 3px 6px 3px 6px; border-radius: 10px; }
  .vswitch.in-topbar > .vswitch-btn .vswitch-thumb { display: none; }
  .vswitch.in-topbar > .vswitch-btn .vswitch-name { max-width: 110px; font-size: 14px; }
  .vswitch.in-topbar.has-plate > .vswitch-btn .vswitch-name { display: none; }
  .vswitch.in-topbar:not(.has-plate) > .vswitch-btn .vswitch-sub { display: none; }
  .vswitch.in-topbar > .vswitch-btn .vs-long { display: none; }
  .vswitch.in-topbar > .vswitch-btn .vs-short { display: inline; }
  .vswitch.in-topbar .vswitch-pop { position: fixed; left: 8px; right: 8px; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 6px); max-height: 70vh; }
  .icon-btn .count { border-color: var(--bg-elev); }
  .content { padding: 16px 16px 28px; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
    background: var(--bg-elev); border-top: 1px solid var(--border-soft);
  }
  .bottom-nav a, .bottom-nav button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 4px 0 0; border: 0; background: none; color: var(--muted); font: 600 11.5px/1.1 var(--font); text-decoration: none; cursor: pointer;
  }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--accent); }
  :root[data-theme="light"] .bottom-nav a { color: var(--muted); }
  :root[data-theme="light"] .bottom-nav a.active { color: var(--accent); }
  .bottom-nav .bottom-plus { justify-content: flex-start; padding-top: 0; }
  .plus-disc { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -16px; border-radius: 18px; background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--primary) 75%, transparent), inset 0 -2px 0 rgba(0, 0, 0, .14), 0 0 0 4px var(--bg-elev); }
  .plus-disc .icon { width: 26px; height: 26px; stroke-width: 2.3; }
  .bottom-plus.active .plus-disc { background: var(--primary-hover); }
  .bottom-nav .count { position: absolute; top: 5px; left: calc(50% + 3px); min-width: 10px; height: 16px; padding: 0 3px; border-radius: 9px; background: var(--red); color: #fff; font: 600 10.5px/16px var(--font-num); border: 2px solid var(--bg-elev); box-sizing: content-box; }
}

/* ---------- Nouvelle saisie : fenêtre (ordinateur) ou feuille (téléphone) ---------- */
.quick-sheet { width: min(560px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--border-soft); border-radius: var(--r-xl); background: var(--card); color: var(--text); box-shadow: var(--shadow-pop); overflow: auto; }
.quick-sheet::backdrop { background: var(--dim); }
.quick-sheet-box { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.sheet-grip { display: none; }
.quick-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quick-sheet-head h2 { font: 700 20px/1.2 var(--font); margin: 0; }
.quick-sheet-for { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--text-2); }
.quick-sheet-for > .icon { width: 17px; height: 17px; color: var(--muted); }
.quick-sheet-for > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.quick-sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 112px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--card-2); color: var(--text); text-decoration: none; }
.qa:hover { border-color: var(--primary); text-decoration: none; }
:root[data-theme="light"] a.qa { color: var(--text); }
.qa strong { display: block; font-size: 16px; font-weight: 600; }
.qa .muted { display: block; font-size: 13px; line-height: 1.3; }
.qa-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; }
.qa-go { margin-left: auto; color: var(--muted); }
.qa-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.qa-icon .icon { width: 21px; height: 21px; }
@media (max-width: 767px) {
  .quick-sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .quick-sheet-box { padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); }
  .sheet-grip { display: block; width: 42px; height: 5px; margin: 0 auto 2px; border-radius: 3px; background: var(--border); }
  .quick-sheet[open] { animation: sheet-up .22s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }

/* ==========================================================================
   Composants
   ========================================================================== */

/* ---------- Couleurs des catégories (mêmes teintes que les graphiques) ---------- */
.c-fuel { --c: #f59e0b; } .c-maintenance { --c: #0ea5e9; } .c-inspection { --c: #8b5cf6; }
.c-insurance { --c: #10b981; } .c-tax { --c: #ec4899; } .c-parking { --c: #64748b; }
.c-cleaning { --c: #14b8a6; } .c-accessories { --c: #f97316; } .c-fines { --c: #ef4444; } .c-other { --c: #94a3b8; }
.cat { background: color-mix(in srgb, var(--c, #94a3b8) 20%, transparent); color: color-mix(in oklab, var(--c, #94a3b8) 70%, white); }
:root[data-theme="light"] .cat { background: color-mix(in srgb, var(--c, #94a3b8) 14%, transparent); color: color-mix(in oklab, var(--c, #94a3b8) 72%, black); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c, #94a3b8); }

/* ---------- En-têtes de section, cartes ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title { font: 700 19px/1.25 var(--font); letter-spacing: -.01em; margin: 0; }
.card.raised { box-shadow: var(--shadow-2); }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--accent); white-space: nowrap; }
.more .icon { width: 16px; height: 16px; }
.inset { background: var(--card-2); border: 1px solid var(--border-soft); border-radius: var(--r); }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-main > * { min-width: 0; }
@media (max-width: 1099px) { .grid-main { grid-template-columns: minmax(0, 1fr); } }

.chip { background: var(--primary-soft); color: var(--accent); }
.sticky-actions { background: linear-gradient(to top, var(--bg) 72%, transparent); }
.check input, input[type=radio], input[type=checkbox] { accent-color: var(--primary); }

/* ---------- Alertes ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border: 1px solid; border-radius: var(--r); font-size: 14.5px; }
.alert > .icon { margin-top: 1px; flex: none; }
.alert p { margin: 0; }
.alert strong { color: inherit; }
.alert-amber { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 38%, transparent); color: var(--amber-ink); }
.alert-blue { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 26%, transparent); color: var(--accent); }
.alert-red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 32%, transparent); color: var(--red-ink); }
.alert .btn { flex: none; }
.notice { border-left-width: 4px; }
.text-warning, :root[data-theme="light"] .text-warning { color: var(--amber-ink); }
.warn-text, :root[data-theme="light"] .warn-text { color: var(--amber-ink); }

/* ---------- Tableaux ---------- */
.cell-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-title .lrow-icon { width: 34px; height: 34px; border-radius: 9px; }

/* ---------- Listes ---------- */
.lrows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lrow { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--border-soft); color: inherit; text-decoration: none; }
.lrows > .lrow:first-child, .lrows > li:first-child > .lrow { border-top: 0; }
a.lrow:hover { text-decoration: none; }
.lrows.pad > .lrow { padding-left: 22px; padding-right: 22px; }
.lrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lrow-title { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--text); }
.lrow-title a { color: var(--text); }
.lrow-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 14px; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.lrow-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.lrow-meta .icon { width: 15px; height: 15px; }
.lrow-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.lrow-act { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.amount { font: 600 16px/1.2 var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.lrow-icon { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.lrow-icon .icon { width: 19px; height: 19px; }
.ri-red { background: var(--red-soft); color: var(--red-ink); }
.ri-amber { background: var(--amber-soft); color: var(--amber-ink); }
.ri-green { background: var(--green-soft); color: var(--green-ink); }
.ri-blue { background: var(--primary-soft); color: var(--accent); }
.ri-gray { background: var(--surface-3); color: var(--muted); }
.list-row { padding: 12px 0; }
.plain-list strong { font-weight: 600; }
.lrow-overdue { color: var(--red-ink); font-weight: 600; }
.lrow-soon { color: var(--amber-ink); font-weight: 600; }

/* ---------- Bandeau d'indicateurs ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(176px, 100%), 1fr)); gap: 1px; padding: 0; background: var(--border-soft); border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.stats.kpis { margin-bottom: 0; }
.stat { min-width: 0; padding: 16px 20px; background: var(--card); }
.stat-label { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.stat-value { margin: 6px 0 0; font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; color: var(--text); }
.stat-value small { margin-left: 2px; font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.stat-sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.delta-down { color: var(--green-ink); font-weight: 600; }
.delta-up { color: var(--red-ink); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { min-width: 0; padding: 12px 14px; background: var(--card-2); border: 1px solid var(--border-soft); border-radius: var(--r); }
.tile .stat-value { margin-top: 4px; font-size: 22px; }
.tile .stat-label { font-size: 12.5px; }

/* ---------- Jauge d'échéance ---------- */
.gauge { display: flex; flex-direction: column; gap: 7px; }
.gauge-track { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.gauge-track > span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.g-soon .gauge-track > span { background: var(--amber); }
.g-overdue .gauge-track > span { background: var(--red); }
.g-done .gauge-track > span { background: var(--muted); }
.gauge-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.gauge-meta strong { color: var(--text-2); font-weight: 600; white-space: nowrap; }

/* Barres empilées et barres par catégorie */
.stackbar { display: flex; gap: 2px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.stackbar > span { display: block; height: 100%; flex: none; background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
.legend > li, .legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend strong { font-family: var(--font-num); font-weight: 600; color: var(--text); }
.catbars { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.catbar { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) 84px; align-items: center; gap: 12px; font-size: 14px; }
.catbar-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.catbar .track { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.catbar .track > span { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.catbar .num { text-align: right; font-weight: 600; font-size: 14.5px; }

/* ---------- Plaque d'immatriculation ---------- */
.plate {
  display: inline-flex; align-items: stretch; flex: none; height: 26px; overflow: hidden; vertical-align: middle;
  background: #fff; color: #10141c; border: 1.5px solid #1a1f29; border-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  font: 600 15px/1 var(--font-num); letter-spacing: .05em; white-space: nowrap; text-transform: uppercase;
}
.plate i { width: 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; padding-bottom: 3px; background: #1c3faa; color: #fff; font: 700 8px/1 var(--font); font-style: normal; letter-spacing: 0; }
.plate i:first-child::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.3px dotted #ffd43b; }
.plate i:last-child::before { content: ""; width: 7px; height: 6px; border-radius: 2px; background: rgba(255, 255, 255, .85); }
.plate b { display: flex; align-items: center; padding: 0 7px; font-weight: 600; }
.plate-sm { height: 20px; font-size: 12.5px; border-width: 1.2px; border-radius: 4px; }
.plate-sm i { width: 11px; font-size: 6.5px; padding-bottom: 2px; gap: 2px; }
.plate-sm i:first-child::before { width: 5px; height: 5px; border-width: 1px; }
.plate-sm i:last-child::before { width: 5px; height: 4px; }
.plate-sm b { padding: 0 5px; }
.plate-lg { height: 38px; font-size: 23px; border-width: 2px; border-radius: 6px; }
.plate-lg i { width: 19px; font-size: 10px; padding-bottom: 5px; gap: 4px; }
.plate-lg i:first-child::before { width: 10px; height: 10px; border-width: 1.6px; }
.plate-lg i:last-child::before { width: 10px; height: 8px; }
.plate-lg b { padding: 0 11px; }

/* ---------- Compteur kilométrique ---------- */
.odo { display: inline-flex; align-items: center; gap: 3px; padding: 4px; background: #0d1321; border-radius: 9px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); vertical-align: middle; }
.odo span { width: 22px; height: 32px; display: grid; place-items: center; border-radius: 4px; color: #f2f5fb; font: 600 21px/1 var(--font-num); background: linear-gradient(#232c40 0%, #121a2b 50%, #1b2336 100%); }
.odo em { padding: 0 6px 0 4px; font: 600 13px/1 var(--font); font-style: normal; color: #8f9bb3; }
.odo-sm span { width: 16px; height: 24px; font-size: 16px; }
.odo-sm em { font-size: 12px; }

/* ---------- Tampon, étiquettes ---------- */
.stamp { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1.5px dashed currentColor; border-radius: 6px; font: 600 12.5px/1 var(--font-num); letter-spacing: .02em; color: var(--accent); transform: rotate(-1.2deg); white-space: nowrap; }
.stamp .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.stamp-garage { color: #0f766e; }
:root[data-theme="dark"] .stamp-garage { color: #5eead4; }
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.pill .icon { width: 14px; height: 14px; color: var(--muted); }
a.pill:hover { color: var(--text); text-decoration: none; }

/* ---------- Puces de filtre, onglets ---------- */
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.fchips.scroll::-webkit-scrollbar { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font: 500 14px/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer; }
.fchip:hover { border-color: var(--text-2); color: var(--text); text-decoration: none; }
:root[data-theme="light"] a.fchip { color: var(--text-2); }
.fchip.is-on, .fchip[aria-current="true"], .fchip[aria-pressed="true"], :root[data-theme="light"] a.fchip.is-on { background: var(--text); border-color: var(--text); color: var(--card); }
.fchip .plate { box-shadow: none; }
.fchip .num { font-weight: 600; }
.tabs { display: flex; gap: 2px; margin: 0; padding: 0; border-bottom: 1px solid var(--border-soft); overflow-x: auto; scrollbar-width: none; list-style: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 46px; padding: 0 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 14.5px/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer; }
.tab .icon { width: 18px; height: 18px; }
.tab:hover { color: var(--text); text-decoration: none; }
:root[data-theme="light"] a.tab { color: var(--muted); }
.tab.is-active, .tab[aria-selected="true"], .tab[aria-current="page"], :root[data-theme="light"] a.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); }
.tab-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); font: 600 12px/19px var(--font-num); text-align: center; }
.tab[aria-selected="true"] .tab-count, .tab[aria-current="page"] .tab-count { background: var(--primary-soft); color: var(--accent); }

/* ---------- Illustration d'un véhicule sans photo ---------- */
.placeholder { background: var(--surface-3); color: var(--muted); }
.ill { display: block; }
.ill-shadow { fill: #0b1427; opacity: .1; }
.ill-body { fill: currentColor; }
.ill-glass { fill: #fff; opacity: .55; }
.ill-line { fill: #0b1427; opacity: .12; }
.ill-light { fill: #fff; opacity: .8; }
.ill-rear { fill: #e5484d; opacity: .9; }
.ill-tire { fill: var(--tire); }
.ill-hub { fill: var(--hub); }
.ill-ring { fill: none; stroke: var(--tire); stroke-width: 9; }
.ill-frame { fill: none; stroke: #3b4458; stroke-width: 5; stroke-linecap: round; }
.ill-bar { fill: none; stroke: var(--tire); stroke-width: 5; stroke-linecap: round; }
.ill-seat { fill: var(--tire); }
.ill-engine { fill: #556079; }
.tone-silver { background: linear-gradient(165deg, #1d2a42 0%, #142035 100%); color: #9aa8bf; }
.tone-blue { background: linear-gradient(165deg, #1b2c4d 0%, #132039 100%); color: #6d8fd0; }
.tone-dark { background: linear-gradient(165deg, #1e283d 0%, #131b2d 100%); color: #5a6886; }
.tone-red { background: linear-gradient(165deg, #2c2133 0%, #1b1726 100%); color: #d0605a; }
.tone-green { background: linear-gradient(165deg, #1a2c2c 0%, #12201f 100%); color: #5fa585; }
.tone-orange { background: linear-gradient(165deg, #2d261d 0%, #1d1912 100%); color: #e0a14a; }
.tone-white { background: linear-gradient(165deg, #1f2b42 0%, #152033 100%); color: #e9eef6; }
:root[data-theme="light"] .tone-silver { background: linear-gradient(165deg, #f1f4f8 0%, #dfe6ef 100%); color: #a9b4c4; }
:root[data-theme="light"] .tone-blue { background: linear-gradient(165deg, #eef3fb 0%, #d6e2f5 100%); color: #3d5f9c; }
:root[data-theme="light"] .tone-dark { background: linear-gradient(165deg, #e9edf3 0%, #d3dae5 100%); color: #2c3446; }
:root[data-theme="light"] .tone-red { background: linear-gradient(165deg, #f8eeee 0%, #eed9d9 100%); color: #b8423a; }
:root[data-theme="light"] .tone-green { background: linear-gradient(165deg, #edf5f0 0%, #d8e9df 100%); color: #3f7a5a; }
:root[data-theme="light"] .tone-orange { background: linear-gradient(165deg, #fbf3e7 0%, #f1e1c8 100%); color: #d1842c; }
:root[data-theme="light"] .tone-white { background: linear-gradient(165deg, #e6ebf2 0%, #cfd8e4 100%); color: #ffffff; }

/* ---------- Listes déroulantes avec recherche (js/picker.js) ---------- */
.picker { position: relative; min-width: 0; }
.picker-native { position: absolute !important; left: 0; bottom: 0; width: 100% !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.picker-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: .5rem .75rem .5rem .8rem;
  border: 1px solid var(--border); border-radius: 11px; background: var(--input-bg); color: var(--text); font: 400 15px/1.3 var(--font); text-align: left; cursor: pointer; box-shadow: var(--shadow-1);
}
.picker-btn:hover { border-color: color-mix(in srgb, var(--border) 60%, var(--text-2)); }
.picker-btn:focus-visible, .picker-btn[aria-expanded="true"] { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.picker-btn.is-placeholder .picker-value { color: var(--muted); }
.picker-btn:disabled { opacity: .6; cursor: not-allowed; }
.picker-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-caret { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.picker-btn[aria-expanded="true"] .picker-caret { transform: rotate(180deg); }
.has-error .picker-btn { border-color: var(--red); }
.picker-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 45; width: max(100%, 280px); max-height: min(62vh, 440px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r); box-shadow: var(--shadow-pop);
}
.picker-panel[hidden] { display: none; }
.picker-panel.is-up { top: auto; bottom: calc(100% + 6px); }
.picker-head { display: none; }
.picker-search { position: relative; flex: none; padding: 8px 8px 6px; }
.picker-search > .icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.picker-search input[type=search] { min-height: 40px; padding-left: 36px; border-radius: 10px; background-color: var(--card-2); box-shadow: none; }
.picker-list { flex: 1; min-height: 0; margin: 0; padding: 2px 6px 8px; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.picker-group { padding: 10px 8px 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.picker-group:first-child { padding-top: 4px; }
.picker-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 14.5px; color: var(--text); cursor: pointer; scroll-margin: 40px; }
.picker-option:hover { background: var(--card-2); }
.picker-option.is-active { background: var(--primary-soft); }
.picker-option[aria-selected="true"] { font-weight: 600; color: var(--accent); }
.picker-option[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.picker-check { width: 16px; height: 16px; color: var(--accent); }
.picker-empty { margin: 0; padding: 14px 14px 18px; font-size: 14px; color: var(--muted); }
.picker-panel.is-sheet { position: fixed; inset: 0; z-index: 90; width: auto; max-height: none; border: 0; border-radius: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.picker-panel.is-sheet .picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 2px 16px; }
.picker-title { margin: 0; font: 700 18px/1.25 var(--font); }
.picker-panel.is-sheet .picker-search { padding: 6px 12px 8px; }
.picker-panel.is-sheet .picker-search > .icon { left: 24px; }
.picker-panel.is-sheet .picker-search input[type=search] { min-height: 46px; font-size: 16px; }
.picker-panel.is-sheet .picker-option { padding: 12px 12px; font-size: 15.5px; }
.picker-panel.is-sheet .picker-list { padding: 0 8px 16px; }
body.picker-locked { overflow: hidden; }

/* ---------- Travaux réalisés : ajout rapide (js/suggest.js) ---------- */
.ops-tools { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ops-title { margin: 0; font-size: 13px; color: var(--muted); }
.ops-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ops-chips:empty { display: none; }
.ops-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 11px; border: 1px dashed var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font: 500 13.5px/1.2 var(--font); text-align: left; cursor: pointer; }
.ops-chip::before { content: "+"; font-weight: 700; color: var(--accent); }
.ops-chip:hover { border-color: var(--primary); color: var(--text); }
.ops-chip.is-added { border-style: solid; border-color: transparent; background: var(--green-soft); color: var(--green-ink); }
.ops-chip.is-added::before { content: "✓"; color: inherit; }
.ops-add { display: flex; gap: 8px; }
.ops-add input[type=text] { flex: 1; min-width: 0; min-height: 38px; }
.ops-add .btn { flex: none; }

/* ---------- Recherche globale ---------- */
.search-panel { border-radius: var(--r-lg); border-color: var(--border-soft); box-shadow: var(--shadow-pop); }
.search-field { border-radius: 11px; }
.search-group-title { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.search-hit { border-radius: 11px; }
.search-hit-icon { border-radius: 10px; }
.search-hit-title { font-weight: 600; }
.chip-btn { font-family: var(--font); font-size: 13px; }

/* ---------- Libellés sans capitales (anciens écrans) ---------- */
.activity-day, .sheet-group, .fuel-hl-label, .defects-head, .tour-meta { text-transform: none; letter-spacing: 0; }
.activity-day { font-size: 13px; font-weight: 600; }
.fuel-hl-label { font-size: 13px; font-weight: 500; }
.tour-meta { font-size: 12.5px; }

/* ---------- Divers ---------- */
.quick-tile { border-radius: var(--r-lg); }
.quick-icon { border-radius: 12px; }
.vehicle-card, .station, .fuel-hl, .doc, .part { border-radius: var(--r-lg); }
.page-loader-box { border-radius: var(--r); }
.tour-card { border-radius: 16px; font-family: var(--font); }
kbd { font-family: var(--font-num); }
@media (max-width: 767px) {
  :root { --card-pad: 16px; }
  h1 { font-size: 26px; }
  .page-head { margin-bottom: 18px; }
  .stat { padding: 13px 15px; }
  .stat-value { font-size: 24px; }
  .tiles { gap: 8px; }
  .tile { padding: 10px 11px; }
  .tile .stat-value { font-size: 19px; }
  .catbar { grid-template-columns: minmax(80px, 110px) minmax(0, 1fr) 76px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .scrim, .picker-caret { transition: none; }
  .quick-sheet[open] { animation: none; }
}
@media print {
  .topbar, .bottom-nav, .sidebar, .scrim, .quick-sheet { display: none !important; }
  .main-col { margin: 0 !important; padding: 0 !important; }
}

/* ---------- Largeurs en pourcentage (jauges, barres) : pas d'attribut style, à cause de la politique de sécurité ---------- */
.pct-0{width:0%} .pct-1{width:1%} .pct-2{width:2%} .pct-3{width:3%} .pct-4{width:4%} .pct-5{width:5%} .pct-6{width:6%} .pct-7{width:7%} .pct-8{width:8%} .pct-9{width:9%} .pct-10{width:10%} .pct-11{width:11%} .pct-12{width:12%} .pct-13{width:13%} .pct-14{width:14%} .pct-15{width:15%} .pct-16{width:16%} .pct-17{width:17%} .pct-18{width:18%} .pct-19{width:19%} .pct-20{width:20%} .pct-21{width:21%} .pct-22{width:22%} .pct-23{width:23%} .pct-24{width:24%} .pct-25{width:25%} .pct-26{width:26%} .pct-27{width:27%} .pct-28{width:28%} .pct-29{width:29%} .pct-30{width:30%} .pct-31{width:31%} .pct-32{width:32%} .pct-33{width:33%} .pct-34{width:34%} .pct-35{width:35%} .pct-36{width:36%} .pct-37{width:37%} .pct-38{width:38%} .pct-39{width:39%} .pct-40{width:40%} .pct-41{width:41%} .pct-42{width:42%} .pct-43{width:43%} .pct-44{width:44%} .pct-45{width:45%} .pct-46{width:46%} .pct-47{width:47%} .pct-48{width:48%} .pct-49{width:49%} .pct-50{width:50%} .pct-51{width:51%} .pct-52{width:52%} .pct-53{width:53%} .pct-54{width:54%} .pct-55{width:55%} .pct-56{width:56%} .pct-57{width:57%} .pct-58{width:58%} .pct-59{width:59%} .pct-60{width:60%} .pct-61{width:61%} .pct-62{width:62%} .pct-63{width:63%} .pct-64{width:64%} .pct-65{width:65%} .pct-66{width:66%} .pct-67{width:67%} .pct-68{width:68%} .pct-69{width:69%} .pct-70{width:70%} .pct-71{width:71%} .pct-72{width:72%} .pct-73{width:73%} .pct-74{width:74%} .pct-75{width:75%} .pct-76{width:76%} .pct-77{width:77%} .pct-78{width:78%} .pct-79{width:79%} .pct-80{width:80%} .pct-81{width:81%} .pct-82{width:82%} .pct-83{width:83%} .pct-84{width:84%} .pct-85{width:85%} .pct-86{width:86%} .pct-87{width:87%} .pct-88{width:88%} .pct-89{width:89%} .pct-90{width:90%} .pct-91{width:91%} .pct-92{width:92%} .pct-93{width:93%} .pct-94{width:94%} .pct-95{width:95%} .pct-96{width:96%} .pct-97{width:97%} .pct-98{width:98%} .pct-99{width:99%} .pct-100{width:100%}

/* ==========================================================================
   Pages
   ========================================================================== */

/* ---------- Accueil ---------- */
.dash-chips { display: none; }
.dash-top, .dash-vehicles { margin-bottom: 24px; }
.watch .lrow-top, .lrow.lrow-top { align-items: flex-start; }
.watch .lrow-top .lrow-main { gap: 6px; }
.watch .gauge { max-width: 460px; margin-top: 2px; }
.watch a.lrow { color: inherit; }
.watch a.lrow:hover .lrow-title { color: var(--accent); }
.watch-more { margin: 10px 0 0; }
.watch-empty { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0 4px; }
.watch-empty p { margin: 0 0 8px; }
.month-total-big { margin: 2px 0 0; font-size: 36px; }
.month-card .stat-sub { margin-bottom: 16px; }
.month-legend { justify-content: space-between; margin-top: 12px; }
.qa-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qa-mini { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border: 1px solid var(--border-soft); border-radius: var(--r); background: var(--card); color: var(--text); font: 600 12.5px/1.15 var(--font); text-align: center; text-decoration: none; }
.qa-mini:hover { border-color: var(--primary); text-decoration: none; }
:root[data-theme="light"] a.qa-mini { color: var(--text); }
.qa-mini .qa-icon { width: 38px; height: 38px; border-radius: 11px; }
.qa-mini .qa-icon .icon { width: 19px; height: 19px; }
.charts-head { flex-wrap: wrap; }
.period-form select { width: auto; min-width: 180px; min-height: 38px; padding-top: .35rem; padding-bottom: .35rem; font-size: 14px; }
.kpis.kpis-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 2px -22px 6px; }
.kpis-strip .stat { padding: 10px 22px; background: none; border-left: 1px solid var(--border-soft); }
.kpis-strip .stat:first-child { border-left: 0; }
.kpis-strip .stat-value { font-size: 24px; }
.chart-tabs { margin: 4px 0 14px; }
.chart-panel .chart-box { height: 300px; }
.chart-panel .chart-empty { padding: 3rem 1rem; }

/* ---------- Véhicules (cartes) ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.vcard { display: flex; flex-direction: column; overflow: hidden; color: inherit; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-1); text-decoration: none; }
.vcard:hover, .vehicle-card.vcard:hover { transform: none; border-color: var(--border); text-decoration: none; }
:root[data-theme="light"] a.vcard { color: inherit; }
.vmedia { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.vmedia-img { display: grid; place-items: center; width: 100%; height: 100%; object-fit: cover; }
.vmedia-img .ill { width: 74%; height: auto; }
.vbadges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.vbody { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.vname { margin: 0; font: 600 17px/1.2 var(--font); color: var(--text); }
.vsub { color: var(--muted); font-size: 13.5px; }
.vid { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vnext { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); }
.vfacts { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.vfacts .num { font-size: 15.5px; font-weight: 600; color: var(--text); }
.vfacts .muted .num { font-size: inherit; color: var(--text-2); }
.vadd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 230px; padding: 20px; border: 1.5px dashed var(--border); border-radius: var(--r-lg); background: transparent; color: var(--text); text-align: center; text-decoration: none; }
.vadd:hover { border-color: var(--primary); text-decoration: none; }
:root[data-theme="light"] a.vadd { color: var(--text); }
.add-disc { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--accent); }
.add-disc .icon { width: 24px; height: 24px; }

@media (max-width: 767px) {
  .dash-head { margin-bottom: 12px; }
  .dash-chips { display: flex; margin: 0 -16px 16px; padding: 0 16px; }
  .dash-top, .dash-vehicles { margin-bottom: 18px; }
  .watch .lrow, .lrow:has(> .lrow-cta) { flex-wrap: wrap; align-items: flex-start; }
  .watch .lrow-main, .lrow:has(> .lrow-cta) > .lrow-main { flex-basis: calc(100% - 54px); }
  .lrow-cta { margin: -2px 0 0 54px; }
  .watch .lrow-top > .badge { display: none; }
  .month-total-big { font-size: 32px; }
  .kpis.kpis-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 2px -16px 6px; row-gap: 6px; }
  .kpis-strip .stat { padding: 8px 16px; }
  .kpis-strip .stat:nth-child(3) { border-left: 0; }
  .chart-panel .chart-box { height: 250px; }
  .dash-vehicles .vgrid { display: flex; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .dash-vehicles .vgrid::-webkit-scrollbar { display: none; }
  .dash-vehicles .vcard { flex: 0 0 min(280px, 82vw); scroll-snap-align: start; }
  .dash-vehicles .vmedia { aspect-ratio: 16 / 8; }
  .dash-vehicles .vadd { flex: 0 0 200px; min-height: 0; }
  .dash-vehicles .vfacts { display: none; }
}

/* ---------- Véhicules (liste en lignes larges) ---------- */
.tabs-pills { gap: 2px; padding: 3px; border-bottom: 0; border-radius: 11px; background: var(--surface-3); }
.tabs-pills .tab { height: 34px; margin: 0; padding: 0 13px; border: 0; border-radius: 8px; color: var(--text-2); font-size: 13.5px; }
.tabs-pills .tab[aria-current="page"], .tabs-pills .tab[aria-selected="true"], :root[data-theme="light"] .tabs-pills a.tab[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(14, 26, 47, .1), 0 0 0 1px var(--border-soft); }
.vrows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.vrow, .vrow.vehicle-card {
  display: grid; align-items: center; gap: 10px 22px; padding: 12px 20px 12px 12px;
  grid-template-columns: 180px repeat(3, minmax(0, 1fr)) 20px;
  grid-template-areas: "media id id id go" "media km spent perkm go" "media next next next go";
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: inherit; text-decoration: none;
}
.vrow:hover, .vrow.vehicle-card:hover { transform: none; border-color: var(--border); text-decoration: none; }
:root[data-theme="light"] a.vrow { color: inherit; }
.vrow > .vmedia { grid-area: media; border-radius: 12px; align-self: center; }
.vrow .vmedia-img .ill { width: 80%; }
.vrow-id { grid-area: id; }
.kv-km { grid-area: km; } .kv-spent { grid-area: spent; } .kv-perkm { grid-area: perkm; }
.vrow-next { grid-area: next; }
.vrow-go { grid-area: go; color: var(--muted); }
.vrow .vname { font-size: 19px; }
.vrow .vid { margin: 6px 0 0; }
.vshare { margin: 6px 0 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.vshare .icon { width: 15px; height: 15px; }
.kv { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kv .k { font-size: 13px; font-weight: 500; color: var(--muted); }
.kv .v { font: 600 19px/1.15 var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.kv .v small { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted); }
.vrow-next .vnext { gap: 6px 8px; }
.vrow-add { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 18px; border: 1.5px dashed var(--border); border-radius: var(--r-lg); color: var(--text); text-decoration: none; }
.vrow-add:hover { border-color: var(--primary); text-decoration: none; }
:root[data-theme="light"] a.vrow-add { color: var(--text); }
.vrow-add .add-disc { width: 36px; height: 36px; border-radius: 11px; }
.vrow-add .add-disc .icon { width: 20px; height: 20px; }
.vrow-add .muted { font-weight: 500; }
.share-hint { display: flex; align-items: center; gap: 16px; background: var(--card-2); box-shadow: none; }
.share-hint p { margin: 0; }
@media (min-width: 1440px) {
  .vrow, .vrow.vehicle-card { grid-template-columns: 200px minmax(0, 1.3fr) repeat(3, minmax(0, .72fr)) minmax(0, 1.7fr) 20px; grid-template-areas: "media id km spent perkm next go"; }
}
@media (max-width: 767px) {
  .page-head .tabs-pills { order: 2; }
  .vrow, .vrow.vehicle-card { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "media media media" "id id id" "km spent perkm" "next next next"; gap: 12px 14px; padding: 0 0 14px; overflow: hidden; }
  .vrow > .vmedia { border-radius: 0; aspect-ratio: 16 / 8; }
  .vrow > :not(.vmedia) { margin: 0 14px; }
  .vrow .kv-perkm { margin-left: 0; } .vrow .kv-spent { margin: 0; }
  .vrow .vname { font-size: 18px; }
  .vrow-go { display: none; }
  .kv .v { font-size: 17px; }
  .share-hint { align-items: flex-start; }
}

/* ---------- Fiche d'un véhicule ---------- */
.vhero { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; margin-bottom: 20px; padding: 18px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r-xl); box-shadow: var(--shadow-1); }
.vhero-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px; background: var(--surface-3); }
.vhero-media .vmedia-img .ill { width: 82%; }
.vhero-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 6px 6px 2px 0; }
.vhero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vhero-title h1 { font-size: 34px; letter-spacing: -.02em; }
.vhero-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; }
.vhero-badges:empty { display: none; }
.vhero-actions { gap: 8px; }
.vhero-actions form { display: inline; }
.vhero-id { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vchips { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.vchip .icon { width: 15px; height: 15px; color: var(--muted); }
.vhero-odo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vhero-odo-text { display: flex; flex-direction: column; gap: 2px; }
.vhero-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: auto; }
.vtabs { margin-bottom: 20px; }
.lrow-sub { font-weight: 500; }
.info dd.num { font-family: var(--font-num); letter-spacing: .02em; }
.chart-box-sm { height: 190px; }
.recall-none { display: flex; gap: 14px; align-items: flex-start; }
.recall-none h2 { margin: 0 0 3px; font-size: 16px; }
.recall-none p { margin: 0; }
.recalls .recalls-done { margin-top: 12px; }
.recall { border-radius: var(--r); }
.recall h3 { font-size: 16px; }
.info-row { padding: 9px 0; font-size: 14.5px; }
@media (max-width: 1199px) {
  .vhero { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; }
  .vhero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .vhero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0 0 16px; overflow: hidden; }
  .vhero-media { border-radius: 0; aspect-ratio: 16 / 9; }
  .vhero-body { padding: 0 16px; }
  .vhero-title h1 { font-size: 26px; }
  .vhero-actions { width: 100%; }
  .vhero-actions .btn { flex: 1 1 auto; }
  .vtabs { margin: 0 -16px 16px; padding: 0 16px; }
  .odo span { width: 19px; height: 28px; font-size: 18px; }
}

/* ---------- Filtres des listes (puces, liste des types, recherche) ---------- */
.list-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.list-filters .fchips { flex: 1 1 360px; min-width: 0; }
.list-filters-end { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; flex-wrap: wrap; }
.filter-kind { width: 220px; }
.filter-kind .picker-btn, .filter-kind select { min-height: 38px; font-size: 14px; }
.search-box { position: relative; width: 280px; max-width: 100%; }
.search-box > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-box input[type=search] { min-height: 38px; padding-left: 36px; font-size: 14px; }
.pending-alert { align-items: center; margin-bottom: 18px; }
.pending-alert p { flex: 1; }
.pending-alert form { margin: 0; }

/* ---------- Carnet : frise ---------- */
.tl { display: flex; flex-direction: column; }
.tl-year { margin: 0; padding: 18px 0 8px 128px; font: 700 15px/1 var(--font-num); letter-spacing: .02em; color: var(--muted); }
.tl > .tl-year:first-child { padding-top: 0; }
.tl-item, .tl-item.entry { display: grid; grid-template-columns: 96px 26px minmax(0, 1fr); column-gap: 16px; margin: 0; padding: 4px 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
.tl-when { padding-top: 14px; text-align: right; }
.tl-when strong { display: block; font: 600 15px/1.2 var(--font-num); color: var(--text); }
.tl-when span { font: 500 13.5px/1.3 var(--font-num); color: var(--muted); }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--border-soft); }
.tl > .tl-item:last-child .tl-rail::before { bottom: auto; height: 28px; }
.tl-dot { position: relative; margin-top: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--border); color: var(--muted); }
.tl-dot .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.tl-dot.is-primary { border-color: var(--primary); color: var(--primary); }
.tl-dot.is-garage { border-color: #0f766e; color: #0f766e; }
:root[data-theme="dark"] .tl-dot.is-garage { border-color: #5eead4; color: #5eead4; }
.tl-card { display: flex; flex-direction: column; gap: 12px; margin: 4px 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r); box-shadow: var(--shadow-1); min-width: 0; }
.tl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tl-title { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.tl-title h2 { margin: 0; font: 600 17px/1.25 var(--font); }
.tl-title h2 a { color: var(--text); }
.tl-when-inline { display: none !important; }
.tl-side { display: flex; align-items: center; gap: 4px; flex: none; }
.tl-side .amount { font-size: 18px; margin-right: 4px; }
.tl-side .icon-btn { width: 34px; height: 34px; }
.tl-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.tl-body > div:only-child { grid-column: 1 / -1; }
.tl-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ops-done, .parts-used { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--text-2); }
.ops-done li { display: flex; align-items: flex-start; gap: 8px; }
.ops-done .icon { width: 14px; height: 14px; margin-top: 3px; color: var(--green); stroke-width: 2.4; }
.parts-used li { display: flex; justify-content: space-between; gap: 12px; }
.parts-used strong { font-weight: 600; white-space: nowrap; color: var(--text); }
.tl-foot { display: flex; flex-direction: column; gap: 8px; }
.tl-notes { margin: 0; }
.tl-plain { padding: 14px 0 10px; }
.tl-plain p { margin: 0; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) {
  .list-filters { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .list-filters .fchips { flex: none; margin: 0 -16px; padding: 0 16px; }
  .list-filters-end { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filter-kind, .search-box { width: auto; }
  .pending-alert { flex-wrap: wrap; }
  .pending-alert form { margin-left: 32px; }
  .tl-year { padding-left: 38px; }
  .tl-item, .tl-item.entry { grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; }
  .tl-when { display: none; }
  .tl-when-inline { display: inline-flex !important; }
  .tl-card { padding: 14px; }
  .tl-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tl-head { flex-direction: column; }
  .tl-side { position: absolute; right: 14px; top: 14px; }
  .tl-card { position: relative; }
  .tl-title { padding-right: 96px; }
}

/* ---------- Dépenses ---------- */
.spend-summary { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 20px; }
.spend-total { padding-right: 28px; border-right: 1px solid var(--border-soft); }
.spend-total p { margin: 0; }
.spend-total .stat-value { font-size: 34px; margin-top: 4px; }
.spend-total .stat-sub { margin-top: 4px; }
.spend-split { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.spend-split .stackbar { height: 14px; }
.spend-split .legend { gap: 8px 26px; }
.more-filters { position: relative; }
.more-filters > summary { list-style: none; }
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters[open] > summary { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.more-filters-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(440px, calc(100vw - 32px)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.more-filters-pop .btn { grid-column: 1 / -1; justify-self: start; }
.expense-table .cell-title { align-items: center; }
.cell-main { margin: 0; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.cell-sub { margin: 1px 0 0; font-size: 13px; color: var(--muted); }
.cell-note { display: block; color: var(--muted); font-style: italic; }
.cell-links { white-space: nowrap; }
.tnum { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.cell-links .badge { gap: 4px; margin: 2px 4px 2px 0; text-decoration: none; }
.cell-links .badge .icon { width: 13px; height: 13px; }
.expense-table .table td { padding-top: 10px; padding-bottom: 10px; }
.expense-table .table .amount { font-size: 15.5px; }
.recurring-card > summary .muted { font-weight: 400; margin-left: 4px; }
@media (max-width: 1099px) {
  .spend-summary { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .spend-total { padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--border-soft); }
}
@media (max-width: 767px) {
  .spend-total .stat-value { font-size: 30px; }
  .more-filters-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 12px); width: auto; z-index: 70; }
  .expense-filters-bar .list-filters-end { grid-template-columns: auto minmax(0, 1fr); }
}

/* ---------- Échéances ---------- */
.rem-tabs { display: inline-flex; margin: 0 0 20px; }
.rem-group { display: flex; flex-direction: column; gap: 12px; }
.rem-group-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.rem-group-title .muted { font-size: 14px; font-weight: 500; }
.rem-item.reminder { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-start; gap: 16px; border-left: 0; }
.card.rem-item.level-overdue { border-color: color-mix(in srgb, var(--red) 35%, var(--border-soft)); box-shadow: var(--shadow-2); }
.card.rem-item.level-soon { border-color: color-mix(in srgb, var(--amber) 35%, var(--border-soft)); }
.lrow.rem-item { padding: 16px 0; }
.rem-list { padding-top: 4px; padding-bottom: 4px; }
.rem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rem-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rem-title { margin: 0 0 4px; font: 600 17px/1.3 var(--font); }
.lrow .rem-title { font-size: 15.5px; }
.rem-due { margin: 0; font-weight: 600; white-space: nowrap; color: var(--text-2); }
.rem-due.is-late { color: var(--red-ink); }
.rem-notes { margin: 0; }
.rem-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rem-actions form { display: inline; margin: 0; }
.rem-calendar .lrow { align-items: flex-start; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-pop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; width: 250px; display: flex; flex-direction: column; gap: 1px; padding: 6px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.row-menu-pop form { margin: 0; }
.rem-month { width: 76px; flex: none; font-weight: 600; color: var(--text); }
.rem-calendar .lrow-main { gap: 2px; }
.rem-alerts { display: flex; flex-direction: column; gap: 10px; box-shadow: none; }
.rem-alerts h2 { margin: 0; font-size: 16px; }
.rem-alerts p { margin: 0; }
.rem-alert-links { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 767px) {
  .rem-tabs { display: flex; }
  .rem-tabs .tab { flex: 1; justify-content: center; }
  .rem-item.reminder { flex-direction: row; gap: 12px; }
  .rem-head { flex-direction: column; gap: 6px; }
  .rem-actions .btn-secondary { flex: 1 1 auto; }
}

/* ---------- Contrôle technique ---------- */
.ct-status-list { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; margin-bottom: 24px; }
.ct-status, .ct-status.level-ok, .ct-status.level-soon, .ct-status.level-overdue { display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--border-soft); }
.ct-status.level-none { background: var(--card-2); box-shadow: none; }
.ct-status.level-overdue { border-color: color-mix(in srgb, var(--red) 35%, var(--border-soft)); }
.ct-status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-status p { margin: 0; }
.ct-entry, .ct-entry.result-favorable, .ct-entry.result-counter, .ct-entry.result-critical { display: flex; gap: 16px; align-items: flex-start; border-left: 1px solid var(--border-soft); }
.ct-entry.result-counter { border-color: color-mix(in srgb, var(--amber) 30%, var(--border-soft)); }
.ct-entry.result-critical { border-color: color-mix(in srgb, var(--red) 35%, var(--border-soft)); }
.ct-entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ct-entry-main > p { margin: 0; }
.ct-entry .rem-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-link { margin: 0; }
.defects-details > summary { font-size: 14px; }
.ct-history { margin-bottom: 20px; }
@media (max-width: 767px) {
  .ct-entry { gap: 12px; }
  .ct-entry .rem-head { flex-direction: column; }
  .ct-entry .tl-side { position: absolute; right: 16px; top: 16px; }
  .ct-entry { position: relative; }
  .ct-entry .rem-title { padding-right: 90px; }
}

/* ---------- Connexion (et autres pages hors connexion) ---------- */
.auth-body { display: block; place-items: normal; min-height: 100vh; padding: 0; background: var(--card); }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art, .lp-hero {
  --night: #0b1427;
  background-color: var(--night);
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px; color: #eef2fb;
}
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 36px; padding: 44px 56px; }
.lp-brand, .lp-brand:hover, :root[data-theme="light"] a.lp-brand { color: #fff; }
.lp-brand .brand-mark, .auth-mobile-brand .brand-mark { background: #2f5bd8; }
.auth-art-title { margin: 0; max-width: 520px; font: 700 44px/1.08 var(--font); letter-spacing: -.025em; color: #fff; }
.auth-art-lead { margin: 14px 0 0; max-width: 470px; font-size: 17px; color: #a9b5cc; }
.auth-floats { position: relative; height: 290px; max-width: 560px; }
.auth-float { position: absolute; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 16px; background: #fff; color: #0e1a2f; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6); }
.auth-float p { margin: 0; }
.auth-float-1 { left: 0; top: 0; width: 360px; }
.auth-float-2 { left: 170px; top: 136px; width: 340px; gap: 10px; }
.auth-float-3 { left: 36px; top: 222px; width: 320px; flex-direction: row; align-items: center; gap: 10px; padding: 12px 16px; }
.auth-float-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-float-name { font: 600 16px/1.2 var(--font); }
.auth-float-sub { font-size: 13px; color: #5e6a82; }
.auth-float-sub strong { color: #3c4860; }
.auth-float-track { height: 6px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.auth-float-track span { display: block; height: 100%; border-radius: inherit; background: #12a150; }
.auth-ok { background: #e6f6ed; color: #0b7a3e; }
.auth-stamp { color: #1a3fae; }
.auth-assure { margin: auto 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: #c9d2e3; }
.auth-assure li { display: flex; align-items: center; gap: 10px; }
.auth-assure .icon { color: #8fb0ff; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--card); }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-card { padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
.auth-heading { margin-bottom: 22px; }
.label-row label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.auth-heading h1 { font-size: 30px; }
.auth-heading p { margin: 6px 0 0; }
.auth-note { margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--border-soft); text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; font-size: 13px; }
.auth-foot .icon { width: 15px; height: 15px; }
.auth-mobile-brand { display: none; }
.auth-card .center-text h2 { font-size: 24px; }
@media (max-width: 1023px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-body { background: var(--bg); }
  .auth-main { align-items: flex-start; padding: calc(28px + env(safe-area-inset-top)) 20px 40px; background: var(--bg); }
  .auth-mobile-brand { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--text); text-decoration: none; }
  :root[data-theme="light"] a.auth-mobile-brand { color: var(--text); }
  .auth-card { padding: 24px 20px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r-xl); box-shadow: var(--shadow-1); }
}

/* ---------- Page de présentation (visiteurs) ---------- */
.lp-body { background: var(--bg); }
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.lp-hero { overflow: hidden; padding-bottom: 96px; }
.lp-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; padding: 18px 0; }
.lp-nav { display: flex; gap: 26px; margin-right: auto; font-size: 15px; }
.lp-nav a { color: #b7c2d8; font-weight: 500; }
.lp-nav a:hover { color: #fff; text-decoration: none; }
.lp-hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 48px; align-items: center; padding-top: 56px; }
.lp-hero h1 { max-width: 560px; font: 700 58px/1.03 var(--font); letter-spacing: -.03em; color: #fff; }
.lp-lead { max-width: 520px; margin: 20px 0 0; font-size: 18.5px; line-height: 1.55; color: #b4bfd4; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-light { background: #fff; color: #0e1a2f; }
.btn-light:hover { background: #e9eef7; }
:root[data-theme="light"] a.btn-light, a.btn-light { color: #0e1a2f; }
.btn-line { border-color: rgba(255, 255, 255, .26); color: #fff; background: transparent; }
.btn-line:hover { background: rgba(255, 255, 255, .08); }
:root[data-theme="light"] a.btn-line, a.btn-line { color: #fff; }
.lp-visual { position: relative; padding-right: 30px; }
.lp-browser { overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: #f3f5f9; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75); }
.lp-browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; background: #e6eaf1; }
.lp-browser-bar i { display: block; width: 10px; height: 10px; border-radius: 50%; background: #c4ccd8; }
.lp-browser-bar span { flex: 0 0 240px; height: 20px; margin-left: 14px; padding: 0 10px; border-radius: 6px; background: #fff; color: #5e6a82; font: 500 11.5px/20px var(--font); overflow: hidden; }
.lp-mini { display: flex; flex-direction: column; gap: 12px; padding: 18px; color: #0e1a2f; font-size: 13px; }
.lp-mini p { margin: 0; }
.lp-mini-title { font: 700 20px/1.2 var(--font); color: #0e1a2f; }
.lp-mini-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid #e2e7ef; border-radius: 14px; background: #fff; }
.lp-mini-head { font-weight: 600; }
.lp-mini-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lp-mini-label { display: inline-flex; align-items: center; gap: 8px; }
.lp-mini .lrow-icon, .lp-phone .lrow-icon { width: 30px; height: 30px; border-radius: 8px; }
.lp-mini .lrow-icon .icon, .lp-phone .lrow-icon .icon { width: 16px; height: 16px; }
.lp-mini .ri-red { background: #fdecea; color: #b42318; }
.lp-mini .ri-green { background: #e6f6ed; color: #0b7a3e; }
.lp-mini .badge-red { background: #fdecea; color: #b42318; }
.lp-mini .muted { color: #5e6a82; }
.lp-mini .gauge-track { background: #eef1f6; }
.lp-mini .gauge-track span { background: #12a150; }
.lp-mini-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lp-mini-card { overflow: hidden; border: 1px solid #e2e7ef; border-radius: 14px; background: #fff; }
.lp-mini-card .vmedia { aspect-ratio: 16 / 8; display: grid; place-items: center; }
.lp-mini-card .ill { width: 70%; height: auto; }
.lp-mini-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; font-weight: 600; }
.lp-hero .tone-silver { background: linear-gradient(165deg, #f1f4f8 0%, #dfe6ef 100%); color: #a9b4c4; }
.lp-hero .tone-blue { background: linear-gradient(165deg, #eef3fb 0%, #d6e2f5 100%); color: #3d5f9c; }
.lp-hero .ill { --tire: #1a2130; --hub: #c9d1dd; }
.lp-phone { position: absolute; right: -18px; bottom: -56px; width: 210px; padding: 8px; border-radius: 30px; background: #0d1321; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8); }
.lp-phone-screen { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 16px; border-radius: 23px; background: #f3f5f9; color: #0e1a2f; }
.lp-phone-screen p { margin: 0; }
.lp-phone .lp-mini-title { font-size: 15px; }
.lp-phone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lp-phone .qa-mini { padding: 8px 2px; font-size: 11px; background: #fff; border-color: #e2e7ef; color: #0e1a2f; }
.lp-phone .qa-mini .qa-icon { width: 28px; height: 28px; border-radius: 8px; }
.lp-phone .qa-mini .qa-icon .icon { width: 16px; height: 16px; }
.lp-phone .cat { background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in oklab, var(--c) 72%, black); }
.lp-phone .btn-primary { background: #1f4bd1; color: #fff; }
.lp-sources { padding: 34px 0; background: var(--card); border-bottom: 1px solid var(--border-soft); }
.lp-sources .lp-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; font-weight: 600; color: var(--text-2); }
.lp-sources span { display: inline-flex; align-items: center; gap: 8px; }
.lp-sources .icon { color: var(--primary); }
.lp-section { padding: 96px 0; }
.lp-alt { background: var(--card); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.lp-h2 { max-width: 640px; margin: 0; font: 700 40px/1.1 var(--font); letter-spacing: -.02em; }
.lp-sub { max-width: 620px; margin: 12px 0 0; font-size: 17px; color: var(--muted); }
.lp-feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-top: 44px; }
.lp-feat-4 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.lp-feat article { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r-lg); }
.lp-alt .lp-feat article { background: var(--bg); }
.lp-feat h3 { margin: 0; font: 600 18px/1.25 var(--font); }
.lp-feat p { margin: 0; font-size: 15px; color: var(--muted); }
.lp-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 56px; align-items: center; }
.lp-ticks { display: flex; flex-direction: column; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.lp-ticks li { display: flex; gap: 14px; align-items: flex-start; }
.lp-ticks strong { display: block; font-size: 16px; font-weight: 600; }
.lp-ticks .muted { font-size: 15px; }
.lp-phone-demo { display: flex; justify-content: center; }
.lp-phone-lg { position: static; width: 280px; padding: 10px; border-radius: 38px; box-shadow: var(--shadow-pop); }
.lp-phone-lg .lp-phone-screen { gap: 12px; padding: 18px 14px; border-radius: 30px; }
.lp-phone-lg .lp-mini-title { font-size: 18px; }
.lp-station { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid #1f4bd1; border-radius: 12px; background: rgba(31, 75, 209, .1); font-size: 13px; font-weight: 600; }
.lp-station span:nth-child(2) { flex: 1; }
.lp-field { display: flex; align-items: center; height: 44px; padding: 0 13px; border: 1px solid #cfd7e3; border-radius: 11px; background: #fff; font-size: 15px; color: #0e1a2f; }
.lp-field-xl { height: 56px; font-size: 26px; font-weight: 600; }
.lp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-last { padding-top: 0; }
.lp-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 56px; border-radius: 26px; background: #0b1427; color: #fff; }
.lp-band h2 { margin: 0; font: 700 34px/1.15 var(--font); letter-spacing: -.02em; }
.lp-band p { max-width: 560px; margin: 10px 0 0; font-size: 16.5px; color: #b4bfd4; }
.lp-foot { padding: 26px 0; border-top: 1px solid var(--border-soft); }
.lp-foot .lp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lp-foot p { margin: 0; }
.lp-brand-sm { color: var(--text); }
.lp-brand-sm .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.lp-brand-sm .brand-mark .icon { width: 16px; height: 16px; }
.lp-brand-sm .brand-name { font-size: 18px; }
@media (max-width: 1023px) {
  .lp-nav { display: none; }
  .lp-hero h1 { font-size: 44px; }
  .lp-visual { padding-right: 0; margin-bottom: 40px; }
  .lp-phone { right: 6px; bottom: -48px; width: 180px; }
}
@media (max-width: 767px) {
  .lp-wrap { padding: 0 18px; }
  .lp-head { gap: 12px; justify-content: space-between; }
  .lp-head .btn { min-height: 38px; }
  .lp-hero { padding-bottom: 72px; }
  .lp-hero-grid { padding-top: 28px; gap: 36px; }
  .lp-hero h1 { font-size: 36px; }
  .lp-lead { font-size: 16.5px; }
  .lp-cta .btn { flex: 1 1 auto; }
  .lp-browser-bar span { flex-basis: 160px; }
  .lp-phone { display: none; }
  .lp-section { padding: 64px 0; }
  .lp-h2 { font-size: 30px; }
  .lp-band { padding: 32px 24px; }
  .lp-band h2 { font-size: 26px; }
  .lp-band .btn { width: 100%; }
  .lp-phone-lg { display: block; position: static; }
}

/* ---------- Réglages du compte ---------- */
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 1px; }
.settings-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 500 14.5px/1.2 var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.settings-link .icon { width: 19px; height: 19px; color: var(--muted); }
.settings-link:hover { background: var(--card-2); color: var(--text); text-decoration: none; }
:root[data-theme="light"] a.settings-link { color: var(--text-2); }
.settings-link.active, :root[data-theme="light"] a.settings-link.active { background: var(--primary-soft); color: var(--accent); font-weight: 600; }
.settings-link.active .icon { color: var(--accent); }
.settings-link.is-danger, .settings-link.is-danger .icon { color: var(--red-ink); }
.settings-logout { margin: 10px 0 0; }
.settings-main { min-width: 0; }
.settings-main > .grid-2 { margin-bottom: 0; }
.settings-main .form-narrow { max-width: none; }
.alert-green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green-ink); align-items: center; }
@media (max-width: 1199px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1023px) {
  .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 0 -16px; padding: 0 16px 2px; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-link { flex: none; width: auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); white-space: nowrap; font-size: 14px; }
  .settings-link.active { border-color: transparent; }
  .settings-nav .nav-label { display: none; }
  .settings-logout { margin: 0; flex: none; }
}

/* @@PAGES@@ */

/* ---------- Demandes d'accès (3.1) ---------- */
/* Formulaire public */
.ar-steps { margin: 0; padding: 0; list-style: none; max-width: 470px; display: flex; flex-direction: column; }
.ar-steps li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding-bottom: 26px; }
.ar-steps li:last-child { padding-bottom: 0; }
.ar-steps li::before { content: ""; position: absolute; left: 19px; top: 42px; bottom: 4px; width: 2px; background: rgba(255, 255, 255, .12); }
.ar-steps li:last-child::before { display: none; }
.ar-steps strong { display: block; margin-top: 2px; font-size: 16.5px; font-weight: 600; color: #fff; }
.ar-steps li > span > span { display: block; font-size: 15px; color: #a9b5cc; }
.ar-step-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--font-num); background: rgba(143, 176, 255, .14); color: #c8d7ff; border: 1px solid rgba(143, 176, 255, .3); }
.ar-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ar-opt { font-weight: 400; color: var(--muted); }
.field > label.check { font-size: 14.5px; font-weight: 400; color: var(--text-2); }
.ar-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.ar-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 14px; }
.ar-links .back-link { margin: 0; }
.ar-steps-narrow { display: none; }
.ar-sent-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ar-sent-head h1 { margin: 0; font-size: 28px; }
.ar-sent-head p { margin: 0; max-width: 340px; }
.ar-sent-head strong { color: var(--text); word-break: break-word; }
.ar-done { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); }
.ar-done .icon { width: 36px; height: 36px; }
.ar-track { margin: 0; padding: 4px 18px; list-style: none; border: 1px solid var(--border-soft); border-radius: var(--r-lg, 16px); background: var(--card); }
.ar-track li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.ar-track li:first-child { border-top: 0; }
.ar-track strong { display: block; font-size: 15px; color: var(--text); }
.ar-track li > span > span { display: block; font-size: 13.5px; color: var(--muted); }
.ar-track-s { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border); color: var(--muted); font: 700 13px/1 var(--font-num); }
.ar-track-s .icon { width: 16px; height: 16px; }
.ar-track-s.is-ok { background: var(--green); border-color: var(--green); color: #fff; }
.ar-track-s.is-now { border-color: var(--primary); color: var(--primary); }
@media (max-width: 1023px) {
  .ar-steps-narrow { display: block; margin-top: 22px; padding: 20px 4px 0; border-top: 1px solid var(--border-soft); }
  .ar-steps-narrow h2 { margin: 0 0 14px; font-size: 16px; }
  .ar-steps-narrow ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
  .ar-steps-narrow li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
  .ar-steps-narrow .ar-step-n { width: 30px; height: 30px; font-size: 14px; background: var(--primary-soft); color: var(--accent); border: 0; }
  .ar-steps-narrow strong { display: block; font-size: 15px; }
  .ar-steps-narrow li > span > span { display: block; font-size: 14px; color: var(--muted); }
}
@media (max-width: 520px) {
  .ar-names { grid-template-columns: minmax(0, 1fr); }
}

/* Page de présentation : deux boutons */
.lp-head-actions, .lp-band-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lp-band-actions { gap: 12px; }
@media (max-width: 767px) {
  .lp-head-request { display: none; }
  .lp-band-actions { width: 100%; flex-direction: column-reverse; align-items: stretch; }
}

/* Menu du compte : demandes en attente */
.avatar { position: relative; }
.avatar-dot { position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg-elev); }
.usermenu-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: #fff; font: 600 12px/20px var(--font-num); text-align: center; }

/* Administration : onglets, demandes, décision */
.admin-tabs { margin-bottom: 22px; }
.tab-count.is-alert, .tab[aria-current="page"] .tab-count.is-alert { background: var(--primary); color: #fff; }
.ar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 22px 2px; }
.ar-head h2 { margin: 0; }
.ar-req { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px 22px; }
.ar-req + .ar-req { border-top: 1px solid var(--border-soft); }
.ar-av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--accent); font: 700 16px/1 var(--font); }
.ar-req-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ar-req-main .lrow-meta > span { word-break: break-all; }
.ar-req-name { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 600 17px/1.25 var(--font); color: var(--text); }
.ar-quote { margin: 8px 0 0; max-width: 640px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg); color: var(--text-2); font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.ar-quote .icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--muted); }
.ar-nomsg { margin: 6px 0 0; }
.ar-req-actions { display: flex; gap: 8px; align-items: center; }
.ar-accept-short { display: none; }
.ar-empty { display: flex; align-items: center; gap: 14px; padding: 18px 22px 22px; }
.ar-empty p { margin: 0; }
.ar-foot { display: flex; align-items: center; gap: 8px; margin: 0; }
.ar-foot .icon { flex: none; width: 16px; height: 16px; }
.ar-dialog { max-width: 600px; padding: 0; overflow: hidden; }
.ar-dialog-sm { max-width: 540px; }
.ar-dialog-head { padding: 22px 24px 0; }
.ar-dialog-head h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.ar-dialog-head p { margin: 4px 0 0; }
.ar-dialog-body { padding: 18px 24px 22px; }
.ar-dialog-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border-soft); background: var(--bg); }
.ar-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--bg); }
.ar-who .ar-av { width: 42px; height: 42px; font-size: 15px; }
.ar-who p { margin: 0; }
.ar-locked { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); word-break: break-all; }
.ar-locked .icon { flex: none; width: 16px; height: 16px; color: var(--muted); }
.ar-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.ar-roles legend { margin-bottom: 8px; }
.ar-roles > .ar-role { font-weight: 400; }
.ar-role { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ar-role:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ar-role input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; }
.ar-role strong { display: block; font-size: 15px; color: var(--text); }
.ar-role > span > span { display: block; font-size: 13px; color: var(--muted); }
.ar-info { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--text); font-size: 14px; }
.ar-info .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent); }
@media (max-width: 767px) {
  .ar-head { padding: 16px 16px 2px; }
  .ar-req { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .ar-av { width: 44px; height: 44px; font-size: 15px; }
  .ar-req-actions { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .ar-req-actions .btn { min-height: 44px; }
  .ar-req-actions .btn-ghost { border-color: var(--border); }
  .ar-accept-long { display: none; }
  .ar-accept-short { display: inline; }
  .ar-empty { padding: 16px; }
  .ar-dialog-head { padding: 18px 18px 0; }
  .ar-dialog-body { padding: 16px 18px 18px; }
  .ar-dialog-foot { flex-direction: column-reverse; padding: 14px 18px; }
  .ar-dialog-foot .btn { width: 100%; justify-content: center; min-height: 44px; }
  .ar-roles { grid-template-columns: minmax(0, 1fr); }
}
