/* Composants métier SIRC / SIM-ÉTAT. Aucune couleur en dur : tokens uniquement. */

/* ---------- Avatar, tuile d'icône ---------- */
.avatar {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-text); font-size: 13px; font-weight: 600;
}
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.tile {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface-2); color: var(--text-2);
}
.tile.brand { background: var(--brand-soft); color: var(--brand-text); }
.tile.accent { background: var(--accent-soft); color: var(--accent-text); }
.tile.danger { background: var(--danger-soft); color: var(--danger-text); }
.tile.warning { background: var(--warning-soft); color: var(--warning-text); }
.tile.success { background: var(--success-soft); color: var(--success-text); }
.tile.info { background: var(--info-soft); color: var(--info-text); }

/* ---------- Plaque d'immatriculation ---------- */
.plate {
  display: inline-flex; align-items: center; flex: none;
  min-height: 24px; padding: 0 var(--s2); border-radius: 6px;
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--text);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---------- Lignes de liste riches ---------- */
.list-row {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  min-height: 64px; padding: var(--s3) var(--s4); border: 0; background: transparent;
  color: var(--text); text-align: left;
  transition: background-color var(--t-fast);
}
.list-row + .list-row { box-shadow: inset 0 1px 0 var(--border); }
a.list-row:active, button.list-row:active { background: var(--surface-2); }
@media (hover: hover) { a.list-row:hover, button.list-row:hover { background: var(--surface-2); } }
.list-row .main-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); color: var(--text-2); min-width: 0; }
.list-row .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; font-size: var(--fs-small); color: var(--text-2); }
.list-row .amount { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Carte véhicule ---------- */
.vcard {
  display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s4); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1);
  color: var(--text);
}
.vcard-head { display: flex; align-items: center; gap: var(--s3); }
.vcard-head .main-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vcard-head .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard-driver {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s3); border-radius: var(--r-field); background: var(--surface-2);
  font-size: var(--fs-small);
}
.vcard-driver .avatar { width: 28px; height: 28px; font-size: 11px; }
.vcard-driver .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard .actions-row { margin-top: auto; }
.vcard .actions-row .btn { min-height: 40px; font-size: 14px; }
.vcard-actions { display: flex; align-items: center; gap: var(--s2); }
.vcard-actions > form, .vcard-actions > .btn { flex: 1 1 0; min-width: 0; }
.vcard-actions > .icon-btn { flex: none; margin-left: auto; }
.page .vcard-actions .btn { min-width: 0; }

/* ---------- Indicateurs ---------- */
.kpi {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: var(--s3) var(--s4); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1);
}
.kpi .k-label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.kpi .k-value { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .k-value small { font-size: var(--fs-small); color: var(--text-2); font-weight: 500; letter-spacing: 0; }

/* ---------- Jauge de points (SVG : aucun style inline) ---------- */
.points { display: flex; align-items: center; gap: var(--s4); }
.ring { position: relative; flex: none; width: 76px; height: 76px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.ring .value { fill: none; stroke: var(--brand); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray var(--t-slow) var(--ease-out); }
.ring.low .value { stroke: var(--danger); }
.ring .label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; font-size: var(--fs-h3); font-variant-numeric: tabular-nums; }

/* ---------- Demande en attente (mise en avant orange) ---------- */
.request {
  display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s4); border-radius: var(--r-card); background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow-1);
}
.request .actions-row .btn { min-height: 44px; }

/* ---------- Écran Scanner ---------- */
.scanner {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 3 / 4; max-height: 62dvh; width: 100%; border-radius: var(--r-sheet); overflow: hidden;
  background: var(--camera);
}
.scanner-frame { position: relative; width: 64%; aspect-ratio: 1; }
.scanner-frame i { position: absolute; width: 28px; height: 28px; border: 3px solid var(--accent); }
.scanner-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scanner-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scanner-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scanner-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scanner-line {
  position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: scan 2.4s var(--ease-out) infinite alternate;
}
@keyframes scan { from { top: 12%; } to { top: 88%; } }
.scanner-hint { position: absolute; bottom: var(--s4); left: 0; right: 0; text-align: center; color: var(--camera-text); font-size: var(--fs-small); }
@media (prefers-reduced-motion: reduce) { .scanner-line { animation: none; } }

