/* Admin Fast Serious — même langage que le site : noir, blanc, le bleu du logo. */
:root {
  --ink: #111111; --ink-2: #4d4d4d; --muted: #767676; --line: #e2e2e2; --bg: #f6f6f6; --card: #ffffff;
  --blue: #1b5fd9; --wa: #128c4b; --danger: #b3261e; --warn: #9a5b00;
  --radius: 10px;
  --body: Manrope, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); font-size: 15px; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
a { color: var(--ink); text-underline-offset: 3px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.brand { display: block; margin: 0; }
.brand img { display: block; height: 44px; width: auto; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; border-color: #333; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { background: #0e7a41; border-color: #0e7a41; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: #fdf3f2; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* champs */
input, select, textarea { min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .15s; }
input:hover, select:hover, textarea:hover { border-color: #bdbdbd; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
input[type="search"] { width: min(340px, 100%); background: #fff; }
input[type="checkbox"] { min-height: 0; accent-color: var(--ink); }

/* connexion */
.login { width: min(380px, 100% - 32px); margin: 14vh auto 0; padding: 32px; display: grid; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.login .brand img { height: 56px; margin-bottom: 8px; }
.login h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.login label { font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.login .btn { min-height: 48px; margin-top: 4px; }
.error { color: var(--danger); font-size: .9rem; font-weight: 600; }

/* structure */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 22px 14px 18px; background: #fff; border-right: 1px solid var(--line); }
.side .brand { padding: 0 8px; }
.side nav { display: grid; gap: 4px; }
.side nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-weight: 600; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.side nav button:hover { background: var(--bg); color: var(--ink); }
.side nav button.on { background: var(--ink); color: #fff; }
.side nav button .lbl { flex: 1; }
.pill { min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: .74rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; display: grid; gap: 4px; font-size: .88rem; }
.side-foot p { padding: 0 12px 10px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.side-foot a, .side-foot .linkish { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.side-foot a:hover, .side-foot .linkish:hover { background: var(--bg); color: var(--ink); }
.main { padding: 28px 32px 72px; min-width: 0; }

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.page-head p { color: var(--muted); font-weight: 600; }
.page-head p::first-letter { text-transform: uppercase; }

/* indicateurs */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.kpi { margin: 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.kpi dt { font-size: .82rem; font-weight: 600; color: var(--muted); }
.kpi dd { margin-top: 6px; font-weight: 800; font-size: 1.9rem; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi.alert { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--blue); }
.kpi.alert dd { color: var(--blue); }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.toolbar h2 { font-size: 1.1rem; font-weight: 800; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; font-size: .88rem; color: var(--ink-2); cursor: pointer; transition: border-color .15s; }
.filters button:hover { border-color: var(--ink); }
.filters button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters button span { opacity: .6; margin-left: 6px; font-variant-numeric: tabular-nums; }

/* tableaux */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; text-align: left; font-size: .78rem; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px; border-top: 1px solid #efefef; vertical-align: top; }
tbody tr:first-child td { border-top: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num { font-weight: 700; }
tbody tr.click { cursor: pointer; transition: background .12s; }
tbody tr.click:hover { background: #fafafa; }
td small { display: block; color: var(--muted); white-space: nowrap; font-size: .84rem; }
.ref { font-weight: 800; white-space: nowrap; }
.route { max-width: 360px; }
.route span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route span + span { color: var(--ink-2); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; color: var(--ink); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.badge.nouvelle { border-color: var(--blue); color: var(--blue); }
.badge.nouvelle::before { background: var(--blue); }
.badge.validee::before { background: #d08a00; }
.badge.acompte_paye::before { background: var(--wa); }
.badge.terminee { color: var(--ink-2); }
.badge.terminee::before { background: #111; }
.badge.annulee { color: var(--danger); }
.badge.annulee::before { background: var(--danger); }
.driver-tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.driver-tag i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.none { color: var(--warn); font-weight: 700; }

/* calendrier */
.daynav { display: flex; gap: 6px; align-items: center; }
.week { display: flex; gap: 4px; }
.week button { min-width: 56px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--ink-2); }
.week button:hover { border-color: var(--ink); }
.week button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.week button b { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.timeline { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.tl-inner { min-width: 900px; }
.tl-row { display: grid; grid-template-columns: 160px 1fr; border-top: 1px solid var(--line); min-height: 62px; }
.tl-row:first-child { border-top: 0; min-height: 0; }
.tl-name { position: sticky; left: 0; z-index: 2; background: #fff; padding: 10px 14px; font-weight: 700; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.tl-name i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tl-name small { display: block; font-weight: 500; color: var(--muted); }
.tl-track { position: relative; background-image: repeating-linear-gradient(90deg, #efefef 0 1px, transparent 1px calc(100% / 24)); }
.tl-hours { display: grid; grid-template-columns: repeat(24, 1fr); font-size: .72rem; font-weight: 600; color: var(--muted); }
.tl-hours span { padding: 7px 0 7px 5px; }
.tl-block { position: absolute; top: 8px; bottom: 8px; min-width: 46px; padding: 4px 8px; border: 0; border-radius: 6px; color: #fff; font-size: .76rem; font-weight: 700; text-align: left; overflow: hidden; white-space: nowrap; cursor: pointer; line-height: 1.3; }
.tl-block small { display: block; font-weight: 500; opacity: .9; }
.tl-block.pending { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .25) 0 6px, transparent 6px 12px); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 1; }

/* réglages */
.settings { display: grid; gap: 16px; max-width: 920px; }
.settings + .settings, .wa-box { margin-top: 16px; }
.settings fieldset, .wa-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; margin: 0; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.settings legend { float: left; width: 100%; grid-column: 1 / -1; padding: 0; margin-bottom: 4px; font-size: 1.05rem; font-weight: 800; }
.settings label { display: grid; gap: 6px; font-size: .86rem; font-weight: 700; color: var(--ink-2); align-content: start; }
.settings label.inline { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; font-weight: 600; color: var(--ink); }
.settings label.inline input { width: 18px; height: 18px; }
.settings small { font-weight: 500; color: var(--muted); }
.saved { color: var(--wa); font-weight: 700; margin-left: 10px; }

/* groupes WhatsApp */
.wa-box { display: block; max-width: 920px; }
.wa-box h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; }
.wa-state { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-weight: 700; }
.wa-state .dot { width: 10px; height: 10px; border-radius: 50%; background: #d08a00; }
.wa-state .dot.ok { background: var(--wa); }
.wa-note { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.wa-qr { display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.wa-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; margin-bottom: 16px; }
.wa-group { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.wa-group:hover { background: var(--bg); }
.wa-group input { width: 18px; height: 18px; }

/* panneau de détail */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .4); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(520px, 100%); padding: 26px 26px 40px; overflow-y: auto; background: #fff; border-left: 1px solid var(--line); animation: drawer .22s cubic-bezier(.2, .7, .2, 1); }
@keyframes drawer { from { transform: translateX(24px); } }
.drawer header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer h2 { font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.1; }
.drawer header p { margin-top: 4px; color: var(--ink-2); font-weight: 600; }
.drawer h3 { margin: 26px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .95rem; font-weight: 800; }
.drawer .close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink); }
.drawer .close:hover { background: #e9e9e9; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { font-weight: 600; overflow-wrap: anywhere; }
.kv dd small { font-weight: 500; color: var(--muted); }
.next { padding: 18px; border-radius: var(--radius); background: var(--bg); display: grid; gap: 12px; }
.next p { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 label, .stack label { display: grid; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.stack { display: grid; gap: 12px; }
.stack textarea, .stack input, .stack select, .grid2 input { width: 100%; }
.stack textarea { line-height: 1.5; }
.lines li { display: flex; justify-content: space-between; padding: 3px 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lines li.total { font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.events li { padding: 7px 0; border-top: 1px solid #efefef; font-size: .88rem; }
.events li:first-child { border-top: 0; }
.events time { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; font-size: .84rem; color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 13px 20px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 600; animation: toast .2s cubic-bezier(.2, .7, .2, 1); }
@keyframes toast { from { transform: translate(-50%, 10px); } }
.toast.bad { background: var(--danger); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand img { height: 36px; }
  .side nav { display: flex; overflow-x: auto; order: 3; width: 100%; }
  .side nav button { white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; display: flex; gap: 2px; }
  .side-foot p, .side-foot .lbl { display: none; }
  .main { padding: 18px 12px 64px; }
  .page-head h1 { font-size: 1.5rem; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi dd { font-size: 1.5rem; }
  .week { display: none; }
}

/* propositions d'adresse (nouvelle course) */
.acwrap { position: relative; }
.ac { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; margin-top: 4px; max-height: 260px; overflow: auto; padding: 4px; background: #fff; border: 1px solid var(--ink); border-radius: 8px; }
.ac li { padding: 9px 10px; border-radius: 6px; font-weight: 600; color: var(--ink); cursor: pointer; }
.ac li:hover { background: var(--bg); }
.ac li.vague { color: var(--muted); }
.ac li small { display: block; font-weight: 500; font-size: .78rem; }

.toolbar .actions { flex-wrap: nowrap; }
@media (max-width: 860px) { .toolbar .actions { flex-wrap: wrap; } }

/* comptes chauffeurs */
.bal { font-weight: 800; }
.bal.owe { color: var(--danger); }
.bal.owed { color: var(--wa); }
.toolbar a.btn { flex: none; }

/* documents d'une course */
.docbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.docs { display: grid; gap: 4px; }
.doc { font-size: .86rem; font-weight: 700; white-space: nowrap; }
.rides { display: grid; gap: 10px; }
.ride { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.ride-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.ride p { font-weight: 600; overflow-wrap: anywhere; }
.ride .ride-meta { color: var(--muted); font-weight: 600; font-size: .88rem; margin: 4px 0 8px; }

td .docs { margin-top: 8px; }
#search { min-width: 220px; }

.btn.small { min-height: 32px; padding: 0 10px; font-size: .82rem; }
td .docs { display: flex; flex-wrap: wrap; gap: 6px; }
.warn { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--warn); background: #fff8ea; font-weight: 600; font-size: .9rem; }

/* ---------- téléphone : rien ne dépasse de l'écran, la fiche s'ouvre en plein écran ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; max-width: 100vw; }
  .side nav { min-width: 0; max-width: 100%; scrollbar-width: none; }
  .side nav::-webkit-scrollbar { display: none; }
  .side-foot { flex: none; }
  .main, .toolbar, .filters { min-width: 0; max-width: 100%; }
  .toolbar .actions { width: 100%; flex-wrap: wrap; }
  .toolbar .actions input[type="search"], #search { flex: 1 1 100%; width: 100%; min-width: 0; }
  .toolbar h2 { font-size: 1rem; }
  .drawer { width: 100%; padding: 18px 16px 96px; border-left: 0; }
  .drawer .actions .btn, .docbar .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: 84px minmax(0, 1fr); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .settings fieldset { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .login { margin-top: 8vh; padding: 24px; }
}

/* accès du gérant */
.login .linkish { justify-self: center; margin-top: 6px; font-size: .9rem; color: var(--ink-2); }
.login-note { color: var(--muted); font-size: .9rem; }
.codes { margin: 12px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: 600 1.05rem/1.9 ui-monospace, Consolas, monospace; letter-spacing: .06em; }

/* Tableau de bord des comptes, options de course, plusieurs motos */
.kpis.money { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; }
.kpi p { margin-top: 6px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.kpi.in dd { color: var(--wa); }
.kpi.out dd { color: var(--danger); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sub { margin: 22px 0 10px; font-size: .95rem; font-weight: 800; }
td small.opts, .flag { color: var(--blue); font-weight: 700; }
.flag { margin-top: 10px; }
.member { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.member-title { font-weight: 800; }
.tick, .stack label.tick, .grid2 label.tick { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 42px; }
.tick input, .stack .tick input, .grid2 .tick input { width: 18px; height: 18px; flex: none; accent-color: var(--ink); }
@media (max-width: 760px) {
  .kpis.money, .duo { grid-template-columns: minmax(0, 1fr); }
}

/* Cases à cocher : nombre de motos, gilet airbag */
.opts-box { display: grid; gap: 8px; }
.opts-title { font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.boxes { display: flex; flex-wrap: wrap; gap: 8px; }
.stack label.box, .box { position: relative; display: block; cursor: pointer; }
.stack .box input, .box input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.box span { display: grid; place-items: center; min-width: 46px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font-weight: 800; color: var(--ink); }
.box input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.box input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.box.wide span::before { content: ""; width: 16px; height: 16px; margin-right: 8px; border: 2px solid currentColor; border-radius: 4px; }
.box.wide span { display: flex; align-items: center; }
.box.wide input:checked + span::before { background: #fff; box-shadow: inset 0 0 0 3px var(--ink); }

/* Tri de la liste, calendrier du mois, historique, statut de paiement */
.sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.sortbar label { display: flex; align-items: center; gap: 8px; }
.cal-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month .wd { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.day { display: grid; align-content: space-between; gap: 6px; min-height: 76px; padding: 8px; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.day.off { background: none; border: 0; cursor: default; }
.day.today b { color: var(--blue); }
.day.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.marks { display: flex; flex-wrap: wrap; gap: 4px; }
.mk, .lg { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-style: normal; font-size: .78rem; font-weight: 800; color: #fff; }
.mk.done, .lg.done { background: var(--muted); }
.mk.todo, .lg.todo { background: var(--blue); }
.mk.ask, .lg.ask { background: var(--warn); }
.legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.legend .lg { min-width: 12px; width: 12px; height: 12px; padding: 0; margin-left: 10px; }
.legend .lg:first-child { margin-left: 0; }
.ride.click { cursor: pointer; background: var(--card); }
.kpis.money.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.mini dl { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: var(--radius); }
.mini dt { font-size: .76rem; font-weight: 700; color: var(--muted); }
.mini dd { font-weight: 800; font-size: 1.1rem; }
.mini .due dd { color: var(--danger); }
.paytag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .8rem; font-weight: 800; background: var(--bg); color: var(--ink-2); }
.paytag.ok { color: var(--wa); }
.paytag.due { color: var(--danger); }
.paytag.part { color: var(--warn); }
@media (max-width: 760px) {
  .day { min-height: 58px; padding: 5px; }
  .mk { min-width: 18px; height: 18px; padding: 0 4px; font-size: .7rem; }
  .kpis.money.four, .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sortbar label { flex: 1 1 100%; }
  .sortbar select, .sortbar input { flex: 1; min-width: 0; }
}
.daynav { flex-wrap: wrap; }

/* Qui encaisse le client */
.collect { display: grid; gap: 8px; }
.fix { display: block; }
.fix summary { cursor: pointer; font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.fix[open] summary { margin-bottom: 10px; }
.fix .actions { margin-top: 10px; }

/* Tuiles cliquables du tableau de bord */
.kpi.tile { display: grid; gap: 6px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.kpi.tile:hover, .kpi.tile:focus-visible { border-color: var(--ink); }
.kpi-label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.kpi-value { font-weight: 800; font-size: 1.9rem; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi.in .kpi-value { color: var(--wa); }
.kpi.out .kpi-value { color: var(--danger); }
.kpi-note { font-size: .82rem; font-weight: 600; color: var(--muted); }
.kpi-more { font-size: .82rem; font-weight: 800; color: var(--blue); }
