/* JEK — feuille de style unique. Charte : couleurs du logo Jek Company (bleu #0231CF, jaune #ECA71C), couleurs d'état, IBM Plex Sans. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --accent: #0231CF;
  --accent-hover: #0226A3;
  --accent-soft: #E8EDFC;
  --brand-yellow: #ECA71C;

  --st-success: #1E7A4C;
  --st-danger: #B42318;
  --st-info: #0231CF;
  --st-warning: #B54708;
  --st-neutral: #8D9098;

  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-alt: #F9FAFB;
  --border: #DDE1E6;
  --border-strong: #C4CAD2;
  --text: #1B2430;
  --text-muted: #5B6573;
  --focus: 0 0 0 3px rgba(2, 49, 207, .35);

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar-w: 232px;
  --touch: 44px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 var(--space-3); line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.375rem; }
h2 { font-size: 1.125rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 var(--space-3); }
:focus-visible { outline: none; box-shadow: var(--focus); }
.muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: var(--space-2) var(--space-3); z-index: 100; }
.skip-link:focus { left: 8px; }
[data-lucide] { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }

/* ---------- Structure ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--accent); color: #fff; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-4) var(--space-5); font-weight: 600; font-size: 1.05rem; }
.sidebar__brand small { display: block; font-weight: 400; font-size: .75rem; opacity: .75; }
.nav { list-style: none; margin: 0; padding: 0 var(--space-2); }
.nav__section { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .6; padding: var(--space-4) var(--space-3) var(--space-1); }
.nav a {
  display: flex; align-items: center; gap: var(--space-3); min-height: var(--touch);
  padding: 0 var(--space-3); color: rgba(255,255,255,.88); border-radius: var(--radius); font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: var(--space-3); min-height: 60px; padding: 0 var(--space-5);
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-size: 1.05rem; font-weight: 600; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .topbar__menu { display: none; }
.topbar__title { visibility: hidden; } /* le titre figure déjà dans la page ; visible en mobile */
.topbar__user { display: flex; align-items: center; gap: var(--space-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: .8rem; }
.content { padding: var(--space-5) var(--space-6); max-width: none; width: 100%; }

.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.page-header h1 { margin: 0; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Composants ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--space-5); margin-bottom: var(--space-4); }
.card__title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-4); }
.card__title h2 { margin: 0; }
.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-alt); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--danger { background: var(--st-danger); border-color: var(--st-danger); color: #fff; }
.btn--danger:hover { background: #912018; }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--sm { min-height: 32px; padding: 0 var(--space-3); font-size: .875rem; }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 1.05rem; padding: 0 var(--space-5); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: .8125rem; font-weight: 500; line-height: 1.6; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge--success   { color: var(--st-success);   background: #E7F3EC; }
.badge--danger   { color: var(--st-danger);   background: #FBEAE8; }
.badge--info { color: var(--st-info); background: var(--accent-soft); }
.badge--warning{ color: var(--st-warning);background: #FCEFE3; }
.badge--muted { color: #5E6166;               background: #EEEFF0; }
.badge--neutral     { color: var(--text-muted);     background: #EEF0F3; }
.badge--neutral::before, .badge--plain::before { display: none; }
.badge--critical { color: #fff; background: var(--st-danger); }
.badge--critical::before { display: none; }
.badge--high { color: var(--st-warning); background: #FCEFE3; }
.badge--high::before { display: none; }

.alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius); margin-bottom: var(--space-4); border: 1px solid; }
.alert--success { background: #E7F3EC; border-color: #B7DCC6; color: #14532D; }
.alert--error { background: #FBEAE8; border-color: #F1C1BB; color: #7A1A12; }
.alert--info { background: var(--accent-soft); border-color: #BFCCF5; color: var(--accent); }
.alert--warning { background: #FCEFE3; border-color: #F4CFA9; color: #7A3306; }

/* Formulaires */
.form { max-width: 880px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 500; font-size: .9rem; }
.field .hint { font-size: .8125rem; color: var(--text-muted); }
.field .error { font-size: .8125rem; color: var(--st-danger); }
.required::after { content: " *"; color: var(--st-danger); }
.input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; color: var(--text); background: var(--surface);
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: var(--focus); outline: none; }
.input[aria-invalid="true"] { border-color: var(--st-danger); }
.check { display: flex; align-items: center; gap: var(--space-2); min-height: var(--touch); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-actions { display: flex; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-5); flex-wrap: wrap; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 var(--space-4); }

/* Barre de filtres */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin-bottom: var(--space-4); }
.filters .field { min-width: 180px; }

/* Listes de définitions */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; font-weight: 500; }

/* Tables simples */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; color: var(--text-muted); font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: var(--space-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--text-muted); padding: var(--space-4) 0; text-align: center; }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow); display: block; color: inherit; }
a.kpi:hover { border-color: var(--accent); text-decoration: none; }
.kpi__label { font-size: .8125rem; color: var(--text-muted); font-weight: 500; }
.kpi__value { font-size: 1.75rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: var(--space-1); }
.kpi__hint { font-size: .8125rem; color: var(--text-muted); }
.kpi--alert .kpi__value { color: var(--st-danger); }
.chart-box { position: relative; height: 280px; }

/* Chronologie (journal, historique) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: var(--space-3) 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--text-muted); font-size: .8125rem; display: block; }
.diff { font-size: .8125rem; margin-top: var(--space-1); color: var(--text-muted); }
.diff del { color: var(--st-danger); text-decoration: line-through; }
.diff ins { color: var(--st-success); text-decoration: none; font-weight: 500; }

/* DataTables : alignement sur la charte */
div.dt-container { font-size: .9rem; }
div.dt-container .dt-search input, div.dt-container .dt-length select { min-height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 4px 10px; font: inherit; background: var(--surface); }
table.dataTable thead th { font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
table.dataTable tbody td { vertical-align: middle; }
table.dataTable tbody tr:hover > * { box-shadow: inset 0 0 0 9999px rgba(2, 49, 207, .04); }
table.dataTable tbody tr.row-link { cursor: pointer; }
div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button.current:hover { background: var(--accent-soft) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
div.dt-container .dt-processing > div:last-child > div { background: var(--accent); }
.overdue { color: var(--st-danger); font-weight: 600; }

/* Connexion / pages minimales */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--space-4); }
.auth__card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--space-6); }
.auth__brand { display: flex; align-items: center; gap: var(--space-2); color: var(--accent); font-weight: 600; font-size: 1.25rem; margin-bottom: var(--space-5); }
.auth .input { min-height: var(--touch); }
.auth .btn { min-height: var(--touch); }

/* Connexion : illustration plein écran, texte à gauche, carte de connexion à droite */
.auth:has(.login) { display: block; padding: 0; }
.login {
  position: relative; width: 100%; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  background: linear-gradient(135deg, #050E33 0%, var(--accent) 100%);
}
/* Voile sombre : lisibilité du texte et contraste de la carte */
.login::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,15,22,.75) 0%, rgba(10,15,22,.35) 55%, rgba(10,15,22,.55) 100%),
    linear-gradient(180deg, rgba(10,15,22,.6) 0%, transparent 40%, transparent 70%, rgba(10,15,22,.6) 100%);
}
.login > * { position: relative; }
.login__hero { color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6); }
.login__brand { display: flex; align-items: center; gap: var(--space-3); font-weight: 600; font-size: 1.125rem; color: #fff; }
.login__logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius); background: var(--accent); color: #fff; }
.login__logo [data-lucide] { width: 20px; height: 20px; }
.login__pitch { max-width: 440px; margin-bottom: auto; margin-top: var(--space-6); }
.login__pitch h2 { font-size: 1.75rem; line-height: 1.25; font-weight: 500; margin-bottom: var(--space-3); }
.login__pitch p { color: rgba(255,255,255,.75); margin: 0; }
.login__footnote { font-size: .8125rem; color: rgba(255,255,255,.6); }

.login__panel { display: flex; flex-direction: column; padding: var(--space-5) 56px var(--space-5) var(--space-4); }
.login__top { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4); }
.login__top .lang-switch button { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.login__top .lang-switch button[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--accent); }
.login__brand--compact { display: none; margin-right: auto; }
.login__form {
  width: 100%; max-width: 400px; margin: auto; padding: 40px;
  background: var(--surface); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.15);
}
.login__form h1 { font-size: 1.625rem; margin-bottom: var(--space-2); }
.login__form > .muted { margin-bottom: var(--space-5); }
.login__submit { margin-top: var(--space-2); font-weight: 600; }
.login__secure { display: flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: .8125rem; margin: var(--space-5) 0 0; }
.login__secure [data-lucide] { width: 16px; height: 16px; color: var(--st-success); }

.input-icon { position: relative; }
.input-icon > [data-lucide] { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-icon > .input { padding-left: 40px; }
.input-icon > .input:has(~ .input-icon__toggle) { padding-right: 44px; }
.input-icon__toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-muted); cursor: pointer;
}
.input-icon__toggle:hover { color: var(--accent); background: var(--accent-soft); }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login__hero { display: none; }
  .login__brand--compact { display: flex; }
  .login__panel { padding: var(--space-4); }
  .login__form { padding: var(--space-5); }
  .login__form .input { font-size: 16px; }
}
.lang-switch { display: flex; gap: var(--space-1); }
.lang-switch button { min-height: 32px; min-width: 40px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); font: inherit; font-size: .8125rem; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- Écrans terrain (mobile d'abord, cibles >= 44 px) ---------- */
.field-app { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.field-bar {
  display: flex; align-items: center; gap: var(--space-2); background: var(--accent); color: #fff;
  min-height: 56px; padding: 0 var(--space-2); position: sticky; top: 0; z-index: 10;
}
.field-bar a, .field-bar button { color: #fff; min-width: var(--touch); min-height: var(--touch); display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: var(--radius); cursor: pointer; }
.field-bar h1 { font-size: 1.05rem; margin: 0; flex: 1; }
.field-main { padding: var(--space-4); flex: 1; }
.field-main .btn { min-height: var(--touch); }
.field-main .input, .field-main select.input { min-height: 48px; font-size: 16px; } /* 16px : pas de zoom iOS */
.field-actions { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.field-actions .btn { min-height: 64px; font-size: 1.1rem; justify-content: flex-start; padding: 0 var(--space-5); }
.field-actions .btn [data-lucide] { width: 24px; height: 24px; }
.wo-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-3); color: inherit; min-height: var(--touch);
}
.wo-card:hover { text-decoration: none; border-color: var(--accent); }
.wo-card--critical { border-left-color: var(--st-danger); }
.wo-card--high { border-left-color: var(--st-warning); }
.wo-card__head { display: flex; justify-content: space-between; gap: var(--space-2); align-items: center; font-size: .85rem; color: var(--text-muted); }
.wo-card__title { font-weight: 600; margin: var(--space-1) 0; }
.field-search { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }
.field-search .input { flex: 1; min-width: 0; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: var(--space-3) 0; display: grid; gap: var(--space-2); }
.sticky-actions .btn { min-height: 52px; }
.search-results { list-style: none; margin: var(--space-2) 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.search-results:empty { display: none; }
.search-results button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-4); background: none; border: 0; border-bottom: 1px solid var(--border); font: inherit; text-align: left; cursor: pointer; }
.search-results li:last-child button { border-bottom: 0; }
.selected-equipment { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--main-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar { padding: 0 var(--space-3); }
  .topbar .topbar__menu { display: inline-flex; }
  .topbar__title { visibility: visible; }
  .lang-switch button { min-height: var(--touch); }
  .topbar__user .name { display: none; }
  .content { padding: var(--space-4) var(--space-3); }
  .grid--2, .grid--3, .form-grid { grid-template-columns: 1fr; }
  .card { padding: var(--space-4); }
  .btn { min-height: var(--touch); }
  .btn--sm { min-height: 36px; }
  .input, select.input { min-height: var(--touch); font-size: 16px; }
  .dl { grid-template-columns: 1fr; gap: 0; }
  .dl dd { margin-bottom: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .sidebar, .topbar, .page-header__actions, .form-actions { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
}

/* ---------- Titres de page enrichis ---------- */
.page-title { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.page-title__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.page-title__icon [data-lucide] { width: 22px; height: 22px; }
.page-title h1 { margin: 0; line-height: 1.2; }
.page-title__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); color: var(--text-muted); font-size: .8125rem; margin-top: 2px; }
.page-title__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.page-title__meta [data-lucide] { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .75rem; }
.small { font-size: .8125rem; }

/* ---------- KPI compacts ---------- */
.kpis--compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
.kpis--compact .kpi { padding: var(--space-3) var(--space-4); transition: border-color .15s, transform .15s, box-shadow .15s; }
.kpis--compact a.kpi:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,24,40,.08); }
.kpis--compact .kpi__value { font-size: 1.5rem; }
.kpi__value small { font-size: .9rem; font-weight: 500; margin-left: 2px; color: var(--text-muted); }
.kpi--hero { background: linear-gradient(135deg, #fff 0%, var(--accent-soft) 100%); }
.kpi__value--good { color: var(--st-success); }
.kpi__value--warn { color: var(--st-warning); }
.kpi__value--bad { color: var(--st-danger); }
.kpi--warn .kpi__value { color: var(--st-warning); }
.meter { height: 6px; border-radius: 99px; background: #E6E9ED; overflow: hidden; margin-top: var(--space-2); }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s ease; }
.meter--good > span { background: var(--st-success); }
.meter--warn > span { background: var(--st-warning); }
.meter--bad > span { background: var(--st-danger); }

/* Barre de répartition des états */
.status-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 0 0 var(--space-4); }
.status-bar__seg { min-width: 6px; }
.status-bar__seg--available { background: var(--st-success); }
.status-bar__seg--breakdown { background: var(--st-danger); }
.status-bar__seg--maintenance { background: var(--st-info); }
.status-bar__seg--waiting_part { background: var(--st-warning); }
.status-bar__seg--immobilized { background: var(--st-neutral); }

/* ---------- Recherche et puces de filtre ---------- */
.search-inline { position: relative; min-width: 200px; }
.search-inline > [data-lucide] { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.search-inline .input { padding-left: 32px; }
.input--sm { min-height: 34px !important; padding: 4px 10px; font-size: .875rem; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: .8125rem; color: var(--text); cursor: pointer; transition: all .15s;
}
.chip-btn b { font-weight: 600; color: var(--text-muted); }
.chip-btn:hover { border-color: var(--border-strong); }
.chip-btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.chip-btn[aria-pressed="true"] b { color: rgba(255,255,255,.75); }
.chip-btn--available[aria-pressed="true"] { background: var(--st-success); border-color: var(--st-success); }
.chip-btn--breakdown[aria-pressed="true"] { background: var(--st-danger); border-color: var(--st-danger); }
.chip-btn--maintenance[aria-pressed="true"] { background: var(--st-info); border-color: var(--st-info); }
.chip-btn--waiting_part[aria-pressed="true"] { background: var(--st-warning); border-color: var(--st-warning); }
.chip-btn--immobilized[aria-pressed="true"] { background: var(--st-neutral); border-color: var(--st-neutral); }

/* ---------- Tuiles du parc ---------- */
.fleet-group + .fleet-group { margin-top: var(--space-4); }
.fleet-group__title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; margin-bottom: var(--space-2); }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--space-2); }
.fleet-tile {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.fleet-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--st-success); }
.fleet-tile--breakdown::before { background: var(--st-danger); }
.fleet-tile--maintenance::before { background: var(--st-info); }
.fleet-tile--waiting_part::before { background: var(--st-warning); }
.fleet-tile--immobilized::before { background: var(--st-neutral); }
.fleet-tile--breakdown { background: #FFF8F7; }
.fleet-tile:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 4px 12px rgba(16,24,40,.08); transform: translateY(-1px); }
.fleet-tile__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.fleet-tile__name { font-size: .8125rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fleet-tile__foot { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.fleet-tile__meter { margin-left: auto; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-success); flex-shrink: 0; }
.dot--breakdown { background: var(--st-danger); box-shadow: 0 0 0 3px rgba(180,35,24,.15); }
.dot--maintenance { background: var(--st-info); }
.dot--waiting_part { background: var(--st-warning); }
.dot--immobilized { background: var(--st-neutral); }
.count-pill { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; color: var(--st-warning); background: #FCEFE3; border-radius: 99px; padding: 0 6px; }
.count-pill [data-lucide] { width: 11px; height: 11px; }

/* ---------- États vides ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-6) var(--space-4); color: var(--text-muted); text-align: center; }
.empty-state > [data-lucide] { width: 36px; height: 36px; stroke-width: 1.5; opacity: .6; }
.empty-state p { margin: 0; }
.empty-state--ok > [data-lucide] { color: var(--st-success); opacity: 1; }

/* ---------- Liste d'OT compacte ---------- */
.wo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.wo-list__item { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); color: var(--text); transition: background .15s, border-color .15s; }
.wo-list__item:hover { text-decoration: none; background: var(--surface-alt); border-color: var(--accent); }
.wo-list__item--critical { border-left-color: var(--st-danger); }
.wo-list__item--high { border-left-color: var(--st-warning); }
.wo-list__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.wo-list__top .badge { font-size: .72rem; padding: 0 8px; }
.wo-list__title { font-size: .875rem; }
.wo-list__meta { font-size: .75rem; color: var(--text-muted); }
.wo-list__meta .badge { font-size: .7rem; padding: 0 6px; }

/* ---------- Référentiel ---------- */
.grid--side-main { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.inline-add { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }
.inline-add .input { flex: 1; min-width: 0; }
.inline-add--wide { flex-wrap: wrap; }
.inline-add--wide .input { min-width: 140px; }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { display: flex; align-items: center; gap: var(--space-2); padding: 8px 0; border-bottom: 1px solid var(--border); }
.list-rows li:last-child { border-bottom: 0; }
.list-rows li > .small { margin-left: auto; }
.list-rows__action { margin: 0; }
.is-muted { opacity: .55; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--accent); }
.link-btn[aria-pressed="true"] { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.table--compact td { padding: 8px var(--space-3); vertical-align: middle; }
.table--compact form { margin: 0; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 99px; border: 0; background: var(--border-strong); cursor: pointer; padding: 0; transition: background .2s; vertical-align: middle; }
.switch > span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--st-success); }
.switch[aria-checked="true"] > span { transform: translateX(16px); }
.input-group { display: flex; gap: var(--space-2); }
.input-group .input { flex: 1; min-width: 0; }
.input-group .btn { flex-shrink: 0; padding: 0 12px; }
.is-flash { animation: flash-field .9s ease; }
@keyframes flash-field { 0%, 100% { background: var(--surface); } 30% { background: #FFF6D6; } }
@media (max-width: 1100px) { .grid--side-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .search-inline { min-width: 0; width: 100%; } .card__title { flex-wrap: wrap; } }

/* ---------- Fiche engin : en-tête ---------- */
.eq-hero { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--space-4); margin-bottom: var(--space-3); }
.eq-hero__photo { width: 132px; height: 96px; border-radius: var(--radius); overflow: hidden; background: var(--surface-alt); }
.eq-hero__img { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
.eq-hero__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.eq-hero__img:hover img { transform: scale(1.04); }
.eq-hero__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--border-strong); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.eq-hero__placeholder [data-lucide] { width: 32px; height: 32px; }
.eq-hero__title { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.eq-hero__title h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.01em; }
.eq-hero__name { margin: 2px 0 var(--space-2); font-weight: 500; }
.eq-hero__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-hero__actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--surface-alt); border: 1px solid var(--border); font-size: .75rem; color: var(--text-muted); }
a.tag:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.tag [data-lucide] { width: 13px; height: 13px; }
.tag--plate { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-weight: 700; color: var(--text); background: #FFF8D6; border-color: #E8D27A; letter-spacing: .04em; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .875rem; }
.text-warn { color: var(--st-warning); font-weight: 600; }

/* Menu « … » */
.menu { position: relative; }
.menu__list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(16,24,40,.14); padding: 4px; z-index: 30; }
.menu__list form { margin: 0; }
.menu__list a, .menu__list button { display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: 8px 10px; border: 0; background: none; font: inherit; font-size: .875rem; color: var(--text); border-radius: 4px; cursor: pointer; text-align: left; }
.menu__list a:hover, .menu__list button:hover { background: var(--surface-alt); text-decoration: none; }
.menu__list .is-danger { color: var(--st-danger); }
.menu__list [data-lucide] { width: 16px; height: 16px; }