/* ---------- Divers ---------- */
.kv { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; font-size: 14px; }
.kv + .kv { box-shadow: inset 0 1px 0 var(--border); }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 500; text-align: right; }
.searchbar { position: relative; }
.searchbar .ic { position: absolute; left: var(--s4); top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.searchbar .input { padding-left: 44px; }
.badge .ic { width: 14px; height: 14px; }

/* ---------- Page de connexion ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: var(--s5) var(--gutter); background: var(--surface-2); }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); border-radius: var(--r-sheet); background: var(--surface); box-shadow: var(--shadow-2); }
.auth-brand { display: flex; align-items: center; gap: var(--s3); }
.auth-brand .brand-mark { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.auth-brand .brand-mark.is-logo { display: block; border-radius: 50%; background: none; }
.form-error { padding: var(--s2) var(--s3); border-radius: var(--r-field); background: var(--danger-soft); color: var(--danger-text); font-size: var(--fs-small); }

/* ---------- Historique (frise verticale) ---------- */
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history li { position: relative; display: flex; gap: var(--s3); padding: 0 0 var(--s4) var(--s5); }
.history li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--border); box-shadow: 0 0 0 3px var(--surface); }
.history li::after { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.history li:last-child { padding-bottom: 0; }
.history li:last-child::after { display: none; }
.history li.current::before { background: var(--brand); }
.history li.done::before { background: var(--success); }
.history .when { white-space: nowrap; font-size: var(--fs-small); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Tableaux denses (console, desktop) ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: var(--s3) var(--s4); white-space: nowrap; }
.table td { padding: var(--s3) var(--s4); box-shadow: inset 0 1px 0 var(--border); vertical-align: middle; }
.table tr.link { cursor: pointer; }
.table tr.link:hover td { background: var(--surface-2); }
.table .num { text-align: right; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0; }
dl { margin: 0; }
.appbar .searchbar { width: min(360px, 40vw); }
.appbar .searchbar .input { min-height: 40px; }

/* =====================================================================
   ACCUEIL — carte SIRC (héro), actions rapides, carrousel, activité
   ===================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--s4);
  padding: var(--s5) var(--s4) var(--s4); border-radius: var(--r-sheet);
  color: var(--brand-hero-ink);
  background: var(--brand-hero-to);  /* couleur unie, sans dégradé ni motif (choix de l'utilisateur) */
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-hero-to) 28%, transparent);
}
/* Seul ornement : le liseré orange / blanc / vert */

.hero-top { display: flex; align-items: flex-start; gap: var(--s3); }
.hero-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hero-label { font-size: var(--fs-small); font-weight: 500; opacity: .85; }
.hero-name { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }
.hero-chip {
  display: inline-flex; align-items: center; gap: var(--s1); align-self: flex-start;
  min-height: 26px; padding: 0 var(--s2); border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 600;
}
.hero-chip .ic { width: 14px; height: 14px; }
.hero-qr {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px; border: 0; border-radius: 16px;
  background: var(--brand-hero-ink); color: var(--brand-hero-from); box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform var(--t-fast) var(--ease-out);
}
.hero-qr .ic { width: 26px; height: 26px; stroke-width: 2; }
.hero-qr:active { transform: scale(.94); }

.hero-points { display: flex; align-items: flex-end; gap: var(--s3); }
.hero-big { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-big small { font-size: var(--fs-body); font-weight: 500; letter-spacing: 0; opacity: .8; margin-left: 2px; }
.hero-pending { margin-left: auto; padding-bottom: 4px; font-size: var(--fs-small); font-weight: 600; color: var(--accent-soft-on-hero, #FFD3A3); }

.hero-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.hero-tile {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--s2) var(--s3);
  border-radius: var(--r-field); background: rgba(255, 255, 255, .11);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-tile span { font-size: 12px; opacity: .85; white-space: nowrap; }
.hero-tile strong { font-size: var(--fs-h3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

.hero-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s2); }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; border: 0; border-radius: var(--r-field); font-weight: 600;
  transition: transform var(--t-fast) var(--ease-out);
}
.hero-btn:active { transform: scale(.97); }
.hero-btn.solid { background: var(--accent); color: var(--accent-ink); }
.hero-btn.glass { background: rgba(255, 255, 255, .14); color: var(--brand-hero-ink); }

/* ---------- Actions rapides : pastilles colorées, mélange de teintes ---------- */
.qa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3) var(--s2); }
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
  padding: 0; border: 0; background: none; color: var(--text); font-size: 12px; font-weight: 500; text-align: center;
}
.qa-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 20px;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.qa-icon .ic { width: 24px; height: 24px; }
.qa:active .qa-icon { transform: scale(.92); }
@media (hover: hover) { .qa:hover .qa-icon { box-shadow: var(--shadow-2); transform: translateY(-1px); } }
.qa span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa.c-brand .qa-icon { background: var(--brand-soft); color: var(--brand-text); }
.qa.c-accent .qa-icon { background: var(--accent-soft); color: var(--accent-text); }
.qa.c-info .qa-icon { background: var(--info-soft); color: var(--info-text); }
.qa.c-warning .qa-icon { background: var(--warning-soft); color: var(--warning-text); }
.qa.c-danger .qa-icon { background: var(--danger-soft); color: var(--danger-text); }
.qa.c-neutral .qa-icon { background: var(--surface-2); color: var(--text); }

/* ---------- Carrousel (mobile) / grille (desktop) ---------- */
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: var(--s3);
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) var(--s2);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }

/* ---------- Fil d'activité (façon relevé) ---------- */
.feed-day { padding: var(--s2) var(--s4) var(--s1); font-size: 12px; font-weight: 600; color: var(--text-2); }
.feed-day + .list-row { box-shadow: none; }
.amount.neg { color: var(--danger-text); }
.amount.pos { color: var(--success-text); }

/* ---------- Grand QR (feuille « Ma carte ») ---------- */
.qr-card { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s2) 0 var(--s3); text-align: center; }
.qr-box { width: min(260px, 72vw); aspect-ratio: 1; padding: 14px; border-radius: 24px; background: var(--qr-bg); box-shadow: var(--shadow-2); }
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-code-text { font-size: var(--fs-h3); font-weight: 600; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

@media (min-width: 900px) {
  .hero { padding: var(--s6) var(--s5) var(--s5); }
  .hero-big { font-size: 52px; }
  .qa-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .carousel { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { .qa-icon, .hero-btn, .hero-qr { transition: none; } }

/* =====================================================================
   CONNEXION — marque, langue, téléphone, code à 6 chiffres
   ===================================================================== */
.signin {
  /* Démarrage sur fond blanc (choix de l'utilisateur) : la marque n'apparaît que dans le logo */
  min-height: 100dvh; display: grid; place-items: start center;
  padding: calc(var(--safe-t) + var(--s5)) var(--gutter) var(--s6);
  background: var(--bg);
}
.signin-col { width: min(420px, 100%); display: flex; flex-direction: column; gap: var(--s5); }
.signin-brand { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 72px; padding-top: var(--s3); color: var(--text); }
.signin-mark { display: block; width: 44px; height: 44px; border-radius: 50%; }
.signin-name { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.signin-card { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5) var(--s4); border-radius: var(--r-sheet); background: var(--surface); box-shadow: var(--shadow-2); }
.signin-title { font-size: var(--fs-h2); }
.signin-link { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); color: var(--text-2); font-size: var(--fs-small); font-weight: 500; }
.signin-link .ic { width: 16px; height: 16px; }
.signin-resend { justify-content: center; }
@media (min-width: 900px) { .signin { place-items: center; background: var(--surface-2); } .signin-card { padding: var(--s6) var(--s5); } }

.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.lang-tile {
  position: relative; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3);
  border-radius: var(--r-card); background: var(--surface-2); cursor: pointer;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow var(--t-fast), background-color var(--t-fast);
}
.lang-tile input { position: absolute; opacity: 0; pointer-events: none; }
.lang-tile:has(input:checked) { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.lang-tile:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.lang-initial { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); font-weight: 700; color: var(--brand-text); }
.lang-label { font-weight: 600; }
.lang-play { position: absolute; top: var(--s2); right: var(--s2); width: 36px; height: 36px; }

.phone-input { position: relative; display: flex; align-items: center; }
.phone-prefix { position: absolute; left: var(--s4); font-weight: 600; color: var(--text-2); font-size: var(--fs-h3); pointer-events: none; }
.phone-input .input { padding-left: 72px; letter-spacing: .04em; }

.otp { position: relative; }
.otp-input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.01; border: 0; font-size: 16px;
  caret-color: transparent; letter-spacing: 2em; z-index: 1;
}
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2); }
.otp-boxes span {
  display: grid; place-items: center; height: 56px; border-radius: var(--r-field);
  background: var(--surface-2); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow var(--t-fast);
}
.otp-boxes span.filled { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); }
.otp:focus-within .otp-boxes span.active { box-shadow: inset 0 0 0 2px var(--brand); }
.field.has-error .otp-boxes span { box-shadow: inset 0 0 0 1.5px var(--danger); }