/* ---------- Indicateurs vitaux ---------- */
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-2); }
.vital { display: flex; gap: var(--space-3); align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); color: var(--text); }
a.vital:hover { border-color: var(--accent); text-decoration: none; }
.vital--alert { border-color: #F1C1BB; background: #FFF8F7; }
.vital__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.vital__icon--good { background: #E7F3EC; color: var(--st-success); }
.vital__icon--warn { background: #FCEFE3; color: var(--st-warning); }
.vital__icon--bad { background: #FBEAE8; color: var(--st-danger); }
.vital__grow { flex: 1; min-width: 0; }
.vital__label { font-size: .75rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vital__value { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.vital__value small { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.vital__value--sm { font-size: .9rem; font-weight: 500; }
.vitals__foot { margin: 0 0 var(--space-4); text-align: right; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); border-radius: var(--radius); transition: background .15s; }
.gallery__item { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gallery__item.is-primary { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gallery__img { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; cursor: zoom-in; background: var(--surface-alt); }
.gallery__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__item figcaption { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 6px 4px 10px; font-size: .75rem; color: var(--text-muted); }
.gallery__item figcaption > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery__tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.gallery__tools form { margin: 0; }
.is-star { color: #D4A20B; fill: #F5C518; width: 16px; height: 16px; margin: 0 6px; }
.icon-btn { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; border-radius: 4px; color: var(--text-muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-alt); color: var(--accent); }
.icon-btn--danger:hover { color: var(--st-danger); }
.icon-btn [data-lucide] { width: 15px; height: 15px; }
.empty-state--drop { border: 2px dashed var(--border); border-radius: var(--radius); }
.is-dragover { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: 4px; }
.swal2-popup.lightbox .swal2-image { margin: 0; max-height: 80vh; object-fit: contain; border-radius: 6px; }

/* Relevés */
.timeline--dense li { padding: var(--space-2) 0; }
.reading { display: flex; flex-wrap: wrap; gap: var(--space-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.reading > span { display: inline-flex; align-items: center; gap: 4px; }
.reading [data-lucide] { width: 14px; height: 14px; color: var(--text-muted); }
.dialog-title { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: 1.05rem; }
.range { width: 100%; accent-color: var(--accent); height: 28px; }
.field label output { float: right; font-weight: 600; color: var(--accent); }

/* ---------- Formulaires en sections ---------- */
.form--sections { padding: 0; }
.form-section { border: 0; margin: 0; padding: var(--space-5); border-bottom: 1px solid var(--border); min-width: 0; }
.form-section legend { display: flex; align-items: center; gap: var(--space-2); float: left; width: 100%; font-weight: 600; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: var(--space-4); padding: 0; }
.form-section legend + * { clear: both; }
.form-section legend [data-lucide] { width: 16px; height: 16px; color: var(--accent); }
.form--sections .form-actions { margin: 0; padding: var(--space-4) var(--space-5); background: var(--surface-alt); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.contract-fields { gap: var(--space-4); }
.readonly-value { min-height: 40px; display: flex; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; width: fit-content; max-width: 100%; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 16px; font-size: .875rem; font-weight: 500; border-right: 1px solid var(--border); transition: background .15s, color .15s; }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--accent); color: #fff; }
.segmented input:focus-visible + span { box-shadow: inset var(--focus); }
.dl--2col { grid-template-columns: max-content 1fr max-content 1fr; }
@media (max-width: 1100px) { .dl--2col { grid-template-columns: max-content 1fr; } }
@media (max-width: 860px) {
  .eq-hero { grid-template-columns: 88px minmax(0, 1fr); }
  .eq-hero__photo { width: 88px; height: 72px; }
  .eq-hero__actions { grid-column: 1 / -1; justify-content: stretch; }
  .eq-hero__actions > .btn { flex: 1; }
  .form-section { padding: var(--space-4); }
}
.fleet-tile__thumb { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); }
.fleet-tile:has(.fleet-tile__thumb) .fleet-tile__head { padding-right: 40px; }
.fleet-tile__fuel { position: absolute; left: 4px; right: 0; bottom: 0; height: 3px; background: #EEF0F3; }
.fleet-tile__fuel > span { display: block; height: 100%; background: var(--st-success); }
.fleet-tile__fuel--warn > span { background: var(--st-warning); }
.fleet-tile__fuel--bad > span { background: var(--st-danger); }

/* ---------- Équipes & shifts ---------- */
.section-title { display: flex; align-items: center; gap: var(--space-2); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: var(--space-5) 0 var(--space-3); }
.section-title [data-lucide] { width: 15px; height: 15px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.team-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; border-top: 3px solid #E0A800; }
.team-card--night { border-top-color: #3B4A7A; }
.team-card--rotation { border-top-color: var(--accent); }
.team-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); padding: var(--space-4) var(--space-4) var(--space-3); }
.team-card__head h3 { margin: 0 0 6px; font-size: 1.05rem; }
.team-card__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.shift-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #FFF4D1; color: #8A6100; }
.shift-badge [data-lucide] { width: 13px; height: 13px; }
.shift-badge--night { background: #E6E9F5; color: #2E3A63; }
.shift-badge--rotation { background: var(--accent-soft); color: var(--accent); }
.crew .shift-badge, .team-mini .shift-badge { padding: 4px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-block: 1px solid var(--border); }
.contact { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); background: var(--surface-alt); min-width: 0; }
.contact strong { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
.phone-btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone-btn:hover { border-color: var(--st-success); color: var(--st-success); text-decoration: none; }
.phone-btn [data-lucide] { width: 14px; height: 14px; }
.phone-btn--strong { background: #E7F3EC; border-color: #B7DCC6; color: #14532D; }
.member-list { list-style: none; margin: 0; padding: var(--space-2) var(--space-4); flex: 1; }
.member-list li { display: flex; align-items: center; gap: var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--border); }
.member-list li:last-child { border-bottom: 0; }
.member-list__name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .875rem; font-weight: 500; }
.member-list__name small, .crew__name small, .team-mini__name small { font-size: .75rem; color: var(--text-muted); font-weight: 400; }
.avatar--sm { width: 30px; height: 30px; font-size: .7rem; flex-shrink: 0; }
.team-card__add { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 10px; border-top: 1px dashed var(--border-strong); font-size: .8125rem; font-weight: 600; }
.team-card__add:hover { background: var(--accent-soft); text-decoration: none; }
.team-card__add [data-lucide] { width: 16px; height: 16px; }

/* Équipage d'un engin */
.crew, .team-mini { list-style: none; margin: 0; padding: 0; }
.crew li, .team-mini li { display: flex; align-items: center; gap: var(--space-2); padding: 8px 0; border-bottom: 1px solid var(--border); }
.crew li:last-child, .team-mini li:last-child { border-bottom: 0; }
.crew form { margin: 0; }
.crew__name, .team-mini__name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .875rem; }
.team-mini .phone-btn { margin: 0; }
.crew-history { margin-top: var(--space-3); font-size: .8125rem; }
.crew-history summary { cursor: pointer; color: var(--text-muted); }
@media (max-width: 860px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- Fiche OT ---------- */
.wo-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-4); align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-3); }
.wo-hero--critical { border-left-color: var(--st-danger); }
.wo-hero--high { border-left-color: var(--st-warning); }
.wo-hero__ref { font-size: .8125rem; color: var(--text-muted); font-weight: 600; letter-spacing: .02em; }
.wo-hero h1 { margin: 2px 0 var(--space-2); font-size: 1.375rem; }
.wo-hero__equipment { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-alt); color: var(--text); min-width: 180px; }
.wo-hero__equipment:hover { border-color: var(--accent); text-decoration: none; }
.wo-hero__eq-code { font-weight: 700; font-size: 1.05rem; }
.card--actions .page-header__actions { justify-content: flex-start; }
.subhead { font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: var(--space-4) 0 var(--space-2); }
.i-inline { width: 12px !important; height: 12px !important; vertical-align: -2px; margin-right: 3px; }
.badge--cause { color: #5B3B00; background: #FFF1CC; }
.badge--cause::before { display: none; }
.badge--cause-misuse, .badge--cause-accident { color: #7A1A12; background: #FBEAE8; }
.badge--cause-maintenance_lapse { color: var(--accent); background: var(--accent-soft); }

/* Intervenants */
.crew__time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .875rem; white-space: nowrap; }
.crew-add { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.crew-add select { flex: 1; min-width: 0; }
.crew-add__min { width: 80px; flex: 0 0 80px; }
.chip [data-lucide] { width: 13px; height: 13px; }

/* Fil de remarques */
.thread { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-3); }
.thread__item { display: flex; gap: var(--space-2); align-items: flex-start; }
.thread__bubble { flex: 1; min-width: 0; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 4px 12px 12px 12px; padding: var(--space-2) var(--space-3); }
.thread__item.is-mine { flex-direction: row-reverse; }
.thread__item.is-mine .thread__bubble { background: var(--accent-soft); border-color: #BFCCF5; border-radius: 12px 4px 12px 12px; }
.thread__meta { font-size: .75rem; color: var(--text-muted); margin-bottom: 2px; }
.thread__body { font-size: .9rem; white-space: normal; overflow-wrap: anywhere; }
.thread-form { display: flex; gap: var(--space-2); align-items: flex-end; }
.thread-form textarea { flex: 1; min-height: 44px; resize: none; overflow: hidden; }
@media (max-width: 860px) {
  .wo-hero { grid-template-columns: 1fr; }
  .wo-hero__equipment { min-width: 0; }
  .thread-form { flex-direction: column; align-items: stretch; }
}

/* ---------- Pièces & consommables ---------- */
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-2); }
.type-picker label { cursor: pointer; }
.type-picker input { position: absolute; opacity: 0; pointer-events: none; }
.type-picker span { display: flex; align-items: center; gap: var(--space-2); padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); font-size: .875rem; font-weight: 500; transition: all .15s; }
.type-picker span:hover { border-color: var(--accent); }
.type-picker input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(2, 49, 207,.25); }
.type-picker input:focus-visible + span { box-shadow: var(--focus); }
.type-picker [data-lucide] { width: 16px; height: 16px; }
.chip--warn { background: #FCEFE3; color: var(--st-warning); }
.compat__search { max-width: 360px; margin-bottom: var(--space-3); }
.compat__brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-3); max-height: 420px; overflow-y: auto; padding: 2px; }
.compat__brand { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-2) var(--space-3); transition: border-color .15s; }
.compat__brand.has-selection { border-color: var(--accent); background: #FAFCFE; }
.compat__brand-name { display: flex; align-items: center; gap: var(--space-2); padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.compat__models { display: grid; gap: 2px; }
.compat__model { display: flex; align-items: center; gap: var(--space-2); padding: 3px 0; cursor: pointer; font-size: .875rem; }
.compat__model small { display: block; font-size: .7rem; color: var(--text-muted); }
.compat input[type=checkbox], .compat__brand-name input { width: 16px; height: 16px; accent-color: var(--accent); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* Barres horizontales (consommation par site) */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.bars li { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: var(--space-3); font-size: .875rem; }
.bars__label { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars__track { height: 10px; border-radius: 99px; background: #EEF0F3; overflow: hidden; }
.bars__track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent) 0%, #3E7CB1 100%); transition: width .6s ease; }
.bars__value { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* Top des articles consommés */
.top-list { list-style: none; margin: 0; padding: 0; }
.top-list li { display: flex; align-items: center; gap: var(--space-2); padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.top-list li:last-child { border-bottom: 0; }
.top-list__rank { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .75rem; display: grid; place-items: center; flex-shrink: 0; }
.top-list [data-lucide] { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.top-list__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.top-list__qty { color: var(--text-muted); white-space: nowrap; }
.top-list__value { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 90px; text-align: right; }
.kpi--button { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.kpi--button:hover { border-color: var(--accent); }

/* Consommation de fluides */
.rate-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); }
.rate-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 8px 10px; background: var(--surface-alt); border-radius: var(--radius); }
.rate-list li > span:first-child { display: flex; flex-direction: column; font-size: .875rem; min-width: 0; }
.rate-list small { font-size: .75rem; color: var(--text-muted); }
/* Documents à échéance (assurance, contrôle technique…) */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.doc-list__item { padding: 8px 10px; background: var(--surface-alt); border-radius: var(--radius); border-left: 3px solid var(--border); }
.doc-list__item--expired { border-left-color: var(--st-danger); }
.doc-list__item--soon { border-left-color: var(--st-warning); }
.doc-list__item--valid { border-left-color: var(--st-success); }
.doc-list__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: .875rem; }
.doc-list__meta { display: flex; flex-wrap: wrap; gap: 4px var(--space-2); margin-top: 2px; font-size: .8125rem; color: var(--text-muted); }
.doc-list__tools { display: flex; align-items: center; gap: var(--space-1); margin-top: var(--space-2); }
.doc-list__tools form { margin: 0; }
.doc-list .crew-history { margin-top: var(--space-2); }
.doc-file { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; word-break: break-all; }
.doc-file [data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }
.field .doc-file { justify-content: space-between; width: 100%; gap: var(--space-3); margin: 0 0 var(--space-2); }
.rate-list__value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-list__value small { font-weight: 500; }
@media (max-width: 860px) { .bars li { grid-template-columns: 80px 1fr auto; } }

/* ---------- Pilotage : alertes, planning, rapports ---------- */
.page-title__icon--alert { background: #FBEAE8; color: var(--st-danger); }
.card__title h2 { display: flex; align-items: center; gap: var(--space-2); }
.title-icon { width: 20px !important; height: 20px !important; color: var(--accent); }
.title-icon--bad { color: var(--st-danger); }
.title-icon--warn { color: var(--st-warning); }
.life { display: flex; align-items: center; gap: var(--space-2); min-width: 140px; }
.life__bar { flex: 1; height: 8px; border-radius: 99px; background: #EEF0F3; overflow: hidden; }
.life__bar > span { display: block; height: 100%; background: var(--st-danger); border-radius: inherit; }
.life__bar--good > span { background: var(--st-success); }
.life__bar--warn > span { background: var(--st-warning); }
.life strong { font-variant-numeric: tabular-nums; font-size: .8125rem; white-space: nowrap; }
.chart-box--sm { height: 240px; }
.table--report th { white-space: nowrap; }

/* Segments sous forme de liens */
.segmented__link { display: block; padding: 7px 14px; font-size: .875rem; font-weight: 500; color: var(--text); border-right: 1px solid var(--border); }
.segmented__link:last-child { border-right: 0; }
.segmented__link:hover { background: var(--surface-alt); text-decoration: none; }
.segmented__link.is-active { background: var(--accent); color: #fff; }

/* Barre du planning */
.planning-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.planning-bar__nav { display: flex; align-items: center; gap: var(--space-2); flex: 1; min-width: 240px; }
.planning-bar__label { font-size: 1.05rem; margin-left: var(--space-2); }
.planning-bar__site { margin: 0; }
.icon-btn--lg { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0 0 var(--space-3); font-size: .8125rem; color: var(--text-muted); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__item b { color: var(--text); }

/* Calendrier */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--border); gap: 1px; box-shadow: var(--shadow); }
.calendar__head { background: var(--surface-alt); padding: 8px 10px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.calendar__day { background: var(--surface); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.calendar--week .calendar__day { min-height: 420px; }
.calendar--month .calendar__day { min-height: 118px; }
.calendar__day.is-weekend { background: #FBFBFC; }
.calendar__day.is-outside { background: #F7F8F9; }
.calendar__day.is-outside .calendar__date { opacity: .45; }
.calendar__date { align-self: flex-start; font-size: .8125rem; font-weight: 600; color: var(--text); padding: 2px 7px; border-radius: 99px; }
.calendar__date:hover { background: var(--accent-soft); text-decoration: none; }
.calendar__day.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.calendar__day.is-today .calendar__date { background: var(--accent); color: #fff; }
.calendar__more { font-size: .75rem; font-weight: 600; padding: 0 4px; }

/* Événements */
.ev { display: flex; align-items: flex-start; gap: 6px; padding: 5px 7px; border-radius: 6px; font-size: .75rem; line-height: 1.3; color: var(--text); border-left: 3px solid; background: var(--surface-alt); min-width: 0; transition: transform .1s, box-shadow .15s; }
.ev:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(16,24,40,.12); transform: translateY(-1px); }
.ev [data-lucide] { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; }
.ev__text { display: flex; flex-direction: column; min-width: 0; }
.ev__text strong, .ev__text span, .ev__text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev__text small { color: var(--text-muted); }
.ev--preventive { border-color: #7C5CC4; background: #F3F0FB; }
.ev--preventive_planned { border-color: var(--accent); background: var(--accent-soft); }
.ev--work_order { border-color: var(--st-warning); background: #FCEFE3; }
.ev--contract { border-color: #8D9098; background: #EEEFF0; }
.ev--document { border-color: #0E7490; background: #E6F4F7; }
.ev--overdue { box-shadow: inset 0 0 0 1px var(--st-danger); }
.ev--critical { border-color: var(--st-danger); background: #FBEAE8; }
.ev-dot { width: 10px; height: 10px; border-radius: 3px; background: #8D9098; }
.ev-dot--preventive { background: #7C5CC4; }
.ev-dot--preventive_planned { background: var(--accent); }
.ev-dot--work_order { background: var(--st-warning); }
.ev-dot--contract { background: #8D9098; }
.ev-dot--document { background: #0E7490; }
.day-list { display: grid; gap: var(--space-2); }
.day-list .ev { font-size: .875rem; padding: 10px 12px; }
@media (max-width: 860px) {
  .calendar--week { grid-template-columns: 1fr; }
  .calendar--week .calendar__head { display: none; }
  .calendar--week .calendar__day { min-height: 0; }
  .calendar--month .calendar__day { min-height: 64px; padding: 3px; }
  .calendar--month .ev__text { display: none; }
  .calendar--month .ev { padding: 3px; justify-content: center; }
  .planning-bar__nav { min-width: 0; }
}

/* Impression : rapports et planning lisibles sur papier */
@media print {
  .chips, .planning-bar .segmented, .planning-bar__site, .page-header__actions, .legend { display: none !important; }
  .calendar { box-shadow: none; }
  .kpi, .card { break-inside: avoid; }
  body { background: #fff; }
}

/* ---------- Accueil : vue d'ensemble par site ---------- */
.site-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.site-card { display: flex; flex-direction: column; gap: 8px; padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.site-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,24,40,.08); }
.site-card__head { display: flex; align-items: center; gap: var(--space-2); }
.site-card__head [data-lucide] { width: 16px; height: 16px; color: var(--accent); }
.site-card__pct { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.site-card__pct--good { color: var(--st-success); }
.site-card__pct--warn { color: var(--st-warning); }
.site-card__pct--bad { color: var(--st-danger); }
.site-card .meter { margin: 0; }
.site-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .75rem; color: var(--text-muted); }
.site-card__down { display: inline-flex; align-items: center; gap: 4px; color: var(--st-danger); font-weight: 600; }

/* Navigation compacte sur grand écran (cibles tactiles conservées en mobile) */
@media (min-width: 861px) {
  .nav a { min-height: 36px; font-size: .9rem; }
  .nav a [data-lucide] { width: 17px; height: 17px; }
  .nav__section { padding-top: var(--space-3); }
  .sidebar { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
}
@media (max-width: 860px) {
  .fleet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-tile__name { white-space: normal; }
  .kpis--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-cards { grid-template-columns: 1fr; }
}

/* ---------- Fenêtre de détail (drill-down) ---------- */
body.has-drill { overflow: hidden; }
.drill { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.drill__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 34, .55); backdrop-filter: blur(2px); animation: drill-fade .15s ease-out; }
.drill__panel {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.28); overflow: hidden; animation: drill-in .18s ease-out;
}
.drill__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 14px 18px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fff, var(--surface-alt)); }
.drill__title { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.drill__title h2 { margin: 0; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drill__count { flex-shrink: 0; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.drill__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.drill__actions .btn [data-lucide] { width: 15px; height: 15px; }
.drill__filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 10px 18px; border-bottom: 1px solid var(--border); }
.drill__filters .chips { margin: 0; }
.drill__filters select { width: auto; min-width: 180px; }
.drill__body { padding: 10px 18px 14px; overflow: auto; flex: 1; }
.drill__body div.dt-container { font-size: .8125rem; }
.drill__body div.dt-container .dt-layout-row { margin: 6px 0; }
.drill__body div.dt-container .dt-search input { min-width: 240px; }
.drill__body table.dataTable.compact thead th { padding: 6px 8px; font-size: .7rem; }
.drill__body table.dataTable.compact tbody td { padding: 5px 8px; }
.drill__body table.dataTable .badge { font-size: .72rem; padding: 0 8px; }
@keyframes drill-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes drill-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 860px) {
  .drill { padding: 0; place-items: stretch; }
  .drill__panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .drill__head { flex-wrap: wrap; }
  .drill__hide-sm { display: none; }
  .drill__body div.dt-container .dt-search input { min-width: 0; width: 100%; }
}

/* Indicateurs cliquables */
button.kpi { display: block; }
.kpi--button { position: relative; }
.kpi--button::after { content: ""; position: absolute; top: 12px; right: 12px; width: 6px; height: 6px; border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong); transform: rotate(45deg); opacity: 0; transition: opacity .15s, right .15s; }
.kpi--button:hover::after { opacity: 1; right: 10px; border-color: var(--accent); }
.kpi--button:focus-visible { outline: none; box-shadow: var(--focus); }
.row-hover:hover { background: var(--surface-alt); }
.link-btn .badge { cursor: pointer; }

/* ---------- Notifications ---------- */
.notif { position: relative; }
.notif__btn { position: relative; padding: 0 10px; }
.notif__badge { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--st-danger); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.notif.has-items .notif__btn [data-lucide] { animation: notif-ring 1.2s ease 1; }
@keyframes notif-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.notif__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(16,24,40,.18); z-index: 60; overflow: hidden; }
.notif__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .875rem; }
.notif__list { list-style: none; margin: 0; padding: 6px; max-height: 420px; overflow-y: auto; }
.notif__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: .875rem; color: var(--text); cursor: pointer; text-align: left; }
.notif__item:hover { background: var(--surface-alt); }
.notif__icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: #FCEFE3; color: var(--st-warning); }
.notif__item--bad .notif__icon { background: #FBEAE8; color: var(--st-danger); }
.notif__icon [data-lucide] { width: 16px; height: 16px; }
.notif__label { flex: 1; min-width: 0; }
.notif__count { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.notif__empty { display: flex; align-items: center; gap: 8px; padding: 14px; color: var(--text-muted); font-size: .875rem; }
.notif__empty [data-lucide] { color: var(--st-success); }
/* Détail : une ligne par enregistrement (texte secondaire à la suite, sans retour) */
.drill__body table.dataTable tbody td { white-space: nowrap; }
.drill__body table.dataTable tbody td br { display: none; }
.drill__body table.dataTable tbody td .muted { margin-left: 4px; }
.notif__chev { width: 15px !important; height: 15px !important; color: var(--border-strong); }

/* Chiffres et segments cliquables (fenêtre de détail) */
.cell-link { border: 0; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 4px; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; font-variant-numeric: tabular-nums; }
.cell-link:hover { background: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; }
button.badge { border: 0; font: inherit; font-size: .8125rem; cursor: pointer; }
button.status-bar__seg { border: 0; padding: 0; cursor: pointer; transition: filter .15s, transform .15s; }
button.status-bar__seg:hover { filter: brightness(1.15); transform: scaleY(1.6); }
.status-bar { overflow: visible; height: 10px; }

/* ---------- Menu latéral restructuré ---------- */
.sidebar { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%); }
.sidebar__brand { position: relative; padding-bottom: var(--space-3); }
.sidebar__collapse { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: rgba(255,255,255,.7); cursor: pointer; }
.sidebar__collapse:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar__collapse [data-lucide] { width: 17px; height: 17px; }

/* Sélecteur du site de travail */
.site-switch { margin: 0 var(--space-3) var(--space-2); }
.site-switch__label { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin: 0 0 4px 2px; }
.site-switch__control { position: relative; display: flex; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; transition: background .15s, border-color .15s; }
.site-switch__control:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
.site-switch__control > [data-lucide]:first-child { position: absolute; left: 10px; width: 16px; height: 16px; pointer-events: none; }
.site-switch__chevron { position: absolute; right: 8px; width: 14px !important; height: 14px !important; opacity: .7; pointer-events: none; }
.site-switch select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 38px; padding: 0 28px 0 34px; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.site-switch select:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,.5); border-radius: 8px; }
.site-switch option { color: var(--text); background: #fff; font-weight: 400; }

/* Pastilles de compteurs */
.nav a { position: relative; }
.nav__badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: #E5484D; color: #fff; font-size: .68rem; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }

/* Paramètres repliables */
.nav__group details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-radius: var(--radius); }
.nav__group details > summary::-webkit-details-marker { display: none; }
.nav__group details > summary:hover { opacity: .9; }
.nav__group summary [data-lucide] { width: 14px; height: 14px; transition: transform .2s; margin-right: var(--space-2); }
.nav__group details[open] > summary [data-lucide] { transform: rotate(180deg); }
.nav__group .nav { padding: 0; }

/* Pied de menu : mode terrain */
.sidebar__foot { margin-top: auto; padding: var(--space-3); border-top: 1px solid rgba(255,255,255,.12); }
.sidebar__field { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 38px; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; font-size: .875rem; }
.sidebar__field:hover { background: rgba(255,255,255,.2); text-decoration: none; }
.sidebar__field [data-lucide] { width: 17px; height: 17px; }

/* Menu réduit en icônes */
@media (min-width: 861px) {
  body.sidebar-mini { --sidebar-w: 68px; }
  body.sidebar-mini .sidebar .nav__text, body.sidebar-mini .site-switch__label, body.sidebar-mini .site-switch__chevron { display: none; }
  body.sidebar-mini .sidebar__brand { flex-direction: column; gap: var(--space-2); padding-inline: 0; align-items: center; }
  body.sidebar-mini .sidebar__collapse { margin: 0; transform: rotate(180deg); }
  body.sidebar-mini .nav { padding: 0 var(--space-2); }
  body.sidebar-mini .nav a { justify-content: center; padding: 0; }
  body.sidebar-mini .nav__section { height: 1px; padding: 0; margin: var(--space-2) var(--space-2); background: rgba(255,255,255,.14); overflow: hidden; }
  body.sidebar-mini .nav__group summary [data-lucide] { margin: 0 auto; }
  body.sidebar-mini .nav__badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 15px; font-size: .6rem; padding: 0 4px; }
  body.sidebar-mini .site-switch { margin-inline: var(--space-2); }
  body.sidebar-mini .site-switch select { padding: 0; color: transparent; width: 100%; }
  body.sidebar-mini .site-switch__control > [data-lucide]:first-child { left: 50%; transform: translateX(-50%); }
  body.sidebar-mini .sidebar__field { padding: 0; }
  .sidebar { transition: width .2s ease; }
}

/* ---------- Planning : événements cliquables et fenêtre de détail ---------- */
button.ev { width: 100%; border: 0; border-left: 3px solid; font: inherit; font-size: .75rem; text-align: left; cursor: pointer; }
.day-list button.ev { font-size: .875rem; }
.swal2-popup.ev-popup { padding: 0; border-radius: 14px; overflow: hidden; }
.ev-popup .swal2-html-container { margin: 0; padding: 0; text-align: left; }
.ev-popup .swal2-close { top: 8px; right: 8px; }
.ev-popup__actions { width: 100%; justify-content: flex-end; gap: var(--space-2); margin: 0; padding: 12px 20px; background: var(--surface-alt); border-top: 1px solid var(--border); }
.ev-popup__actions .btn [data-lucide] { width: 15px; height: 15px; }
.ev-modal__head { display: flex; gap: var(--space-3); align-items: flex-start; padding: 20px 44px 16px 20px; border-bottom: 1px solid var(--border); border-top: 4px solid #7C5CC4; }
.ev-modal--preventive_planned .ev-modal__head { border-top-color: var(--accent); }
.ev-modal--work_order .ev-modal__head { border-top-color: var(--st-warning); }
.ev-modal--contract .ev-modal__head { border-top-color: #8D9098; }
.ev-modal--document .ev-modal__head { border-top-color: #0E7490; }
.ev-modal__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: #F3F0FB; color: #5B3FA6; }
.ev-modal--preventive_planned .ev-modal__icon { background: var(--accent-soft); color: var(--accent); }
.ev-modal--work_order .ev-modal__icon { background: #FCEFE3; color: var(--st-warning); }
.ev-modal--contract .ev-modal__icon { background: #EEEFF0; color: #5E6166; }
.ev-modal--document .ev-modal__icon { background: #E6F4F7; color: #0E7490; }
.ev-modal__icon [data-lucide] { width: 20px; height: 20px; }
.ev-modal__kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-muted); }
.ev-modal h3 { margin: 2px 0 0; font-size: 1.1rem; color: var(--text); }
.ev-modal__flags { display: flex; gap: 6px; margin-top: 6px; }
.ev-modal__grid { margin: 0; padding: 12px 20px 16px; display: grid; }
.ev-modal__row { display: grid; grid-template-columns: 150px 1fr; gap: var(--space-3); padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .875rem; }
.ev-modal__row:last-child { border-bottom: 0; }
.ev-modal__row dt { color: var(--text-muted); }
.ev-modal__row dd { margin: 0; font-weight: 600; color: var(--text); }
@media (max-width: 560px) { .ev-modal__row { grid-template-columns: 1fr; gap: 0; } .ev-popup__actions { flex-wrap: wrap; } }
.ev-popup .swal2-close:focus { box-shadow: none; }
.ev-popup .swal2-close:focus-visible { box-shadow: var(--focus); }

/* Grands écrans : le contenu occupe toute la largeur disponible */
@media (min-width: 1600px) {
  .grid--main-side { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); }
  .chart-box { height: 320px; }
}

/* ---------------------------------------------------------------- Tableaux compacts & filtres exécutifs */
/* Barre de filtres compacte : libellés courts au-dessus, contrôles bas, outils (compteur, réinitialiser) à droite */
.filters--compact { gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); align-items: flex-end; }
.filters--compact .field { min-width: 150px; gap: 2px; }
.filters--compact .field label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.filters--compact .input, .filters--compact select.input { min-height: 32px; height: 32px; padding: 2px 8px; font-size: .8125rem; }
.filters--compact .check { min-height: 32px; font-size: .8125rem; gap: 6px; }
.filters--compact .check input { width: 16px; height: 16px; }
.filters__tools { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); min-height: 32px; }
.filters__count { font-size: .75rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.filters__tools [hidden] { display: none !important; }

/* DataTables compactes */
div.dt-container { font-size: .8125rem; }
div.dt-container .dt-layout-row { margin: 6px 0; }
div.dt-container .dt-search input, div.dt-container .dt-length select { min-height: 32px; padding: 2px 8px; font-size: .8125rem; }
div.dt-container .dt-search input { min-width: 220px; }
div.dt-container .dt-search label, div.dt-container .dt-length label { font-size: .75rem; color: var(--text-muted); }
div.dt-container .dt-info { font-size: .75rem; color: var(--text-muted); }
div.dt-container .dt-paging .dt-paging-button { padding: 2px 9px; min-width: 28px; font-size: .8125rem; }
table.dataTable.compact thead th, table.dataTable.compact thead td { padding: 6px 8px; font-size: .6875rem; letter-spacing: .04em; background: var(--bg); border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
table.dataTable.compact tbody td { padding: 5px 8px; line-height: 1.35; }
table.dataTable.compact tbody tr:nth-child(even) > * { background: rgba(2, 49, 207, .018); }
table.dataTable.compact .badge { font-size: .72rem; padding: 0 8px; }
table.dataTable.compact .muted { font-size: .75rem; }
table.dataTable.compact td.dt-right, table.dataTable.compact th.dt-right { font-variant-numeric: tabular-nums; }

/* Tables simples : même densité */
.table { font-size: .8125rem; }
.table th { font-size: .6875rem; padding: 6px 8px; }
.table td { padding: 6px 8px; }
.table--compact td { padding: 5px 8px; }

@media (max-width: 720px) {
  .filters--compact .field { min-width: 0; flex: 1 1 140px; }
  .filters__tools { margin-left: 0; width: 100%; justify-content: space-between; }
  div.dt-container .dt-search input { min-width: 0; width: 100%; }
}

/* Journal d'activité : synthèse par utilisateur, pastilles d'action, détail d'une entrée */
.log-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-2); }
.log-users .empty { grid-column: 1 / -1; }
.log-user { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.log-user:hover { border-color: var(--accent); }
.log-user:focus-visible { outline: none; box-shadow: var(--focus); }
.log-user[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.log-user__body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.log-user__body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-user__count { font-weight: 600; font-size: 1.125rem; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.1; }
.log-user__count small { display: block; font-size: .6875rem; font-weight: 500; color: var(--text-muted); }
.log-action { background: #EEF0F3; color: var(--text); }
.log-action--add { background: #E6F4EC; color: var(--st-success); }
.log-action--remove, .log-action--alert { background: #FDECEA; color: var(--st-danger); }
.log-action--session { background: var(--accent-soft); color: var(--accent); }
table[data-table="activity"] tbody tr { cursor: pointer; }
table[data-table="activity"] tbody tr:focus-visible { outline: none; box-shadow: inset var(--focus); }
.log-detail { text-align: left; font-size: .9rem; }
.log-detail__head { margin: 0 0 var(--space-2); }
.log-detail__summary { margin: 0 0 var(--space-3); font-weight: 500; overflow-wrap: anywhere; }
.log-detail .dl { margin-bottom: var(--space-4); }
.log-detail .dl dd { overflow-wrap: anywhere; }
.log-detail__table td { overflow-wrap: anywhere; }
.log-detail__table del { color: var(--st-danger); }
.log-detail__table ins { color: var(--st-success); text-decoration: none; font-weight: 500; }
.log-detail__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.log-detail__actions:empty { display: none; }

/* Tableau de bord à 8 indicateurs : 2 rangées de 4, une seule rangée sur grand écran */
@media (min-width: 701px) { .kpis--8 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .kpis--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

/* Saisie des index (encodeurs) : une colonne sur téléphone, deux ou trois sur tablette */
.entry-app { max-width: 1180px; }
.field-bar h1 small { display: block; font-size: .75rem; font-weight: 400; opacity: .8; }
.entry-bar__icon { min-width: var(--touch); min-height: var(--touch); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.entry-site { display: flex; align-items: center; gap: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
.entry-site__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.entry-site__form { flex: 1; min-width: 0; margin: 0; display: grid; gap: 2px; }
.entry-site__form label, .entry-site__single span { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.entry-site__form .input { width: 100%; font-weight: 600; }
.entry-site__single { display: grid; }
.entry-site__single strong { font-size: 1.1rem; }
.entry-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #E6E9ED; border-radius: var(--radius); padding: 4px; margin-bottom: var(--space-3); }
.entry-tabs a { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 40px; border-radius: 6px; color: var(--text-muted); font-weight: 600; font-size: .9rem; }
.entry-tabs a:hover { text-decoration: none; color: var(--text); }
.entry-tabs a[aria-current="page"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.entry-tabs [data-lucide] { width: 16px; height: 16px; }
.entry-date { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-2); margin: 0; }
.entry-date .input { width: 100%; min-width: 0; font-weight: 600; text-align: center; }
.entry-date .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.entry-readonly { margin: 0; display: flex; align-items: center; gap: var(--space-2); font-size: .8125rem; color: var(--text-muted); }
.entry-readonly [data-lucide] { width: 15px; height: 15px; }
.entry-report { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: var(--space-2); }
.entry-report dt { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.entry-report dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-report__delta { display: block; font-size: .8125rem; font-weight: 500; color: var(--st-success); }
.entry-report__by { margin: 0; }
.entry-missing { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.entry-missing li { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--st-danger); border-radius: var(--radius); padding: var(--space-2) var(--space-3); display: grid; }
.entry-top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-bottom: var(--space-3); display: grid; gap: var(--space-3); }
.entry-progress__text { display: flex; align-items: baseline; gap: var(--space-2); color: var(--text-muted); font-size: .875rem; }
.entry-progress__text strong { font-size: 1.5rem; color: var(--text); font-variant-numeric: tabular-nums; }
.entry-progress .meter { height: 8px; margin-top: 4px; }
.entry-tools { display: flex; gap: var(--space-2); }
.entry-tools form { flex: 0 1 220px; margin: 0; }
.entry-tools form .input { width: 100%; }
.entry-tools > .input { flex: 1; min-width: 0; }
.entry-section { margin: var(--space-4) 0 var(--space-2); font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.entry-section span { font-weight: 600; color: var(--text); }
.entry-list { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.entry-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--st-warning); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2); }
.entry-card.is-done { border-left-color: var(--st-success); }
.entry-card[hidden] { display: none; }
.entry-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); }
.entry-card__head strong { display: block; font-size: 1.15rem; }
.entry-card__last { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-2); }
.entry-card__index { font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-card__form { display: grid; gap: var(--space-2); margin: 0; }
.entry-card__form[hidden] { display: none; }
.entry-card__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); align-items: end; }
.entry-field .input::placeholder { font-weight: 400; color: #A3ABB6; }
.entry-field { display: grid; gap: 4px; font-size: .8125rem; font-weight: 500; color: var(--text-muted); }
.entry-field .input { width: 100%; min-width: 0; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-card__error { margin: 0; color: var(--st-danger); font-size: .875rem; font-weight: 500; }
.entry-all-done { display: flex; align-items: center; gap: var(--space-2); color: var(--st-success); font-weight: 600; }
.entry-all-done[hidden] { display: none; }


/* Supervision des index — encodeur (/saisie/supervision) : cartes, une colonne sur téléphone, grille sur ordinateur */
.sup-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-3); }
.sup-kpi { display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-2) var(--space-3); min-height: var(--touch); font: inherit; color: var(--text); cursor: pointer; }
.sup-kpi:hover { border-color: var(--border-strong); }
.sup-kpi:focus-visible { outline: none; box-shadow: var(--focus); }
.sup-kpi[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.sup-kpi__label { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 500; color: var(--text-muted); line-height: 1.2; }
.sup-kpi__label [data-lucide] { width: 15px; height: 15px; flex-shrink: 0; }
.sup-kpi__value { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sup-kpi--due.is-hot { border-top-color: var(--st-danger); } .sup-kpi--due.is-hot .sup-kpi__value { color: var(--st-danger); }
.sup-kpi--check.is-hot { border-top-color: var(--st-info); } .sup-kpi--check.is-hot .sup-kpi__value { color: var(--st-info); }
.sup-card--check, .sup-plan--check { border-left-color: var(--st-info); }
.sup-kpi--soon.is-hot, .sup-kpi--unread.is-hot { border-top-color: var(--st-warning); }
.sup-kpi--soon.is-hot .sup-kpi__value, .sup-kpi--unread.is-hot .sup-kpi__value { color: var(--st-warning); }
.sup-kpi--stale.is-hot { border-top-color: var(--st-danger); }
.sup-kpi--ok { border-top-color: var(--st-success); }
.sup-tools { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: var(--space-1) 0 var(--space-2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.sup-tools .input { flex: 1 1 220px; min-width: 0; }
.sup-status { font-size: .8125rem; color: var(--st-success); font-weight: 500; }
.sup-status.is-offline { color: var(--st-danger); }
.sup-list { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.sup-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--st-neutral); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2); cursor: pointer; }
.sup-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.sup-card:focus-visible { outline: none; box-shadow: var(--focus); }
.sup-card--due { border-left-color: var(--st-danger); }
.sup-card--soon { border-left-color: var(--st-warning); }
.sup-card--ok { border-left-color: var(--st-success); }
.sup-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); }
.sup-card__head strong { display: block; font-size: 1.1rem; }
.sup-card__head .muted { display: block; }
.sup-card__index { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px var(--space-2); font-variant-numeric: tabular-nums; }
.sup-card__plan { margin: 0; display: grid; gap: 6px; padding-top: var(--space-2); border-top: 1px solid var(--border); }
.sup-card__plan-title { font-weight: 600; }
.sup-card__due { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px var(--space-2); font-variant-numeric: tabular-nums; }
.sup-rule { margin-top: var(--space-4); }
.sup-popup { padding: 0 0 1em; }
.sup-detail { text-align: left; font-size: .9rem; color: var(--text); display: grid; gap: var(--space-2); }
.sup-detail h3 { margin: var(--space-3) 0 0; font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.sup-detail__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); margin-right: var(--space-6); }
.sup-detail__head h2 { margin: 0; font-size: 1.35rem; }
.sup-detail__head p { margin: 0; }
.sup-detail__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); }
.sup-vitals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.sup-vital { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-2) var(--space-3); display: grid; gap: 2px; min-width: 0; }
.sup-vital span, .sup-vital small { font-size: .75rem; color: var(--text-muted); }
.sup-vital strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sup-plans { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.sup-plan { border: 1px solid var(--border); border-left: 4px solid var(--st-success); border-radius: var(--radius); padding: var(--space-2) var(--space-3); display: grid; gap: 6px; }
.sup-plan > div:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--space-2); }
.sup-plan--due { border-left-color: var(--st-danger); }
.sup-plan--soon { border-left-color: var(--st-warning); }
@media (max-width: 860px) {
  .sup-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sup-kpi__value { font-size: 1.35rem; }
  .entry-tabs a { flex-direction: column; gap: 2px; font-size: .75rem; text-align: center; line-height: 1.15; padding: 4px; }
}
@media (max-width: 560px) {
  .sup-list { grid-template-columns: 1fr; }
  .sup-vitals { grid-template-columns: 1fr 1fr; }
  .sup-vitals .sup-vital:last-child { grid-column: span 2; }
  .sup-popup.swal2-popup { width: 100vw !important; min-height: 100dvh; border-radius: 0; margin: 0; }
}
/* Détail d'un relevé, ouvert au clic sur un point d'une courbe (au-dessus des autres fenêtres) */
.reading-pop { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1em; background: rgba(16, 24, 40, .45); }
.reading-pop__card { width: min(100%, 26em); background: #fff; color: #1B2430; border-radius: .75em; box-shadow: 0 1em 3em rgba(0, 0, 0, .35); padding: 1.1em 1.25em; outline: none; text-align: left; }
.reading-pop__card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; margin-bottom: .8em; }
.reading-pop__card h3 { margin: 0; font-size: 1.1em; line-height: 1.25; color: #1B2430; }
.reading-pop__card header p { margin: .15em 0 0; font-size: .85em; color: #5B6573; }
.reading-pop__close { width: 1.9em; height: 1.9em; flex-shrink: 0; border: 1px solid #DDE1E6; border-radius: .4em; background: #fff; color: #1B2430; font: inherit; font-size: 1.1em; line-height: 1; cursor: pointer; }
.reading-pop__close:hover { border-color: var(--accent); color: var(--accent); }
.reading-pop__card dl { margin: 0; }
.reading-pop__row { display: grid; grid-template-columns: 9.5em 1fr; gap: .75em; padding: .5em 0; border-top: 1px solid #EEF0F3; }
.reading-pop__row dt { color: #5B6573; font-size: .85em; }
.reading-pop__row dd { margin: 0; font-variant-numeric: tabular-nums; }
.reading-pop__row dd strong { font-size: 1.1em; }
.reading-pop__row dd small { display: block; font-size: .8em; color: #5B6573; }

/* Supervision des index */
.meters-popup { padding: 0 0 1.25em; }
.meters-modal { text-align: left; font-size: .875rem; color: var(--text); }
.meters-modal h3 { margin: var(--space-4) 0 var(--space-2); font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.meters-modal__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); margin: 0 var(--space-6) var(--space-3) 0; }
.meters-modal__head h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.meters-modal__head p { margin: 0; }
.meters-modal details { margin-top: var(--space-3); }
.meters-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }
.meters-table .meters-name { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meters-table .life { min-width: 80px; }
.meters-actions .btn { padding: 0 8px; }

/* Supervision des index — affichage mural (salle de supervision) : sombre, lisible à distance, sans défilement.
   Toutes les tailles sont en em : le corps suit la largeur de l'écran (20 px en Full HD, 40 px en 4K). */
.wall-body { margin: 0; background: #0B121C; color: #F2F5F8; font-size: clamp(11px, 1.04vw, 44px); overflow: hidden; }
.wall-body.wall-idle { cursor: none; }
.wall { --w-panel: #121C2A; --w-line: #263243; --w-muted: #9AA7B6; --w-due: #F97066; --w-soon: #FDB022; --w-ok: #47CD89;
  height: 100vh; display: flex; flex-direction: column; gap: .7em; padding: .9em 1.2em .6em; box-sizing: border-box; }
.wall h1, .wall h2, .wall p { margin: 0; }
.wall small { font-size: 1em; }
.wall [data-lucide] { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.wall__head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 2em; }
.wall__brand { display: flex; align-items: center; gap: .8em; min-width: 0; }
.wall__logo { width: 2.6em; height: 2.6em; border-radius: .6em; display: grid; place-items: center; background: var(--accent); }
.wall__logo [data-lucide] { width: 1.5em; height: 1.5em; }
.wall__brand h1 { font-size: 1.5em; line-height: 1.15; }
.wall__brand p { color: var(--w-muted); }
.wall__status { display: flex; align-items: center; gap: .5em; color: var(--w-muted); }
.wall__dot { width: .7em; height: .7em; border-radius: 50%; background: var(--w-ok); }
.wall__status.is-down { color: var(--w-due); font-weight: 600; }
.wall__status.is-down .wall__dot { background: var(--w-due); }
.wall__clock { text-align: right; line-height: 1.1; }
.wall__clock strong { display: block; font-size: 2.4em; font-variant-numeric: tabular-nums; }
.wall__clock span { display: block; color: var(--w-muted); }
.wall__clock span::first-letter { text-transform: uppercase; }
.wall__chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--w-muted); }
.wall__alert { display: flex; align-items: center; justify-content: center; gap: .6em; padding: .5em 1em; border-radius: .5em; background: #B42318; color: #fff; font-size: 1.3em; font-weight: 600; }
.wall__alert[hidden] { display: none; }
.wall__kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7em; }
.wall__kpi { background: var(--w-panel); border: 1px solid var(--w-line); border-radius: .7em; padding: .6em 1em .5em; border-top: .25em solid var(--w-line); }
/* Navigation à la souris : indicateurs, lignes et engins non relevés sont cliquables */
button.wall__kpi, button.wall__chip, .wall__nav, button.wall__link { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.wall__kpi { display: block; width: 100%; }
.wall__kpi-value { display: block; }
.wall__row--ok .wall__badge, .wall__row--ok .wall__bar > span { background: var(--w-ok); }
.wall__row--none .wall__badge { background: #98A2B3; }
.wall__kpi:hover, .wall__chip:hover { border-color: #6CB0F2; }
.wall__kpi.is-selected { outline: .15em solid #6CB0F2; outline-offset: -.15em; background: #19273A; }
.wall__kpi:focus-visible, .wall__chip:focus-visible, .wall__row:focus-visible, .wall__nav:focus-visible { outline: .15em solid #6CB0F2; outline-offset: -.15em; }
.wall__row { cursor: pointer; }
.wall__row:hover { background: #162234; }
.wall__title-tools { display: inline-flex; align-items: center; gap: .8em; min-width: 0; }
.wall__search { display: inline-flex; align-items: center; gap: .4em; padding: 0 .6em; height: 1.9em; border-radius: .45em; border: 1px solid var(--w-line); background: #19273A; color: var(--w-muted); }
.wall__search:focus-within { border-color: #6CB0F2; color: #F2F5F8; }
.wall__search input { width: 11em; min-width: 0; border: 0; outline: 0; background: transparent; color: #F2F5F8; font: inherit; font-size: .9em; }
.wall__search input::placeholder { color: var(--w-muted); }
.wall__search input::-webkit-search-cancel-button { filter: invert(1); cursor: pointer; }
.wall__pager { display: inline-flex; align-items: center; gap: .5em; white-space: nowrap; }
.wall__nav { width: 1.8em; height: 1.8em; border-radius: .4em; border: 1px solid var(--w-line); background: #19273A; text-align: center; line-height: 1; font-size: 1.1em; }
.wall__nav:hover { border-color: #6CB0F2; }
.wall__link { color: #6CB0F2; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .2em; }
.wall__link[hidden], .wall__paused[hidden] { display: none; }
.wall__paused { display: inline-flex; align-items: center; gap: .4em; color: #F2F5F8; font-size: 1.25em; }
[data-wall-scope] { cursor: pointer; }
/* Détail d'un engin, ouvert au clic */
.wall__overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 2em; background: rgba(4, 8, 14, .78); }
.wall__overlay[hidden] { display: none; }
.wall__modal { width: min(100%, 82em); max-height: 100%; display: flex; flex-direction: column; gap: .8em; padding: 1.2em 1.4em; box-sizing: border-box; overflow: auto;
  background: var(--w-panel); border: 1px solid #3A4A60; border-radius: .9em; box-shadow: 0 1.5em 4em rgba(0, 0, 0, .6); outline: none; }
.wall__modal h3 { margin: 0 0 .4em; font-size: 1em; font-weight: 600; color: var(--w-muted); }
.wall__modal-head { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1em; }
.wall__modal-head h2 { font-size: 2em; line-height: 1.1; }
.wall__modal-head p, .wall__muted { color: var(--w-muted); }
.wall__modal-head.wall__row--due .wall__badge, .wall__table .wall__row--due .wall__badge, .wall__table .wall__row--due .wall__bar > span { background: var(--w-due); }
.wall__vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7em; }
.wall__vital { border: 1px solid var(--w-line); border-radius: .6em; padding: .5em .8em; background: #19273A; }
.wall__vital > span { display: flex; align-items: center; gap: .4em; color: var(--w-muted); font-size: .9em; }
.wall__vital strong { display: block; font-size: 1.7em; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.wall__vital small { display: block; color: var(--w-muted); font-size: .85em; }
.wall__modal-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1em 1.4em; flex-shrink: 0; }
.wall__modal-body > section { min-width: 0; }
/* Les échéances occupent toute la largeur : un intitulé long passe à la ligne au lieu de déborder sur la courbe */
.wall__modal-plans { grid-column: 1 / -1; }
.wall__modal-plans td:first-child { white-space: normal; min-width: 12em; }
.wall__modal-chart { display: flex; flex-direction: column; min-height: 17em; }
.wall__vitals, .wall__modal-head { flex-shrink: 0; }
.wall__modal-chart .wall__title { margin-bottom: .3em; }
.wall__table { width: 100%; border-collapse: collapse; }
.wall__table th { text-align: left; font-weight: 500; font-size: .8em; color: var(--w-muted); padding: .2em .5em; white-space: nowrap; }
.wall__table td { padding: .4em .5em; border-top: 1px solid var(--w-line); vertical-align: middle; white-space: nowrap; }
.wall__table td small { display: block; color: var(--w-muted); font-size: .85em; }
.wall__table .num { text-align: right; font-variant-numeric: tabular-nums; }
.wall__table .wall__progress { min-width: 8em; }
.wall__nav--text { width: auto; padding: 0 .6em; font-size: .9em; }
.wall__nav[aria-pressed="true"] { background: #6CB0F2; border-color: #6CB0F2; color: #0B121C; font-weight: 600; }
.wall__kpi-label { display: flex; align-items: center; gap: .45em; color: var(--w-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall__kpi-value { font-size: 3.4em; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wall__kpi--due.is-on { border-top-color: var(--w-due); }
.wall__kpi--due.is-on .wall__kpi-value { color: var(--w-due); }
.wall__kpi--soon.is-on, .wall__kpi--read.is-on { border-top-color: var(--w-soon); }
.wall__kpi--soon.is-on .wall__kpi-value { color: var(--w-soon); }
.wall__kpi--stale.is-on { border-top-color: var(--w-due); }
.wall__kpi--stale.is-on .wall__kpi-value { color: var(--w-due); }
.wall__kpi--ok { border-top-color: var(--w-ok); }
.wall__main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: .7em; min-height: 0; }
.wall__side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .7em; min-height: 0; }
.wall__panel { background: var(--w-panel); border: 1px solid var(--w-line); border-radius: .7em; padding: .7em 1em; min-height: 0; display: flex; flex-direction: column; }
.wall__title { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; margin-bottom: .5em; color: var(--w-muted); }
.wall__title h2 { font-size: 1.1em; font-weight: 600; color: #F2F5F8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall__rows { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); }
.wall__row { display: grid; grid-template-columns: 11em minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.1fr); align-items: center; gap: 1em; padding: 0 .7em; border-top: 1px solid var(--w-line); border-left: .3em solid transparent; }
.wall__row:first-child { border-top: 0; }
.wall__row.is-active { background: #19273A; border-left-color: #6CB0F2; }
.wall__row.is-new { animation: wall-flash 1s ease-in-out infinite alternate; }
@keyframes wall-flash { from { background: transparent; } to { background: rgba(249, 112, 102, .28); } }
.wall__row strong, .wall__row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall__row small { color: var(--w-muted); }
.wall__engine strong { font-size: 1.45em; }
.wall__plan strong { font-weight: 500; }
.wall__badge { justify-self: start; padding: .2em .6em; border-radius: 99em; font-weight: 700; font-size: .9em; white-space: nowrap; color: #0B121C; background: var(--w-soon); }
.wall__row--due .wall__badge { background: var(--w-due); }
.wall__progress { display: grid; gap: .15em; min-width: 0; font-variant-numeric: tabular-nums; }
.wall__progress-line { display: flex; align-items: center; gap: .5em; }
.wall__issue { color: var(--w-soon) !important; }
.wall__row--check .wall__badge, .wall__row--check .wall__bar > span { background: #6CB0F2; }
.wall__kpi--check.is-on { border-top-color: #6CB0F2; }
.wall__kpi--check.is-on .wall__kpi-value { color: #6CB0F2; }
.wall__bar { flex: 1; height: .55em; border-radius: 99em; background: var(--w-line); overflow: hidden; }
.wall__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--w-soon); }
.wall__row--due .wall__bar > span { background: var(--w-due); }
.wall__due { text-align: right; }
.wall__due strong { font-size: 1.45em; font-variant-numeric: tabular-nums; }
.wall__row--due .wall__due strong { color: var(--w-due); }
.wall__chips { display: flex; flex-wrap: wrap; gap: .45em; }
.wall__chip { display: inline-flex; align-items: baseline; gap: .45em; padding: .2em .6em; border-radius: .45em; border: 1px solid var(--w-line); background: #19273A; }
.wall__chip small { color: var(--w-muted); font-size: .85em; }
.wall__chip--stale { border-color: var(--w-due); }
.wall__chip--stale small { color: var(--w-due); font-weight: 600; }
.wall__chip--more { color: var(--w-muted); }
.wall__chart { position: relative; flex: 1; min-height: 0; }
.wall__empty { grid-row: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em; color: var(--w-ok); font-size: 1.5em; font-weight: 600; text-align: center; }
.wall__empty [data-lucide] { width: 2.4em; height: 2.4em; }
.wall__empty--sm { flex-direction: row; font-size: 1em; padding: .4em 0; width: 100%; }
.wall__empty--sm [data-lucide] { width: 1.3em; height: 1.3em; }
.wall__foot { display: flex; justify-content: space-between; gap: 2em; color: var(--w-muted); font-size: .75em; }
.wall__tools { position: fixed; top: .6em; left: 50%; transform: translateX(-50%); display: flex; gap: .5em; transition: opacity .3s; }
.wall-idle .wall__tools { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .wall__row.is-new { animation: none; background: rgba(249, 112, 102, .28); } }
/* Échéances au compteur : bornes de l'avancement et raison d'un « à vérifier » (suivi, encodeur) */
.kpi--info .kpi__value { color: var(--st-info); }
.life__bar--muted > span { background: var(--st-neutral); }
.meter-bounds { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-2); margin-top: 2px; font-size: .75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.meter-bounds .is-unconfirmed { color: var(--st-warning); font-style: italic; }
.meter-issue { display: flex; align-items: flex-start; gap: 4px; margin-top: 2px; font-size: .75rem; font-weight: 500; color: var(--st-warning); }
.meter-issue [data-lucide] { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; }

/* Plan préventif : compteur de suivi de l'engin et aperçu de l'échéance */
.plan-meter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: .875rem; font-variant-numeric: tabular-nums; }
.plan-meter[hidden], [data-meter][hidden] { display: none; }
.plan-preview { display: grid; gap: var(--space-3); }
.plan-preview__row { display: grid; gap: 4px; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-alt); font-variant-numeric: tabular-nums; }
.plan-preview__row .life { max-width: 360px; }
.form-section > .hint { margin: 0 0 var(--space-3); }
.form-section > [data-preventive-other] { margin-top: var(--space-3); display: inline-flex; align-items: center; gap: 4px; }
.form-section > [data-preventive-other][hidden] { display: none; }
.form-actions__start { margin-right: auto; }

/* Écran mural : badge contenu dans sa colonne, ligne sans plan sur toute la largeur, titre « Non relevés » cliquable */
.wall__badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wall__plan--wide { grid-column: span 3; }
.wall__link--title { font-weight: inherit; font-size: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.wall__link--title.is-selected { color: #6CB0F2; }
.wall__progress > strong { font-size: 1.2em; }

/* Fiche engin : relevés de compteurs en tableau compact, lignes dépliables */
.readings-table tbody tr:not(.reading-child) { cursor: pointer; }
.readings-toggle { width: 28px; }
.readings-toggle [data-lucide] { width: 16px; height: 16px; transition: transform .15s; }
.readings-table tr.is-open .readings-toggle [data-lucide] { transform: rotate(90deg); }
.reading-flat { color: var(--st-warning); font-weight: 600; }
.reading-details { display: grid; grid-template-columns: max-content 1fr; gap: 4px var(--space-3); margin: 0; padding: var(--space-2) var(--space-2) var(--space-2) 34px; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.reading-details dt { color: var(--text-muted); }
.reading-details dd { margin: 0; overflow-wrap: anywhere; }

/* Saisie : carburant lu sur l'indicateur (graduation → litres) */

.entry-fuel__preview { font-size: .8125rem; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.entry-fuel__preview.is-error { color: var(--st-danger); }

/* Référentiel : indicateurs de carburant */
.gauge-add { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px auto; gap: var(--space-2); margin-bottom: var(--space-4); }
.input--num { width: 90px; }
@media (max-width: 560px) { .gauge-add { grid-template-columns: 1fr 1fr; } }

/* Référentiel : onglets, ajout sur une ligne, tableau des modèles éditable en ligne */
.catalog-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: var(--space-2) 0 var(--space-4); }
.catalog-tabs button { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); padding: 0 var(--space-4); border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-weight: 600; color: var(--text-muted); cursor: pointer; margin-bottom: -1px; }
.catalog-tabs button:hover { color: var(--text); }
.catalog-tabs button:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }
.catalog-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.catalog-tabs [data-lucide] { width: 16px; height: 16px; }
.catalog-tabs small { min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; text-align: center; }
.catalog-panel[hidden] { display: none; }
.catalog-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.catalog-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3); margin-bottom: var(--space-3); background: var(--surface-alt); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.catalog-add .input { flex: 1 1 160px; min-width: 0; }
.catalog-add .input--num { flex: 0 0 110px; }
.catalog-add__label { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--accent); }
.catalog-add__label [data-lucide] { width: 16px; height: 16px; }
.catalog-models td { vertical-align: middle; }
.catalog-models tr[hidden] { display: none; }
.catalog-models tr.is-incomplete > td:first-child { box-shadow: inset 3px 0 0 var(--st-warning); }
.catalog-models tr.is-dirty { background: var(--accent-soft); }
.catalog-models select { max-width: 260px; }
.catalog-tank { display: flex; align-items: center; gap: 6px; }
.catalog-tank form { margin: 0; }
.gauge-chip { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8125rem; }
.segmented--sm span { padding: 4px 12px; font-size: .8125rem; }
.segmented--sm { margin: 0; }

/* Fiche engin (formulaire) : formulaire + synthèse fixe, valeurs héritées */
.equipment-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-4); align-items: start; }
.equipment-form__aside { position: sticky; top: var(--space-4); }
.equipment-form__actions { position: sticky; bottom: 0; z-index: 4; align-items: center; box-shadow: 0 -4px 12px rgba(16, 24, 40, .06); }
.equipment-form__actions [data-dirty-note] { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--st-warning); }
.equipment-form__actions [data-dirty-note][hidden] { display: none; }
.equipment-form__actions [data-lucide] { width: 14px; height: 14px; }
.form-section { scroll-margin-top: var(--space-4); }
.form-section > .hint { margin: 0 0 var(--space-3); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.model-brings { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-size: .8125rem; }
.model-brings[hidden] { display: none; }
.model-brings.is-incomplete { background: #FCEFE3; color: #7A3306; }
.model-brings [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.summary-card { padding: var(--space-4); display: grid; gap: var(--space-3); }
.summary-card__head { display: grid; gap: 2px; padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.summary-card__head strong { font-size: 1.35rem; line-height: 1.2; }
.summary-list { margin: 0; display: grid; gap: var(--space-2); }
.summary-list > div { display: grid; gap: 1px; }
.summary-list dt { font-size: .75rem; color: var(--text-muted); }
.summary-list dd { margin: 0; font-weight: 600; font-size: .875rem; }
.summary-source { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--surface-alt); border: 1px solid var(--border); font-size: .6875rem; font-weight: 500; color: var(--text-muted); }
.summary-missing { color: var(--st-warning); font-weight: 600; }
.summary-nav { display: grid; gap: 2px; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.summary-nav a { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-2); border-radius: var(--radius); color: var(--text-muted); font-size: .8125rem; font-weight: 500; }
.summary-nav a:hover { text-decoration: none; background: var(--surface-alt); color: var(--text); }
.summary-nav a.is-current { background: var(--accent-soft); color: var(--accent); }
.summary-nav [data-lucide] { width: 15px; height: 15px; }
.summary-nav__state { margin-left: auto; font-weight: 700; }
.summary-nav__state.is-ok { color: var(--st-success); }
.summary-nav__state.is-todo { color: var(--st-warning); }
.summary-card__actions { display: grid; gap: var(--space-2); }
@media (max-width: 1100px) {
  .equipment-form { grid-template-columns: 1fr; }
  .equipment-form__aside { position: static; order: -1; }
  .summary-nav, .summary-card__actions { display: none; }
  .summary-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 700px) { .form-grid--3 { grid-template-columns: 1fr; } }

/* Confirmation de soumission : sobre, résumé libellé → valeur */
.confirm-popup.swal2-popup { width: min(520px, 96vw); padding: var(--space-5) var(--space-5) var(--space-4); text-align: left; }
.confirm-popup .swal2-title { padding: 0; font-size: 1.05rem; font-weight: 600; text-align: left; color: var(--text); }
.confirm-popup .swal2-html-container { margin: var(--space-3) 0 0; padding: 0; text-align: left; font-size: .875rem; }
.confirm-popup--danger .swal2-title { color: var(--st-danger); }
.confirm-lead { margin: 0 0 var(--space-3); color: var(--text-muted); }
.confirm-summary { margin: 0; display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.confirm-summary > div { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: var(--space-3); padding: 7px var(--space-3); border-top: 1px solid var(--border); }
.confirm-summary > div:first-child { border-top: 0; }
.confirm-summary > div:nth-child(even) { background: var(--surface-alt); }
.confirm-summary dt { color: var(--text-muted); }
.confirm-summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.confirm-more { margin: var(--space-2) 0 0; font-size: .8125rem; color: var(--text-muted); }
@media (max-width: 560px) { .confirm-summary > div { grid-template-columns: 1fr; gap: 0; } }

/* Confirmation : boutons de l'application (libellé d'action, icône, couleur selon l'effet) */
.btn--success { background: var(--st-success); border-color: var(--st-success); color: #fff; }
.btn--success:hover { background: #16603C; }
.btn--warning { background: var(--st-warning); border-color: var(--st-warning); color: #fff; }
.btn--warning:hover { background: #8E3805; }
.confirm-actions { display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: var(--space-2); width: 100%; margin: var(--space-4) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.confirm-actions .btn { min-height: var(--touch); padding: 0 var(--space-4); gap: var(--space-2); font-weight: 600; }
.confirm-actions .btn [data-lucide], .confirm-actions .btn svg { width: 17px; height: 17px; }
.confirm-actions .btn:focus-visible { outline: none; box-shadow: var(--focus); }
.confirm-back { color: var(--text-muted); }
.confirm-back:hover { color: var(--text); background: var(--surface-alt); }
.confirm-popup--deactivate .swal2-title { color: var(--st-warning); }
.confirm-popup--danger .swal2-title { color: var(--st-danger); }
.confirm-popup--activate .swal2-title { color: var(--st-success); }
@media (max-width: 560px) { .confirm-actions .btn { flex: 1 1 100%; justify-content: center; } }

/* ---------- Menu : page active, pastilles par gravité, menu réduit ---------- */
.nav a[aria-current="page"] { background: rgba(255,255,255,.2); box-shadow: inset 3px 0 0 var(--brand-yellow); font-weight: 600; }
.nav a[aria-current="page"] [data-lucide] { color: #CFE6FB; }
.nav a:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.nav__sub a { min-height: 34px; padding-left: calc(var(--space-3) + 26px); font-size: .8125rem; color: rgba(255,255,255,.7); }
.nav__sub [data-lucide] { width: 15px; height: 15px; }
.nav__badge--bad { background: #E5484D; }
.nav__badge--warn { background: #F5A524; color: #3B2300; }
.nav__badge--info { background: rgba(255,255,255,.22); color: #fff; }
@media (min-width: 861px) {
  body.sidebar-mini .nav__sub { display: none; }
  /* Menu réduit : la pastille devient un point de couleur sur l'icône */
  body.sidebar-mini .nav__badge { position: absolute; top: 7px; right: 12px; min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--accent); }
}

/* ---------- Barre supérieure : recherche rapide ---------- */
.topbar__search { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 38px; min-width: 240px; padding: 0 8px 0 12px; margin-left: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); color: var(--text-muted); font: inherit; font-size: .875rem; cursor: pointer; }
.topbar__search:hover { border-color: var(--border-strong); color: var(--text); }
.topbar__search:focus-visible { outline: none; box-shadow: var(--focus); }
.topbar__search [data-lucide] { width: 16px; height: 16px; }
.topbar__search span { flex: 1; text-align: left; }
.topbar__search kbd, .cmdk kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); font: 600 .6875rem/1.4 var(--font); color: var(--text-muted); }
@media (max-width: 860px) {
  .topbar__search { min-width: 0; padding: 0 10px; }
  .topbar__search span, .topbar__search kbd { display: none; }
}

/* ---------- Cloche : couleur selon la gravité, nouveautés ---------- */
.notif__badge--bad { background: var(--st-danger); }
.notif__badge--warn { background: #F5A524; color: #3B2300; }
.notif__badge--info { background: var(--text-muted); }
.notif__badge--dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 7px; right: 7px; font-size: 0; }
.notif__panel { width: 400px; }
.notif__head > div { display: grid; }
.notif__head small { font-size: .75rem; }
.notif__body { max-height: min(460px, 70vh); overflow-y: auto; padding: 4px 6px; }
.notif__group h3 { display: flex; align-items: center; gap: 6px; margin: 10px 8px 4px; font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.notif__group h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.notif__group--bad h3::before { background: var(--st-danger); }
.notif__group--warn h3::before { background: #F5A524; }
.notif__group h3 span { margin-left: auto; font-variant-numeric: tabular-nums; }
.notif__group ul { list-style: none; margin: 0; padding: 0; }
.notif__item--info .notif__icon { background: var(--surface-alt); color: var(--text-muted); }
.notif__item.is-new { background: var(--accent-soft); }
.notif__item.is-new:hover { background: #DCE6F0; }
.notif__label em { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .625rem; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: 1px; }
.notif__foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-top: 1px solid var(--border); font-size: .8125rem; font-weight: 600; }
.notif__foot [data-lucide] { width: 15px; height: 15px; }
.notif__foot:hover { background: var(--surface-alt); text-decoration: none; }

/* ---------- Recherche rapide (Ctrl + K) ---------- */
body.cmdk-open { overflow: hidden; }
.cmdk { position: fixed; inset: 0; z-index: 1500; display: grid; justify-items: center; align-items: start; padding: 10vh var(--space-4) var(--space-4); background: rgba(16, 24, 40, .45); }
.cmdk[hidden] { display: none; }
.cmdk__box { width: min(640px, 100%); max-height: 75vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; box-shadow: 0 24px 60px rgba(16,24,40,.3); overflow: hidden; }
.cmdk__input { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-4); border-bottom: 1px solid var(--border); }
.cmdk__input [data-lucide] { width: 18px; height: 18px; color: var(--text-muted); }
.cmdk__input input { flex: 1; min-width: 0; min-height: 54px; border: 0; outline: none; background: none; font: inherit; font-size: 1rem; color: var(--text); }
.cmdk__results { overflow-y: auto; padding: 6px; }
.cmdk__group h3 { margin: 8px 10px 4px; font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.cmdk__item { display: flex; align-items: center; gap: var(--space-3); padding: 8px 10px; border-radius: 8px; color: var(--text); }
.cmdk__item:hover, .cmdk__item.is-active { background: var(--accent-soft); text-decoration: none; }
.cmdk__item.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.cmdk__item [data-lucide] { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }
.cmdk__item span { display: grid; min-width: 0; flex: 1; }
.cmdk__item strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk__item small { color: var(--text-muted); font-size: .75rem; }
.cmdk__item em { font-style: normal; }
.cmdk__empty { margin: 0; padding: var(--space-4); color: var(--text-muted); }
.cmdk__help { margin: 0; padding: 8px var(--space-4); border-top: 1px solid var(--border); background: var(--surface-alt); font-size: .75rem; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .notif.has-items .notif__btn [data-lucide] { animation: none; } }

/* Saisie des index : champs proportionnés (même largeur, même hauteur) sur une ligne */
.entry-card__inputs { display: grid; gap: 6px; }
.entry-card__fields--1 { grid-template-columns: minmax(0, 1fr); }
.entry-card__fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-card__fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry-field > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-field .input { height: 52px; padding: 0 10px; font-size: 1.25rem; text-align: center; }
.entry-field .input::placeholder { font-size: .9375rem; }
.entry-fuel__preview { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .8125rem; }
.entry-fuel__preview [data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }
@media (max-width: 360px) { .entry-field .input { font-size: 1.05rem; padding: 0 6px; } }

/* ---------- Filtre par engin (recherche dynamique) ---------- */
.eq-filter { position: relative; min-width: 240px; }
.eq-filter__box { position: relative; display: flex; align-items: center; }
.eq-filter__box > svg, .eq-filter__box > i { position: absolute; left: 8px; width: 14px; height: 14px; color: var(--text-muted); pointer-events: none; }
.eq-filter__box .input { width: 100%; padding-left: 28px !important; padding-right: 28px !important; }
.eq-filter__clear { position: absolute; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 99px; background: none; color: var(--text-muted); cursor: pointer; }
.eq-filter__clear:hover { background: var(--accent-soft); color: var(--text); }
.eq-filter__clear svg { width: 14px; height: 14px; }
.eq-filter__list { position: absolute; z-index: 30; top: 100%; left: 0; right: 0; min-width: 320px; max-height: 320px; overflow-y: auto; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.eq-filter__list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: 6px 8px; border-radius: calc(var(--radius) - 2px); font-size: .8125rem; cursor: pointer; }
.eq-filter__list li span { min-width: 0; }
.eq-filter__list li small { display: block; color: var(--text-muted); font-size: .6875rem; }
.eq-filter__list li.is-active { background: var(--accent-soft); }
.eq-filter__list mark { background: none; color: var(--accent); font-weight: 700; }
.eq-filter__list .eq-filter__empty { color: var(--text-muted); cursor: default; }

/* ---------- Répertoire des index : modale d'un relevé ---------- */
table.dataTable tbody tr.row-modal { cursor: pointer; }
table.dataTable tbody tr.row-modal:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.reading-popup { text-align: left; }
.reading-popup .dialog-title { margin: 0 0 var(--space-3); font-size: 1.125rem; }
.reading-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-4); padding: var(--space-3); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); font-size: .8125rem; }
.reading-details dt { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.reading-details dd { margin: 0; }
.reading-form .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.reading-form .field { display: grid; gap: 4px; text-align: left; }

/* ---------- Répertoire des index : sélection et suppression en lot ---------- */
table.dataTable th.select-cell, table.dataTable td.select-cell { width: 32px; text-align: center; cursor: default; }
table.dataTable .select-cell input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
table.dataTable tbody tr.is-selected > td { background: var(--accent-soft); }
.bulk-bar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); }
.bulk-bar[hidden] { display: none; }
.bulk-bar__count { font-weight: 600; font-size: .875rem; margin-right: auto; }

/* ---------- Aperçu PDF (bon de travail) ---------- */
.pdf-preview-popup .swal2-html-container { margin: var(--space-2) var(--space-3) 0; }
.pdf-preview { display: block; width: 100%; height: min(75vh, 900px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }

/* ---------- JEK : compléments ---------- */
table.display { width: 100%; }
.chart-table { margin-top: var(--space-3); }
.debug-trace { margin-top: var(--space-4); font-size: 12px; white-space: pre-wrap; overflow-x: auto; }

/* ---------- Back-office métier : clients, abonnements, planning ---------- */
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }
td .inline-actions { margin-top: 0; }
.inline-actions form { margin: 0; }
.input--narrow { width: 96px; }
.fold { margin-top: var(--space-4); border-top: 1px solid var(--border); padding-top: var(--space-3); }
.fold summary { cursor: pointer; font-weight: 500; color: var(--accent); margin-bottom: var(--space-3); }
.dialog-form { text-align: left; display: grid; gap: var(--space-3); }
.page-header h1 small { font-size: .9rem; font-weight: 400; }
.page-header__actions form { margin: 0; }
.page-header__actions .input { width: auto; }
a.kpi.kpi--hero, a.kpi { text-decoration: none; }
.kpi__value small { font-size: 1rem; font-weight: 500; }

/* Créneaux hebdomadaires d'un abonnement */
.slots { display: grid; gap: var(--space-2); margin-bottom: var(--space-2); }
.slots__row { display: grid; grid-template-columns: minmax(120px, 1fr) 120px 120px; gap: var(--space-2); align-items: center; }
.slots__row .check { display: flex; align-items: center; gap: var(--space-2); font-weight: 500; }
.slots__row:has(input[type=checkbox]:not(:checked)) .input { opacity: .45; }

/* Tournées du jour */
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: var(--space-4); align-items: start; }
.routes .card { margin-bottom: 0; }
.routes + .card { margin-top: var(--space-4); }
.route--unassigned { border-color: #F4CFA9; background: #FFFBF6; }
.route__list { list-style: none; margin: 0; padding: 0; }
.route__item { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.route__item:last-child { border-bottom: 0; }
.route__order { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .8rem; flex-shrink: 0; }
.route__body { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; }
.route__body:hover { text-decoration: none; }
.route__body:hover strong { color: var(--accent); }
.route__body span { font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route__moves { display: inline-flex; flex-shrink: 0; }
.route__moves form { margin: 0; }

/* Semaine par équipe */
.week th, .week td { vertical-align: top; min-width: 112px; }
.week tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.week__today { background: var(--accent-soft); }
.week__load { display: inline-block; margin-bottom: var(--space-1); }
.week__visit { display: block; font-size: .78rem; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.week__visit--done { color: var(--st-success); }
.week__visit--missed_client, .week__visit--missed_belej { color: var(--st-danger); text-decoration: line-through; }
.week__visit--postponed { color: var(--text-muted); text-decoration: line-through; }

/* Photos d'un passage */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-2); }
.photo-grid__item { padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-alt); cursor: zoom-in; aspect-ratio: 4 / 3; }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .routes { grid-template-columns: 1fr; }
  .slots__row { grid-template-columns: 1fr 1fr; }
  .slots__row .check { grid-column: 1 / -1; }
}

/* ---------- Messages WhatsApp préparés ---------- */
.msgs { display: grid; gap: var(--space-3); }
.msg { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); background: var(--surface); }
.msg--sent { background: var(--surface-alt); }
.msg--sent .msg__body { color: var(--text-muted); }
.msg__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.msg__head > div { display: flex; flex-direction: column; min-width: 0; }
.msg__body { margin: 0; padding: var(--space-3); border-radius: var(--radius); background: var(--bg); font: inherit; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .inline-actions { margin-top: var(--space-3); }
.msg__eta { margin: 0 0 var(--space-4); }
.msg__eta label { font-weight: 500; font-size: .9rem; }
.msg__editor { font-size: .9rem; line-height: 1.5; min-height: 200px; }
.timeline details summary { cursor: pointer; font-weight: 500; }
.timeline details .msg__body { margin-top: var(--space-2); }
.card code { background: var(--accent-soft); color: var(--accent); padding: 1px 5px; border-radius: 4px; font-size: .8125rem; }

/* ---------- Version 3 : réclamations, contrôles qualité, tableau de bord ---------- */
.fd-note { background: var(--surface-alt); border-left: 3px solid var(--border-strong); padding: var(--space-2) var(--space-3); border-radius: var(--radius); white-space: pre-line; }
.thread { margin-bottom: var(--space-4); }
.thread__item--client { background: var(--accent-soft); border-radius: var(--radius); padding: var(--space-3) !important; border-bottom: 0 !important; margin: var(--space-2) 0; }
.check-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.check-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.check-list li:last-child { border-bottom: 0; }
.check-list__choice { display: inline-flex; gap: var(--space-4); flex-shrink: 0; }
.check-list__choice label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fill { display: grid; gap: var(--space-3); }
.fill__row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 3fr) minmax(150px, auto); align-items: center; gap: var(--space-3); }
.fill__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fill__bar { height: 12px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.fill__bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.fill__bar span.is-over { background: var(--st-danger); }
.fill__value { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.fill__value small { font-weight: 400; }
@media (max-width: 860px) { .fill__row { grid-template-columns: 1fr; gap: 4px; } .fill__value { text-align: left; } }

/* ---------- Connexion : illustration du logiciel et points forts ---------- */
@media (min-width: 901px) { .login { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); } }
.login::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(120deg, #000 0%, transparent 62%); mask-image: linear-gradient(120deg, #000 0%, transparent 62%);
}
.login__hero { padding: 40px 56px; gap: var(--space-5); justify-content: flex-start; min-height: 100vh; }
.login__pitch { max-width: 520px; margin: var(--space-4) 0 0; }
.login__pitch h2 { font-size: clamp(1.6rem, 2.3vw, 2.15rem); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.login__pitch p { font-size: 1.02rem; }
.login__art { flex: 1 1 0; min-height: 0; display: flex; align-items: center; max-width: 640px; }
.login-art { width: 100%; height: 100%; max-height: 400px; overflow: visible; filter: drop-shadow(0 24px 40px rgba(0,0,0,.28)); }
.login-art__phone { animation: login-float 7s ease-in-out infinite; }
.login-art__pin { animation: login-float 5s ease-in-out infinite reverse; }
.login-art__route { animation: login-route 28s linear infinite; }
@keyframes login-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes login-route { to { stroke-dashoffset: -220; } }
.login__features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); max-width: 720px; }
.login__features li { display: flex; gap: var(--space-3); align-items: flex-start; }
.login__feature-icon { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.login__feature-icon [data-lucide] { width: 18px; height: 18px; }
.login__features strong { display: block; font-weight: 600; font-size: .9375rem; }
.login__features span { display: block; font-size: .8125rem; line-height: 1.4; color: rgba(255,255,255,.72); }
.login__footnote { margin-top: auto; }
.login__form { border-top: 4px solid var(--accent); }
.login__who { list-style: none; margin: var(--space-4) 0 0; padding: var(--space-3); display: grid; gap: var(--space-2); border-radius: var(--radius); background: var(--accent-soft); font-size: .8125rem; color: var(--text); }
.login__who li { display: flex; align-items: center; gap: var(--space-2); }
.login__who [data-lucide] { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
@media (max-width: 1180px) { .login__features { grid-template-columns: 1fr; gap: var(--space-3); } .login-art { max-height: 300px; } }
@media (max-height: 760px) { .login__hero { padding-top: 28px; padding-bottom: 24px; gap: var(--space-4); } .login__pitch { margin-top: 0; } .login__pitch h2 { font-size: 1.5rem; } }
@media (max-height: 600px) { .login__art { display: none; } }
@media (prefers-reduced-motion: reduce) { .login-art__phone, .login-art__pin, .login-art__route { animation: none; } }

/* ---------- Planning du jour : barre de semaine, synthèse, points à traiter, frise des tournées ---------- */
.seg { display: inline-flex; padding: 3px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--border); }
.seg__item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: calc(var(--radius) - 2px); font-size: .875rem; font-weight: 500; color: var(--text-muted); }
.seg__item [data-lucide] { width: 16px; height: 16px; }
a.seg__item:hover { color: var(--accent); text-decoration: none; }
.seg__item.is-active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(16,24,40,.12); }

.daybar { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); padding: var(--space-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.daybar__days { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.daybar__day { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: var(--radius); color: var(--text); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.daybar__day:hover { background: var(--accent-soft); text-decoration: none; }
.daybar__name { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.daybar__num { font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.daybar__count { position: relative; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--surface-alt); font-size: .75rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.daybar__alert { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--st-danger); box-shadow: 0 0 0 2px var(--surface); }
.daybar__day.is-empty .daybar__num, .daybar__day.is-empty .daybar__count { color: var(--text-muted); font-weight: 500; }
.daybar__day.is-today { border-color: var(--accent); }
.daybar__day.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.daybar__day.is-current .daybar__name, .daybar__day.is-current .daybar__num { color: #fff; }
.daybar__day.is-current .daybar__count { background: rgba(255,255,255,.22); color: #fff; }
.daybar__day.is-current .daybar__alert { box-shadow: 0 0 0 2px var(--accent); }
.daybar__nav { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius); color: var(--text-muted); flex-shrink: 0; }
.daybar__nav:hover { background: var(--accent-soft); color: var(--accent); }
.daybar__pick { margin: 0; flex-shrink: 0; }
.daybar__pick .input { min-height: 36px; width: 150px; }

.plan-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-kpis .kpi__value small { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.meter { height: 6px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; margin: var(--space-2) 0 var(--space-1); }
.meter--thin { height: 4px; margin: 0 0 var(--space-3); }
.meter__bar { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s ease; }
.meter__bar--success { background: var(--st-success); }
.meter__bar--danger { background: var(--st-danger); }

.attention { padding: var(--space-3) var(--space-4); border-left: 4px solid var(--st-warning); }
.attention--clear { border-left-color: var(--st-success); }
.attention__clear { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: 500; }
.attention__clear [data-lucide] { color: var(--st-success); width: 18px; height: 18px; }
.attention__title { display: flex; align-items: center; gap: var(--space-2); font-size: .9375rem; margin: 0 0 var(--space-2); }
.attention__title [data-lucide] { width: 18px; height: 18px; color: var(--text-muted); }
.attention__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--st-danger); color: #fff; font-size: .75rem; font-weight: 600; }
.attention__list { list-style: none; margin: 0; padding: 0; }
.attention__item { display: flex; align-items: center; gap: var(--space-3); padding: 6px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.attention__item > [data-lucide] { width: 18px; height: 18px; flex-shrink: 0; color: var(--st-warning); }
.attention__item--danger > [data-lucide] { color: var(--st-danger); }
.attention__item--muted > [data-lucide] { color: var(--text-muted); }
.attention__item > span { flex: 1; min-width: 0; }
.attention__item .btn [data-lucide] { width: 14px; height: 14px; }

.route { scroll-margin-top: var(--space-4); }
.route:target { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); border-color: var(--accent); }
.route__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.route__name h2 { margin: 0; font-size: 1.0625rem; }
.route__name span { display: block; }
.route__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); font-size: .8125rem; color: var(--text-muted); }
.route__check { display: inline-flex; align-items: center; gap: 6px; }
.route__check [data-lucide] { width: 15px; height: 15px; }
.route__check.is-ok { color: var(--st-success); }
.route__meta .route__optimize { margin: 0 0 0 auto; }
.route__notes { display: flex; gap: var(--space-2); margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: var(--surface-alt); font-size: .8125rem; }
.route__notes [data-lucide] { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--text-muted); }
.route__item { position: relative; gap: var(--space-3); padding: 10px 0; }
.route__time { width: 44px; flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .9rem; }
/* Frise : un trait relie les passages, la pastille porte l'ordre et la couleur de l'état */
.route__item:not(:last-child)::after { content: ""; position: absolute; left: calc(44px + var(--space-3) + 12px); top: calc(50% + 15px); bottom: calc(-50% + 15px); width: 2px; background: var(--border); }
.route__order { position: relative; z-index: 1; border: 2px solid transparent; }
.route__item--done .route__order { background: var(--st-success); color: #fff; }
.route__item--in_progress .route__order { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.route__item--postponed .route__order, .route__item--missed_belej .route__order, .route__item--missed_client .route__order { background: var(--surface-alt); color: var(--text-muted); }
.route__item--postponed .route__body strong, .route__item--missed_belej .route__body strong, .route__item--missed_client .route__body strong { color: var(--text-muted); text-decoration: line-through; }
.route__item--postponed .route__time, .route__item--missed_belej .route__time, .route__item--missed_client .route__time { color: var(--text-muted); }
.route__client { font-weight: 400; }
.route__state { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex-shrink: 0; }
.route__moves { opacity: 0; transition: opacity .15s; }
.route__item:hover .route__moves, .route__item:focus-within .route__moves { opacity: 1; }
@media (hover: none) { .route__moves { opacity: 1; } }

.plan-idle { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-4) 0 0; font-size: .875rem; }
.plan-idle [data-lucide] { width: 16px; height: 16px; }
.plan-empty { text-align: center; padding: var(--space-6) var(--space-4); }
.plan-empty p { margin: 0 0 var(--space-2); }
.plan-empty .btn { margin-top: var(--space-3); }
.plan-empty__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--space-3); }

@media (max-width: 1000px) { .plan-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .daybar { flex-wrap: wrap; }
  .daybar__days { order: 3; flex-basis: 100%; }
  .daybar__day { flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; }
  .daybar__pick { margin-left: auto; }
  .route__item { flex-wrap: wrap; }
  .route__body { flex-basis: calc(100% - 44px - 26px - 2 * var(--space-3)); }
  .route__state { margin-left: calc(44px + 26px + 2 * var(--space-3)); }
  .route__moves { margin-left: auto; }
  .route__item:not(:last-child)::after { display: none; }
}

/* ---------- Planning : calendrier du mois ---------- */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-4); padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.cal-bar__nav { display: flex; align-items: center; gap: var(--space-1); }
.cal-bar__month { min-width: 150px; text-align: center; font-size: 1.0625rem; }
.cal-stats { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0 auto 0 0; padding-left: var(--space-5); border-left: 1px solid var(--border); }
.cal-stats dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.cal-stats dd { margin: 0; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cal-stats dd small { font-size: .75rem; font-weight: 500; color: var(--text-muted); }
.cal-stats dd.is-success { color: var(--st-success); }
.cal-stats dd.is-danger { color: var(--st-danger); }
.cal-bar__filter { margin: 0; }
.cal-bar__filter .input { min-height: 36px; }

.cal { padding: 0; overflow: hidden; }
.cal__head, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__head { background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.cal__head span { padding: 8px 10px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.cal__day { min-height: 102px; padding: 6px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day.is-weekend { background: #FCFCFD; }
.cal__day.is-outside { background: var(--surface-alt); }
.cal__day.is-outside > * { opacity: .5; }
.cal__date { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; color: var(--text); border-radius: var(--radius); }
.cal__date:hover { text-decoration: none; }
.cal__date:hover .cal__num { background: var(--accent-soft); color: var(--accent); }
.cal__num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal__day.is-today .cal__num { background: var(--accent); color: #fff; }
.cal__count { font-size: .7rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; padding-right: 4px; }
.cal__chip { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 2px 6px; border: 0; border-left: 3px solid var(--chip-line); border-radius: 4px; background: var(--chip-bg); color: var(--chip-text); font: inherit; font-size: .72rem; line-height: 1.5; text-align: left; cursor: pointer; transition: filter .12s, transform .12s; }
.cal__chip:hover { filter: brightness(.95); transform: translateX(1px); }
.cal__chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal__time { font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.cal__plate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Couleur = état du passage */
.cal__chip--planned { --chip-bg: #EEF2F6; --chip-line: #8A96A6; --chip-text: #2B3441; }
.cal__chip--in_progress { --chip-bg: #E3EEFA; --chip-line: #1F6FC2; --chip-text: #134A85; }
.cal__chip--done { --chip-bg: #E3F5EC; --chip-line: #12805C; --chip-text: #0B5B41; }
.cal__chip--postponed { --chip-bg: #F1EEF8; --chip-line: #7A5AC2; --chip-text: #4B3590; }
.cal__chip--missed_belej { --chip-bg: #FDF0DD; --chip-line: #B54708; --chip-text: #8A3606; }
.cal__chip--missed_client { --chip-bg: #FCE8E6; --chip-line: #B42318; --chip-text: #8C1B12; }
.cal__chip--postponed .cal__plate, .cal__chip--missed_belej .cal__plate, .cal__chip--missed_client .cal__plate { text-decoration: line-through; }
/* Point = équipe */
.cal__team { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--team, #98A2B3); }
.cal__team--0 { --team: #1F6FC2; } .cal__team--1 { --team: #D9730D; } .cal__team--2 { --team: #0E9384; }
.cal__team--3 { --team: #C11574; } .cal__team--4 { --team: #6941C6; } .cal__team--5 { --team: #4E5BA6; }
.cal__team--none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st-danger); }
.cal__more { font-size: .7rem; font-weight: 600; padding: 0 6px; color: var(--accent); }
.cal__legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); padding: var(--space-3) var(--space-4); font-size: .75rem; color: var(--text-muted); }
.cal__legend-group { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.cal__key { display: inline-flex; align-items: center; gap: 6px; }
.cal__swatch { width: 14px; height: 10px; border-radius: 3px; background: var(--chip-bg); border-left: 3px solid var(--chip-line); }

/* Fenêtre d'information et fiche résumée d'un passage */
.info-modal { border-radius: 14px; overflow: hidden; }
.info-modal .info-modal__body { margin: 0; padding: 0; text-align: left; font-size: .9rem; color: var(--text); }
.info-modal .swal2-close { color: var(--text-muted); font-size: 1.6rem; top: 6px; right: 6px; }
.vcard__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) 48px var(--space-4) var(--space-4); background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.vcard__head > div { flex: 1; min-width: 0; }
.vcard__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; background: #EEF2F6; color: #2B3441; }
.vcard__icon [data-lucide] { width: 20px; height: 20px; }
.vcard__icon--in_progress { background: #E3EEFA; color: #134A85; }
.vcard__icon--done { background: #E3F5EC; color: #0B5B41; }
.vcard__icon--postponed { background: #F1EEF8; color: #4B3590; }
.vcard__icon--missed_belej { background: #FDF0DD; color: #8A3606; }
.vcard__icon--missed_client { background: #FCE8E6; color: #8C1B12; }
.vcard__title { margin: 0; font-size: 1.125rem; letter-spacing: .01em; }
.vcard__sub { margin: 0; font-size: .8125rem; color: var(--text-muted); }
.vcard__facts { margin: 0; padding: var(--space-2) var(--space-4); }
.vcard__facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--space-3); padding: 9px 0; border-bottom: 1px solid var(--border); }
.vcard__facts > div:last-child { border-bottom: 0; }
.vcard__facts dt { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--text-muted); align-self: start; }
.vcard__facts dt [data-lucide] { width: 15px; height: 15px; flex-shrink: 0; }
.vcard__facts dd { margin: 0; font-weight: 500; }
.vcard__facts dd .muted { font-weight: 400; font-size: .8125rem; }
.vcard__actions { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); background: var(--surface-alt); }
.vcard__actions .btn [data-lucide] { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .cal-stats { padding-left: 0; border-left: 0; flex-basis: 100%; order: 3; }
  .cal__day { min-height: 92px; padding: 3px; }
  .cal__chip { padding: 2px 3px; gap: 3px; }
  .cal__plate { display: none; }
  .cal__head span { padding: 6px 3px; text-align: center; }
}
@media (max-width: 480px) {
  .cal__time { font-size: .62rem; }
  .cal__chip .cal__team { display: none; }
  .vcard__facts > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Calendrier : passages supplémentaires d'un jour, déroulés dans la case */
.cal__rest { display: flex; flex-direction: column; gap: 3px; }
.cal__rest[open] { flex-direction: column-reverse; }
.cal__rest > summary { list-style: none; cursor: pointer; border-radius: 4px; padding: 1px 6px; user-select: none; }
.cal__rest > summary::-webkit-details-marker { display: none; }
.cal__rest > summary:hover { background: var(--accent-soft); }
.cal__rest > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal__more-close, .cal__rest[open] .cal__more-open { display: none; }
.cal__rest[open] .cal__more-close { display: inline; }
.cal__rest[open] > summary { color: var(--text-muted); }

/* ---------- Contrat d'un véhicule ---------- */
.contract__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-2); }
.contract__ref { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 1.0625rem; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.contract__ref [data-lucide] { width: 18px; height: 18px; color: var(--accent); }
.contract__period { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-variant-numeric: tabular-nums; }
.contract__period [data-lucide] { width: 14px; height: 14px; color: var(--text-muted); }
.contract__left { margin: 0 0 var(--space-3); font-size: .8125rem; color: var(--text-muted); }
.contract__left.is-soon { color: var(--st-danger); font-weight: 600; }
.contract__history-title { margin: var(--space-4) 0 var(--space-2); font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.contract__history { list-style: none; margin: 0; padding: 0; font-size: .8125rem; }
.contract__history li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: 6px 0; border-top: 1px solid var(--border); }
.contract__history span:not(.badge) { flex: 1; min-width: 0; color: var(--text-muted); }

/* ---------- Liste des contrats : tuiles de synthèse cliquables, avancement en ligne ---------- */
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: flex; align-items: flex-start; gap: var(--space-3); color: var(--text); border-left: 4px solid var(--border); }
.tile__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; background: var(--surface-alt); color: var(--text-muted); }
.tile__icon [data-lucide] { width: 19px; height: 19px; }
.tile--success { border-left-color: var(--st-success); } .tile--success .tile__icon { background: #E3F5EC; color: #0B5B41; }
.tile--danger { border-left-color: var(--st-danger); } .tile--danger .tile__icon { background: #FCE8E6; color: #8C1B12; } .tile--danger .kpi__value { color: var(--st-danger); }
.tile--warning { border-left-color: var(--st-warning); } .tile--warning .tile__icon { background: #FDF0DD; color: #8A3606; }
.tile.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mini-progress { display: inline-flex; align-items: center; gap: var(--space-2); }
.mini-progress__track { width: 64px; height: 6px; border-radius: 999px; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.mini-progress__bar { display: block; height: 100%; background: var(--st-success); border-radius: inherit; }
.mini-progress__text { font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tile__icon { display: none; } .tile { padding: var(--space-3); } }

/* ---------- Clients : identité en liste, ouverture de dossier ---------- */
.cell-id { display: inline-flex; align-items: center; gap: var(--space-3); }
.cell-id__avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 600; }
.cell-id__avatar--company { border-radius: 8px; background: #F1EEF8; color: #4B3590; }
.cell-id__sub { display: block; font-size: .78rem; color: var(--text-muted); }

.wz { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-4); align-items: start; }
.wz__main .card { margin-bottom: var(--space-4); }
.wz__side { position: sticky; top: var(--space-4); }
.form-grid .span-3 { grid-column: 1 / -1; }
.wz-step__head { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-4); }
.wz-step__head h2 { margin: 0; font-size: 1.125rem; }
.wz-step__head p { margin: 2px 0 0; font-size: .8125rem; }
.wz-step__num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; background: var(--accent); color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.wz-check { justify-content: flex-end; }
.wz-vehicle { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-3); background: var(--surface); }
.wz-vehicle__head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.wz-vehicle__head h3 { margin: 0; flex: 1; font-size: 1rem; }
.wz-vehicle__badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.wz-vehicle__badge [data-lucide] { width: 18px; height: 18px; }
.wz-contract { margin-top: var(--space-4); border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--border); }
.wz-contract__toggle { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); cursor: pointer; }
.wz-contract__toggle .muted { font-size: .8125rem; font-weight: 400; }
.wz-contract__body { padding: 0 var(--space-4) var(--space-4); }
.wz-slots__title { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-4) 0 var(--space-2); }
.wz-slots__title [data-lucide] { width: 16px; height: 16px; color: var(--accent); }
.wz-slots { display: grid; gap: 4px; }
.wz-slot { display: grid; grid-template-columns: 130px 120px 120px minmax(0, 1fr); gap: var(--space-2); align-items: center; padding: 4px 8px; border-radius: var(--radius); }
.wz-slot:has([data-slot-on]:checked) { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.wz-slot:not(:has([data-slot-on]:checked)) input[type=time] { opacity: .45; }
.wz-slot .input { min-height: 34px; }
.wz-avail { justify-self: start; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.wz-avail:empty { display: none; }
.wz-avail--free { background: #E3F5EC; color: #0B5B41; }
.wz-avail--tight { background: #FDF0DD; color: #8A3606; }
.wz-avail--full { background: #FCE8E6; color: #8C1B12; }
.wz-add { margin-top: var(--space-1); }

.wz-summary h2 { display: flex; align-items: center; gap: var(--space-2); font-size: 1rem; margin: 0 0 var(--space-3); }
.wz-summary h2 [data-lucide], .wz-summary__title [data-lucide] { width: 17px; height: 17px; color: var(--accent); }
.wz-summary__name { margin: 0 0 var(--space-3); font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; }
.wz-summary__name.is-empty { color: var(--text-muted); font-weight: 500; }
.wz-summary__facts { margin: 0; }
.wz-summary__facts > div { display: flex; justify-content: space-between; gap: var(--space-3); padding: 7px 0; border-top: 1px solid var(--border); font-size: .875rem; }
.wz-summary__facts dt { color: var(--text-muted); }
.wz-summary__facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.wz-summary__title { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-4) 0 var(--space-1); font-size: .875rem; }
.wz-summary__team { margin: 0 0 var(--space-2); font-size: .8125rem; color: var(--text-muted); }
.wz-week { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: 5px; }
.wz-week li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 48px; gap: var(--space-2); align-items: center; font-size: .75rem; color: var(--text-muted); }
.wz-week__name { text-transform: uppercase; letter-spacing: .04em; }
.wz-week__bar { height: 6px; border-radius: 999px; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.wz-week__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #8A96A6; transition: width .25s ease; }
.wz-week__num { text-align: right; font-variant-numeric: tabular-nums; }
.wz-week li.is-added { color: var(--text); font-weight: 600; }
.wz-week li.is-added .wz-week__bar i { background: var(--accent); }
.wz-week li.is-tight .wz-week__bar i { background: var(--st-warning); }
.wz-week li.is-full { color: var(--st-danger); }
.wz-week li.is-full .wz-week__bar i { background: var(--st-danger); }
.wz-summary__overload { margin-bottom: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: #FCE8E6; color: #8C1B12; font-size: .8125rem; align-items: flex-start; }
.wz-summary__actions { display: grid; gap: var(--space-2); margin-bottom: var(--space-2); }
@media (max-width: 1100px) {
  .wz { grid-template-columns: 1fr; }
  .wz__side { position: static; }
}
@media (max-width: 700px) {
  .form-grid--3 { grid-template-columns: 1fr; }
  .wz-slot { grid-template-columns: 1fr 1fr; }
  .wz-slot .check { grid-column: 1 / -1; }
  .wz-avail { grid-column: 1 / -1; }
}
/* Ouverture de dossier : sur trois colonnes, un champ « span-2 » en occupe deux (et non toute la ligne) */
.wz .form-grid--3 .span-2 { grid-column: span 2; }
@media (max-width: 700px) { .wz .form-grid--3 .span-2 { grid-column: 1 / -1; } }

/* ---------- Chiffrage d'un contrat : prix et passages en évidence ---------- */
.quote { margin: var(--space-4) 0 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.quote__main { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.quote__figure { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border-right: 1px solid var(--border); min-width: 0; }
.quote__figure:last-child { border-right: 0; }
.quote__label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.quote__value { font-size: 1.5rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote__note { font-size: .75rem; color: var(--text-muted); min-height: 1em; }
.quote__figure--price { background: var(--accent); color: #fff; }
.quote__figure--price .quote__label, .quote__figure--price .quote__note { color: rgba(255,255,255,.8); }
.quote__figure--price .quote__value { font-size: 1.75rem; }
.quote__warn { margin: 0; padding: var(--space-2) var(--space-4); border-top: 1px solid #F4CFA9; background: #FDF0DD; color: #8A3606; font-size: .8125rem; font-weight: 500; }
.wz-summary .quote { margin: 0 0 var(--space-3); }
.wz-summary .quote__main { grid-template-columns: 1fr 1fr; }
.wz-summary .quote__figure { border-bottom: 1px solid var(--border); padding: var(--space-3); }
.wz-summary .quote__figure:nth-child(2n) { border-right: 0; }
.wz-summary .quote__figure:nth-last-child(-n+2) { border-bottom: 0; }
.wz-summary .quote__value { font-size: 1.25rem; }
.wz-summary .quote__figure--price .quote__value { font-size: 1.35rem; }
.wz-total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: var(--space-3) 0 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--accent); color: #fff; }
.wz-total span { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.wz-total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wz-summary__facts .is-credit dd { color: var(--st-success); }

/* Fenêtre de confirmation d'un dossier */
.confirm-sum { text-align: left; font-size: .875rem; }
.confirm-sum__client { margin: 0 0 var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.confirm-sum__client strong { display: block; font-size: 1.0625rem; }
.confirm-sum__client span { color: var(--text-muted); font-size: .8125rem; }
.confirm-sum__list { list-style: none; margin: 0 0 var(--space-3); padding: 0; max-height: 220px; overflow-y: auto; }
.confirm-sum__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-3); padding: 7px 0; border-bottom: 1px solid var(--border); }
.confirm-sum__list strong { font-variant-numeric: tabular-nums; }
.confirm-sum__list small { grid-column: 1 / -1; color: var(--text-muted); }
.confirm-sum__price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.confirm-sum__totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.confirm-sum__totals div { padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: var(--surface-alt); }
.confirm-sum__totals div.is-main { background: var(--accent); color: #fff; }
.confirm-sum__totals span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.confirm-sum__totals strong { font-size: 1.0625rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.confirm-sum__note { margin: var(--space-3) 0 0; font-size: .8125rem; color: #8A3606; }

/* Modification d'un contrat : bandeau du mode */
.mode { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--border); border-left-width: 4px; background: var(--surface); }
.mode p { margin: 2px 0 0; font-size: .875rem; color: var(--text-muted); }
.mode__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.mode__icon [data-lucide] { width: 18px; height: 18px; }
.mode--amend { border-left-color: var(--st-warning); }
.mode--amend .mode__icon { background: #FDF0DD; color: #8A3606; }
.mode--inplace { border-left-color: var(--accent); }

/* Carte du contrat : document et exemplaire signé */
.contract__doc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-3) 0 var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.contract__doc-state { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: .875rem; font-weight: 500; color: var(--text-muted); }
.contract__doc-state [data-lucide] { width: 17px; height: 17px; }
.contract__doc-state.is-signed { color: var(--st-success); }
.contract__upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); padding: var(--space-3); border-radius: var(--radius); background: var(--surface-alt); }
.contract__upload label, .contract__upload .hint, .contract__upload .error { grid-column: 1 / -1; }
.contract__upload label { font-size: .8125rem; font-weight: 600; }
.contract__upload .input { min-height: 36px; padding: 4px 8px; font-size: .8125rem; }

/* Contrat imprimable */
.auth:has(.doc) { display: block; padding: 0; background: #E9EDF2; }
.doc__bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-4); background: var(--surface); border-bottom: 1px solid var(--border); }
.doc__bar-hint { margin: 0 auto; font-size: .8125rem; color: var(--text-muted); }
.doc__page { width: 210mm; max-width: calc(100% - 2 * var(--space-4)); min-height: 297mm; margin: var(--space-5) auto; padding: 16mm 16mm 14mm; background: #fff; box-shadow: 0 8px 30px rgba(16,24,40,.14); color: #111827; font-size: 10.5pt; line-height: 1.45; }
.doc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding-bottom: 5mm; border-bottom: 2px solid var(--accent); }
.doc__brand { margin: 0; font-size: 17pt; font-weight: 600; color: var(--accent); }
.doc__site, .doc__ref p { margin: 0; font-size: 9pt; color: #5B6573; }
.doc__ref { text-align: right; }
.doc__ref .doc__kind { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.doc__ref .doc__number { font-size: 14pt; font-weight: 600; color: #111827; font-variant-numeric: tabular-nums; }
.doc__title { margin: 7mm 0 1mm; font-size: 15pt; text-align: center; }
.doc__lead { margin: 0 0 4mm; text-align: center; font-size: 9.5pt; color: #5B6573; }
.doc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin-top: 5mm; }
.doc__box { padding: 3mm 4mm; border: 1px solid #D5DBE3; border-radius: 2mm; }
.doc__box p { margin: 0; }
.doc h2 { margin: 0 0 2mm; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.doc__section { margin-top: 5mm; }
.doc__table { width: 100%; border-collapse: collapse; }
.doc__table th, .doc__table td { padding: 1.6mm 2mm; border-bottom: 1px solid #E3E7EC; text-align: left; vertical-align: top; }
.doc__table th { width: 22%; font-weight: 500; color: #5B6573; white-space: nowrap; }
.doc__table--months th { width: auto; }
.doc__table--months td:not(:first-child), .doc__table--months th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.doc__figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(30mm, 1fr)); gap: 3mm; margin-bottom: 3mm; }
.doc__figures div { padding: 2.5mm 3mm; border: 1px solid #D5DBE3; border-radius: 2mm; }
.doc__figures span { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .05em; color: #5B6573; }
.doc__figures strong { font-size: 13pt; font-variant-numeric: tabular-nums; }
.doc__figures .doc__figure--price { background: var(--accent); border-color: var(--accent); color: #fff; }
.doc__figures .doc__figure--price span { color: rgba(255,255,255,.85); }
.doc__muted { color: #5B6573; font-size: 8.5pt; }
.doc__clauses ol { margin: 0; padding-left: 5mm; font-size: 9pt; }
.doc__clauses li { margin-bottom: 1mm; }
.doc__signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin-top: 8mm; break-inside: avoid; }
.doc__signatures p { margin: 0; }
.doc__sign-title { font-weight: 600; }
.doc__sign-line { font-size: 9pt; color: #5B6573; }
.doc__sign-box { margin-top: 2mm !important; height: 26mm; padding: 2mm; border: 1px dashed #9AA4B2; border-radius: 2mm; font-size: 8pt; color: #7B8594; }
.doc__foot { margin-top: 5mm; font-size: 8.5pt; color: #5B6573; text-align: center; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  [data-no-print] { display: none !important; }
  .auth:has(.doc) { background: #fff; }
  .doc__page { width: auto; max-width: none; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .doc__figures .doc__figure--price, .doc__head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Dossier client : plages horaires d'un jour, planning d'un jour de l'équipe ---------- */
.wz-bands { grid-column: 1 / -1; padding: 6px 0 4px; }
.wz-bands__title { margin: 0 0 6px; font-size: .75rem; color: var(--text-muted); }
.wz-bands__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.band { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 9px; border: 1px solid var(--band-line, var(--border)); border-left-width: 4px; border-radius: 8px; background: var(--band-bg, var(--surface)); color: var(--band-text, var(--text)); font: inherit; text-align: left; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.band:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(16,24,40,.1); }
.band:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.band__time { font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.band__state { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.band--free { --band-bg: #E3F5EC; --band-line: #12805C; --band-text: #0B5B41; }
.band--partial { --band-bg: #FDF0DD; --band-line: #B54708; --band-text: #8A3606; }
.band--full { --band-bg: #F3F4F6; --band-line: #9AA4B2; --band-text: #6B7480; cursor: not-allowed; }
.band--full .band__time { text-decoration: line-through; }
.band.is-selected { box-shadow: 0 0 0 2px var(--accent); }
.band.is-selected::after { content: "✓"; position: absolute; }
.band { position: relative; }
.band.is-selected::after { top: 4px; right: 7px; font-size: .8rem; font-weight: 700; color: var(--accent); }
.wz-bands__warn { margin: 6px 0 0; font-size: .75rem; font-weight: 500; color: #8A3606; }

.wz-summary__tip { margin: 0 0 var(--space-2); }
.wz-week li { display: block; }
.wz-week__open { display: grid; grid-template-columns: 34px minmax(0, 1fr) 48px 14px; gap: var(--space-2); align-items: center; width: 100%; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.wz-week__open:hover { background: var(--accent-soft); }
.wz-week__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wz-week__open [data-lucide] { width: 14px; height: 14px; color: var(--text-muted); }

.dayplan { text-align: left; font-size: .875rem; }
.dayplan__head { padding: var(--space-4) 48px var(--space-3) var(--space-4); background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.dayplan__head h2 { margin: 0; font-size: 1.0625rem; }
.dayplan__head p { margin: 2px 0 var(--space-2); font-size: .8125rem; color: var(--text-muted); }
.dayplan__body { padding: var(--space-3) var(--space-4) var(--space-4); max-height: 60vh; overflow-y: auto; }
.dayplan h3 { margin: var(--space-3) 0 var(--space-2); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.dayplan h3:first-child { margin-top: 0; }
.dayplan .wz-bands__list { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.dayplan .band { cursor: default; }
.dayplan .band:hover { transform: none; box-shadow: none; }
.dayplan__list { list-style: none; margin: 0; padding: 0; }
.dayplan__list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--space-3); align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); }
.dayplan__list li:last-child { border-bottom: 0; }
.dayplan__time { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dayplan__who small { display: block; color: var(--text-muted); }
.dayplan__list li.is-new { background: var(--accent-soft); margin: 0 calc(-1 * var(--space-2)); padding-left: var(--space-2); padding-right: var(--space-2); border-radius: 6px; border-bottom-color: transparent; }
.dayplan__empty { margin: 0; color: var(--text-muted); }
.dayplan__dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.dayplan__dates div { padding: 6px 10px; border-radius: 8px; background: var(--surface-alt); }
.dayplan__dates strong { display: block; font-variant-numeric: tabular-nums; }
.dayplan__dates span { font-size: .75rem; color: var(--text-muted); }

/* ---------- Plages horaires : barre segmentée compacte (remplace les grandes pastilles) ---------- */
.wz-slot { padding: 3px 8px; }
.wz-bands { padding: 2px 0 5px; }
.wz-bands__list, .dayplan .wz-bands__list { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); max-width: 100%; }
.band { position: relative; flex-direction: row; align-items: center; justify-content: center; gap: 5px; min-width: 66px; height: 30px; padding: 0 10px 3px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); box-shadow: inset 0 -3px 0 var(--band-line); transition: background .12s; }
.band:last-child { border-right: 0; }
.band:hover:not(:disabled) { transform: none; box-shadow: inset 0 -3px 0 var(--band-line); background: var(--band-bg); }
.band__time { font-size: .78rem; font-weight: 600; }
.band__count { font-size: .68rem; font-weight: 600; color: var(--band-text); font-variant-numeric: tabular-nums; }
.band--free { --band-line: #12805C; }
.band--partial { --band-line: #D9730D; }
.band--full { --band-line: #C4CAD3; background: #F6F7F9; color: #98A2B3; }
.band--full .band__time { text-decoration: line-through; }
.band.is-selected, .band.is-selected:hover:not(:disabled) { background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.band.is-selected .band__count { color: rgba(255,255,255,.85); }
.band.is-selected::after { content: none; }
.dayplan .band:hover { background: var(--surface); }
.wz-bands__warn { margin: 4px 0 0; }
.wz-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-3); margin: 0 0 var(--space-2); font-size: .75rem; color: var(--text-muted); }
.wz-legend__key { display: inline-flex; align-items: center; gap: 5px; }
.wz-legend__key::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--key); }
.wz-legend__key--free { --key: #12805C; } .wz-legend__key--partial { --key: #D9730D; } .wz-legend__key--full { --key: #C4CAD3; }
@media (max-width: 700px) { .band { min-width: 56px; padding: 0 6px 3px; } }
/* Heure choisie dans une plage déjà pleine : le segment passe au rouge pour signaler le conflit */
.band--full.is-selected, .band--full.is-selected:hover:not(:disabled) { background: var(--st-danger); box-shadow: inset 0 -3px 0 var(--st-danger); color: #fff; }
.band--full.is-selected .band__time { text-decoration: none; }

/* ---------- Facturation : à facturer, balance âgée ---------- */
.tile__body { flex: 1; min-width: 0; }
.tile .meter { margin: 6px 0 4px; }
.bill-cta { display: inline-flex; align-items: center; gap: var(--space-3); margin: 0; padding: 6px 6px 6px var(--space-3); border-radius: var(--radius); background: var(--accent-soft); font-size: .875rem; }
.bill-cta strong { font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.bill-cta--done { padding: 8px var(--space-3); background: #E3F5EC; color: #0B5B41; font-weight: 500; gap: var(--space-2); }
.bill-cta--done [data-lucide] { width: 17px; height: 17px; }
.bill-panels { margin-bottom: var(--space-4); align-items: stretch; }
.bill-panels .card { margin-bottom: 0; }
.aging .card__title h2 { display: flex; align-items: center; gap: var(--space-2); }
.aging .card__title h2 [data-lucide] { width: 18px; height: 18px; color: var(--accent); }
.aging__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-alt); gap: 2px; }
.aging__seg { display: block; height: 100%; min-width: 4px; }
.aging__seg--current { background: #8A96A6; } .aging__seg--d15 { background: #E0A100; } .aging__seg--d30 { background: #D9730D; } .aging__seg--older { background: var(--st-danger); }
.aging__legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-3) 0 0; }
.aging__legend dt { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--text-muted); }
.aging__legend dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.aging__legend dd small { display: block; font-weight: 400; font-size: .75rem; color: var(--text-muted); }
.aging__legend .is-empty dd { color: var(--text-muted); font-weight: 500; }
.aging__dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
@media (max-width: 900px) { .aging__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bill-panels { grid-template-columns: 1fr; gap: var(--space-4); } }

/* ---------- Dossier client : utilisation de la formule selon les jours cochés ---------- */
.usage { margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-left: 4px solid var(--usage, #8A96A6); border-radius: var(--radius); background: var(--surface); }
.usage__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: 6px; }
.usage__label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.usage__value { font-size: 1.0625rem; font-variant-numeric: tabular-nums; color: var(--usage, var(--text)); white-space: nowrap; }
.usage__track { position: relative; display: flex; height: 10px; border-radius: 999px; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.usage__bar { display: block; height: 100%; width: 0; background: var(--usage, #8A96A6); border-radius: inherit; transition: width .25s ease; }
.usage__extra { position: absolute; top: 0; right: 0; bottom: 0; width: 18%; background: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 4px, transparent 4px 8px); }
.usage__extra[hidden] { display: none; }
.usage__steps { display: flex; margin-top: 3px; }
.usage__steps span { flex: 1; text-align: right; font-size: .68rem; font-variant-numeric: tabular-nums; color: var(--text-muted); border-right: 1px solid var(--border); padding-right: 3px; }
.usage__steps span.is-on { color: var(--usage); font-weight: 600; }
.usage__text { margin: 6px 0 0; font-size: .8125rem; color: var(--text); }
.usage--none { --usage: #8A96A6; }
.usage--under { --usage: #B54708; background: #FFFBF6; }
.usage--ok { --usage: #12805C; }
.usage--over { --usage: #1F6FC2; }

/* ---------- Formule : illustration au maximum, jours verrouillés ---------- */
.usage { display: flex; align-items: center; gap: var(--space-4); }
.usage__main { flex: 1; min-width: 0; }
.usage__art { width: 104px; height: 84px; flex-shrink: 0; }
.usage__art[hidden] { display: none; }
.usage--ok { background: linear-gradient(90deg, #EAF7F0 0%, var(--surface) 70%); }
.usage--ok .usage__ring { animation: usage-ring .7s ease-out both; }
.usage--ok .usage__sparks { animation: usage-spark 1.8s ease-in-out infinite; transform-origin: 60px 48px; }
@keyframes usage-ring { from { stroke-dashoffset: 251.3; } to { stroke-dashoffset: 0; } }
@keyframes usage-spark { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.usage--over { --usage: var(--st-danger); background: #FEF3F2; }
.wz-slot.is-locked { opacity: .5; cursor: not-allowed; }
.wz-slot.is-locked .check { cursor: not-allowed; }
.wz-slot.is-locked .wz-avail { visibility: hidden; }
.wz-slot.is-extra { box-shadow: inset 0 0 0 2px var(--st-danger) !important; background: #FEF3F2 !important; }
@media (prefers-reduced-motion: reduce) { .usage--ok .usage__ring, .usage--ok .usage__sparks { animation: none; } }
@media (max-width: 520px) { .usage__art { width: 72px; height: 58px; } }
/* Jauge de la formule : le titre reste sur une ligne, la valeur passe dessous si la place manque */
.usage__head { flex-wrap: wrap; gap: 2px var(--space-3); }
.usage__label { white-space: nowrap; }

/* ---------- Équipes : une carte par équipe ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); align-items: start; }
.team-card { margin-bottom: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.team-card.is-inactive { opacity: .65; }
.team-card__head { display: flex; align-items: center; gap: var(--space-3); }
.team-card__badge { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.team-card__badge [data-lucide] { width: 20px; height: 20px; }
.team-card__title { flex: 1; min-width: 0; }
.team-card__title h2 { margin: 0; font-size: 1.0625rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card__title p { margin: 0; font-size: .8125rem; color: var(--text-muted); }
.team-card__load-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .8125rem; color: var(--text-muted); }
.team-card__load-head strong { font-size: 1.0625rem; color: var(--text); font-variant-numeric: tabular-nums; }
.team-card__load .meter { margin: 4px 0 0; }
.team-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding-top: var(--space-2); }
.team-week__day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; color: var(--text-muted); }
.team-week__bar { display: flex; align-items: flex-end; width: 100%; height: 38px; border-radius: 5px; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.team-week__bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.team-week__num { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.team-week__day.is-empty .team-week__bar i { background: transparent; }
.team-week__day.is-empty .team-week__num { color: var(--text-muted); font-weight: 400; }
.team-week__day.is-over .team-week__bar i { background: var(--st-danger); }
.team-week__day.is-over .team-week__num { color: var(--st-danger); }
.team-week__day.is-today .team-week__name { color: var(--accent); font-weight: 700; }
.team-week__day.is-today .team-week__bar { box-shadow: inset 0 0 0 2px var(--accent); }
.team-card__caption { margin: calc(-1 * var(--space-2)) 0 0; font-size: .7rem; color: var(--text-muted); }
.team-card__members { list-style: none; margin: 0; padding: var(--space-2) 0 0; border-top: 1px solid var(--border); display: grid; gap: 6px; }
.team-card__members li { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); font-size: .875rem; }
.team-card__members li.is-away a { color: var(--text-muted); text-decoration: line-through; }
.team-card__job { font-size: .75rem; color: var(--text-muted); margin-right: auto; }
.team-card__empty { margin: 0; padding-top: var(--space-2); border-top: 1px solid var(--border); font-size: .875rem; color: var(--text-muted); }
.team-card__actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: auto; }
/* Carte d'équipe : neutralise un ancien style du même nom (bandeau coloré en tête) */
.team-grid .team-card { border-top: 1px solid var(--border); overflow: visible; }

/* ---------- Listes : « Plus de filtres », aperçu PDF ---------- */
.filters__toggle { align-self: flex-end; height: 32px; gap: 6px; }
.filters__toggle.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.filters__toggle-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 600; }
.filters__toggle-count[hidden] { display: none; }
.filters__more { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); padding-top: var(--space-2); margin-top: var(--space-1); border-top: 1px dashed var(--border); }
.filters__more[hidden] { display: none; }
.pdf-modal { padding: var(--space-3) var(--space-4) var(--space-4); }
.pdf-modal .swal2-title { font-size: 1.0625rem; padding: var(--space-2) 0 var(--space-3); text-align: left; }
.pdf-modal .pdf-modal__body { margin: 0; padding: 0; }
.pdf-preview { display: block; width: 100%; height: min(70vh, 720px); border: 1px solid var(--border); border-radius: var(--radius); background: #525659; }

/* ---------- Fiche client : en-tête d'identité, chiffres clés, listes compactes ---------- */
.profile { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-3); padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.profile__avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; background: var(--accent); color: #fff; font-size: 1.25rem; font-weight: 600; letter-spacing: .02em; }
.profile__avatar--company { border-radius: 14px; }
.profile__main { flex: 1; min-width: 0; }
.profile__name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.profile__name h1 { margin: 0; font-size: 1.375rem; line-height: 1.2; overflow-wrap: anywhere; }
.profile__meta { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px var(--space-4); font-size: .8125rem; color: var(--text-muted); }
.profile__meta li { display: inline-flex; align-items: center; gap: 6px; }
.profile__meta [data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }
.profile__meta a { color: var(--text); font-weight: 500; }
.profile__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); flex-shrink: 0; max-width: 46%; }
.profile__actions form { margin: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; margin-bottom: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.fact { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-right: 1px solid var(--border); color: var(--text); min-width: 0; }
.fact:last-child { border-right: 0; }
a.fact:hover { background: var(--accent-soft); text-decoration: none; }
.fact__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; background: var(--surface-alt); color: var(--text-muted); }
.fact__icon [data-lucide] { width: 17px; height: 17px; }
.fact__body { display: flex; flex-direction: column; min-width: 0; }
.fact__label { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact__value { font-size: 1.1875rem; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fact__hint { font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact--success .fact__icon { background: #E3F5EC; color: #0B5B41; }
.fact--warning .fact__icon { background: #FDF0DD; color: #8A3606; }
.fact--danger .fact__icon { background: #FCE8E6; color: #8C1B12; }
.fact--danger .fact__value { color: var(--st-danger); }

.profile-grid { gap: var(--space-3); }
.card--tight { padding: var(--space-4); margin-bottom: var(--space-3); }
.card--tight .card__title { margin-bottom: var(--space-2); }
.card--tight .card__title h2 { font-size: 1rem; }
.card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-2); font-size: .8125rem; font-weight: 500; }
.card__more [data-lucide] { width: 14px; height: 14px; }

.vlist, .vnext, .alist, .ilist { list-style: none; margin: 0; padding: 0; }
.vlist__item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto; gap: var(--space-3); align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.vlist__item:first-child { border-top: 0; }
.vlist__item.is-inactive { opacity: .6; }
.vlist__main { display: flex; align-items: center; gap: var(--space-3); color: inherit; min-width: 0; }
.vlist__main:hover { text-decoration: none; }
.vlist__main:hover strong { color: var(--accent); }
.vlist__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.vlist__icon [data-lucide] { width: 18px; height: 18px; }
.vlist__id { display: flex; flex-direction: column; min-width: 0; }
.vlist__id strong { font-size: .9375rem; letter-spacing: .01em; }
.vlist__id span { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vlist__id [data-lucide] { width: 12px; height: 12px; flex-shrink: 0; }
.vlist__contract { min-width: 0; font-size: .8125rem; }
.vlist__line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px var(--space-2); }
.vlist__line strong { font-variant-numeric: tabular-nums; }
.vlist__line--muted { color: var(--text-muted); font-size: .78rem; }
.vlist__line--muted strong { color: var(--text); }
.vlist__signed { display: inline-flex; color: var(--st-success); }
.vlist__signed [data-lucide] { width: 15px; height: 15px; }
.vlist__next { display: flex; align-items: center; gap: var(--space-2); text-align: right; font-size: .78rem; }
.vlist__next-label { display: block; color: var(--text-muted); }
.vlist__next strong { font-variant-numeric: tabular-nums; }

.vnext { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-2); }
.vnext li { display: flex; align-items: center; gap: var(--space-3); padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); }
.vnext li.is-today { border-color: var(--accent); background: var(--accent-soft); }
.vnext__date { display: flex; flex-direction: column; align-items: center; width: 40px; flex-shrink: 0; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); line-height: 1.1; }
.vnext__date strong { font-size: 1.125rem; color: var(--text); font-variant-numeric: tabular-nums; }
.vnext__body { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .8125rem; }
.vnext__body span { font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.alist li { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: 8px 0; border-top: 1px solid var(--border); font-size: .875rem; }
.alist li:first-child { border-top: 0; }
.alist__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-alt); color: var(--text-muted); flex-shrink: 0; }
.alist__icon [data-lucide] { width: 14px; height: 14px; }
.alist__body { flex: 1; min-width: 160px; }
.alist__notes { display: block; font-size: .78rem; color: var(--text-muted); }

.ilist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px var(--space-2); align-items: center; padding: 7px 0; border-top: 1px solid var(--border); font-size: .8125rem; }
.ilist li:first-child { border-top: 0; }
.ilist__due { grid-column: 1; grid-row: 2; font-size: .75rem; color: var(--text-muted); }
.ilist__amount { grid-row: 1 / span 2; grid-column: 2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ilist .badge { grid-row: 1 / span 2; grid-column: 3; }
.timeline--compact li { padding-top: 4px; padding-bottom: 4px; }

@media (max-width: 1000px) {
  .profile { flex-wrap: wrap; }
  .profile__actions { max-width: none; flex-basis: 100%; justify-content: flex-start; }
  .vlist__item { grid-template-columns: 1fr; gap: var(--space-2); }
  .vlist__next { justify-content: space-between; text-align: left; }
}
@media (max-width: 700px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { border-bottom: 1px solid var(--border); }
  .fact:nth-child(2n) { border-right: 0; }
}
/* Chiffres clés de la fiche client : la précision peut passer sur deux lignes plutôt que d'être coupée */
.fact__hint { white-space: normal; line-height: 1.25; }

/* ---------- Fiche client : éléments qui ouvrent leur résumé dans une fenêtre ---------- */
button.vlist__main { border: 0; background: transparent; padding: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; }
button.vlist__main:focus-visible, .ilist__open:focus-visible, .vnext li:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.vnext li[data-modal] { cursor: pointer; transition: border-color .12s, background .12s; }
.vnext li[data-modal]:hover { border-color: var(--accent); background: var(--accent-soft); }
.vnext__more { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.ilist__open { border: 0; background: transparent; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
.ilist__open:hover strong { text-decoration: underline; }

/* ---------- Résumé d'une ligne de liste, planning d'un client (fenêtres) ---------- */
.vcard--row .vcard__facts > div { grid-template-columns: 150px minmax(0, 1fr); padding: 8px 0; }
.vcard--row .vcard__facts dd { font-weight: 500; overflow-wrap: anywhere; }
.vcard--row .vcard__facts .cell-id__avatar { display: none; }
.vcard--row .vcard__facts .cell-id__sub { display: none; }
.vcard__head .badge { flex-shrink: 0; }
.cplan { padding: var(--space-2) var(--space-4) var(--space-3); max-height: 56vh; overflow-y: auto; text-align: left; font-size: .875rem; }
.cplan h3 { display: flex; align-items: center; justify-content: space-between; margin: var(--space-3) 0 var(--space-1); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.cplan h3:first-child { margin-top: var(--space-1); }
.cplan h3 span { padding: 0 7px; border-radius: 999px; background: var(--surface-alt); font-weight: 600; color: var(--text); }
.cplan__list { list-style: none; margin: 0; padding: 0; }
.cplan__list li { display: grid; grid-template-columns: 62px 48px minmax(0, 1fr) auto; gap: var(--space-2); align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border); }
.cplan__list li.is-today { background: var(--accent-soft); margin: 0 calc(-1 * var(--space-2)); padding-left: var(--space-2); padding-right: var(--space-2); border-radius: 6px; }
.cplan__day { color: var(--text-muted); font-size: .8125rem; white-space: nowrap; }
.cplan__day strong { color: var(--text); font-variant-numeric: tabular-nums; }
.cplan__time { font-weight: 600; font-variant-numeric: tabular-nums; }
.cplan__what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cplan__team { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

/* ---------- Fiche véhicule ---------- */
.profile__avatar [data-lucide] { width: 26px; height: 26px; }
.mini-dl { margin: 0; }
.mini-dl > div { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: var(--space-2); padding: 7px 0; border-top: 1px solid var(--border); font-size: .8125rem; }
.mini-dl > div:first-child { border-top: 0; }
.mini-dl dt { color: var(--text-muted); }
.mini-dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.vnext--stack { grid-template-columns: 1fr; }
.hlist { list-style: none; margin: 0; padding: 0; }
.hlist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: 6px 6px; margin: 0 -6px; border-top: 1px solid var(--border); border-radius: 6px; font-size: .8125rem; cursor: pointer; }
.hlist li:first-child { border-top: 0; }
.hlist li:hover { background: var(--accent-soft); }
.hlist li:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hlist__date { font-weight: 600; font-variant-numeric: tabular-nums; }
.hlist__what { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contract.card--tight .dl { font-size: .875rem; }
.contract.card--tight .inline-actions { margin-top: var(--space-3); }
/* Chiffres clés : une valeur longue (référence de contrat, date) reste dans sa case */
.fact__value { font-size: 1.0625rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fact { padding: var(--space-3); gap: var(--space-2); }

/* ---------- Aperçu d'un document du site dans une fenêtre ---------- */
.doc-preview { background: #E9EDF2; height: min(72vh, 780px); }
.pdf-modal .pdf-modal__tab { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }
.doc--embed .doc__page { margin: var(--space-4) auto; box-shadow: 0 2px 10px rgba(16,24,40,.12); }

/* ---------- Aperçu d'un document : Fermer, Télécharger, Imprimer ---------- */
.doc-actions { gap: var(--space-2); margin-top: var(--space-3); }
.doc-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 var(--space-4); font-weight: 600; border-radius: var(--radius); border: 1px solid transparent; }
.doc-btn [data-lucide] { width: 17px; height: 17px; }
.doc-btn--close { background: var(--surface); border-color: var(--border); color: var(--text); }
.doc-btn--close:hover { background: var(--surface-alt); }
.doc-btn--download { background: #12805C; border-color: #12805C; color: #fff; }
.doc-btn--download:hover:not(:disabled) { background: #0B5B41; }
.doc-btn--download:disabled { opacity: .6; cursor: progress; }
.doc-btn--print { background: var(--accent); border-color: var(--accent); color: #fff; }
.doc-btn--print:hover { background: var(--accent-hover); }
.doc-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Contrat payé d'avance : couverture, encaissement, périodes payées ---------- */
.cover { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-2) 0 var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius); border: 1px solid var(--cover-line); border-left-width: 4px; background: var(--cover-bg); }
.cover__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; background: rgba(255,255,255,.7); color: var(--cover-text); }
.cover__icon [data-lucide] { width: 19px; height: 19px; }
.cover__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cover__body strong { font-size: 1rem; color: var(--cover-text); }
.cover__body span { font-size: .8125rem; color: var(--text-muted); }
.cover--success { --cover-bg: #EAF7F0; --cover-line: #12805C; --cover-text: #0B5B41; }
.cover--warning { --cover-bg: #FDF0DD; --cover-line: #B54708; --cover-text: #8A3606; }
.cover--danger { --cover-bg: #FEF3F2; --cover-line: #B42318; --cover-text: #8C1B12; }
.pay > summary { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; }
.pay > summary [data-lucide] { width: 17px; height: 17px; }
.pay__form .form-grid--3 .span-2 { grid-column: span 2; }
.pay__quote { margin: var(--space-3) 0; }
.pay__quote .quote__main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pay__quote .quote__value { font-size: 1.25rem; }
.cover-list { list-style: none; margin: 0 0 var(--space-2); padding: 0; font-size: .8125rem; }
.cover-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); padding: 6px 0; border-top: 1px solid var(--border); align-items: baseline; }
.cover-list li:first-child { border-top: 0; }
.cover-list__dates { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cover-list__what { color: var(--text-muted); }
.cover-gap { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); padding: 6px var(--space-3); border-radius: var(--radius); background: #FDF0DD; color: #8A3606; font-size: .8125rem; }
.cover-gap [data-lucide] { width: 15px; height: 15px; flex-shrink: 0; }
@media (max-width: 700px) { .pay__form .form-grid--3 .span-2 { grid-column: 1 / -1; } .pay__quote .quote__main { grid-template-columns: 1fr; } }

/* ---------- Recouvrement ---------- */
.collect .card__title h2 { display: flex; align-items: center; gap: var(--space-2); }
.collect .card__title h2 [data-lucide] { width: 18px; height: 18px; color: var(--accent); }
.collect__list { list-style: none; margin: 0; padding: 0; }
.collect__item { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: var(--space-2) var(--space-4); align-items: center; padding: var(--space-3) 0; border-top: 1px solid var(--border); font-size: .875rem; }
.collect__item:first-child { border-top: 0; }
.collect__who, .collect__what, .collect__when { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.collect__who span, .collect__what > span:last-child, .collect__when span:not(.badge) { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--text-muted); }
.collect__who [data-lucide] { width: 13px; height: 13px; }
.collect__when .badge { align-self: flex-start; }
.collect__msg { grid-column: 1 / -1; }
.collect__msg > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .8125rem; font-weight: 500; color: var(--accent); }
.collect__msg > summary [data-lucide] { width: 15px; height: 15px; }
.collect__msg[data-sent] > summary { color: var(--st-success); }
.collect__msg .msgs { margin-top: var(--space-2); }
@media (max-width: 900px) { .collect__item { grid-template-columns: 1fr 1fr; } .collect__actions { justify-self: end; } }
@media (max-width: 560px) { .collect__item { grid-template-columns: 1fr; } .collect__actions { justify-self: start; } }

/* Liste des contrats : cinq tuiles */
.tiles:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .tiles:has(> :nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .tiles:has(> :nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wz-pay { margin: var(--space-3) 0; display: grid; gap: var(--space-2); }
.wz-pay[hidden] { display: none; }
.wz-total--pay { margin-top: 0; background: #12805C; }
.wz-pay__later { margin: var(--space-2) 0; }
.confirm-sum__paid { color: #0B5B41 !important; font-weight: 600; }
.confirm-sum__pay { display: flex; justify-content: space-between; align-items: baseline; margin: var(--space-3) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: #12805C; color: #fff; }
.confirm-sum__pay strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
/* Bande de chiffres : les cases passent sur deux lignes plutôt que de couper leurs libellés */
.facts { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.fact { border-bottom: 1px solid var(--border); margin-bottom: -1px; }

/* ------------------------------------------------------------------ Simulateur de contrat */
.sim-hero { display: flex; align-items: center; gap: var(--space-3); margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(135deg, #050E33 0%, var(--accent) 100%); color: #fff; }
.sim-art { width: 132px; height: 66px; flex: none; }
.sim-hero__text { display: grid; gap: 2px; min-width: 0; }
.sim-hero__text span { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.sim-hero__text strong { font-size: 1.0625rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-note { margin: 4px 0 0; font-size: .75rem; color: var(--text-muted, #64748B); }
.sim .wz-total--pay { margin-top: var(--space-3); }
.sim-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.sim-cal__head { font-size: .625rem; font-weight: 700; text-align: center; text-transform: uppercase; color: var(--text-muted, #64748B); }
.sim-cal__day { display: grid; place-items: center; height: 24px; border-radius: 6px; font-size: .6875rem; font-variant-numeric: tabular-nums; background: #F1F5F9; color: #475569; }
.sim-cal__day.is-out { background: transparent; }
.sim-cal__day.is-visit { background: var(--accent); color: #fff; font-weight: 700; }
.sim-cal__day.is-extra { box-shadow: inset 0 0 0 1px var(--accent); background: #fff; }
.sim-bars { display: flex; align-items: flex-end; gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.sim-bar { flex: 1 0 18px; display: grid; justify-items: center; gap: 2px; min-width: 18px; }
.sim-bar__num { font-size: .625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sim-bar__col { display: flex; align-items: flex-end; width: 100%; height: 52px; border-radius: 4px; background: #F1F5F9; overflow: hidden; }
.sim-bar__col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--accent); }
.sim-bar.is-short .sim-bar__col i { background: #D9822B; }
.sim-bar.is-partial .sim-bar__col i { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 4px, transparent 4px 8px); }
.sim-bar__name { font-size: .5625rem; color: var(--text-muted, #64748B); }
.sim-convert { margin-top: var(--space-2); }
.sim-saved { margin-top: var(--space-4); }
.sim-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sim-list__item { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border, #E2E8F0); }
.sim-list__item:first-child { border-top: 0; }
.sim-list__item.is-current { background: #F1F6FB; box-shadow: inset 3px 0 0 var(--accent); }
.sim-list__item.is-done { opacity: .75; }
.sim-list__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #EAF1F8; color: var(--accent); }
.sim-list__icon [data-lucide] { width: 16px; height: 16px; }
.sim-list__who, .sim-list__offer, .sim-list__figures { display: grid; gap: 1px; min-width: 0; font-size: .8125rem; }
.sim-list__who span, .sim-list__offer span, .sim-list__figures span { font-size: .75rem; color: var(--text-muted, #64748B); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-list__figures { text-align: right; font-variant-numeric: tabular-nums; }
.sim-list__actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-1); flex-wrap: wrap; }
.sim-list__actions form { margin: 0; }
@media (max-width: 900px) {
  .sim-list__item { grid-template-columns: auto minmax(0, 1fr); }
  .sim-list__offer, .sim-list__figures, .sim-list__actions { grid-column: 2; text-align: left; justify-content: flex-start; }
}.sim-bars { margin-bottom: var(--space-4); }

/* ------------------------------------------------------------------ Liste intelligente (select[data-smart]) */
.smart { position: relative; }
.smart__input { width: 100%; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; text-overflow: ellipsis; }
.smart.has-value .smart__input { font-weight: 600; }
.smart.is-invalid .smart__input { border-color: #C0392B; }
.smart__hint { display: block; min-height: 1rem; margin-top: 3px; font-size: .75rem; color: var(--text-muted, #64748B); }
.smart__native { position: absolute; left: 0; bottom: 1rem; width: 100%; height: 1px; opacity: 0; pointer-events: none; }
.smart__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 1rem); margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow-y: auto; border: 1px solid var(--border-strong, #CBD5E1); border-radius: var(--radius); background: #fff; box-shadow: 0 12px 28px rgba(15, 34, 51, .16); }
.smart__option { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .875rem; }
.smart__option strong { font-weight: 600; }
.smart__option span { font-size: .75rem; color: var(--text-muted, #64748B); white-space: nowrap; font-variant-numeric: tabular-nums; }
.smart__option.is-active { background: #EAF1F8; }
.smart__option.is-selected strong { color: var(--accent); }
.smart__option.is-selected::after { content: "✓"; color: var(--accent); font-weight: 700; }
.smart__none { padding: 8px 10px; font-size: .8125rem; color: var(--text-muted, #64748B); }
.sim-zone { margin-bottom: var(--space-3); }
.sim-zone .smart__hint { min-height: 0; }

/* Reprise d'une simulation en tête du nouveau dossier client */
.sim-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); border-left: 3px solid var(--accent); }
.sim-pick__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #EAF1F8; color: var(--accent); }
.sim-pick__icon [data-lucide] { width: 18px; height: 18px; }
.sim-pick__text label { font-weight: 700; }
.sim-pick__text p { margin: 2px 0 0; }
.sim-pick .smart__list { top: calc(100% - 1.15rem); }
@media (max-width: 800px) { .sim-pick { grid-template-columns: auto minmax(0, 1fr); } .sim-pick__field { grid-column: 1 / -1; } }
/* ------------------------------------------------------------------ Simulation en lot : tableau des lignes d'offre */
.sim-lines-wrap { margin-bottom: var(--space-2); border: 1px solid var(--border, #E2E8F0); border-radius: var(--radius); }
.sim-lines { width: 100%; border-collapse: collapse; font-size: .875rem; }
.sim-lines th { padding: 7px 10px; text-align: left; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #64748B); background: #F8FAFC; border-bottom: 1px solid var(--border, #E2E8F0); white-space: nowrap; }
.sim-lines th:first-child { border-top-left-radius: var(--radius); }
.sim-lines th:last-child { border-top-right-radius: var(--radius); }
.sim-lines td { padding: 6px 10px; vertical-align: top; border-bottom: 1px solid var(--border, #E2E8F0); }
.sim-lines tbody td:nth-child(1) { width: 26%; min-width: 170px; }
.sim-lines tbody td:nth-child(2) { width: 30%; min-width: 190px; }
.sim-lines tfoot td { border-bottom: 0; background: #F8FAFC; vertical-align: middle; }
.sim-lines tfoot td:first-child { border-bottom-left-radius: var(--radius); }
.sim-lines tfoot td:last-child { border-bottom-right-radius: var(--radius); }
.sim-lines .sim-lines__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sim-lines tbody .sim-lines__num { padding-top: 14px; }
.sim-lines .sim-lines__total { font-weight: 700; color: var(--accent); }
.sim-lines__qty { width: 76px; margin-left: auto; text-align: right; }
.sim-lines__act { width: 36px; text-align: center; }
.sim-lines tbody .sim-lines__act { padding-top: 10px; }
.sim-lines .smart__hint { min-height: 0; }
.sim-lines .smart__list { top: 100%; }
.sim-lines tr.is-short [data-line-visits] { color: #B4530A; font-weight: 700; }
.sim-terms { margin-top: var(--space-3); }
.doc__table--lines td:nth-child(n+3), .doc__table--lines th:nth-child(n+3) { text-align: right; }
.doc__table--lines tfoot th { border-top: 1.5px solid #9AA4B2; font-weight: 700; }
@media (max-width: 760px) { .sim-lines-wrap { overflow-x: auto; } .sim-lines { min-width: 640px; } }.sim-lines { table-layout: fixed; }
.sim-lines th:nth-child(1), .sim-lines th:nth-child(2) { width: 25%; }
.sim-lines tbody td:nth-child(1), .sim-lines tbody td:nth-child(2) { width: auto; min-width: 0; }
.sim-lines th:nth-child(3) { width: 96px; }
.sim-lines th:last-child { width: 40px; }
.sim-lines td { overflow: visible; }
.sim-lines .smart__hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ Contrat groupé */
.ct-lines { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.ct-lines th { padding: 7px 10px; text-align: left; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #64748B); background: #F8FAFC; border-bottom: 1px solid var(--border, #E2E8F0); white-space: nowrap; }
.ct-lines td { padding: 7px 10px; vertical-align: middle; border-bottom: 1px solid var(--border, #E2E8F0); }
.ct-lines .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-lines tbody tr:hover { background: #F8FBFE; }
.ct-lines tfoot td { background: #F8FAFC; border-bottom: 0; }
.ct-lines tr.is-old { opacity: .7; }
.ct-lines .cell-id__sub { display: block; }
.ct-lines__act { text-align: right; white-space: nowrap; }
.ct-add { margin: 0; }
.ct-add .input { min-width: 260px; padding-block: 5px; font-size: .8125rem; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-4); margin-top: var(--space-4); align-items: start; }
.ct-list { list-style: none; margin: 0; padding: 0; }
.ct-list a { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border, #E2E8F0); color: inherit; }
.ct-list li:first-child a { border-top: 0; }
.ct-list a:hover { background: var(--accent-soft, #F1F6FB); text-decoration: none; }
.ct-list__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #EAF1F8; color: var(--accent); }
.ct-list__icon [data-lucide], .ct-list a > [data-lucide] { width: 16px; height: 16px; }
.ct-list__main { display: grid; gap: 1px; flex: 1; min-width: 0; font-size: .875rem; }
.ct-list__main span { font-size: .75rem; color: var(--text-muted, #64748B); }
.doc__table--lines td, .doc__table--lines th { text-align: left !important; }
.doc__table--lines .is-num { text-align: right !important; }
@media (max-width: 900px) { .ct-grid { grid-template-columns: 1fr; } }.ct-lines td, .ct-lines th { padding-inline: 8px; }
.ct-lines__act .btn { padding-inline: 8px; }

/* ------------------------------------------------------------------ Simulateur : capacité nécessaire */
.cap { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--border, #E2E8F0); border-left: 3px solid var(--border-strong, #CBD5E1); border-radius: var(--radius); background: #FBFCFD; }
.cap--ok { border-left-color: #12805C; background: #F3FAF6; }
.cap--need { border-left-color: #C0392B; background: #FDF6F5; }
.cap__head { display: flex; align-items: flex-start; gap: var(--space-3); }
.cap__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: #fff; color: var(--accent); box-shadow: inset 0 0 0 1px var(--border, #E2E8F0); }
.cap--ok .cap__icon { color: #12805C; }
.cap--need .cap__icon { color: #C0392B; }
.cap__icon [data-lucide] { width: 18px; height: 18px; }
.cap h3 { margin: 0; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted, #64748B); }
.cap__head p { margin: 2px 0 0; font-size: .9375rem; font-weight: 600; }
.cap--idle .cap__head p { font-weight: 400; color: var(--text-muted, #64748B); font-size: .875rem; }
.cap__table { width: 100%; margin-top: var(--space-3); border-collapse: collapse; font-size: .8125rem; background: #fff; border: 1px solid var(--border, #E2E8F0); border-radius: 8px; overflow: hidden; }
.cap__table th { padding: 6px 10px; text-align: left; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #64748B); background: #F8FAFC; }
.cap__table td { padding: 6px 10px; border-top: 1px solid var(--border, #E2E8F0); }
.cap__table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cap__table tr.is-over td { background: #FDF1EF; }
.cap h4 { margin: var(--space-3) 0 var(--space-1); font-size: .8125rem; }
.cap__solutions { margin: 0; padding: 0; list-style: none; counter-reset: cap; display: grid; gap: var(--space-2); }
.cap__solutions li { counter-increment: cap; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); background: #fff; border: 1px solid var(--border, #E2E8F0); border-radius: 8px; }
.cap__solutions li::before { content: counter(cap); display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; }
.cap__solutions li > div { flex: 1; min-width: 0; }
.cap__solutions strong { font-size: .875rem; }
.cap__solutions p { margin: 1px 0 0; font-size: .8125rem; color: #475569; }
.cap__note { margin: var(--space-2) 0 0; font-size: .75rem; color: var(--text-muted, #64748B); }.sim-lines th { white-space: normal; line-height: 1.25; vertical-align: bottom; }

/* ================================================================== Navigation horizontale
   Bandeau clair (marque, recherche, notifications, compte), puis barre de menus sombre qui reste en haut de l'écran.
   Liens directs pour le quotidien ; menus déroulants par métier, chaque lien avec sa description. */
.layout--top { flex-direction: column; }
.hbar { background: var(--surface); }
.hbar__top.topbar { position: static; min-height: 58px; gap: var(--space-3); padding: 0 var(--space-6); border-bottom: 0; }
.hbar__brand { display: flex; align-items: center; gap: var(--space-3); margin-right: auto; color: var(--text); }
.hbar__brand:hover { text-decoration: none; }
.hbar__logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%); color: #fff; }
.hbar__logo [data-lucide] { width: 20px; height: 20px; }
.hbar__brand strong { display: block; font-size: 1rem; line-height: 1.15; letter-spacing: .01em; }
.hbar__brand small { display: block; font-size: .6875rem; color: var(--text-muted); }
.hbar__top .topbar__search { margin-left: 0; }

.hnav { position: sticky; top: 0; z-index: 30; display: flex; align-items: stretch; gap: var(--space-3); padding: 0 var(--space-6); background: linear-gradient(90deg, var(--accent-hover) 0%, var(--accent) 100%); color: #fff; box-shadow: 0 2px 8px rgba(15, 34, 51, .18); }
.hnav__list { display: flex; align-items: stretch; gap: 2px; margin: 0; padding: 0; list-style: none; flex: 1; min-width: 0; }
.hnav__item { position: relative; display: flex; }
.hnav__link { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 0; background: transparent; color: rgba(255,255,255,.86); font: inherit; font-size: .875rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.hnav__link:hover, .hnav__group.is-open > .hnav__link { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.hnav__link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.hnav__link > [data-lucide] { width: 17px; height: 17px; }
.hnav__link .hnav__caret { width: 14px; height: 14px; opacity: .7; transition: transform .15s; }
.hnav__group.is-open .hnav__caret { transform: rotate(180deg); }
/* Page en cours : trait clair sous l'entrée (lien direct, ou groupe qui contient la page). */
.hnav__link[aria-current="page"], .hnav__link.is-active { color: #fff; font-weight: 600; background: rgba(255,255,255,.08); }
.hnav__link[aria-current="page"]::after, .hnav__link.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-yellow); }
.hnav .nav__badge { margin-left: 2px; }

.hnav__menu { display: none; position: absolute; top: 100%; left: 0; z-index: 40; min-width: 290px; margin: 0; padding: 6px; list-style: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: 0 16px 32px rgba(15, 34, 51, .18); }
.hnav__group.is-open > .hnav__menu { display: block; }
.hnav__menu a { display: flex; align-items: center; gap: var(--space-3); padding: 8px 10px; border-radius: 8px; color: var(--text); }
.hnav__menu a:hover, .hnav__menu a:focus-visible { background: var(--accent-soft); text-decoration: none; outline: none; }
.hnav__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.hnav__icon [data-lucide] { width: 17px; height: 17px; }
.hnav__label { display: grid; gap: 1px; flex: 1; min-width: 0; }
.hnav__label strong { font-size: .875rem; font-weight: 600; }
.hnav__label small { font-size: .75rem; color: var(--text-muted); }
.hnav__menu a[aria-current="page"] { background: var(--accent-soft); }
.hnav__menu a[aria-current="page"] .hnav__icon { background: var(--accent); color: #fff; }
.hnav__menu a[aria-current="page"] strong { color: var(--accent); }

.hnav__site { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .8125rem; color: rgba(255,255,255,.85); white-space: nowrap; }
.hnav__site [data-lucide] { width: 15px; height: 15px; }
.hnav__site label { display: flex; margin: 0; }
.hnav__site select { appearance: none; -webkit-appearance: none; max-width: 220px; min-height: 32px; padding: 0 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-overflow: ellipsis; }
.hnav__site select:hover { background: rgba(255,255,255,.16); }
.hnav__site option { color: var(--text); background: #fff; }

/* Éléments collants des pages : sous la barre de menus. */
.layout--top .wz__side, .layout--top .equipment-form__aside { top: calc(46px + var(--space-4)); }
.layout--top .bulk-bar, .layout--top .entry-top, .layout--top .sup-tools { top: 46px; }

@media (max-width: 1180px) {
  .hnav, .hbar__top.topbar { padding-inline: var(--space-4); }
  .hnav__link { padding: 0 10px; gap: 6px; }
  .hnav__site--single { display: none; }
}
/* Petit écran : la barre devient un panneau vertical ouvert par le bouton « Menu », groupes dépliés. */
@media (max-width: 860px) {
  .hbar__top.topbar { padding-inline: var(--space-3); }
  .hbar__brand small { display: none; }
  .hbar__top .topbar__search { min-width: 0; }
  .hbar__top .topbar__search span, .hbar__top .topbar__search kbd { display: none; }
  .hnav { position: static; display: none; flex-direction: column; gap: 0; padding: var(--space-2) var(--space-3) var(--space-3); }
  .hnav.is-open { display: flex; }
  .hnav__list { flex-direction: column; gap: 0; }
  .hnav__item { flex-direction: column; }
  .hnav__link { width: 100%; min-height: var(--touch); }
  .hnav__link[aria-current="page"]::after, .hnav__link.is-active::after { left: 0; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .hnav__group > .hnav__link { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; opacity: .7; min-height: 34px; cursor: default; pointer-events: none; }
  .hnav__group > .hnav__link .hnav__caret, .hnav__group > .hnav__link > .nav__badge { display: none; }
  .hnav__menu, .hnav__group.is-open > .hnav__menu { display: block; position: static; min-width: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
  .hnav__menu a { color: rgba(255,255,255,.9); min-height: var(--touch); }
  .hnav__menu a:hover, .hnav__menu a[aria-current="page"] { background: rgba(255,255,255,.12); }
  .hnav__menu a[aria-current="page"] strong { color: #fff; }
  .hnav__icon { background: rgba(255,255,255,.12); color: #fff; width: 30px; height: 30px; }
  .hnav__label small { display: none; }
  .hnav__site { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid rgba(255,255,255,.15); }
  .hnav__site select { max-width: none; flex: 1; min-height: var(--touch); }
  .hnav__site--single { display: flex; }
}
@media print { .hbar, .hnav { display: none !important; } }@media (max-width: 520px) {
  .hbar__brand > span:last-child { display: none; }
  .hbar__top.topbar { gap: 4px; }
  .hbar__top .topbar__search { padding: 0 10px; }
  .hbar__top .btn--ghost { padding-inline: 8px; }
}

/* Bandeau et barre de menus figés ensemble en haut de l'écran pendant le défilement. */
.hbar { position: sticky; top: 0; z-index: 31; }
.hbar__top.topbar { height: 58px; }
.hnav { top: 58px; }
.layout--top .wz__side, .layout--top .equipment-form__aside { top: calc(104px + var(--space-4)); }
.layout--top .bulk-bar, .layout--top .entry-top, .layout--top .sup-tools { top: 104px; }
@media (max-width: 860px) {
  /* Petit écran : seul le bandeau reste figé ; le panneau du menu s'ouvre dessous et défile avec la page. */
  .layout--top .wz__side, .layout--top .equipment-form__aside { top: auto; }
  .layout--top .bulk-bar, .layout--top .entry-top, .layout--top .sup-tools { top: 58px; }
}

/* Tableau d'offre compact : une ligne par offre sur une seule hauteur de champ, sans ligne d'aide sous les listes
   (les passages et le prix sont déjà dans leurs colonnes ; les précisions restent dans la liste déroulante). */
.sim-lines { font-size: .8125rem; }
.sim-lines th { padding: 5px 8px; font-size: .625rem; }
.sim-lines td { padding: 3px 8px; vertical-align: middle; }
.sim-lines tbody .sim-lines__num, .sim-lines tbody .sim-lines__act { padding-top: 3px; }
.sim-lines .smart__hint { display: none; }
.sim-lines .input { min-height: 32px; height: 32px; padding-block: 0; font-size: .8125rem; }
.sim-lines .smart__input { padding-right: 1.75rem; background-position: right .45rem center; background-size: 14px; }
.sim-lines__qty { width: 64px; }
.sim-lines .icon-btn { width: 26px; height: 26px; }
.sim-lines tfoot td { padding-block: 5px; }
.sim-lines tfoot .btn--sm { min-height: 28px; padding-block: 0; }
.sim-lines-wrap + template + select + script + .hint, .sim-lines-wrap ~ .hint.small { margin: 4px 0 0; font-size: .6875rem; }
.sim-terms { margin-top: var(--space-2); }
@media (max-width: 860px) { .sim-lines .input { min-height: 38px; height: 38px; font-size: 16px; } }

/* ------------------------------------------------------------------ Créneaux à confirmer */
.slotq { display: grid; gap: var(--space-3); }
.slotq__item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--space-4); align-items: start; padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid #F5A524; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.slotq__item.is-late { border-left-color: #C0392B; }
.slotq__who { display: grid; gap: 2px; min-width: 0; font-size: .875rem; }
.slotq__who strong { font-size: .9375rem; }
.slotq__who span { font-size: .8125rem; color: var(--text-muted); }
.slotq__who .badge { justify-self: start; margin-top: 4px; }
.slotq__label { display: block; margin-bottom: 4px; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.slotq__days { display: flex; flex-wrap: wrap; gap: 4px; }
.slotq__day { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 99px; background: #F1F5F9; font-size: .75rem; font-variant-numeric: tabular-nums; }
.slotq__day strong { font-weight: 700; }
.slotq__day.is-over { background: #FDE8E6; color: #A1281B; }
.slotq__team { margin: 8px 0 0; font-size: .8125rem; color: var(--text-muted); }
.slotq__acts { display: grid; gap: 6px; }
.slotq__act { display: flex; gap: 6px; margin: 0; }
.slotq__act .input { flex: 1; min-width: 0; min-height: 34px; height: 34px; padding-block: 0; font-size: .8125rem; }
.slotq__act .btn { min-height: 34px; white-space: nowrap; }
.slotq__links { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1000px) { .slotq__item { grid-template-columns: 1fr; gap: var(--space-3); } }
/* ------------------------------------------------------------------ Contrat groupé : actions sur la sélection */
.ct-lines__pick { width: 30px; text-align: center; }
.ct-lines__pick input { width: 16px; height: 16px; cursor: pointer; }
.ct-lines tr.is-picked td { background: #EEF5FC; }
.ct-bar { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); padding: 6px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: #FBFCFD; }
.ct-bar.is-active { border-style: solid; border-color: var(--accent); background: #F1F6FB; }
.ct-bar__count { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 700; color: var(--text-muted); }
.ct-bar.is-active .ct-bar__count { color: var(--accent); }
.ct-bar__count [data-lucide] { width: 16px; height: 16px; }
.ct-bar__hint { flex: 1; font-size: .75rem; color: var(--text-muted); }
.ct-bar.is-active .ct-bar__hint { visibility: hidden; }
.ct-bar .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.ct-panel { margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ct-panel__foot { display: flex; justify-content: flex-end; margin-top: var(--space-3); }
.ct-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; margin-top: var(--space-2); }
.ct-slot { display: grid; grid-template-columns: 64px 1fr 1fr; align-items: center; gap: 6px; }
.ct-slot .input { min-height: 34px; height: 34px; padding-block: 0; }
.ct-quote { width: 100%; margin-top: var(--space-3); border-collapse: collapse; font-size: .8125rem; }
.ct-quote td { padding: 5px 8px; border-top: 1px solid var(--border); }
.ct-quote .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-quote tr.is-error td { color: #A1281B; background: #FDF6F5; }
.ct-quote tfoot td { background: #F1F6FB; font-weight: 600; border-top: 2px solid var(--accent); }
.ct-quote tfoot strong { font-size: 1rem; color: var(--accent); }.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .form-grid--4 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Simulateur : zone et créneaux de chaque ligne d'offre */
.sim-lines--zoned tbody + tbody .sim-line__main td { border-top: 2px solid var(--border-strong, #CBD5E1); }
.sim-lines--zoned .sim-line__main td { border-bottom: 0; padding-bottom: 2px; }
.sim-lines--zoned .sim-line__sub td { padding: 2px 8px 7px; background: #FBFCFD; }
.sim-line__where { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: var(--space-3); align-items: center; }
.sim-line__zone, .sim-line__days { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sim-line__zone .smart { flex: 1; min-width: 0; }
.sim-line__days { flex-wrap: wrap; row-gap: 4px; }
.sim-line__label { display: inline-flex; align-items: center; gap: 4px; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #64748B); white-space: nowrap; }
.sim-line__label [data-lucide] { width: 13px; height: 13px; }
.sim-line__label em { font-style: normal; padding: 0 5px; border-radius: 99px; background: #E8EDFC; color: var(--accent); }
.sim-lines tbody.is-short .sim-line__label em { background: #FDE8D0; color: #B4530A; }
.lday { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 7px; border: 1px solid var(--border, #E2E8F0); border-radius: 99px; background: #fff; font-size: .75rem; font-weight: 600; color: #475569; cursor: pointer; user-select: none; }
.lday input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.lday input[type="time"] { display: none; width: 78px; height: 22px; min-height: 0; padding: 0 2px; border: 0; border-left: 1px solid rgba(255,255,255,.4); background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; }
.lday.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.lday.is-on input[type="time"] { display: inline-block; color-scheme: dark; }
.lday.is-locked { opacity: .4; cursor: not-allowed; }
.lday:focus-within { box-shadow: var(--focus, 0 0 0 2px rgba(2, 49, 207,.35)); }
.cap__list { margin: var(--space-2) 0 0; padding-left: 18px; font-size: .8125rem; color: #475569; }
.cap--warn { border-left-color: #F5A524; background: #FFFAF0; }
.cap--warn .cap__icon { color: #B4530A; }
@media (max-width: 900px) { .sim-line__where { grid-template-columns: 1fr; gap: 6px; } }
/* Nouveau client : adresse propre à un véhicule */
.wz-vaddr { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px dashed var(--border-strong, #CBD5E1); border-radius: var(--radius); background: #FBFCFD; }
.wz-vaddr .form-grid { margin-top: var(--space-2); }

/* ================================================================== Simulateur : bloc « Offre » (version soignée)
   Chaque ligne est une carte numérotée : l'offre en haut, la zone et les jours dessous. Le total du lot ferme le
   tableau ; « Ajouter une ligne » est une zone d'action pleine largeur. */
.sim-lines--pro { font-size: .875rem; border-collapse: separate; border-spacing: 0; }
.sim-lines-wrap:has(.sim-lines--pro) { border: 0; margin-bottom: 0; }
.sim-lines--pro thead th { padding: 0 10px 6px; background: transparent; border-bottom: 0; font-size: .625rem; letter-spacing: .07em; color: var(--text-muted); vertical-align: bottom; }
.sim-lines--pro thead th:first-child { padding-left: 46px; }
.sim-lines--pro tbody[data-line] td { background: var(--surface); }
.sim-lines--pro tbody[data-line] .sim-line__main td { padding: 10px 10px 6px; border-top: 1px solid var(--border); border-bottom: 0; }
.sim-lines--pro tbody + tbody .sim-line__main td { border-top: 1px solid var(--border); }
.sim-lines--pro .sim-line__main td:first-child { border-left: 1px solid var(--border); border-top-left-radius: 12px; }
.sim-lines--pro .sim-line__main td:last-child { border-right: 1px solid var(--border); border-top-right-radius: 12px; }
.sim-lines--pro .sim-line__sub td { padding: 4px 10px 12px 46px; background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; }
/* Espace entre deux cartes de ligne. */
.sim-lines--pro tbody[data-line]::after { content: ""; display: table-row; height: 10px; }
.sim-lines--pro tbody[data-line]:focus-within .sim-line__main td, .sim-lines--pro tbody[data-line]:focus-within .sim-line__sub td { border-color: #97ABEE; }
.sim-lines--pro tbody[data-line]:focus-within .sim-line__no { background: var(--accent); color: #fff; }
.sim-line__lead { display: flex; align-items: center; gap: 10px; }
.sim-line__lead .smart { flex: 1; min-width: 0; }
.sim-line__no { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.sim-lines--pro .input { min-height: 36px; height: 36px; font-size: .875rem; border-radius: 8px; }
.sim-lines--pro .sim-lines__qty { width: 68px; text-align: center; font-weight: 600; }
.sim-lines--pro .sim-lines__num { font-size: .875rem; color: var(--text); }
.sim-lines--pro tbody .sim-lines__num { padding-top: 10px; vertical-align: middle; }
.sim-lines--pro [data-line-visits], .sim-lines--pro [data-line-unit] { color: #475569; }
.sim-lines--pro .sim-lines__total { font-size: .9375rem; }
.sim-lines--pro .sim-lines__act { vertical-align: middle; }
.sim-lines--pro .sim-lines__act .icon-btn { width: 28px; height: 28px; border-radius: 8px; color: #94A3B8; }
.sim-lines--pro .sim-lines__act .icon-btn:hover { background: #FDECEA; color: #C0392B; }

/* Zone et jours : deux groupes étiquetés, sur un fond discret. */
.sim-lines--pro .sim-line__where { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: var(--space-4); padding: 8px 10px; border-radius: 10px; background: #F6F8FB; }
.sim-lines--pro .sim-line__zone, .sim-lines--pro .sim-line__days { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
.sim-lines--pro .sim-line__days { grid-template-columns: auto minmax(0, 1fr) auto; }
.sim-lines--pro .sim-line__label { font-size: .625rem; letter-spacing: .07em; color: #64748B; }
.sim-lines--pro .sim-line__label [data-lucide] { width: 14px; height: 14px; color: var(--accent); }
.sim-lines--pro .sim-line__zone .input { min-height: 32px; height: 32px; background-color: #fff; font-size: .8125rem; }
.sim-line__pills { display: flex; flex-wrap: wrap; gap: 5px; }
.sim-lines--pro .lday { height: 32px; padding: 0 11px; border-color: #D5DDE6; background: #fff; font-size: .8125rem; color: #334155; transition: background .12s, border-color .12s, transform .08s; }
.sim-lines--pro .lday:hover:not(.is-locked) { border-color: var(--accent); color: var(--accent); }
.sim-lines--pro .lday:active:not(.is-locked) { transform: scale(.97); }
.sim-lines--pro .lday.is-on { padding-right: 4px; background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(2, 49, 207, .3); }
.sim-lines--pro .lday.is-on:hover { color: #fff; }
.sim-lines--pro .lday.is-on input[type="time"] { width: 84px; height: 24px; margin-left: 4px; padding: 0 4px; border: 0; border-radius: 99px; background: rgba(255,255,255,.16); font-weight: 600; }
.sim-lines--pro .lday.is-locked { opacity: 1; background: #F1F5F9; border-color: #E8EDF2; color: #B6C0CC; }
.sim-line__count { font-style: normal; font-size: .75rem; font-weight: 600; white-space: nowrap; padding: 3px 10px; border-radius: 99px; background: #E8EDFC; color: #475569; }
.sim-line__count.is-wait { background: transparent; font-weight: 400; color: #94A3B8; padding-inline: 0; }
.sim-line__count.is-short { background: #FDEFD9; color: #9A4A06; }
.sim-line__count.is-done { background: #E3F4EC; color: #0E6B4C; }
.sim-lines--pro tbody.is-short .sim-line__label em { background: none; }

/* Total du lot. */
.sim-lines--pro tfoot td { padding: 12px 10px; background: #F1F6FB; border: 0; border-top: 2px solid var(--accent); font-size: .9375rem; }
.sim-lines--pro tfoot td:first-child { padding-left: 46px; border-radius: 0 0 0 12px; }
.sim-lines--pro tfoot td:last-child { border-radius: 0 0 12px 0; }
.sim-lines__sum { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.sim-lines--pro tfoot .sim-lines__total strong { font-size: 1.125rem; }
.sim-lines--pro tfoot .muted { font-size: .75rem; }

.sim-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; min-height: 40px; border: 1.5px dashed #B9C6D4; border-radius: 12px; background: transparent; color: var(--accent); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s; }
.sim-add:hover { background: var(--accent-soft); border-color: var(--accent); }
.sim-add:focus-visible { outline: none; box-shadow: var(--focus); }
.sim-add [data-lucide] { width: 16px; height: 16px; }
.sim-tip { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #FFFBEB; color: #6B5413; font-size: .75rem; line-height: 1.45; }
.sim-tip [data-lucide] { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #C99A2E; }
.sim-subtitle { display: flex; align-items: center; gap: 8px; margin: var(--space-5) 0 var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--border); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #475569; }
.sim-subtitle [data-lucide] { width: 16px; height: 16px; color: var(--accent); }
.sim-subtitle + .sim-terms { margin-top: 0; }
@media (max-width: 900px) {
  .sim-lines--pro .sim-line__where { grid-template-columns: 1fr; }
  .sim-lines--pro .sim-line__days { grid-template-columns: 1fr; row-gap: 6px; }
  .sim-lines--pro .sim-line__sub td, .sim-lines--pro thead th:first-child, .sim-lines--pro tfoot td:first-child { padding-left: 10px; }
}
/* Offre : en-têtes de colonnes à leur taille, compteur de jours sous son libellé, pastilles sur une seule ligne. */
.sim-lines--pro thead th.sim-lines__num { font-size: .625rem; color: var(--text-muted); }
.sim-lines--pro .sim-line__days { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 3px; }
.sim-lines--pro .sim-line__days .sim-line__label { grid-column: 1; grid-row: 1; align-self: end; }
.sim-lines--pro .sim-line__days .sim-line__count { grid-column: 1; grid-row: 2; align-self: start; justify-self: start; font-size: .6875rem; padding: 1px 8px; }
.sim-lines--pro .sim-line__days .sim-line__count.is-wait { padding-inline: 0; }
.sim-lines--pro .sim-line__pills { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.sim-lines--pro .lday { padding: 0 9px; }
.sim-lines--pro .lday.is-on input[type="time"] { width: 58px; padding: 0 6px; text-align: center; }
.sim-lines--pro .lday input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.sim-lines--pro .sim-line__where { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); }
@media (max-width: 900px) {
  .sim-lines--pro .sim-line__pills { grid-column: 1; grid-row: 3; }
  .sim-lines--pro .sim-line__days { grid-template-rows: auto auto auto; }
}

/* Offre : les sept pastilles de jours sur une seule ligne. Les libellés passent au-dessus des champs (zone à gauche,
   jours à droite), ce qui laisse toute la largeur aux pastilles ; elles ne reviennent jamais à la ligne. */
.sim-lines--pro .sim-line__where { grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); align-items: start; gap: var(--space-4); }
.sim-lines--pro .sim-line__zone { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
.sim-lines--pro .sim-line__days { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; grid-template-areas: "label count" "pills pills"; column-gap: 8px; row-gap: 4px; align-items: center; }
.sim-lines--pro .sim-line__days .sim-line__label { grid-area: label; grid-column: auto; grid-row: auto; align-self: center; }
.sim-lines--pro .sim-line__days .sim-line__count { grid-area: count; grid-column: auto; grid-row: auto; justify-self: start; align-self: center; }
.sim-lines--pro .sim-line__pills { grid-area: pills; grid-column: auto; grid-row: auto; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sim-lines--pro .sim-line__pills::-webkit-scrollbar { display: none; }
.sim-lines--pro .lday { flex: 0 0 auto; padding: 0 8px; white-space: nowrap; }
.sim-lines--pro .lday.is-on { padding: 0 3px 0 9px; }
.sim-lines--pro .lday.is-on input[type="time"] { width: 52px; margin-left: 3px; padding: 0 4px; }
/* Écran plus étroit : la zone passe au-dessus des jours, qui gardent ainsi toute la largeur de la carte. */
@media (max-width: 1280px) {
  .sim-lines--pro .sim-line__where { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sim-lines--pro .sim-line__zone { max-width: 320px; }
}
@media (max-width: 900px) {
  .sim-lines--pro .sim-line__days { grid-template-rows: auto auto; }
  .sim-lines--pro .sim-line__pills { grid-area: pills; grid-column: auto; grid-row: auto; }
}

/* Offre : la zone sur sa ligne, puis les sept jours en colonnes égales sur toute la largeur de la carte — toujours
   une seule ligne, quel que soit le nombre de jours cochés, sans défilement. */
.sim-lines--pro .sim-line__where { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sim-lines--pro .sim-line__zone { grid-template-columns: auto minmax(0, 300px); max-width: none; column-gap: 10px; align-items: center; }
.sim-lines--pro .sim-line__pills { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; overflow: visible; }
.sim-lines--pro .lday, .sim-lines--pro .lday.is-on { justify-content: center; min-width: 0; padding: 0 4px; gap: 3px; overflow: hidden; }
.sim-lines--pro .lday.is-on input[type="time"] { flex: 0 1 46px; width: 46px; min-width: 0; margin-left: 2px; padding: 0 2px; font-size: .75rem; background: rgba(255,255,255,.18); }
@media (max-width: 1280px) { .sim-lines--pro .sim-line__zone { max-width: none; } }
/* Téléphone : sept jours avec leur heure ne tiennent pas en largeur — quatre colonnes, deux rangées. */
@media (max-width: 600px) {
  .sim-lines--pro .sim-line__pills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sim-lines--pro .lday { height: 38px; }
}

/* Document : tableau des lignes (offre d'une simulation, véhicules d'un contrat) en petit corps, pour que toutes ses
   colonnes tiennent lisiblement dans la page. */
.doc__table--lines { font-size: 8pt; line-height: 1.3; table-layout: auto; }
.doc__table--lines th, .doc__table--lines td { width: auto; padding: 1.2mm 1.4mm; }
.doc__table--lines thead th { font-size: 6.5pt; text-transform: uppercase; letter-spacing: .03em; white-space: normal; vertical-align: bottom; }
.doc__table--lines .is-num { white-space: nowrap; }
.doc__table--lines tfoot th { font-size: 8.5pt; color: #111827; }
.sim-line__req { color: #C0392B; font-weight: 700; }
.sim-line__zone .smart.is-invalid .smart__input { border-color: #C0392B; box-shadow: 0 0 0 2px rgba(192, 57, 43, .15); }

/* Document en corps réduit (simulation) : même mise en page, texte plus petit, comme dans le PDF. */
.doc--compact .doc__page { font-size: 8.5pt; line-height: 1.4; }
.doc--compact .doc__brand { font-size: 14.5pt; }
.doc--compact .doc__site, .doc--compact .doc__ref p { font-size: 7.5pt; }
.doc--compact .doc__ref .doc__number { font-size: 12pt; }
.doc--compact .doc__title { margin-top: 5mm; font-size: 12.5pt; }
.doc--compact .doc__lead { font-size: 8pt; margin-bottom: 3mm; }
.doc--compact .doc__section h2, .doc--compact .doc__box h2 { font-size: 7.5pt; }
.doc--compact .doc__box { padding: 2.2mm 3mm; }
.doc--compact .doc__table th, .doc--compact .doc__table td { padding: 1.1mm 1.6mm; }
.doc--compact .doc__figures div { padding: 1.8mm 2.5mm; }
.doc--compact .doc__figures span { font-size: 6.5pt; }
.doc--compact .doc__figures strong { font-size: 11pt; }
.doc--compact .doc__muted, .doc--compact .doc__foot { font-size: 7.5pt; }
.doc--compact .doc__clauses ol { font-size: 7.5pt; }
.doc--compact .doc__table--lines { font-size: 7.5pt; }
.doc--compact .doc__table--lines thead th { font-size: 6pt; }
.doc--compact .doc__table--lines tfoot th { font-size: 8pt; }
.doc--compact .doc__table--months th, .doc--compact .doc__table--months td { padding: .8mm 1.6mm; }
.doc--compact .doc__section { margin-top: 4mm; }

/* Document : échéancier détaillé (simulation). */
.doc__intro { margin: 0 0 1.5mm; font-size: 8pt; color: #5B6573; }
.doc--compact .doc__intro { font-size: 7.5pt; }
.doc__table--sched { font-size: 8.5pt; }
.doc--compact .doc__table--sched { font-size: 8pt; }
.doc__table--sched tbody td:first-child { font-weight: 600; white-space: nowrap; }
.doc__table--sched tfoot th { background: #F1F6FB; }
.doc__table--sched tbody tr:nth-child(even) td { background: #FAFBFC; }
.doc__table--sched tfoot th:first-child { white-space: nowrap; }

/* ------------------------------------------------------------------ Fil d'Ariane */
.crumbs { margin: calc(-1 * var(--space-2)) 0 var(--space-3); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--text-muted); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 9px 0 7px; border-top: 1.5px solid #A8B3C0; border-right: 1.5px solid #A8B3C0; transform: rotate(45deg); flex: none; }
.crumbs a { color: var(--text-muted); border-radius: 4px; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs a:focus-visible { outline: none; box-shadow: var(--focus); }
.crumbs [data-lucide] { width: 14px; height: 14px; margin-right: 6px; color: #94A3B8; }
.crumbs li[aria-current="page"] span { color: var(--text); font-weight: 600; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  /* Téléphone : seuls le parent direct et la page en cours restent affichés. */
  .crumbs li:not(:nth-last-child(-n+2)) { display: none; }
  .crumbs li:nth-last-child(2)::before { display: none; }
}
@media print { .crumbs { display: none !important; } }
/* ================================================================== Nouveau client : formulaire soigné
   Même langage que le simulateur : un véhicule = une carte, les jours de passage = des pastilles ; un jour coché
   se déplie en ligne (heures, places restantes, plages de l'équipe), les autres restent des pastilles à ajouter. */
.wz[data-wizard] .wz-step__head { margin-bottom: var(--space-3); }
.wz[data-wizard] .field .hint { font-size: .75rem; }

.wz[data-wizard] .wz-vehicle { padding: 0; border-radius: 14px; overflow: visible; transition: border-color .15s, box-shadow .15s; }
.wz[data-wizard] .wz-vehicle:focus-within { border-color: #97ABEE; box-shadow: 0 4px 16px rgba(2, 49, 207, .08); }
.wz[data-wizard] .wz-vehicle__head { margin: 0; padding: 10px var(--space-4); border-bottom: 1px solid var(--border); border-radius: 14px 14px 0 0; background: #F6F8FB; }
.wz[data-wizard] .wz-vehicle__head h3 { font-size: .9375rem; }
.wz[data-wizard] .wz-vehicle__badge { width: 30px; height: 30px; border-radius: 50%; transition: background .15s, color .15s; }
.wz[data-wizard] .wz-vehicle:focus-within .wz-vehicle__badge { background: var(--accent); color: #fff; }
.wz[data-wizard] .wz-vehicle__badge [data-lucide] { width: 16px; height: 16px; }
.wz[data-wizard] .wz-vehicle > .form-grid { padding: var(--space-4) var(--space-4) 0; }
.wz[data-wizard] .wz-vehicle > .wz-vaddr { margin: var(--space-3) var(--space-4) 0; border-radius: 10px; }
.wz[data-wizard] .wz-vehicle > .wz-contract { margin: var(--space-3) var(--space-4) var(--space-4); border-radius: 12px; background: #FBFCFD; }
.wz[data-wizard] .wz-contract__toggle { border-radius: 12px; font-weight: 600; }
.wz[data-wizard] .wz-contract:has([data-contract-toggle]:checked) .wz-contract__toggle { border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; background: #F1F6FB; margin-bottom: var(--space-3); }
.wz[data-wizard] .wz-slots__title { margin-top: var(--space-4); font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #475569; }
.wz[data-wizard] .wz-add { margin-top: 0; }

/* Jours de passage : cochés = lignes dépliées en tête ; non cochés = pastilles à ajouter, sur une ligne. */
.wz-slots--pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wz-slots--pills .wz-slot { order: 2; display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 34px; padding: 0 12px 0 10px; border: 1px solid #D5DDE6; border-radius: 99px; background: #fff; box-shadow: none; transition: border-color .12s, background .12s; }
.wz-slots--pills .wz-slot:hover:not(.is-locked) { border-color: var(--accent); }
.wz-slots--pills .wz-slot .check { margin: 0; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.wz-slots--pills .wz-slot:not(:has([data-slot-on]:checked)) input[type="time"], .wz-slots--pills .wz-slot:not(:has([data-slot-on]:checked)) .wz-bands { display: none; }
.wz-slots--pills .wz-slot:not(:has([data-slot-on]:checked)) .wz-avail { padding: 1px 7px; font-size: .6875rem; }
.wz-slots--pills .wz-slot.is-locked { background: #F1F5F9; border-color: #E8EDF2; opacity: 1; }
.wz-slots--pills .wz-slot.is-locked .check { color: #B6C0CC; }
/* Jour coché : une ligne complète — jour, heures, places restantes — puis les plages de l'équipe. */
.wz-slots--pills .wz-slot:has([data-slot-on]:checked) { order: 1; display: grid; grid-template-columns: 120px 116px 116px minmax(0, 1fr); gap: 8px; align-items: center; flex: 0 0 100%; width: 100%; padding: 8px 12px; border: 1px solid #97ABEE; border-radius: 12px; background: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.wz-slots--pills .wz-slot:has([data-slot-on]:checked) .check { color: var(--accent); font-size: .875rem; }
.wz-slots--pills .wz-slot:has([data-slot-on]:checked) .input { min-height: 34px; height: 34px; }
.wz-slots--pills .wz-slot:has([data-slot-on]:checked) .wz-bands { grid-column: 1 / -1; padding: 2px 0 0; }
@media (max-width: 700px) {
  .wz-slots--pills .wz-slot:has([data-slot-on]:checked) { grid-template-columns: 1fr 1fr; }
  .wz-slots--pills .wz-slot:has([data-slot-on]:checked) .check, .wz-slots--pills .wz-slot:has([data-slot-on]:checked) .wz-avail { grid-column: 1 / -1; }
}

/* Reprise d'une simulation : bandeau aligné sur les cartes. */
.sim-pick { border-radius: 14px; }/* Pastille verrouillée : sans sa mention de places, pour que les jours restants tiennent sur une ligne. */
.wz-slots--pills .wz-slot.is-locked .wz-avail { display: none; }
.wz-slots--pills .wz-slot:not(:has([data-slot-on]:checked)) { padding: 0 12px 0 8px; }

/* ================================================================== Nouveau client : semaine en pastilles (comme le simulateur)
   Sept colonnes égales. Rangée 1 : la pastille du jour, avec son heure quand il est coché. Rangée 2 : les places
   restantes de l'équipe. Dessous : les plages horaires de chaque jour coché, sur toute la largeur. */
.wz-slots--week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px 5px; align-items: start; padding: 10px; border-radius: 12px; background: #F6F8FB; }
.wz-slots--week .wz-slot { display: contents; }
.wz-slots--week .wz-slot[data-slot="1"] > .wz-pill, .wz-slots--week .wz-slot[data-slot="1"] > .wz-avail { grid-column: 1; }
.wz-slots--week .wz-slot[data-slot="2"] > .wz-pill, .wz-slots--week .wz-slot[data-slot="2"] > .wz-avail { grid-column: 2; }
.wz-slots--week .wz-slot[data-slot="3"] > .wz-pill, .wz-slots--week .wz-slot[data-slot="3"] > .wz-avail { grid-column: 3; }
.wz-slots--week .wz-slot[data-slot="4"] > .wz-pill, .wz-slots--week .wz-slot[data-slot="4"] > .wz-avail { grid-column: 4; }
.wz-slots--week .wz-slot[data-slot="5"] > .wz-pill, .wz-slots--week .wz-slot[data-slot="5"] > .wz-avail { grid-column: 5; }
.wz-slots--week .wz-slot[data-slot="6"] > .wz-pill, .wz-slots--week .wz-slot[data-slot="6"] > .wz-avail { grid-column: 6; }
.wz-slots--week .wz-slot[data-slot="7"] > .wz-pill, .wz-slots--week .wz-slot[data-slot="7"] > .wz-avail { grid-column: 7; }
.wz-slots--week .wz-pill { grid-row: 1; display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; height: 34px; padding: 0 4px; overflow: hidden; border: 1px solid #D5DDE6; border-radius: 99px; background: #fff; color: #334155; transition: background .12s, border-color .12s, transform .08s; }
.wz-slots--week .wz-pill:hover { border-color: var(--accent); color: var(--accent); }
.wz-slots--week .wz-pill:active { transform: scale(.97); }
.wz-slots--week .wz-pill .check { display: flex; align-items: center; margin: 0; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.wz-slots--week .wz-pill .check input { position: absolute; opacity: 0; width: 0; height: 0; }
.wz-slots--week .wz-pill:focus-within { box-shadow: var(--focus); }
.wz-slots--week .wz-pill__time { display: none; flex: 0 1 50px; width: 50px; min-width: 0; height: 24px; margin-left: 2px; padding: 0 3px; border: 0; border-radius: 99px; background: rgba(255,255,255,.18); color: inherit; font: inherit; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; color-scheme: dark; }
.wz-slots--week .wz-pill__time::-webkit-calendar-picker-indicator { display: none; }
.wz-slots--week .wz-slot:has([data-slot-on]:checked) > .wz-pill { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(2, 49, 207, .3); }
.wz-slots--week .wz-slot:has([data-slot-on]:checked) > .wz-pill .wz-pill__time { display: inline-block; }
.wz-slots--week .wz-slot.is-locked > .wz-pill { background: #F1F5F9; border-color: #E8EDF2; color: #B6C0CC; cursor: not-allowed; }
.wz-slots--week .wz-slot.is-locked > .wz-pill .check { cursor: not-allowed; }
.wz-slots--week .wz-slot.is-extra > .wz-pill { box-shadow: 0 0 0 2px var(--st-danger); }
.wz-slots--week .wz-slot__end { display: none; }
.wz-slots--week .wz-avail { grid-row: 2; justify-self: center; max-width: 100%; padding: 1px 6px; font-size: .625rem; overflow: hidden; text-overflow: ellipsis; }
.wz-slots--week .wz-slot.is-locked > .wz-avail { visibility: hidden; }
.wz-slots--week .wz-bands:not([hidden]) { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 4px 0 0; }
.wz-slots--week .wz-bands:not([hidden])::before { content: attr(data-day); flex: none; width: 34px; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.wz-slots--week .wz-bands .wz-bands__warn { margin: 0; }
@media (max-width: 640px) {
  /* Téléphone : la semaine en liste, un jour par ligne. */
  .wz-slots--week { grid-template-columns: minmax(0, 1fr) auto; }
  .wz-slots--week .wz-slot[data-slot] > .wz-pill { grid-column: 1; grid-row: auto; justify-content: flex-start; padding: 0 12px; }
  .wz-slots--week .wz-slot[data-slot] > .wz-avail { grid-column: 2; grid-row: auto; align-self: center; }
  .wz-slots--week .wz-bands:not([hidden]) { flex-wrap: wrap; }
}
/* ================================================================== Nouveau client : une ligne d'offre par véhicule
   Même dessin que le bloc « Offre » du simulateur : rangée d'en-têtes, cartes numérotées (catégorie, formule, plaque,
   chiffres), panneau gris (véhicule, zone, contrat, période, jours), total du dossier, zone d'ajout. */
.wz-line__head, .wz-line__main { display: grid; grid-template-columns: 26px minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, .9fr) 78px 88px 100px 28px; gap: 10px; align-items: center; }
.wz-line__head { padding: 0 11px 6px; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.wz-line__head .wz-line__num { text-align: right; }
.wz[data-wizard] .wz-vehicle.wz-line { padding: 0; margin-bottom: 10px; border-radius: 12px; }
.wz-line__main { padding: 10px; }
.wz-line__main .input { min-height: 36px; height: 36px; font-size: .875rem; border-radius: 8px; }
.wz-line__main .smart__hint { display: none; }
.wz-line__plate { font-weight: 600; text-transform: uppercase; }
.wz-line__plate::placeholder { font-weight: 400; text-transform: none; }
.wz-line__num { text-align: right; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: #475569; }
.wz-line__total { font-size: .9375rem; font-weight: 700; color: var(--accent); }
.wz-line__main .sim-line__no span { font: inherit; }
.wz-line:focus-within .sim-line__no { background: var(--accent); color: #fff; }
.wz-line .wz-vehicle__remove { width: 28px; height: 28px; border-radius: 8px; color: #94A3B8; }
.wz-line .wz-vehicle__remove:hover { background: #FDECEA; color: #C0392B; }
.wz-line:has([data-contract-toggle]:not(:checked)) .wz-line__plan { opacity: .4; pointer-events: none; }
.wz-line:has([data-contract-toggle]:not(:checked)) .wz-line__num { visibility: hidden; }

.wz-line__panel { display: grid; gap: 7px; margin: 0 10px 10px 46px; padding: 9px 10px; border-radius: 10px; background: #F6F8FB; }
.wz-line__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; }
.wz-line__row--days { align-items: start; }
.wz-line__row--days > .sim-line__label { padding-top: 9px; }
.wz-line [data-contract-body] { display: grid; gap: 7px; }
.wz-line [data-contract-body][hidden] { display: none; }
.wz-line .sim-line__label { font-size: .625rem; letter-spacing: .07em; color: #64748B; }
.wz-line .sim-line__label [data-lucide] { width: 14px; height: 14px; color: var(--accent); }
.wz-line__fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.wz-line__fields--inner { flex: 1 1 100%; }
.wz-line__fields .input { flex: 1 1 130px; min-width: 0; min-height: 32px; height: 32px; padding-block: 0; font-size: .8125rem; background-color: #fff; border-radius: 8px; }
.wz-line__fields .wz-line__wide { flex: 2 1 240px; }
.wz-line__check { flex: none; margin: 0; font-size: .8125rem; white-space: nowrap; }
.wz[data-wizard] .wz-line .wz-contract { margin: 0; padding: 0; border: 0; background: transparent; }
.wz[data-wizard] .wz-line .wz-contract__toggle { padding: 0; border: 0; background: transparent; margin: 0; font-weight: 600; }
.wz-line__quote { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding-left: 122px; font-size: .75rem; color: var(--text-muted); }
.wz-line__quote strong { color: var(--text); font-variant-numeric: tabular-nums; }
.wz-line__quote .quote__warn { flex: 1 1 100%; margin: 2px 0 0; padding: 5px 10px; border-radius: 8px; font-size: .75rem; }
.wz-line__days { display: grid; gap: 5px; min-width: 0; }
.wz-line__days .wz-slots--week { padding: 0; background: transparent; }
.wz-line__days .sim-line__count { justify-self: start; }

.wz-line__total-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: var(--space-5); align-items: center; margin-top: 2px; padding: 12px 14px 12px 46px; border-top: 2px solid var(--accent); border-radius: 0 0 12px 12px; background: #F1F6FB; font-size: .8125rem; color: #475569; }
.wz-line__total-bar strong { font-size: .9375rem; color: var(--text); font-variant-numeric: tabular-nums; }
.wz-line__total-amount strong { margin-left: 6px; font-size: 1.125rem; color: var(--accent); }
.wz-line__total-bar + .wz-add { margin-top: 10px; }

@media (max-width: 1100px) {
  .wz-line__head { display: none; }
  .wz-line__main { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 28px; }
  .wz-line__main > .wz-line__cell:nth-of-type(3) { grid-column: 2 / 4; }
  .wz-line__main > .wz-line__num { grid-column: span 1; text-align: left; }
  .wz-line__panel { margin-left: 10px; }
  .wz-line__row { grid-template-columns: 1fr; gap: 4px; }
  .wz-line__row--days > .sim-line__label { padding-top: 0; }
  .wz-line__quote { padding-left: 0; }
  .wz-line__total-bar { grid-template-columns: 1fr 1fr; padding-left: 14px; gap: 6px 12px; }
}
/* Nouveau client, lignes d'offre : en-têtes à leur taille, rangées du panneau serrées sur une ligne. */
.wz-line__head .wz-line__num { font-size: .625rem; color: var(--text-muted); }
.wz-line__row { min-height: 32px; }
.wz-line .wz-line__check { min-height: 0; padding: 0; gap: 6px; }
.wz-line .wz-line__check input { width: 16px; height: 16px; }
.wz-line__fields { flex-wrap: nowrap; }
.wz-line__fields--inner { flex: 1 1 auto; }
.wz-line__fields .input { flex: 1 1 0; }
.wz-line__fields .wz-line__wide { flex: 1.6 1 0; }
.wz-line__fields select.input[data-paid-months] { flex: 1.5 1 0; }
.wz-line__row > .wz-line__fields > .wz-line__check:last-child { margin-left: 4px; }
@media (max-width: 1100px) { .wz-line__fields { flex-wrap: wrap; } .wz-line__fields .input { flex: 1 1 130px; } }
.wz-line__head { align-items: end; }
.wz-line__head .wz-line__num { white-space: normal; line-height: 1.25; }

/* ================================================================== Nouveau client : matrice des véhicules d'une ligne d'offre */
.wz-line__head, .wz-line__main { grid-template-columns: 26px minmax(0, 1.3fr) minmax(0, 1.3fr) 84px 88px 96px 110px 28px; }
.wz-line__qty { text-align: center; font-weight: 600; }
.wz-units { margin: 0 10px 10px 46px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.wz-units__head { display: flex; align-items: center; gap: var(--space-3); padding: 6px 10px; background: #F6F8FB; border-bottom: 1px solid var(--border); }
.wz-units__head em { font-style: normal; margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: #E8EDFC; color: #475569; font-size: .6875rem; letter-spacing: 0; }
.wz-units__head em.is-short { background: #FDEFD9; color: #9A4A06; }
.wz-units__head em.is-done { background: #E3F4EC; color: #0E6B4C; }
.wz-units__hint { flex: 1; font-size: .6875rem; color: var(--text-muted); }
.wz-units__head .btn { min-height: 26px; padding-block: 0; font-size: .75rem; }
.wz-units__table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.wz-units__table th { padding: 4px 6px; text-align: left; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.wz-units__table td { padding: 2px 4px; border-top: 1px solid #EEF2F6; }
.wz-units__table th:first-child, .wz-units__no { width: 34px; text-align: center; color: #94A3B8; font-variant-numeric: tabular-nums; }
.wz-units__table .input { min-height: 30px; height: 30px; padding: 0 8px; border-color: transparent; border-radius: 6px; background: transparent; font-size: .8125rem; }
.wz-units__table .input:hover { border-color: var(--border); }
.wz-units__table .input:focus { border-color: var(--accent); background: #fff; }
.wz-units__table tr:nth-child(even) td { background: #FAFBFC; }
.wz-units__plate { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.wz-units__table .input:required:invalid { box-shadow: inset 0 -2px 0 #F5A524; border-radius: 6px 6px 0 0; }
@media (max-width: 1100px) {
  .wz-line__main { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 70px 28px; }
  .wz-line__main > .wz-line__num { grid-column: span 1; }
  .wz-units { margin-left: 10px; }
  .wz-units__hint { display: none; }
}
/* ------------------------------------------------------------------ Plaques à compléter */
.wz-plates-note { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: #FFF7E6; color: #7A4B06; font-size: .8125rem; }
.wz-plates-note[hidden] { display: none; }
.ct-plates { border-left: 3px solid #F5A524; }
.ct-plates h2 { display: flex; align-items: center; gap: 8px; }
.ct-plates h2 [data-lucide] { width: 18px; height: 18px; color: #B4530A; }
.ct-plates__intro { margin: 0 0 var(--space-3); font-size: .875rem; color: #475569; }
.ct-plates__matrix { margin: 0 0 var(--space-3); }
.ct-plates__matrix .wz-units__table .input { border-color: var(--border); background: #fff; }
/* ------------------------------------------------------------------ Nouveau contrat : client existant ou nouveau client */
.wz-who { display: inline-grid; grid-auto-flow: column; gap: 0; margin-bottom: var(--space-3); padding: 3px; border-radius: 10px; background: #EEF2F6; }
.wz-who__option { margin: 0; cursor: pointer; }
.wz-who__option input { position: absolute; opacity: 0; width: 0; height: 0; }
.wz-who__option span { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px; border-radius: 8px; font-size: .875rem; font-weight: 600; color: #475569; transition: background .12s, color .12s; }
.wz-who__option span [data-lucide] { width: 16px; height: 16px; }
.wz-who__option input:checked + span { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(15, 34, 51, .14); }
.wz-who__option input:focus-visible + span { box-shadow: var(--focus); }
.wz-who__pick { max-width: 560px; }
/* Corbeille d'une ligne de liste (suppression réservée, confirmée). */
.row-del { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: 6px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--st-danger); cursor: pointer; vertical-align: middle; }
.row-del:hover, .row-del:focus-visible { background: rgba(180, 35, 24, .08); border-color: rgba(180, 35, 24, .35); }
.row-del svg { width: 15px; height: 15px; }
td:has(> .row-del) { white-space: nowrap; }

/* ---- Fiche du contrat : formulaires compacts ---- */
.ct-todo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: var(--space-3); padding: 7px 12px; border: 1px solid #F3D9A8; border-radius: var(--radius-lg); background: #FFFAF0; }
.ct-todo.is-done { border-color: #BFE3D0; background: #F1FAF5; }
.ct-todo__title { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #8A4B08; }
.ct-todo.is-done .ct-todo__title { color: #0E6B4C; text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.ct-todo__title [data-lucide], .ct-todo__item [data-lucide] { width: 15px; height: 15px; }
.ct-todo__item { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid #EBCB93; border-radius: 99px; background: #fff; color: #7A3E05; font-size: .8125rem; font-weight: 600; }
.ct-todo__item:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.ct-fold { padding-top: 0; padding-bottom: 0; scroll-margin-top: 120px; }
.ct-fold__head { display: flex; align-items: center; gap: 12px; padding: 9px 0; cursor: pointer; list-style: none; }
.ct-fold__head::-webkit-details-marker { display: none; }
.ct-fold__head h2 { flex: none; margin: 0; font-size: .9375rem; }
.ct-fold__intro { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: #64748B; }
.ct-fold__chev { flex: none; width: 18px; height: 18px; color: #64748B; transition: transform .15s; }
.ct-fold[open] .ct-fold__chev { transform: rotate(180deg); }
.ct-fold[open] { padding-bottom: 10px; }
.ct-fold .ct-plates__matrix { margin: 0; }
.ct-fold .wz-units__table .input { min-height: 28px; height: 28px; }
.ct-fold .wz-units__table td { padding: 2px 4px; }
.ct-lotcell { padding-left: 10px !important; }
.ct-scroll { max-height: 396px; overflow: auto; }
.ct-scroll thead th { position: sticky; top: 0; z-index: 2; background: #F6F8FB; box-shadow: inset 0 -1px 0 var(--border); }
.ct-lot td { padding: 3px 6px 3px 10px !important; background: #EEF3F8 !important; border-top: 1px solid #DCE5EE !important; }
.ct-lot td { display: table-cell; }
.ct-lot__label { font-size: .75rem; color: #334155; }
.ct-lot__label em { font-style: normal; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #fff; color: #475569; font-size: .6875rem; }
.ct-lot .btn { float: right; min-height: 22px; height: 22px; padding: 0 8px; font-size: .6875rem; }
.ct-lot .btn [data-lucide] { width: 12px; height: 12px; }
.ct-savebar { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.ct-savebar__hint { flex: 1; font-size: .75rem; color: #64748B; }
.ct-savebar__count { padding: 2px 10px; border-radius: 99px; background: #FDEFD9; color: #9A4A06; font-size: .75rem; font-variant-numeric: tabular-nums; }
.ct-savebar__count.is-done { background: #E3F4EC; color: #0E6B4C; }

#ct-lines { scroll-margin-top: 120px; }
.ct-scroll--lines { max-height: 470px; border: 1px solid var(--border); border-radius: var(--radius); }
.ct-scroll--lines tfoot td { position: sticky; bottom: 0; z-index: 2; background: #F8FAFC; box-shadow: inset 0 1px 0 var(--border); }
.ct-lines--dense th { padding: 6px 8px; }
.ct-lines--dense td { padding: 4px 8px; line-height: 1.25; }
.ct-lines--dense .cell-id__sub { display: inline; margin-left: 6px; font-size: .75rem; }
.ct-lines--dense .ct-lines__days { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-lines--dense .ct-lines__state { white-space: nowrap; }
.ct-lines--dense .badge { padding-block: 1px; font-size: .6875rem; }
.ct-lines--dense .ct-lines__act .btn { min-height: 26px; height: 26px; padding-inline: 6px; }
.ct-lines--dense .ct-lines__pick input { vertical-align: middle; }

.ct-panel--dense { padding: 10px 12px; background: #FBFCFE; }
.ct-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; align-items: start; }
.ct-fields .field { margin: 0; }
.ct-fields label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #475569; }
.ct-fields .input { min-height: 34px; height: 34px; padding-block: 0; font-size: .875rem; }
.ct-fields .hint { font-size: .6875rem; line-height: 1.25; }
.ct-week { margin-top: 8px; }
.ct-week__toggle { font-size: .8125rem; font-weight: 600; }
.ct-week .wz-slots--week { margin-top: 6px; padding: 8px; }
.ct-panel--dense .ct-panel__foot { margin-top: 8px; }
.ct-panel--dense .ct-panel__foot .btn { min-height: 34px; }
@media (max-width: 900px) { .ct-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ct-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: var(--space-3); padding-block: 9px; scroll-margin-top: 120px; }
.ct-doc__title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .9375rem; }
.ct-doc__title [data-lucide] { width: 17px; height: 17px; color: var(--accent); }
.ct-doc .contract__doc-state { margin-right: auto; }
.ct-doc__upload { display: flex; align-items: center; gap: 6px; margin: 0; padding-left: 12px; border-left: 1px solid var(--border); }
.ct-doc__upload .input { width: 250px; min-height: 30px; height: 30px; padding: 2px 6px; font-size: .75rem; }
.ct-doc__error { flex: 0 0 100%; }
.ct-after { margin-top: var(--space-3); }
.ct-lines--dense .ct-lines__plan .cell-id__sub { display: none; }
.ct-lines--dense .ct-lines__days { max-width: 180px; }
.ct-flag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: #FDEFD9; color: #9A4A06; vertical-align: middle; }
.ct-flag [data-lucide] { width: 13px; height: 13px; }
.ct-fold .wz-units__plate::placeholder { font-weight: 400; text-transform: none; letter-spacing: 0; color: #A0AEC0; }
.ct-lines--dense { font-size: .78rem; }
.ct-lines--dense th, .ct-lines--dense td { padding-inline: 6px; }
.ct-lines--dense .ct-lines__days { max-width: 150px; }
[data-ct-quote] { max-height: 232px; overflow: auto; margin-top: 8px; }
[data-ct-quote] .ct-quote { margin-top: 0; }
[data-ct-quote] .ct-quote tfoot td { position: sticky; bottom: 0; }
.ct-cat { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: #E6EEF6; color: var(--accent); font-size: .6875rem; font-weight: 700; vertical-align: middle; }
.ct-lines--dense .ct-lines__days { max-width: 130px; }

/* ---- Fiche du contrat : enregistrement sans rechargement ---- */
[data-ct-page] { display: contents; }
[data-live-page] { display: contents; }
[data-live-page].is-sending form button[type="submit"], [data-live-page].is-sending [data-ct-submit] { opacity: .6; pointer-events: none; }
.ct-fold tr.is-missing .wz-units__plate { border-color: #EBCB93; background: #FFFAF0; }
.ct-fold tr.is-missing .wz-units__plate::placeholder { color: #B7791F; }
/* ---- Fiche du contrat : créneaux à confirmer sur place ---- */
#ct-slots { scroll-margin-top: 120px; }
.ct-slotq td { padding: 4px 8px !important; font-size: .8125rem; vertical-align: middle; }
.ct-slotq .slotq__days { display: inline-flex; }
.ct-slotbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 8px; }
.ct-slotbar .field { margin: 0; min-width: 210px; }
.ct-slotbar__note { flex: 1; }
.ct-slotbar label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #475569; }
.ct-slotbar .input { min-height: 34px; height: 34px; padding-block: 0; font-size: .875rem; }
.ct-slotbar .btn { min-height: 34px; }
/* ---- Facture mise en page (aperçu et impression) ---- */
.inv { display: flex; flex-direction: column; }
.inv__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; padding-bottom: 6mm; border-bottom: 2px solid var(--accent); }
.inv__title { text-align: right; }
.inv__word { margin: 0; font-size: 20pt; font-weight: 300; letter-spacing: .14em; text-transform: uppercase; color: #111827; line-height: 1.1; }
.inv__number { margin: 1mm 0 2mm; font-size: 11pt; font-weight: 600; font-variant-numeric: tabular-nums; color: #374151; }
.inv__stamp { display: inline-block; padding: 1mm 3.5mm; border: 1.5px solid currentColor; border-radius: 1.5mm; font-size: 8pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.inv__stamp--paid { color: #0E7A55; background: #EDF9F3; }
.inv__stamp--due { color: var(--accent); background: var(--accent-soft, #EEF3F8); }
.inv__stamp--partial { color: #9A5B06; background: #FFF6E5; }
.inv__stamp--late { color: #B42318; background: #FDECEA; }
.inv__stamp--cancelled { color: #6B7280; background: #F3F4F6; }
.inv__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin-top: 7mm; }
.inv__party p { margin: 0; font-size: 9.5pt; color: #4B5563; }
.inv__party .inv__client { margin-bottom: 1mm; font-size: 12.5pt; font-weight: 600; color: #111827; }
.inv__meta { margin: 0; display: grid; gap: 0; align-content: start; border: 1px solid #D5DBE3; border-radius: 2mm; overflow: hidden; }
.inv__meta div { display: flex; justify-content: space-between; gap: 4mm; padding: 1.8mm 3.5mm; border-bottom: 1px solid #E8ECF1; font-size: 9.5pt; }
.inv__meta div:last-child { border-bottom: 0; }
.inv__meta dt { color: #5B6573; }
.inv__meta dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.inv__meta .is-key { background: var(--accent-soft, #EEF3F8); }
.inv__meta .is-key dd { color: var(--accent); }
.inv__lines { width: 100%; margin-top: 8mm; border-collapse: collapse; font-size: 9.5pt; }
.inv__lines thead th { padding: 2.2mm 3mm; background: var(--accent); color: #fff; font-size: 8pt; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.inv__lines thead th:first-child { border-radius: 1.5mm 0 0 0; }
.inv__lines thead th:last-child { border-radius: 0 1.5mm 0 0; }
.inv__lines td { padding: 2.2mm 3mm; border-bottom: 1px solid #E3E7EC; vertical-align: top; }
.inv__lines tbody tr:nth-child(even) td { background: #FAFBFC; }
.inv__lines strong { font-weight: 600; }
.inv__sub { display: block; margin-top: .5mm; font-size: 8.5pt; color: #6B7280; }
.inv__no { width: 9mm; color: #6B7280; font-variant-numeric: tabular-nums; }
.inv__num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv__lines tr.is-credit td { color: #0E7A55; font-style: italic; }
.inv__bottom { display: grid; grid-template-columns: 1fr 72mm; gap: 8mm; margin-top: 6mm; align-items: start; }
.inv__notes h2 { margin-bottom: 1.5mm; }
.inv__payments { width: 100%; margin-bottom: 4mm; border-collapse: collapse; font-size: 9pt; }
.inv__payments td { padding: 1.2mm 0; border-bottom: 1px dashed #D9DEE5; color: #374151; }
.inv__payments td:first-child { width: 24mm; color: #6B7280; }
.inv__note { margin: 0 0 1.5mm; padding-left: 3mm; border-left: 2px solid var(--accent); font-size: 9pt; color: #374151; }
.inv__note--muted { border-left-color: #D5DBE3; color: #6B7280; }
.inv__totals { margin: 0; }
.inv__totals div { display: flex; justify-content: space-between; gap: 4mm; padding: 1.8mm 3.5mm; font-size: 10pt; }
.inv__totals dt { color: #5B6573; }
.inv__totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.inv__totals .inv__due { margin-top: 1.5mm; padding: 3mm 3.5mm; border-radius: 2mm; background: var(--accent); color: #fff; font-size: 12pt; }
.inv__totals .inv__due dt { color: inherit; font-weight: 500; }
.inv__totals .inv__due dd { font-weight: 700; }
.inv__totals .inv__due--paid { background: #0E7A55; }
.inv__totals .inv__due--late { background: #B42318; }
.inv__totals .inv__due--cancelled { background: #6B7280; }
.inv__foot { display: flex; justify-content: space-between; gap: 6mm; margin-top: auto; padding-top: 4mm; border-top: 1px solid #E3E7EC; font-size: 8pt; color: #6B7280; }
.row-preview { min-height: 26px; height: 26px; padding-inline: 8px; font-size: .75rem; }
.row-preview [data-lucide] { width: 14px; height: 14px; }
@media print { .inv__lines thead th, .inv__totals .inv__due, .inv__stamp, .inv__meta .is-key { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }td:has(> .row-preview) { white-space: nowrap; }
.row-preview { float: right; margin-left: 8px; }

/* ==================================================================== JEK — stock */
/* Quantités : entrée en vert, sortie en orange, transfert en bleu, rupture en rouge */
.qty { font-variant-numeric: tabular-nums; }
.qty--in, .qty--ok { color: var(--st-success); }
.qty--out, .qty--low { color: var(--st-warning); }
.qty--move { color: var(--accent); }
.qty--none, .qty--inactive { color: var(--text-muted); }
td .qty--out.qty, .qty--out { color: var(--st-warning); }
.dataTable .qty--out, .table .qty--none { font-weight: 600; }
table[data-table="products"] .qty--out { color: var(--st-danger); }
.row-actions { text-align: right; }
.row-actions .btn { padding: 0 8px; }
.input-unit { display: inline-flex; align-items: center; min-width: 44px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-alt); color: var(--text-muted); font-size: .875rem; white-space: nowrap; }
.input-unit:empty { display: none; }
.inline-new { margin: var(--space-4) 0 0; padding-top: var(--space-4); border-top: 1px dashed var(--border); }

/* À réapprovisionner (accueil) */
.restock { list-style: none; margin: 0; padding: 0; display: grid; }
.restock li + li { border-top: 1px solid var(--border); }
.restock a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-3); align-items: center; padding: var(--space-2) 0; color: var(--text); }
.restock a:hover { text-decoration: none; }
.restock a:hover .restock__name strong { color: var(--accent); }
.restock__name, .restock__level { display: grid; min-width: 0; }
.restock__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.restock__name small, .restock__level small { color: var(--text-muted); font-size: .75rem; }
.restock__level { justify-items: end; }
.restock__bar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: #EEF0F3; overflow: hidden; }
.restock__bar > span { display: block; height: 100%; border-radius: 99px; background: var(--st-warning); }
.restock__bar > span.is-out { background: var(--st-danger); }
.card .empty [data-lucide] { width: 16px; height: 16px; vertical-align: -3px; color: var(--st-success); }

/* Encadré « Stock » de la saisie d'un mouvement */
.stock-box { align-self: start; position: sticky; top: calc(var(--space-4) + 96px); }
.stock-box__product { margin: 0 0 var(--space-3); display: grid; }
.stock-box__product strong { font-size: 1.0625rem; }
.stock-box__lines { margin: 0; display: grid; gap: var(--space-3); }
.stock-box__lines > div { display: grid; gap: 2px; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-alt); }
.stock-box__lines > div[hidden] { display: none; }
.stock-box__lines dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.stock-box__lines dd { margin: 0; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.stock-box__lines dd strong.is-changed { color: var(--st-success); }
.stock-box__lines dd strong.is-bad { color: var(--st-danger); }
.stock-box__arrow { color: var(--text-muted); margin: 0 4px; }
.stock-box__warning { display: flex; gap: var(--space-2); align-items: flex-start; margin: var(--space-3) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: #FDECEA; color: #8A1C12; font-size: .875rem; }
.stock-box__warning[hidden] { display: none; }
.stock-box__warning [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.stock-box__levels { width: 100%; margin-top: var(--space-3); border-collapse: collapse; font-size: .8125rem; color: var(--text-muted); }
.stock-box__levels td { padding: 4px 0; border-top: 1px solid var(--border); }
.stock-box__levels td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.stock-box__levels tr.is-current td { color: var(--text); font-weight: 600; }
@media (max-width: 1100px) { .stock-box { position: static; } }

/* Ligne modifiable sur place (paramètres) : champs côte à côte, bouton en bout de ligne */
.row-edit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.row-edit .input { width: auto; flex: 1 1 160px; min-width: 0; max-width: 300px; }
.row-edit .input.input--narrow { flex: 0 0 84px; }
.row-edit .check { white-space: nowrap; margin: 0 var(--space-2); }

/* ---------- Logo de l'entreprise (partials/logo) ---------- */
.brand-logo { display: block; height: 38px; width: auto; }
.hbar__brand picture, .login__brand picture, .auth__brand picture { display: block; }
/* Sur fond sombre (connexion) : le logo est posé sur une plaque blanche. */
.brand-logo--plate { height: 44px; box-sizing: content-box; padding: 8px 14px; border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.login__brand--compact .brand-logo--plate { height: 30px; padding: 6px 10px; border-radius: 8px; }
.auth__brand .brand-logo { height: 48px; }

/* ---------- Tableau de bord : rapports d'état et réservations, en tableaux denses (une ligne par élément) ---------- */
.dash-reports { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1200px) { .dash-reports { grid-template-columns: 1fr; } }
.dash-report { --tone: var(--st-success); --tone-soft: #E7F3EC; border-top: 3px solid var(--tone); padding: 10px 14px 8px; }
.dash-report--bad { --tone: var(--st-danger); --tone-soft: #FBEAE8; }
.dash-report--reservations { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.dash-report__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dash-report__icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--tone-soft); color: var(--tone); }
.dash-report__icon svg { width: 15px; height: 15px; }
.dash-report__title { flex: 1; min-width: 0; }
.dash-report__title h2 { margin: 0; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-report__head .btn { flex: none; white-space: nowrap; min-height: 26px; padding: 1px 9px; font-size: .75rem; gap: 4px; }
.dash-report__head .btn svg { width: 13px; height: 13px; }
.dash-report__head.filters, .dash-report__head.filters--compact { flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 0; margin-bottom: 6px; background: none; border: 0; }
.dash-report__head .filters__toggle { align-self: center; height: auto; }
.dash-report__head .filters__more { flex: 1 0 100%; gap: 6px 10px; margin: 2px 0 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.dash-report__head .filters__more .field { min-width: 130px; flex: 1 1 130px; gap: 1px; }
.dash-report__head .filters__more label { font-size: .64rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.dash-report__head .filters__more .input { min-height: 28px; height: 28px; padding: 1px 6px; font-size: .78rem; }
.dash-report__head .filters__tools { flex: 1 0 100%; margin: 0; min-height: 0; justify-content: flex-end; font-size: .75rem; }
.dash-report__head .filters__tools:not(:has(:not([hidden]))) { display: none; }
@media (max-width: 700px) { .dash-report__title { flex-basis: 60%; } }
/* Totaux : étiquettes sur une seule ligne (libellé : valeur). */
.dash-report__stats { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 4px; }
.dash-report__stats > div { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 9px; border-radius: 999px; background: var(--tone-soft); }
.dash-report__stats dt { font-size: .6875rem; color: var(--text-muted); }
.dash-report__stats dd { margin: 0; font-size: .8125rem; font-weight: 700; color: var(--tone); font-variant-numeric: tabular-nums; }
.dash-report__stats > .is-warn { background: #FCEFE3; }
.dash-report__stats > .is-warn dd { color: var(--st-warning); }
.dash-report__stats > .is-ok { background: #E7F3EC; }
.dash-report__stats > .is-ok dd { color: var(--st-success); }
/* Tableau : lignes de 26 px, tout sur une ligne, recherche et pagination réduites. */
.dash-report div.dt-container { font-size: .78rem; }
.dash-report div.dt-container .dt-layout-row { margin: 3px 0; }
.dash-report div.dt-container .dt-search label { display: none; }
.dash-report div.dt-container .dt-search input { min-width: 0; width: 200px; max-width: 100%; min-height: 26px; padding: 1px 8px; font-size: .75rem; margin: 0; }
.dash-report div.dt-container .dt-info { font-size: .6875rem; padding-top: 0; }
.dash-report div.dt-container .dt-paging .dt-paging-button { padding: 0 6px; min-width: 22px; font-size: .75rem; }
.dash-report table.dataTable.compact thead th { padding: 4px 8px; font-size: .64rem; }
.dash-report table.dataTable.compact tbody td { padding: 3px 8px; line-height: 1.3; white-space: nowrap; }
.dash-report table.dataTable.compact tbody td:first-child { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.dash-report table.dataTable .cell-id__sub { display: inline; margin-left: 6px; font-size: .6875rem; }
.dash-report table.dataTable .badge { font-size: .68rem; padding: 0 7px; line-height: 1.5; }
.dash-report table.dataTable .qty { font-size: inherit; }
/* ---------- Quantité cliquable d'un tableau (détail des réservations dans une fenêtre) ---------- */
.cell-drill { color: var(--accent); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.cell-drill:hover { text-decoration-style: solid; }

/* ---------- Saisie de mouvements par lot : en-tête commun, tableau des articles, sélection ---------- */
.mv { display: grid; gap: var(--space-3); }
.mv-head { padding: 12px 14px; }
.mv-head__type { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.mv-head__type .hint { margin: 0; flex: 1 1 280px; font-size: .8125rem; }
.mv-head__type .segmented span { padding: 6px 14px; }
.mv-head__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; align-items: end; }
.mv-head__fields .field { gap: 2px; min-width: 0; }
.mv-head__fields .field[hidden] { display: none; }
.mv-head__fields label, .mv-head__fields .label { font-size: .75rem; color: var(--text-muted); font-weight: 600; }
.mv-head__fields .input { min-height: 34px; padding: 4px 10px; font-size: .875rem; }
.mv-head__fields .segmented--sm span { padding: 6px 12px; }
.mv-head__notes { grid-column: auto; }
.mv-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-3); align-items: start; }
@media (max-width: 1100px) { .mv-body { grid-template-columns: 1fr; } .mv-head__notes { grid-column: auto; } }
.mv-items { padding: 12px 14px 8px; }
.mv-items__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.mv-search { position: relative; flex: 1 1 260px; }
.mv-search svg, .mv-search [data-lucide] { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.mv-search .input { width: 100%; min-height: 36px; padding: 4px 10px 4px 34px; }
.mv-items__bar select.input { width: auto; min-height: 36px; padding: 4px 10px; font-size: .8125rem; }
.mv-only { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; cursor: pointer; white-space: nowrap; }
.mv-items__error { margin: 0 0 6px; font-size: .8125rem; color: var(--st-danger); font-weight: 600; }
.mv-items__hint { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: .75rem; }
.mv-items__hint svg { width: 14px; height: 14px; flex: none; }
.mv-items div.dt-container .dt-layout-row { margin: 3px 0; }
.mv-items table.dataTable.compact tbody td { padding: 3px 8px; white-space: nowrap; }
.mv-items table.dataTable.compact tbody td:first-child { white-space: normal; }
.mv-items table.dataTable .cell-id__sub { display: inline; margin-left: 6px; font-size: .6875rem; }
.mv-items table.dataTable tbody tr.is-picked > * { background: var(--accent-soft) !important; box-shadow: none; }
.mv-in { width: 84px; min-height: 28px; padding: 2px 8px; text-align: right; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.mv-in.is-invalid { border-color: var(--st-danger); background: #FBEAE8; }
.mv-unit { display: inline-block; min-width: 44px; text-align: left; font-size: .75rem; }
.mv-ok { color: var(--st-success); }
.mv-bad { color: var(--st-danger); font-weight: 600; }
.mv-cart { padding: 12px 14px; position: sticky; top: var(--space-3); }
.mv-cart__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mv-cart__title h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .95rem; }
.mv-cart__title h2 svg { width: 16px; height: 16px; color: var(--accent); }
.mv-cart .empty { margin: 8px 0; font-size: .8125rem; padding: 0; text-align: left; }
.mv-cart__lines { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.mv-cart__lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: .8125rem; }
.mv-cart__lines li.is-bad .mv-cart__qty { color: var(--st-danger); }
.mv-cart__name { all: unset; cursor: pointer; min-width: 0; }
.mv-cart__name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-cart__name:hover strong, .mv-cart__name:focus-visible strong { color: var(--accent); text-decoration: underline; }
.mv-cart__name small, .mv-cart__qty small { display: block; font-size: .6875rem; color: var(--text-muted); }
.mv-cart__qty { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mv-cart__remove { all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 22px; color: var(--text-muted); }
.mv-cart__remove:hover, .mv-cart__remove:focus-visible { background: #FBEAE8; color: var(--st-danger); }
.mv-cart__total { margin: 8px 0 0; font-size: .8125rem; font-weight: 600; }
.mv-cart .stock-box__warning { margin: 8px 0 0; font-size: .78rem; }
.mv-cart__actions { display: grid; gap: 6px; margin-top: 10px; }
.mv-cart__actions .btn { justify-content: center; }

/* ---- Document commercial : réservation à plusieurs articles, fiche et facture (.sd-*) ---- */
.sd { display: grid; gap: var(--space-3); }
.sd-head { padding: 12px 14px; }
.sd-head__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; align-items: start; }
.sd-head__fields .field { gap: 2px; min-width: 0; }
.sd-head__wide { grid-column: span 2; }
.sd-head__fields label, .sd-foot label, .sd-inline label, .sd-payform label { font-size: .75rem; color: var(--text-muted); font-weight: 600; }
.sd-head__fields .input, .sd-foot .input, .sd-inline .input, .sd-payform .input { min-height: 34px; padding: 4px 10px; font-size: .875rem; }
.sd-lines { padding: 12px 14px 10px; }
.sd-lines__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.sd-lines__bar h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .95rem; white-space: nowrap; }
.sd-lines__bar h2 svg { width: 16px; height: 16px; color: var(--accent); }
.sd-lines__add { flex: 1 1 320px; max-width: 560px; margin-left: auto; }
.sd-lines__hint { font-size: .78rem; }
.sd-lines__empty { margin: 4px 0; padding: 14px 0; font-size: .8125rem; }
.sd-lines > .error { display: block; margin: 0 0 6px; font-size: .8125rem; color: var(--st-danger); font-weight: 600; }
.sd-table { width: 100%; font-size: .8438rem; }
.sd-table th { font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; white-space: nowrap; padding: 6px 8px; background: var(--surface-alt); border-bottom: 1px solid var(--border); text-align: left; }
.sd-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.sd-table th.num, .sd-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sd-table tbody tr:last-child td { border-bottom: 0; }
.sd-table .cell-id__sub { display: inline; margin-left: 6px; font-size: .6875rem; }
.sd-table__no { width: 30px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sd-table__tool { width: 30px; text-align: right; }
.sd-in { width: 92px; min-height: 30px; padding: 2px 8px; text-align: right; font-size: .8438rem; font-variant-numeric: tabular-nums; }
.sd-in--sm { width: 64px; }
.sd-in.is-invalid, .sd .input.is-invalid { border-color: var(--st-danger); background: #FBEAE8; }
.sd-unit { display: inline-block; min-width: 40px; text-align: left; font-size: .75rem; }
.sd-bad { color: var(--st-danger); font-weight: 600; }
.btn-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--text-muted); cursor: pointer; }
.btn-icon:hover { background: #FBEAE8; color: var(--st-danger); }
.btn-icon svg { width: 15px; height: 15px; }
.sd-foot { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-3); align-items: start; }
.sd-foot__notes { padding: 12px 14px; display: grid; gap: 10px; }
.sd-foot__notes .field { gap: 2px; }
.sd-foot__notes textarea.input { resize: vertical; }
.sd-deposit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px 12px; align-items: end; }
.sd-totals { padding: 12px 14px; margin: 0; }
.sd-totals dl { margin: 0; }
.sd-totals div, .sd-totals dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .875rem; }
.sd-totals dt { color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.sd-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sd-totals .input-group { display: inline-flex; align-items: center; gap: 4px; }
.sd-totals__tax .input { width: 64px; min-height: 28px; padding: 2px 8px; text-align: right; font-size: .8125rem; }
.sd-totals .sd-totals__grand { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border-strong); font-size: 1rem; }
.sd-totals .sd-totals__grand dt { color: var(--text); font-weight: 600; }
.sd-totals .sd-totals__due { margin-top: 4px; padding: 8px 10px; border-radius: var(--radius); background: var(--accent); }
.sd-totals .sd-totals__due dt, .sd-totals .sd-totals__due dd { color: #fff; font-weight: 600; }
.sd-totals--plain { padding: 0; width: 320px; max-width: 100%; }
.sd-actions { margin-top: 0; }
.sd-show { align-items: start; }
.sd-show__main, .sd-show__side { display: grid; gap: var(--space-3); min-width: 0; }
.sd-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.sd-sum__notes { flex: 1 1 220px; font-size: .8438rem; }
.sd-sum__notes p { margin: 0 0 4px; }
.sd-inline { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.sd-inline .field { gap: 2px; }
.sd-side { padding: 12px 14px; }
.sd-side h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .95rem; }
.sd-side h2 svg { width: 16px; height: 16px; color: var(--accent); }
.sd-side .dl { font-size: .8438rem; gap: 4px 14px; }
.sd-side__hint { margin: 0 0 8px; font-size: .8125rem; }
.sd-pay { list-style: none; margin: 0 0 8px; padding: 0; }
.sd-pay li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: .8438rem; }
.sd-pay li span { display: grid; }
.sd-pay small { font-size: .75rem; }
.sd-payform { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding-top: 4px; }
.sd-payform .field { gap: 2px; min-width: 0; }
.sd-payform__go { grid-column: 1 / -1; justify-content: center; }
.sd-paper { padding: 22px 24px; }
.sd-paper__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--accent); }
.sd-paper__head p { margin: 0; }
.sd-paper__brand { font-size: 1.25rem; font-weight: 600; color: var(--accent); }
.sd-paper__ref { text-align: right; }
.sd-paper__word { font-size: 1.1rem; letter-spacing: .18em; text-transform: uppercase; }
.sd-paper__number { font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 4px !important; }
.sd-paper__parties { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; margin: 14px 0; font-size: .875rem; }
.sd-paper__parties h3 { margin: 0 0 4px; font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.sd-paper__parties p { margin: 0; }
.sd-paper__parties .dl { gap: 3px 16px; }
@media (max-width: 1100px) { .sd-foot { grid-template-columns: 1fr; } .sd-head__wide { grid-column: auto; } }
@media (max-width: 640px) { .sd-deposit, .sd-payform, .sd-paper__parties { grid-template-columns: 1fr; } .sd-totals--plain { width: 100%; } }.sd-return > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .95rem; list-style: none; }
.sd-return > summary::-webkit-details-marker { display: none; }
.sd-return > summary svg { width: 16px; height: 16px; color: var(--accent); }
.sd-return[open] > summary { margin-bottom: 10px; }
.sd-return .sd-lines__hint { font-weight: 400; }
.sd-inline__grow { flex: 1 1 220px; }
.sd-pay__tools { display: flex !important; align-items: center; gap: 8px; }
.sd-pay__tools .btn { min-height: 26px; padding: 0 6px; }
.cell-clip { display: inline-block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.dash-report .cell-clip { max-width: 200px; }

/* Bon de livraison : étapes (remis, signé, déposé) et dépôt du bon signé */
.sd-steps { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.sd-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); }
.sd-steps li > span { display: grid; min-width: 0; }
.sd-steps li strong { font-size: .875rem; color: var(--text); }
.sd-steps li small { font-size: .75rem; }
.sd-steps li svg { width: 20px; height: 20px; flex: none; }
.sd-steps li.is-done { border-color: var(--st-success); }
.sd-steps li.is-done svg { color: var(--st-success); }
.sd-steps li.is-next { border-color: var(--st-warning); border-style: dashed; }
.sd-steps li.is-next svg { color: var(--st-warning); }
.sd-upload { display: grid; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.sd-upload input[type=file] { padding: 6px; height: auto; }
.sd-side__go { margin: 8px 0 0; }
.sd-side__go .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) { .sd-steps { grid-template-columns: 1fr; } }

/* Fiche article : synthèse (position de stock, prix et valeur) puis mouvements et repères, en vue compacte */
.pf-summary { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; padding: 0; margin-bottom: var(--space-4); }
.pf-block { padding: 14px 20px 12px; min-width: 0; }
.pf-block + .pf-block { border-left: 1px solid var(--border); }
.pf-cap { margin: 0 0 8px; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pf-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: end; }
.pf-fig { display: grid; gap: 2px; padding: 0 14px; border-left: 1px solid var(--border); color: inherit; min-width: 0; }
.pf-fig:first-child { padding-left: 0; border-left: 0; }
a.pf-fig:hover { text-decoration: none; }
a.pf-fig:hover .pf-fig__value { color: var(--accent); }
.pf-fig__label { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.pf-fig__value { font-size: 1.25rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-fig__value small { font-size: .75rem; font-weight: 500; color: var(--text-muted); }
.pf-fig--lead .pf-fig__value { font-size: 1.625rem; }
.pf-fig--out .pf-fig__value { color: var(--st-danger); }
.pf-fig--low .pf-fig__value { color: var(--st-warning); }
.pf-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.pf-dot--free, .pf-gauge__free { background: var(--st-success); }
.pf-dot--reserved, .pf-gauge__reserved { background: var(--accent); }
.pf-gauge { position: relative; display: flex; height: 6px; margin: 12px 0 6px; background: var(--surface-alt, #EEF0F3); border-radius: 3px; }
.pf-gauge > span:first-child { border-radius: 3px 0 0 3px; }
.pf-gauge__mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--st-warning); border-radius: 1px; }
.pf-note { margin: 8px 0 0; font-size: .75rem; color: var(--text-muted); }
.pf-gauge + .pf-note { margin-top: 0; }
.pf-body { align-items: start; gap: var(--space-4); }
.pf-side { display: grid; gap: var(--space-4); min-width: 0; }
.pf-card { padding: 14px 16px; }
.pf-card .card__title { margin-bottom: 8px; }
.pf-card .card__title h2 { font-size: .9375rem; }
.pf-card .card__title h2 [data-lucide] { width: 16px; height: 16px; color: var(--accent); }
.pf-table { width: 100%; font-size: .8125rem; }
.pf-table th { font-size: .6563rem; padding: 5px 8px; }
.pf-table td { padding: 5px 8px; vertical-align: middle; font-variant-numeric: tabular-nums; }
.pf-table th:first-child, .pf-table td:first-child { padding-left: 0; }
.pf-table th:last-child, .pf-table td:last-child { padding-right: 0; }
.pf-table tbody tr:last-child td { border-bottom: 0; }
.pf-table .badge { font-size: .6875rem; padding: 1px 8px; }
.pf-table__doc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.pf-table__act { text-align: right; }
.pf-table__act a { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); }
.pf-table__act a:hover { border-color: var(--accent); color: var(--accent); }
.pf-table__act [data-lucide] { width: 13px; height: 13px; }
.pf-list { list-style: none; margin: 0; padding: 0; font-size: .8125rem; }
.pf-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.pf-list li:last-child { border-bottom: 0; }
.pf-list a { display: grid; min-width: 0; color: inherit; }
.pf-list small { font-size: .6875rem; }
.pf-dl { font-size: .8125rem; gap: 5px var(--space-4); }
@media (max-width: 980px) { .pf-summary { grid-template-columns: 1fr; } .pf-block + .pf-block { border-left: 0; border-top: 1px solid var(--border); } }
@media (max-width: 560px) { .pf-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; } .pf-fig:nth-child(odd) { padding-left: 0; border-left: 0; } .pf-table__doc { display: none; } }

/* Paramètres : dépôts et catégories côte à côte, lignes modifiables serrées */
.st-summary { grid-template-columns: 1fr; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.st-list { font-size: .8125rem; }
.st-row { display: grid; align-items: center; gap: 8px; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.st-list--wh .st-row { grid-template-columns: 64px minmax(0, 1.3fr) minmax(0, 1fr) 56px 130px 40px 28px; }
.st-list--cat .st-row { grid-template-columns: minmax(0, 1fr) 56px 40px 28px; }
.st-row--head { padding: 0 0 5px; font-size: .6563rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.st-row--head span:not(.num) { padding-left: 9px; }
.st-row .num { text-align: right; }
.st-row .input { width: 100%; min-width: 0; height: 30px; min-height: 0; padding: 0 8px; font-size: .8125rem; border-color: transparent; background: transparent; box-shadow: none; }
.st-row .input:hover { border-color: var(--border); }
.st-row .input:focus { border-color: var(--accent); background: var(--surface); }
.st-row input[name=name] { font-weight: 600; }
.st-code { text-transform: uppercase; color: var(--text-muted); }
.st-row.is-off .input, .st-row.is-off .num { color: var(--text-muted); font-weight: 400; }
.st-switch { appearance: none; -webkit-appearance: none; position: relative; width: 30px; height: 17px; margin: 0 0 0 9px; border-radius: 99px; background: var(--border-strong, #C9CDD4); cursor: pointer; transition: background .15s; vertical-align: middle; }
.st-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.st-switch:checked { background: var(--st-success); }
.st-switch:checked::after { transform: translateX(13px); }
.st-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-save { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text-muted); cursor: pointer; }
.st-save:hover, .st-row:focus-within .st-save { border-color: var(--accent); color: var(--accent); }
.st-save [data-lucide] { width: 14px; height: 14px; }
.st-row--new { border-bottom: 0; padding-top: 8px; }
.st-row--new .input { border-color: var(--border); border-style: dashed; background: var(--surface); }
.st-row--new input[name=name] { font-weight: 400; }
.st-add { grid-column: -4 / -1; justify-content: center; }
.st-list--wh .st-add { grid-column: 4 / -1; justify-self: end; }
.st-list--cat .st-add { grid-column: 2 / -1; }
@media (max-width: 1080px) { .st-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .st-list--wh .st-row { grid-template-columns: 56px minmax(0, 1fr) 40px 28px; } .st-list--wh .st-row > :nth-child(4), .st-list--wh .st-row > a.num, .st-list--wh .st-row > span.num, .st-list--wh .st-row--head > :nth-child(3), .st-list--wh .st-row--head > :nth-child(4), .st-list--wh .st-row--head > :nth-child(5) { display: none; } .st-list--wh .st-add { grid-column: 3 / -1; } }

.sd-paper__logo { display: block; height: 46px; width: auto; margin-bottom: 4px; }