/* Écran vide accompagné d'une action (ex. rattacher son identité) */
.cta-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); padding: var(--s4); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1); }
.list-row .select { width: auto; min-width: 128px; min-height: 40px; }
.scanner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner.is-live .scanner-hint { text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.break-all { word-break: break-all; }
a.hero-tile { color: inherit; text-decoration: none; }
.narrow { max-width: 680px; }  /* formulaires et fiches : lisibles sur grand écran */
.hero-actions.single { grid-template-columns: 1fr; }

/* ---------- Liste compacte des véhicules (accueil) ---------- */
.vlist { display: grid; gap: var(--s2); }
@media (min-width: 900px) { .vlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vrow {
  display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: 10px var(--s3);
  border-radius: var(--r-field); background: var(--surface); box-shadow: var(--shadow-1); color: var(--text);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.vrow:active { transform: scale(.98); }
@media (hover: hover) { .vrow:hover { box-shadow: var(--shadow-2); } }
.vrow > .ic { flex: none; width: 18px; height: 18px; color: var(--text-2); }
.vrow-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; }
.vrow-icon .ic { width: 20px; height: 20px; }
.vrow-icon.is-brand { background: var(--brand-soft); color: var(--brand-text); }
.vrow-icon.is-success { background: var(--success-soft); color: var(--success-text); }
.vrow-icon.is-warning { background: var(--accent-soft); color: var(--accent-text); }
.vrow-icon.is-danger { background: var(--danger-soft); color: var(--danger-text); }
.vrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vrow-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vrow-meta { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: var(--fs-small); color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vrow-plate { flex: none; padding: 1px 6px; border: 1.5px solid currentColor; border-radius: 5px; color: var(--text);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }

/* ---------- Plan des caméras (console Police) ---------- */
.police-plan { display: block; width: 100%; height: auto; }
.police-plan .plan-bg { fill: var(--surface-2); }
.police-plan .plan-cam { fill: var(--text-2); stroke: var(--surface); stroke-width: 2; }
.police-plan .plan-cam.is-hit { fill: var(--danger); }
.police-plan .plan-halo { fill: var(--danger); opacity: .18; }
.police-plan .plan-halo.is-latest { animation: plan-pulse 1.6s var(--ease-out) infinite; transform-box: fill-box; transform-origin: center; }
.police-plan .plan-label { fill: var(--text-2); font-size: 11px; font-weight: 500; }
.police-plan .plan-label.is-hit { fill: var(--danger-text); font-size: 13px; font-weight: 600; }
@keyframes plan-pulse { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .police-plan .plan-halo.is-latest { animation: none; } }
.plate.sm { min-height: 20px; padding: 0 6px; font-size: 11px; }

/* ---------- Bandeau d'alerte (véhicule volé détecté) ---------- */
.alert-banner {
  display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-card);
  background: var(--danger-soft); color: var(--danger-text); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 35%, transparent);
}
.alert-banner .strong { color: var(--danger-text); }
.alert-banner > .ic { flex: none; width: 18px; height: 18px; }

/* ---------- Bandeau « État indisponible » (disjoncteur ouvert, SPEC § 14.9) ---------- */
.state-banner {
  display: flex; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); padding: var(--s3);
  border-radius: var(--r-card); background: var(--warning-soft); color: var(--warning-text); font-size: 13px; line-height: 1.4;
}
.state-banner .strong { color: var(--warning-text); }
.state-banner > .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* ---------- Lecture de documents ---------- */
.doc-shot {
  position: relative; display: grid; place-items: center; aspect-ratio: 85.6 / 54; overflow: hidden; cursor: pointer;
  border-radius: var(--r-card); background: #1c2421; color: #fff;
}
.doc-frame { position: absolute; inset: 9%; pointer-events: none; }
.doc-frame i { position: absolute; width: 26px; height: 26px; border: 3px solid var(--accent); }
.doc-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.doc-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.doc-frame i:nth-child(3) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.doc-frame i:nth-child(4) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.doc-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.doc-hint { position: relative; display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 12px;
  border-radius: var(--r-pill); background: rgba(0, 0, 0, .55); font-size: var(--fs-small); font-weight: 600; }
.doc-tips { margin: 0; padding-left: 1.1em; display: grid; gap: 2px; }
.doc-review { display: grid; gap: var(--s4); max-width: 1120px; }
@media (min-width: 900px) { .doc-review { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.doc-photo { margin: 0; border-radius: var(--r-card); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-1); }
.doc-photo img { display: block; width: 100%; height: auto; }
@media (min-width: 900px) { .doc-photo { position: sticky; top: var(--s4); } }
.field.is-low .input { background: var(--warning-soft); box-shadow: inset 0 0 0 1.5px var(--warning); }
.field.is-low label::after { content: " · à vérifier"; color: var(--warning-text); font-weight: 600; }
mark.doc-low-mark { padding: 0 4px; border-radius: 4px; background: var(--warning-soft); color: var(--warning-text); }
.doc-warn { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-field);
  background: var(--warning-soft); color: var(--warning-text); }
.doc-warn .ic { flex: none; width: 16px; height: 16px; }
.tile.spin .ic { animation: doc-spin 1s linear infinite; }
@keyframes doc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tile.spin .ic { animation: none; } }

/* ---------- Studio des voix ---------- */
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s2); }
.voice-cell { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-field); background: var(--surface-2); }
.voice-cell.has-audio { box-shadow: inset 0 0 0 1.5px var(--success); }
.voice-cell.is-recording { box-shadow: inset 0 0 0 2px var(--danger); background: var(--danger-soft); }
.voice-cell audio { width: 100%; height: 32px; }

/* ---------- Carte SIRC (anciens permis) ---------- */
.sirc-card { position: relative; overflow: hidden; display: grid; gap: var(--s3); padding: var(--s4);
  border-radius: 14px; background: var(--brand-hero-to); color: #fff; box-shadow: var(--shadow-2); }
.sirc-card header { display: flex; justify-content: space-between; align-items: baseline; }
.sirc-card-body { display: flex; gap: var(--s4); align-items: center; }
.sirc-card-qr { flex: none; width: 38%; max-width: 170px; padding: 8px; border-radius: 10px; background: #fff; }
.sirc-card-qr svg { display: block; width: 100%; height: auto; }
.sirc-card-name { font-size: var(--fs-h3); font-weight: 700; }
.sirc-card footer { opacity: .85; }
.enroll-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s2); }
.enroll-photos figure { margin: 0; }
.enroll-photos img { display: block; width: 100%; border-radius: var(--r-field); background: var(--surface-2); }
@media print {
  .app-nav, .appbar, .nav-bubble, .sidebar, .btn, .icon-btn, .toast-root { display: none !important; }
  .sirc-card { width: 85.6mm; height: 54mm; aspect-ratio: 85.6 / 54; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Espace flotte (tableaux denses) ---------- */
.fleet .table td { vertical-align: middle; }
.fleet-assign { display: flex; gap: var(--s1); align-items: center; }
.fleet-assign .select { min-width: 0; padding-block: 6px; }
.fleet-assign select[name="license"] { flex: 1 1 160px; }
.fleet-assign select[name="hours"] { flex: 0 0 76px; }
.fleet-action { width: 1%; white-space: nowrap; }
.fleet-sample { margin: 0; padding: var(--s3); border-radius: var(--r-field); background: var(--surface-2); overflow-x: auto; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fleet-assign select[name="license"] { min-width: 190px; }
@media (max-width: 700px) {
  /* Tableaux de flotte sur téléphone : chaque ligne devient une carte compacte (rien hors de l'écran). */
  .fleet .table-wrap { overflow: visible; }
  .fleet .table thead { display: none; }
  .fleet .table, .fleet .table tbody { display: block; }
  .fleet .table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s3); padding: var(--s3); }
  .fleet .table tr + tr { box-shadow: inset 0 1px 0 var(--border); }
  .fleet .table td { padding: 0; border: 0; box-shadow: none; }
  .fleet .table td:nth-child(4):not(:last-child) { display: none; }  /* assurance : sans libellé, inutile ici */
  .fleet .table td:nth-child(n + 3) { grid-column: 1 / -1; }
  .fleet .table td:empty { display: none; }
  .fleet .fleet-action { width: auto; }
  .fleet-assign select[name="license"] { min-width: 0; }
  .fleet .table tfoot { display: block; }
}

/* ---------- Pilotage (ministère) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s2); }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--shadow-1); color: var(--text); }
.kpi-hero { grid-column: span 2; background: var(--brand-hero-to); color: #fff; }
@media (max-width: 420px) { .kpi-hero { grid-column: 1 / -1; } }
.kpi-label { font-size: var(--fs-small); color: inherit; opacity: .8; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-hero .kpi-value { font-size: 34px; }
.kpi-sub { font-size: 12px; opacity: .85; }
.kpi-link:hover { box-shadow: var(--shadow-2); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s3); font-size: var(--fs-small); color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-1 { background: var(--chart-1); } .sw-2 { background: var(--chart-2); }
.chart { display: block; width: 100%; height: 180px; }
.chart .seg-1 { fill: var(--chart-1); } .chart .seg-2 { fill: var(--chart-2); }
.chart .hit { fill: transparent; }
.chart .bar:hover .seg { opacity: .8; }
.chart .baseline { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; }
.police-plan .plan-dot { fill: var(--chart-2); fill-opacity: .55; stroke: var(--surface); stroke-width: 2; }

/* ---------- Carte SIRC de l'accueil (façon pièce d'identité, QR à présenter) ---------- */
.idcard {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: var(--s4); padding: var(--s5) var(--s4) var(--s4);
  border-radius: 22px; color: var(--brand-hero-ink);
  /* Vif en haut (grands textes), profond dès le milieu (petit texte) : blanc lisible partout */
  background: linear-gradient(165deg, var(--brand-hero-to) 0%, var(--brand-hero-from) 62%);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--brand-hero-from) 30%, transparent);
}
/* Guilloché discret, comme sur les documents officiels : de fins cercles concentriques */
.idcard::before {
  content: ""; position: absolute; z-index: -1; inset: -40% -30% auto auto; width: 120%; aspect-ratio: 1;
  background: repeating-radial-gradient(circle, transparent 0 13px, color-mix(in srgb, #FFFFFF 22%, transparent) 13px 14px);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  opacity: .7; pointer-events: none;
}
.idcard-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.idcard-brand { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 800; font-size: var(--fs-h3); letter-spacing: .08em; }
.idcard-kind { padding: 3px 8px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .2); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.idcard-body { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.idcard-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.idcard-name { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idcard-meta { align-self: flex-start; margin-top: 2px; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .2); font-size: var(--fs-small); font-weight: 600; }
.idcard-points { display: flex; align-items: baseline; gap: 4px; margin-top: var(--s3); font-variant-numeric: tabular-nums; }
.idcard-points strong { font-size: 46px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.idcard-points span { font-size: var(--fs-small); font-weight: 600; }
.idcard-pending { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .2); font-size: 12px; font-weight: 600; }
.idcard-qr {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 116px; padding: 8px 8px 6px; border: 0; border-radius: 16px;
  background: var(--qr-bg); color: #141413; box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
  cursor: zoom-in; transition: transform var(--t-fast) var(--ease-out);
}
.idcard-qr svg { display: block; width: 100%; height: auto; }
.idcard-qr:active { transform: scale(.96); }
.idcard-code { font-size: 10px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.idcard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: var(--s3);
  border-top: 1px solid color-mix(in srgb, var(--brand-hero-ink) 18%, transparent); }
.idcard-stats > * { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 var(--s3); color: inherit; text-decoration: none; }
.idcard-stats > :first-child { padding-left: 0; }
.idcard-stats > * + * { border-left: 1px solid color-mix(in srgb, var(--brand-hero-ink) 18%, transparent); }
.idcard-stats span { font-size: 12px; font-weight: 500; opacity: .9; white-space: nowrap; }
.idcard-stats strong { font-size: var(--fs-h3); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.idcard-stats a strong { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.idcard-cta { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--touch);
  padding: 0 var(--s4); border-radius: var(--r-field); background: var(--brand-hero-ink); color: var(--brand-hero-to); font-weight: 600; }
@media (min-width: 900px) {
  .idcard { padding: var(--s6) var(--s5) var(--s5); }
  .idcard-qr { width: 140px; }
  .idcard-points strong { font-size: 56px; }
}

/* ---------- Actions de l'accueil : sobres, icônes monochromes ---------- */
.home-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.home-actions a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: var(--s3) var(--s1);
  border-radius: var(--r-field); background: var(--surface); box-shadow: var(--shadow-1);
  color: var(--text); font-size: var(--fs-small); font-weight: 600; text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.home-actions .ic { width: 22px; height: 22px; color: var(--brand-text); }
.home-actions span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-actions a:active { transform: scale(.97); }
@media (hover: hover) { .home-actions a:hover { box-shadow: var(--shadow-2); } }
@media (min-width: 900px) {
  .home-actions a { flex-direction: row; justify-content: center; gap: var(--s2); padding: var(--s3); }
}

/* ---------- Véhicules : la plaque sert de repère, l'état est une pastille ---------- */
.vrow > .vrow-plate { padding: 4px 8px; font-size: 12px; }
.vrow-meta .dot { color: var(--text-2); }
.vrow-meta.is-success .dot { color: var(--success); }
.vrow-meta.is-warning .dot { color: var(--warning); }
.vrow-meta.is-danger .dot { color: var(--danger); }
.vrow-meta.is-danger { color: var(--danger-text); font-weight: 600; }

/* ---------- Fil d'activité : une pastille de couleur au lieu d'une icône par ligne ---------- */
.feed { list-style: none; margin: 0; padding: var(--s1) var(--s4); border-radius: var(--r-card, 16px); background: var(--surface); box-shadow: var(--shadow-1); }
.feed-item { position: relative; display: flex; align-items: baseline; gap: var(--s3); padding: 10px 0 10px 18px; }
.feed-item + .feed-item { box-shadow: inset 0 1px 0 var(--border); }
.feed-item::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); }
.feed-item.tone-success::before { background: var(--success); }
.feed-item.tone-warning::before { background: var(--warning); }
.feed-item.tone-danger::before { background: var(--danger); }
.feed-item.tone-info::before { background: var(--info); }
.feed-item.tone-accent::before, .feed-item.tone-brand::before { background: var(--brand); }
.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.feed-title { font-weight: 600; font-size: 14px; }
.feed-meta { font-size: var(--fs-small); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-when { flex: none; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.feed-empty { margin: 0; padding: var(--s4); border-radius: var(--r-card, 16px); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-small); }

/* ---------- Console de l'État : accès aux registres ---------- */
.reg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
@media (min-width: 700px) { .reg-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.reg-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon count" "title title" "more more";
  align-items: center; gap: 2px var(--s3); padding: var(--s3) var(--s4); min-width: 0;
  border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1); color: var(--text); text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.reg-card:active { transform: scale(.98); }
@media (hover: hover) { .reg-card:hover { box-shadow: var(--shadow-2); } }
.reg-card-icon { grid-area: icon; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-text); }
.reg-card-icon .ic { width: 19px; height: 19px; }
.reg-card-count { grid-area: count; justify-self: end; font-size: var(--fs-h2); font-weight: 700; font-variant-numeric: tabular-nums; }
.reg-card-title { grid-area: title; margin-top: var(--s2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-card-more { grid-area: more; display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-small); font-weight: 500; color: var(--brand-text); }
.reg-card-more .ic { width: 14px; height: 14px; }
.reg-tabs { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
.reg-tabs::-webkit-scrollbar { display: none; }
.reg-tabs a { flex: none; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-small); font-weight: 600; white-space: nowrap; }
.reg-tabs a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
/* « À payer » : le montant suit la largeur de sa colonne (« 1 162 500 F » tient sur 360 px) */
.idcard-stats > a { container-type: inline-size; }
.idcard-stats > a strong { font-size: min(var(--fs-h3), 15cqi); }

/* Cases à cocher compactes (formulaires de la console : catégories de permis) */
.check-row { gap: var(--s2); }
.check { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-pill); background: var(--surface-2); font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.check:has(input:checked) { background: var(--brand-soft); color: var(--brand-text); }

/* Galerie de photos (console : scans de pièces, photos de véhicules) */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s2); }
.photo { margin: 0; display: flex; flex-direction: column; gap: 4px; border-radius: var(--r-field); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.photo figcaption { padding: 0 var(--s2) var(--s1); align-items: center; }
.photo-add { align-items: center; justify-content: center; gap: var(--s2); min-height: 120px; color: var(--text-2); font-size: var(--fs-small); font-weight: 600; text-align: center; padding: var(--s3); box-shadow: inset 0 0 0 1.5px var(--border); background: transparent; }
.photo-add .ic { width: 24px; height: 24px; }
.kv-grid { gap: var(--s1) var(--s4); }

/* Contrôle routier (agent de police) */
.police-photo { width: 64px; height: 80px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.card.is-alert { box-shadow: inset 0 0 0 2px var(--danger), var(--shadow-1); }

/* Photo de la caméra (preuve du constat) */
.evidence-photo { display: block; width: 100%; height: auto; border-radius: var(--r-field); background: #111; }
.infra-amount { font-size: var(--fs-h1); }

/* Accueil : avis à régler (bordure d'alerte, lignes compactes) */
.due-card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-card);
  background: var(--surface); box-shadow: inset 4px 0 0 var(--danger), var(--shadow-1); }
.due-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; color: var(--text); text-decoration: none; }
.due-row + .due-row { box-shadow: inset 0 1px 0 var(--border); }
.due-row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }

/* ---------- Fiches de la console : synthèse, pastilles, points (Lot 19) ---------- */
.stack-xs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gap-xs { gap: 4px; }
.t-danger { color: var(--danger-text); }
.t-warning { color: var(--warning-text); }
.t-success { color: var(--success-text); }
.chip-sm { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-sm.c-success { background: var(--success-soft); color: var(--success-text); }
.chip-sm.c-warning { background: var(--warning-soft); color: var(--warning-text); }
.chip-sm.c-danger { background: var(--danger-soft); color: var(--danger-text); }
.chip-sm.c-info { background: var(--info-soft); color: var(--info-text); }
.chip-sm.c-brand { background: var(--brand-soft); color: var(--brand-text); }
.chip-sm.c-neutral { background: var(--surface-2); color: var(--text-2); }
.person-head { display: grid; gap: var(--s4); padding: var(--s4); }
@media (min-width: 900px) { .person-head { grid-template-columns: 1fr auto; align-items: center; } }
.person-id { display: flex; gap: var(--s3); align-items: flex-start; min-width: 0; }
.person-photo { width: 72px; height: 90px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; flex: none; }
.person-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.kpi-mini { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) var(--s3); border-radius: var(--r-field); background: var(--surface-2); min-width: 0; }
.kpi-mini span { font-size: 12px; color: var(--text-2); }
.kpi-mini strong { font-size: var(--fs-h3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-mini small { font-size: 12px; color: var(--text-2); font-weight: 500; }
.points-bar { display: flex; align-items: center; gap: 3px; }
.points-bar i { width: 14px; height: 10px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.points-bar i.on { background: var(--success); box-shadow: none; }
.points-bar i.on.low { background: var(--danger); }
.points-bar .strong { margin-left: var(--s2); }
.points-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.points-form .input { min-height: 36px; padding: 0 10px; }
.points-form input[type=number] { width: 72px; }
.points-form .grow { flex: 1; min-width: 160px; }
.infra-table .thumb { display: block; width: 72px; height: 40px; object-fit: cover; border-radius: 6px; background: #111; }

/* ---------- Notifications (Lot 20) ---------- */
.notif-bell { position: relative; }
.notif-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center;
  border-radius: var(--r-pill); background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.live-zone { position: fixed; z-index: 60; top: calc(var(--safe-t) + 8px); left: 50%; transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; }
.live-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 40px 14px 16px; border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-3), inset 5px 0 0 var(--brand); text-decoration: none;
  animation: live-in .35s var(--ease-out); }
.live-card span { font-size: var(--fs-small); color: var(--text-2); }
.live-card.tone-alert { box-shadow: var(--shadow-3), inset 5px 0 0 var(--danger); }
.live-card.tone-action { box-shadow: var(--shadow-3), inset 5px 0 0 var(--warning); }
.live-card.tone-success { box-shadow: var(--shadow-3), inset 5px 0 0 var(--success); }
.live-close { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); font-size: 20px; cursor: pointer; }
@keyframes live-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .live-card { animation: none; } }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.notif { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-field);
  background: var(--surface); box-shadow: var(--shadow-1), inset 4px 0 0 var(--border); color: var(--text); text-decoration: none; }
.notif.tone-alert { box-shadow: var(--shadow-1), inset 4px 0 0 var(--danger); }
.notif.tone-action { box-shadow: var(--shadow-1), inset 4px 0 0 var(--warning); }
.notif.tone-success { box-shadow: var(--shadow-1), inset 4px 0 0 var(--success); }
.notif.tone-info { box-shadow: var(--shadow-1), inset 4px 0 0 var(--brand); }
.notif.is-new { background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }

/* ---------- Vente : étapes, acheteur vérifié, conditions, accord de l'acheteur, code du guichet ---------- */
.steps { display: flex; gap: var(--s2); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.steps li { flex: 1; display: flex; align-items: center; gap: 6px; padding: var(--s2); border-radius: var(--r-field); background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; }
.steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); font-size: 12px; }
.steps li.current { background: var(--accent-soft); color: var(--text); }
.steps li.current span { background: var(--accent); color: #fff; }
.steps li.done span { background: var(--success-soft); color: var(--success-text); }
.buyer-check, .callout, .disclose, .counter-code { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-field); background: var(--surface-2); }
.callout { box-shadow: inset 3px 0 0 var(--accent); }
.callout p { margin: 0; }
/* Avertissement en ligne (vol provisoire, Lot 21) */
.notice { padding: var(--s2) var(--s3); border-radius: var(--r-field); line-height: 1.45; }
.notice.warning { background: var(--warning-soft); color: var(--warning-text); }
.notice.danger { background: var(--danger-soft); color: var(--danger-text); }
.disclose p { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.ack { display: flex; gap: var(--s2); align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.ack input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); }
.counter-code { text-align: center; }
.counter-code .code { font-size: 30px; font-weight: 700; letter-spacing: .12em; }
.counter-code p { margin: 0; text-align: left; }
fieldset.field { border: 0; margin: 0; padding: 0; }
fieldset.field legend { padding: 0; margin-bottom: var(--s2); font-weight: 600; font-size: 14px; }

/* ---------- Invitation à installer l'application ---------- */
.install-card { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.install-card img { flex: none; border-radius: 50%; box-shadow: var(--shadow-1); }
.install-card p { margin: 0; }
.install-steps .ios-share { vertical-align: -3px; color: var(--info, #2563eb); }
.install-steps { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; line-height: 1.4; }

/* ---------- Tableau de bord de la console (SIM-ÉTAT) : compact, coloré, lisible d'un coup d'œil ---------- */
.hue-orange { --hue: #F77F00; } .hue-green { --hue: #1E8A4C; } .hue-red { --hue: #D93A2B; } .hue-blue { --hue: #2563EB; }
.hue-violet { --hue: #7C3AED; } .hue-teal { --hue: #0D9488; } .hue-amber { --hue: #D97706; } .hue-slate { --hue: #64748B; }
.dash { display: flex; flex-direction: column; gap: var(--s4); }
.dash-mode { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); }
.dash-mode .grow { display: flex; flex-direction: column; min-width: 180px; }
.dash-mode .segmented { flex: 1 1 240px; max-width: 360px; }
.dash-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.dash-action {
  display: flex; align-items: center; gap: var(--s3); padding: var(--s3); min-width: 0;
  border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-1); color: var(--text); text-decoration: none;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.dash-action > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dash-action .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-action:active { transform: scale(.98); }
@media (hover: hover) { .dash-action:hover { box-shadow: var(--shadow-2); } }
.dash-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--hue); color: #fff; }
.dash-ic .ic { width: 20px; height: 20px; }
.dash-todo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
@media (min-width: 900px) { .dash-todo { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.todo-tile {
  display: flex; flex-direction: column; gap: 2px; padding: var(--s2) var(--s3); border-radius: var(--r-card); text-decoration: none; color: var(--text); min-width: 0;
  background: color-mix(in srgb, var(--hue) 11%, var(--surface)); box-shadow: inset 3px 0 0 var(--hue);
}
.todo-tile .todo-n { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--hue); font-variant-numeric: tabular-nums; }
.todo-tile .todo-l { font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--text-2); }
.todo-tile.is-zero { background: var(--surface); box-shadow: var(--shadow-1); }
.todo-tile.is-zero .todo-n { color: var(--text-3, var(--text-2)); }
.reg-dot { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--hue) 14%, transparent); color: var(--hue); }
.reg-dot .ic { width: 17px; height: 17px; }
.reg-row .reg-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-cols { display: grid; gap: var(--s4); }
@media (min-width: 900px) {
  .dash-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .dash-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
