:root {
  /* Couleurs ICE : bleu #0359a4, bleu ciel #49c8f5 */
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f5f8fb;
  --ink: #0f1f33;
  --muted: #5d6d80;
  --line: #dde4ec;
  --accent: #0359a4;
  --accent-ink: #ffffff;
  --accent-soft: #e3eefa;
  --sky: #49c8f5;
  --warn: #b45309;
  --warn-soft: #fdf1e3;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #1f7a3f;
  --ok-soft: #e5f4ea;
  --info-soft: #e4f5fd;
  --info: #0a6c93;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(3, 40, 80, .06), 0 2px 10px rgba(3, 40, 80, .04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1420;
    --surface: #121e2c;
    --surface-2: #182637;
    --ink: #e8f0f8;
    --muted: #93a4b8;
    --line: #24364a;
    --accent: #49c8f5;
    --accent-ink: #04233a;
    --accent-soft: #10304a;
    --warn: #f0a85a;
    --warn-soft: #34261a;
    --danger: #f2877d;
    --danger-soft: #3a1f1c;
    --ok: #6fcf8f;
    --ok-soft: #1a3022;
    --info-soft: #10293a;
    --info: #7fd6f7;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.topbar { padding: 12px 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.brand:active { opacity: .6; }
.brand .logo { height: 28px; width: auto; display: block; }
.brand .logo.dark { display: none; }
@media (prefers-color-scheme: dark) { .brand .logo.light { display: none; } .brand .logo.dark { display: block; } }
.brand .app-name { font-weight: 700; font-size: .95rem; color: var(--accent); padding-left: 10px; border-left: 2px solid var(--sky); line-height: 1.1; white-space: nowrap; }
.brand .app-name small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); }
.topbar { border-bottom: 3px solid var(--sky); background: var(--surface); max-width: none; margin-bottom: 14px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto; }
.who { color: var(--muted); font-size: .85rem; }

main { max-width: 560px; margin: 0 auto; padding: 4px 16px 40px; }
main.wide { max-width: 1100px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 18px;
  margin-bottom: 14px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
input, textarea, select {
  width: 100%;
  font: inherit; font-size: 17px; /* ≥16px : pas de zoom auto sur iPhone */
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  -webkit-appearance: none; appearance: none;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
textarea { min-height: 84px; resize: vertical; }
input.big { font-size: 28px; font-weight: 650; letter-spacing: .02em; font-variant-numeric: tabular-nums; padding: 12px 14px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }

button, .btn {
  font: inherit; font-weight: 600;
  border: 0; border-radius: 11px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.danger { color: var(--danger); }
button.block, .btn.block { width: 100%; margin-top: 16px; padding: 15px; font-size: 17px; box-sizing: border-box; }
button.link { background: none; border: 0; color: var(--accent); padding: 6px 0; font-weight: 600; }
button.small, .btn.small { padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
button:disabled { opacity: .5; cursor: default; }

.photo-btn { position: relative; overflow: hidden; width: 100%; margin-top: 12px; color: var(--muted); font-weight: 500; }
.photo-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-preview { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; margin-top: 10px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.stat { background: var(--surface-2); border-radius: 11px; padding: 10px 12px; }
.stat b { display: block; color: var(--accent); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--muted); }

.period-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.period-nav .label { font-weight: 650; text-align: center; }
.period-nav .label small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.period-nav button { width: 40px; height: 40px; padding: 0; font-size: 20px; }

.trip { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.trip:first-child { border-top: 0; }
.trip .d { width: 54px; flex: none; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 5px 0; }
.trip .d b { display: block; font-size: 1.2rem; line-height: 1.1; }
.trip .d span { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.trip .body { flex: 1; min-width: 0; }
.trip .desc { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.trip .km { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meta { font-size: .8rem; color: var(--muted); }

.chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.chip.open { background: var(--info-soft); color: var(--info); }
.chip.done { background: var(--accent-soft); color: var(--accent); }
.chip.submitted { background: var(--warn-soft); color: var(--warn); }
.chip.approved { background: var(--ok-soft); color: var(--ok); }
.chip.rejected { background: var(--danger-soft); color: var(--danger); }

.notice { border-radius: 10px; padding: 10px 12px; font-size: .88rem; margin-top: 8px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--info-soft); color: var(--info); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

.empty { text-align: center; color: var(--muted); padding: 18px 0 6px; }

.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
}
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 18px; } }

.photo-viewer { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center;
  padding: calc(64px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); }
.photo-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.photo-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; background: #fff; color: #111;
  font-weight: 600; padding: 10px 16px; border-radius: 999px; min-height: 44px; }

table.orders tr[data-order] { cursor: pointer; }
.order-lines td { vertical-align: top; }
.ol-section td { font-weight: 600; background: var(--surface-2, #f2f4f6); }
.sheet .photo-close { position: static; border: 1px solid var(--line); }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 600;
  max-width: calc(100% - 32px); z-index: 70; box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}
#toast.err { background: var(--danger); color: #fff; }

/* ------------------------------------------------ admin */
.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.flag-row td { border-bottom: 0; padding-bottom: 0; }
td .notice { margin: 4px 0 0; padding: 4px 8px; font-size: .8rem; }
.rep-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.rep-foot .total { font-size: 1.05rem; }
.rep-foot .total b { font-size: 1.25rem; }
.subs { margin-top: 12px; display: grid; gap: 6px; }
.sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; background: var(--ok-soft); color: var(--ok); padding: 8px 12px; border-radius: 10px; }
.sub.err { background: var(--danger-soft); color: var(--danger); }
.sub .grow { flex: 1; }
.sub.off { background: var(--line); color: var(--muted); }
.sub.off b { text-decoration: line-through; }
.subs-cancelled summary { cursor: pointer; font-weight: 600; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }

/* ------------------------------------------------ sélecteur de mode (gestionnaire) */
.topbar-inner { flex-wrap: wrap; row-gap: 10px; }
.mode-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px;
  margin-left: auto; min-width: 210px;
}
.mode-switch a {
  position: relative; z-index: 1; text-align: center; padding: 7px 14px; border-radius: 99px;
  font-weight: 650; font-size: .9rem; color: var(--muted); text-decoration: none; transition: color .16s;
}
.mode-switch a[aria-current] { color: var(--accent-ink); }
.mode-switch .thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--accent); border-radius: 99px; transition: transform .16s ease;
}
.mode-switch.is-admin .thumb { transform: translateX(100%); }
.mode-switch.is-admin a[href="/admin"], .mode-switch:not(.is-admin) a[href="/"] { color: var(--accent-ink); }
.mode-switch.is-admin a[href="/"], .mode-switch:not(.is-admin) a[href="/admin"] { color: var(--muted); }
@media (max-width: 640px) {
  /* Logo seul en haut, puis sélecteur de mode et Déconnexion côte à côte (une rangée de moins). */
  .mode-switch { order: 3; flex: 1 1 180px; min-width: 0; margin-left: 0; }
  .mode-switch a { padding: 7px 8px; }
  .topbar-inner #logout { order: 4; }
}
@media (prefers-reduced-motion: reduce) { .mode-switch .thumb, .mode-switch a { transition: none; } }

/* ------------------------------------------------ dépenses avec reçu */
.expense-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.expense-cta h3 { margin-bottom: 2px; }
.expense-cta .meta { margin: 0; }
.trip .d.receipt { background: var(--accent-soft); }
.receipt-thumb { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.sub-title { margin: 10px 0 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ------------------------------------------------ dictée vocale */
.mic-fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 15;
  width: 64px; height: 64px; border-radius: 50%; padding: 0; border: 0;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 20px rgba(3, 40, 80, .35), 0 0 0 4px var(--surface);
}
.mic-fab:active { transform: scale(.94); }
main#app { padding-bottom: 110px; }
.voice-listen { text-align: center; padding: 8px 0; }
.voice-orb {
  width: 96px; height: 96px; margin: 8px auto 14px; border-radius: 50%;
  display: grid; place-items: center; color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 0 0 10px var(--accent-soft); transition: transform .08s linear;
  animation: voice-pulse 1.6s ease-in-out infinite;
}
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 18px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) { .voice-orb { animation: none; } }
.voice-examples { text-align: left; color: var(--muted); font-size: .85rem; padding-left: 18px; margin: 12px 0 0; }
.voice-examples li { margin: 4px 0; }
.voice-said { font-style: italic; color: var(--muted); margin: 6px 0 4px; }
/* ------------------------------------------------ gestionnaires */
.scope-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); font-size: .9rem; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
/* Onglets du gestionnaire dans les tuiles Kilométrage et Dépenses */
.tile-tabs { display: flex; width: 100%; margin: 0 0 14px; }
.tile-tabs a { flex: 1; text-align: center; padding: 8px 6px; border-radius: 8px; font-weight: 600; color: var(--muted); font-size: .9rem; text-decoration: none; white-space: nowrap; }
.tile-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tile-tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger, #c0392b); color: #fff; font-size: .75rem; line-height: 18px; }

/* ------------------------------------------------ Coffre à gants : accueil en tuiles */
.center { text-align: center; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 124px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; color: var(--ink); text-decoration: none; position: relative; -webkit-tap-highlight-color: transparent;
}
.tile:active { transform: scale(.97); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.tile b { font-size: 1rem; line-height: 1.2; }
.tile-sub { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.tile.live .tile-sub { color: var(--ok); font-weight: 600; }
.tile.live .tile-icon { background: var(--ok-soft); color: var(--ok); }
.tile.alert .tile-sub { color: var(--danger); font-weight: 600; }
.tile.alert .tile-icon { background: var(--danger-soft); color: var(--danger); }
.tile.soon { opacity: .55; box-shadow: none; border-style: dashed; }
@media (prefers-reduced-motion: reduce) { .tile:active { transform: none; } }

.screen-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.screen-head h1 { font-size: 1.35rem; text-wrap: balance; }
.screen-head .meta { margin: 2px 0 0; }
.screen-head .back {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--accent); font-size: 26px; line-height: 1; text-decoration: none; padding-bottom: 3px;
}
h2.danger { color: var(--danger); }
h2.warn { color: var(--warn); }

/* choix rapides (type d'activité, dates, étiquettes) */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { padding: 9px 13px; border-radius: 99px; font-weight: 600; font-size: .9rem; background: var(--surface-2); color: var(--ink); }
.picks.small .pick { padding: 6px 11px; font-size: .82rem; }
.pick.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.picks + input[type="date"] { margin-top: 10px; }
.segmented.wide { display: flex; width: 100%; margin-bottom: 14px; }
.segmented.wide button, .segmented[data-team] button, .segmented[data-stage] button { flex: 1; }
.segmented[data-team], .segmented[data-stage] { display: flex; width: 100%; }
.card-scan { color: var(--accent); font-weight: 650; border-style: dashed; padding: 16px; margin-top: 0; }
.sheet-section { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }

.mic-inline { margin-top: 8px; width: 100%; color: var(--accent); }
.mic-inline.rec { background: var(--danger-soft); color: var(--danger); border-color: transparent; animation: rec-pulse 1.4s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .mic-inline.rec { animation: none; } }

/* listes de clients */
.p-list { margin-top: 8px; }
.p-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.p-row:first-child { border-top: 0; }
.p-row .body { flex: 1; min-width: 0; }
.p-row .body .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-row .chip { vertical-align: 1px; margin-left: 4px; }
.icon-btn { flex: none; width: 44px; height: 44px; padding: 0; border-radius: 12px; color: var(--accent); }
.dist { flex: none; width: 48px; text-align: center; }
.dist b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; color: var(--accent); }
.dist span { font-size: .7rem; color: var(--muted); }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--accent-soft); border-radius: 11px; padding: 10px 12px; }
.picked > div { min-width: 0; }
.dup { display: grid; gap: 6px; }
.dup-btn { justify-content: flex-start; text-align: left; background: var(--surface); padding: 8px 10px; font-weight: 500; }
.dup-btn span { color: var(--muted); }
.opp-choice { display: grid; gap: 8px; }
.radio { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); font-weight: 500; font-size: .95rem; cursor: pointer; }
.radio input { width: 20px; height: 20px; flex: none; margin-top: 1px; -webkit-appearance: radio; appearance: auto; accent-color: var(--accent); }
.radio span { display: block; min-width: 0; }
.radio .meta { display: block; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; margin-top: 14px; }
.check input { width: 20px; height: 20px; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--accent); }
.nav-apps { display: grid; gap: 8px; margin-top: 14px; }
.nav-apps button { padding: 15px; font-size: 1.02rem; }

/* activités */
.act { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.card-head + .act, .meta + .act { border-top: 0; }
.act .body { flex: 1; min-width: 0; }
.act-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 18px; }
.act-date { flex: none; font-size: .8rem; font-weight: 650; color: var(--muted); text-align: right; white-space: nowrap; }
.act-date.overdue { color: var(--danger); }
.act-date.today { color: var(--warn); }
.stats.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }
.stat.bad b { color: var(--danger); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.quick-actions > * { flex: 1 1 auto; }
.addr { width: 100%; justify-content: flex-start; text-align: left; gap: 10px; background: none; border: 0; padding: 4px 0; color: var(--ink); font-weight: 500; }
.addr svg { color: var(--accent); flex: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 12px; font-size: .9rem; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.queue { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.steps { padding-left: 22px; margin: 4px 0 6px; display: grid; gap: 8px; font-size: .95rem; }
.steps li::marker { color: var(--accent); font-weight: 700; }

/* Fiche nouveau client : recherche sur le site web */
.web-row { align-items: end; }
.web-row button { width: 100%; white-space: nowrap; }
input.from-web { background: #eaf3fd; border-color: #8bb8e8; }
.web-found p { margin: 6px 0 0; }
.web-logo { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.web-logo img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid #dfe6ee; padding: 4px; }
.card.review .quick-actions { flex-wrap: wrap; }

/* Phrase du jour sur l'accueil */
.who.motto { color: var(--ink); font-size: .98rem; font-weight: 600; line-height: 1.35; cursor: pointer; user-select: none; }

/* Suggestions d'entreprises trouvées sur le web (IA) */
.sug-list { display: grid; gap: 6px; margin: 6px 0 4px; }
.sug { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sug span { color: var(--muted); font-size: .85rem; }
.sug-list .link { background: none; border: 0; color: var(--accent); padding: 4px 0; justify-self: start; }

/* ------------------------------------------------ Demande-moi */
.dm-fil { display: grid; gap: 10px; margin-bottom: 12px; }
.dm-accueil ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
.dm-accueil li { margin: 4px 0; }
.dm-accueil button.link { padding: 2px 0; text-align: left; }
.dm-bulle { border-radius: var(--radius); padding: 10px 14px; overflow-wrap: anywhere; }
.dm-bulle p { margin: 0 0 8px; }
.dm-bulle p:last-child { margin-bottom: 0; }
.dm-bulle.moi { justify-self: end; max-width: 85%; background: var(--accent); color: var(--accent-ink); }
.dm-bulle.ia { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dm-bulle.attente { color: var(--muted); font-style: italic; }
.dm-bulle .table-wrap { margin: 8px 0; }
.dm-bulle table { font-size: .85rem; }
.dm-photo { margin: 6px 0 10px; }
.dm-photo img { max-width: 160px; max-height: 160px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.dm-photo figcaption { font-size: .72rem; color: var(--muted); }
.dm-question { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.dm-question p { font-weight: 600; }
.dm-saisie { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); }
/* Le bouton micro global masquerait l'envoi : la dictée du clavier de l'iPhone suffit ici. */
body:has(main#app[data-screen="#/demande"]) .mic-fab { display: none; }
.dm-saisie textarea { flex: 1; min-height: 46px; height: 46px; padding-top: 10px; padding-bottom: 10px; max-height: 160px; resize: none; box-shadow: var(--shadow); }
.dm-saisie button { flex: none; width: 48px; height: 46px; padding: 0; font-size: 1.1rem; }
.dm-photo-btn { flex: none; width: 48px; height: 46px; padding: 0; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); cursor: pointer; }
.dm-apercu { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: .85rem; color: var(--muted); }
.dm-apercu[hidden] { display: none; }
.dm-apercu img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.dm-apercu span { flex: 1; }
.dm-photo-moi { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; margin-bottom: 6px; }

/* ------------------------------------------------ tuiles déplaçables (appui long) */
.tiles { position: relative; }
.tile { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.tiles.editing .tile { animation: jiggle .28s ease-in-out infinite alternate; cursor: grab; touch-action: none; }
.tiles.editing .tile:nth-child(2n) { animation-delay: -.14s; animation-duration: .31s; }
.tiles.editing .tile:nth-child(3n) { animation-duration: .26s; }
.tiles.editing .tile:active { transform: none; }
.tiles .tile.dragging { animation: none; z-index: 5; cursor: grabbing; box-shadow: 0 14px 34px rgba(3, 40, 80, .28); transition: box-shadow .15s; }
@keyframes jiggle { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
.tiles-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.tiles-bar .primary { padding: 7px 18px; }
@media (prefers-reduced-motion: reduce) {
  .tiles.editing .tile { animation: none; outline: 2px dashed var(--line); outline-offset: -2px; }
}

/* ------------------------------------------------ guide illustré (#/aide) */
:root { --mark: #f59e0b; --mark-ink: #261600; --bezel: #13202e; }
@media (prefers-color-scheme: dark) { :root { --mark: #fbbf24; --mark-ink: #261600; --bezel: #000000; } }
.screen-head .grow { flex: 1; min-width: 0; }
.screen-head .help {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  font-weight: 800; font-size: 1.05rem; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line);
}

/* index */
.gd-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.gd-hero .gd-phone { width: 150px; flex: none; font-size: 7.5px; }
.gd-hero p { margin: 0; color: var(--muted); font-size: .95rem; }
.gd-group { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 22px 0 8px; }
.gd-index { display: grid; gap: 8px; }
.gd-chapter { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.gd-chapter .tile-icon { margin: 0; flex: none; }
.gd-chapter-t { flex: 1; min-width: 0; }
.gd-chapter-t b { display: block; }
.gd-chapter-t small { color: var(--muted); font-size: .82rem; }
.gd-go { color: var(--accent); font-size: 1.4rem; }
.gd-n.inline { position: static; display: inline-grid; vertical-align: -3px; }
.gd-finger-demo { display: inline-block; animation: gd-press 1.6s ease-in-out infinite; }

/* chapitre */
.gd-article { display: grid; gap: 18px; }
.gd-lead { margin: 0; font-size: 1rem; }
.gd-panel h2 { font-size: 1.05rem; margin-bottom: 10px; }
.gd-pair { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 600px) { .gd-pair { grid-template-columns: 250px 1fr; } }
.gd-steps { list-style: none; counter-reset: gd; margin: 0; padding: 0; display: grid; gap: 12px; }
.gd-steps li { counter-increment: gd; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-size: 1rem; line-height: 1.4; }
.gd-steps li::before {
  content: counter(gd); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mark); color: var(--mark-ink); font-weight: 800; font-size: .9rem; margin-top: -1px;
}
.gd-tip { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--ink); font-size: .95rem; }
.gd-tip b:first-child { display: block; color: var(--info); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.gd-tip.warn { background: var(--warn-soft); }
.gd-tip.warn b:first-child { color: var(--warn); }
.gd-red { color: var(--danger); }
.gd-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.gd-pager .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* maquette de téléphone */
.gd-phone {
  width: 240px; max-width: 100%; margin: 0 auto; position: relative; font-size: 10.5px; line-height: 1.35;
  background: var(--bg); color: var(--ink); border: 7px solid var(--bezel); border-radius: 30px; padding: 16px 0 12px;
  box-shadow: 0 10px 30px rgba(3, 40, 80, .18); overflow: visible; -webkit-user-select: none; user-select: none;
}
.gd-phone::before { content: ''; position: absolute; top: 5px; left: 50%; width: 54px; height: 5px; margin-left: -27px; border-radius: 9px; background: var(--bezel); opacity: .9; }
.gd-screen { padding: 0 9px; display: grid; gap: 6px; position: relative; }
.gd-bar { display: flex; align-items: center; gap: 6px; padding: 3px 9px 6px; margin-bottom: 6px; border-bottom: 2px solid var(--sky); position: relative; }
.gd-screen > .gd-bar { margin: 0 -9px 2px; }
.gd-bar b { color: var(--accent); font-size: 1.25em; letter-spacing: -.02em; }
.gd-bar span { color: var(--accent); font-weight: 700; padding-left: 6px; border-left: 2px solid var(--sky); }
.gd-odoo-bar { display: flex; justify-content: space-between; align-items: center; padding: 3px 9px 7px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 700; color: #714b67; position: relative; }
.gd-avatar { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #714b67; color: #fff; font-size: .9em; position: relative; }
.gd-head { display: flex; align-items: center; gap: 6px; font-size: 1.2em; }
.gd-back { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); display: grid; place-items: center; font-size: 1.2em; }
.gd-motto { margin: 0; color: var(--muted); font-size: .95em; }
.gd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gd-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px; display: flex; flex-direction: column; gap: 1px; position: relative; min-height: 52px; }
.gd-ti { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 3px; }
.gd-tile small { color: var(--muted); font-size: .85em; }
.gd-tile.live small { color: var(--ok); font-weight: 600; } .gd-tile.live .gd-ti { background: var(--ok-soft); color: var(--ok); }
.gd-tile.alert small { color: var(--danger); font-weight: 600; } .gd-tile.alert .gd-ti { background: var(--danger-soft); color: var(--danger); }
.gd-tiles.jiggle .gd-tile { animation: jiggle .3s ease-in-out infinite alternate; }
.gd-tiles.jiggle .gd-tile:nth-child(2n) { animation-delay: -.15s; }
.gd-tile.lift { animation: gd-lift 2.4s ease-in-out infinite !important; box-shadow: 0 8px 18px rgba(3, 40, 80, .25); z-index: 2; }
.gd-editbar { display: flex; justify-content: space-between; align-items: center; color: var(--accent); font-weight: 600; }
.gd-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 5px; position: relative; }
.gd-t { font-size: 1.1em; }
.gd-t.red { color: var(--danger); }
.gd-muted, .gd-card small, .gd-rowi small { color: var(--muted); display: block; font-size: .88em; font-weight: 400; }
.gd-label { color: var(--muted); font-weight: 600; font-size: .88em; margin-top: 2px; }
.gd-in { background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; position: relative; min-height: 22px; overflow-wrap: anywhere; }
.gd-in.big { font-size: 1.5em; font-weight: 700; font-variant-numeric: tabular-nums; }
.gd-in.filled { background: var(--ok-soft); }
.gd-btn { display: block; text-align: center; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; position: relative; }
.gd-btn.p { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.gd-btn.ghost { color: var(--accent); border-style: dashed; }
.gd-btn.danger { color: var(--danger); }
.gd-btn.sm { display: inline-block; padding: 3px 9px; }
.gd-stack { display: grid; gap: 4px; position: relative; }
.gd-sep { height: 1px; background: var(--line); margin: 2px 0; }
.gd-note { border-radius: 7px; padding: 5px 7px; position: relative; font-size: .95em; }
.gd-note.info { background: var(--info-soft); color: var(--info); }
.gd-note.ok { background: var(--ok-soft); color: var(--ok); }
.gd-note.warn { background: var(--warn-soft); color: var(--warn); }
.gd-chips { display: flex; flex-wrap: wrap; gap: 4px; position: relative; }
.gd-chip { padding: 3px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: .92em; }
.gd-chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.gd-rowi { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); position: relative; }
.gd-card > .gd-rowi:first-of-type, .gd-t + .gd-rowi { border-top: 0; }
.gd-r { text-align: right; font-weight: 600; color: var(--muted); white-space: nowrap; }
.gd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gd-row3 { display: flex; flex-wrap: wrap; gap: 4px; position: relative; }
.gd-row3 .gd-btn { flex: 1 1 auto; font-size: .92em; padding: 4px 6px; }
.gd-seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; position: relative; }
.gd-seg span { flex: 1; text-align: center; padding: 4px; border-radius: 6px; font-weight: 600; color: var(--muted); }
.gd-seg span.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.gd-switch { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 2px; position: relative; }
.gd-switch span { flex: 1; text-align: center; padding: 4px; border-radius: 99px; font-weight: 700; color: var(--muted); }
.gd-switch span.on { background: var(--accent); color: var(--accent-ink); }
.gd-tabs { display: flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; position: relative; flex-wrap: wrap; }
.gd-tabs > * { padding: 3px 7px; border-radius: 6px; color: var(--muted); font-weight: 600; position: relative; }
.gd-tabs > .on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.gd-menu { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; justify-self: end; width: 70%; box-shadow: var(--shadow); }
.gd-menu > * { padding: 3px 0; position: relative; }
.gd-scan { border: 1.5px dashed var(--accent); color: var(--accent); font-weight: 700; text-align: center; padding: 9px; border-radius: 8px; position: relative; }
.gd-receipt { height: 46px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); position: relative;
  background: repeating-linear-gradient(0deg, var(--surface-2) 0 6px, var(--surface) 6px 9px); border: 1px solid var(--line); }
.gd-lines { display: grid; gap: 3px; }
.gd-lines i { height: 5px; border-radius: 3px; background: var(--line); }
.gd-lines i.s { width: 60%; }
.gd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; position: relative; }
.gd-stats span { background: var(--surface-2); border-radius: 7px; padding: 4px 5px; color: var(--muted); font-size: .85em; }
.gd-stats b { display: block; font-size: 1.35em; color: var(--accent); }
.gd-stats .bad b { color: var(--danger); }
.gd-picked { background: var(--accent-soft); border-radius: 7px; padding: 5px 7px; font-weight: 600; }
.gd-radio { border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; position: relative; font-weight: 600; }
.gd-radio.on { border-color: var(--accent); background: var(--accent-soft); }
.gd-addr { font-weight: 600; position: relative; }
.gd-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.gd-kv span { color: var(--muted); }
.gd-near { display: flex; align-items: center; gap: 7px; padding: 4px 0; position: relative; }
.gd-near > div { flex: 1; min-width: 0; }
.gd-dist { width: 30px; text-align: center; font-weight: 800; color: var(--accent); font-size: 1.1em; line-height: 1.05; }
.gd-dist small { display: block; font-size: .7em; color: var(--muted); font-weight: 500; }
.gd-arrow { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); display: grid; place-items: center; position: relative; }
.gd-pill { font-style: normal; font-size: .82em; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--info-soft); color: var(--info); }
.gd-pill.ok { background: var(--ok-soft); color: var(--ok); }
.gd-check { font-weight: 600; position: relative; padding: 2px 0; }
.gd-bubble { border-radius: 10px; padding: 6px 8px; max-width: 88%; }
.gd-bubble.me { justify-self: end; background: var(--accent); color: var(--accent-ink); }
.gd-bubble.ai { background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.gd-mini-table { display: grid; grid-template-columns: 1fr auto; gap: 1px 6px; font-size: .92em; }
.gd-mini-table span:nth-child(3) { grid-column: 1 / -1; color: var(--ok); font-weight: 600; }
.gd-compose { display: flex; gap: 4px; align-items: center; }
.gd-compose .gd-in { flex: 1; color: var(--muted); }
.gd-cam { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); display: grid; place-items: center; position: relative; background: var(--surface-2); }
.gd-table { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 6px; font-size: .92em; position: relative; }
.gd-push { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 7px 9px; box-shadow: 0 6px 16px rgba(3, 40, 80, .18); position: relative; animation: gd-drop 3s ease-in-out infinite; }
.gd-push small { display: block; color: var(--muted); }
.gd-orb { width: 54px; height: 54px; margin: 6px auto 2px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--accent); box-shadow: 0 0 0 7px var(--accent-soft); position: relative; animation: voice-pulse 1.6s ease-in-out infinite; }
.gd-center { text-align: center; display: block; }
.gd-say { margin: 0; padding-left: 14px; color: var(--muted); display: grid; gap: 2px; font-size: .95em; }
.gd-mic { position: absolute; right: 8px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); font-size: 14px; box-shadow: 0 4px 10px rgba(3, 40, 80, .3); }

/* pastilles numérotées et doigt qui touche */
.gd-m { position: relative; }
.gd-n {
  position: absolute; top: -7px; right: -7px; z-index: 3; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--mark); color: var(--mark-ink); font: 800 11px/1 -apple-system, system-ui, sans-serif;
  font-style: normal; box-shadow: 0 0 0 2px var(--surface), 0 2px 5px rgba(0, 0, 0, .25);
}
.gd-tap::after {
  content: '👆'; position: absolute; right: 18%; bottom: -14px; font-size: 18px; z-index: 4; pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); animation: gd-press 1.6s ease-in-out infinite;
}
.gd-tap::before {
  content: ''; position: absolute; right: calc(18% + 2px); bottom: 2px; width: 16px; height: 16px; border-radius: 50%; z-index: 3;
  border: 2px solid var(--mark); opacity: 0; animation: gd-ring 1.6s ease-out infinite; pointer-events: none;
}
.gd-tile.hold::after { animation-duration: 2.4s; }
@keyframes gd-press { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-5px); } 55% { transform: translateY(1px) scale(.94); } }
@keyframes gd-ring { 0%, 50% { opacity: 0; transform: scale(.4); } 60% { opacity: .9; } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes gd-lift { 0%, 15% { transform: translate(0, 0) scale(1); } 45%, 60% { transform: translate(-58%, -112%) scale(1.06); } 90%, 100% { transform: translate(0, 0) scale(1); } }
@keyframes gd-drop { 0%, 10% { transform: translateY(-6px); opacity: 0; } 25%, 85% { transform: translateY(0); opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .gd-tap::after, .gd-tap::before, .gd-finger-demo, .gd-tiles.jiggle .gd-tile, .gd-tile.lift, .gd-push, .gd-orb { animation: none !important; }
  .gd-tap::before { opacity: .8; }
}
.gd-tabs > .gd-m > .gd-n, .gd-table > .gd-n, .gd-stats > .gd-n { right: -10px; top: -9px; }

/* ---------------------------------------------------------------- livraisons : sélection et trajet */
.liv-pick { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: var(--accent-ink); padding: 0; }
.liv-pick.on { background: var(--accent); border-color: var(--accent); }
.liv-bar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 5; display: flex; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(3, 40, 80, .18);
  padding: 8px; margin: 10px 72px 10px 0; }
.liv-bar .primary { flex: 1; }
.map { position: relative; height: 320px; overflow: hidden; border-radius: 12px; background: #e8ecef; touch-action: none; user-select: none; -webkit-user-select: none; }
.map img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.map svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.map-pin { position: absolute; transform: translate(-50%, -100%); min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px 13px 13px 2px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); pointer-events: none; }
.map-me { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26,115,232,.25); pointer-events: none; }
.map-zoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.map-zoom button { width: 38px; height: 38px; padding: 0; font-size: 1.3rem; font-weight: 700; background: #fff; color: #222; border-radius: 10px; }
.map-attr { position: absolute; right: 4px; bottom: 2px; font-size: .62rem; color: #333; background: rgba(255,255,255,.75); padding: 0 4px; border-radius: 4px; }
.route-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 12px; }
.route-sum b { display: block; font-size: 1.25rem; }
.route-sum span { font-size: .78rem; color: var(--muted); }
.stop-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
.stop-move { display: flex; flex-direction: column; gap: 4px; }
.stop-move button { width: 34px; height: 30px; padding: 0; font-size: .9rem; }
.sig-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 110px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; }
.sig-preview.empty { border: 2px dashed var(--accent); color: var(--accent); font-size: 1rem; }
.sig-preview img { max-width: 100%; max-height: 120px; }
.sig-preview span { font-size: .78rem; font-weight: 500; }
.sig-full { position: fixed; inset: 0; z-index: 60; background: #fff; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); color: #111; }
.sig-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #ddd; }
.sig-top b { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-area { position: relative; flex: 1; min-height: 0; }
.sig-area canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.sig-line { position: absolute; left: 24px; right: 24px; bottom: 28%; border-bottom: 2px solid #c8ced6; color: #9aa4b0; font-size: .9rem; padding-bottom: 4px; pointer-events: none; }
.sig-ok { margin: 10px 12px 12px; }
body.no-scroll { overflow: hidden; }
.role-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; margin-top: 6px; }
.role-tiles .check { margin: 0; }

/* ---------------------------------------------------------------- Inventaire physique */
.tile-inv .tile-icon { background: var(--warn-soft); color: var(--warn); }
.inv-zone-card .eyebrow { margin-bottom: 6px; }
.inv-zone-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 1.25rem; font-weight: 700; padding: 14px 16px; text-align: left; }
.inv-zone-btn span { font-size: .85rem; font-weight: 600; color: var(--accent); }
.inv-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.inv-actions > button, .inv-actions > .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 14px 6px; font-size: 22px; min-height: 96px; margin: 0; }
.inv-actions b { font-size: 1rem; }
.inv-actions small { font-size: .72rem; font-weight: 500; opacity: .8; }
.inv-photo { position: relative; overflow: hidden; color: inherit; }
.inv-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inv-img { flex: none; width: 48px; height: 48px; border-radius: 9px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.inv-img.none { display: grid; place-items: center; font-size: 22px; background: var(--surface-2); }
.inv-head { display: flex; gap: 12px; align-items: center; }
.inv-head .inv-img { width: 64px; height: 64px; }
.inv-uom { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 1.05rem; }
.inv-uom b { font-size: 1.25rem; text-transform: uppercase; }
.inv-qty { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; }
.inv-qty button { font-size: 28px; padding: 0; }
.inv-qty input { text-align: center; }
.inv-choices { display: grid; gap: 8px; }
.inv-choices button { display: block; width: 100%; text-align: left; padding: 13px 14px; font-size: 1rem; line-height: 1.3; }
.inv-choices button small { display: block; font-size: .78rem; font-weight: 500; opacity: .8; margin-top: 2px; }
.inv-results { max-height: 60vh; overflow-y: auto; margin-top: 8px; }
.inv-zones { max-height: 46vh; overflow-y: auto; margin: 8px 0; }
.inv-zone-group { margin-bottom: 10px; }
.inv-zone-group .eyebrow { margin-bottom: 4px; }
.pick.done { opacity: .55; }
.inv-pending { opacity: .7; }
.act .go { color: var(--muted); font-size: 1.3rem; }
.act-date small { display: block; font-weight: 500; }
.inv-scan-ov { position: fixed; inset: 0; z-index: 18; background: #000; }
.inv-scan-ov video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inv-scan-frame { position: absolute; left: 7%; right: 7%; top: 29%; height: 21%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
.inv-scan-frame span { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; animation: inv-scanline 1.6s ease-in-out infinite; }
@keyframes inv-scanline { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
@media (prefers-reduced-motion: reduce) { .inv-scan-frame span { animation: none; } }
.inv-scan-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inv-scan-top .photo-close { position: static; }
.inv-scan-zone { color: #fff; font-weight: 700; background: rgba(0, 0, 0, .5); padding: 6px 12px; border-radius: 99px; }
.inv-scan-bottom { position: absolute; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); }
.inv-scan-msg { color: #fff; text-align: center; font-weight: 600; background: rgba(0, 0, 0, .55); padding: 10px; border-radius: 10px; }
.inv-scan-msg .link { color: #8cc8ff; padding: 0; }
.spinner { display: inline-block; width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: inv-spin .8s linear infinite; }
@keyframes inv-spin { to { transform: rotate(360deg); } }
.inv-tabs { flex-wrap: wrap; }
.inv-table tr[data-pid] { cursor: pointer; }
.inv-table tr[data-pid]:hover td { background: var(--surface-2); }
td.neg, b.neg { color: var(--danger); }
tr.inv-del td { text-decoration: line-through; opacity: .55; }
.inv-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); font-size: .92rem; }
.inv-check input { flex: none; width: 20px; height: 20px; margin-top: 1px; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--accent); }
.inv-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: s; }
.inv-steps li { flex: 1; counter-increment: s; font-size: .8rem; font-weight: 650; color: var(--muted); padding: 8px 6px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.inv-steps li::before { content: counter(s) ". "; }
.inv-steps li.on { background: var(--accent); color: var(--accent-ink); }
.inv-steps li.done { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 420px) { .inv-actions { grid-template-columns: 1fr 1fr; } .inv-actions .inv-scan { grid-column: 1 / -1; min-height: 84px; } }
.inv-pour select.on { border-color: var(--warn); background: var(--warn-soft); font-weight: 700; }

/* ---------------------------------------------------------------- assemblage (logistique) */
.asm-client { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.asm-client:first-of-type { border-top: 0; }
.asm-client h3 { margin: 0; font-size: 1.02rem; }
.asm-pick { flex: none; width: 24px; height: 24px; margin: 0; }
.asm-pkg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.asm-line.ok { background: var(--ok-soft); border-radius: 10px; }
.asm-line.ok .act-date { color: var(--ok); }
.asm-qty { flex: 0 0 74px; width: 74px; text-align: right; font-weight: 700; }
.asm-msg { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-weight: 600; }
.asm-msg.bad { background: var(--danger-soft); color: var(--danger); }
/* Étiquettes de colis : aperçu par-dessus l'app, impression 4 × 6 po */
.asm-print { position: fixed; inset: 0; z-index: 65; background: #e9edf1; overflow: auto; padding: calc(64px + env(safe-area-inset-top)) 12px 24px; }
.asm-print-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 66; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: #fff; border-bottom: 1px solid #d5dbe2; color: #111; font-weight: 600; }
.asm-print-bar .photo-close { position: static; border: 1px solid #d5dbe2; white-space: nowrap; flex: 0 0 auto; }
.asm-print-bar span { font-size: .8rem; color: #555; text-align: center; }
.asm-print-bar .primary { white-space: nowrap; }
.asm-print-bar .primary { flex: 0 0 auto; }
.asm-labels { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lab { width: 4in; height: 6in; max-width: 100%; box-sizing: border-box; background: #fff; color: #000; padding: 0.22in 0.25in; display: flex; flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,.15); font-family: Helvetica, Arial, sans-serif; }
.lab-top { display: flex; justify-content: space-between; align-items: center; }
.lab-top img { height: 0.32in; }
.lab-top b { font-size: 11pt; }
.lab-client { font-size: 19pt; font-weight: 700; line-height: 1.12; margin-top: 0.18in; }
.lab-small { font-size: 10pt; line-height: 1.3; }
.lab hr { border: 0; border-top: 2px solid #000; width: 100%; margin: 0.14in 0; }
.lab-big { font-size: 27pt; font-weight: 800; margin-top: 0.05in; }
.lab-pack { font-size: 14pt; margin: 0.04in 0 0.06in; }
.lab-bars { width: 3.2in; height: 0.75in; margin: 0.04in 0 0.12in; fill: #000; }
.lab-foot { margin-top: auto; font-size: 8pt; color: #555; }
.slip { width: 8.5in; max-width: 100%; box-sizing: border-box; margin: 0 auto; background: #fff; color: #000; padding: 0.5in; font-size: 10.5pt; line-height: 1.35; }
.slip-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 10px; }
.slip-head img { height: 0.45in; }
.slip-title { text-align: right; }
.slip-title h1 { margin: 0 0 4px; font-size: 18pt; }
.slip-small { font-size: 9pt; color: #333; margin-top: 4px; }
.slip-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0; }
.slip-lbl { font-size: 8pt; text-transform: uppercase; letter-spacing: .04em; color: #555; }
.slip-table { width: 100%; border-collapse: collapse; }
.slip-table th, .slip-table td { border-bottom: 1px solid #bbb; padding: 6px 4px; text-align: left; vertical-align: top; }
.slip-table th { border-bottom: 2px solid #000; font-size: 9pt; }
.slip-table .n { text-align: right; white-space: nowrap; }
.slip-sign { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 16px; margin-top: 0.6in; font-size: 9pt; }
.slip-sign span { display: block; border-bottom: 1px solid #000; height: 0.4in; }
@media print {
  @page { size: 4in 6in; margin: 0; }
  body.printing-labels > *:not(.asm-print) { display: none !important; }
  body.printing-labels { background: #fff !important; }
  body.printing-labels .asm-print { position: static; padding: 0; background: #fff; overflow: visible; }
  body.printing-labels .no-print { display: none !important; }
  body.printing-labels .asm-labels { display: block; }
  body.printing-labels .slip { padding: 0; width: auto; }
  body.printing-labels .lab { box-shadow: none; page-break-after: always; break-after: page; margin: 0; }
}

/* ================================================================ mise en page par appareil
   Téléphone (< 700 px) : la base ci-dessus, une colonne, tuiles 2 × 2.
   Tablette (700–1099 px) : colonne plus large, tuiles sur 3 colonnes, fenêtres centrées.
   Ordinateur et tablette à l'horizontale (≥ 1100 px) : barre latérale de navigation + contenu. */
.side-nav { display: none; }

@media (min-width: 700px) {
  main { max-width: 760px; padding: 8px 24px 40px; }
  main.wide { max-width: 1320px; }
  .topbar { padding: 12px 24px; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .tile { min-height: 136px; padding: 16px; }
  .screen-head h1 { font-size: 1.55rem; }
  .card { padding: 20px 22px; }
  .table-wrap { margin: 0 -22px; padding: 0 22px; }
  .stats.three, .route-sum { gap: 12px; }
  .sheet { max-width: 620px; max-height: 86vh; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
  .liv-bar { margin-right: 84px; }
  .inv-results { max-height: 52vh; }
}

@media (min-width: 1100px) {
  .topbar-inner { max-width: 1320px; }
  .shell {
    display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start;
    max-width: 1320px; margin: 0 auto; padding: 0 24px;
  }
  .shell main { max-width: 900px; width: 100%; padding: 4px 0 40px; }
  .shell main.wide { max-width: none; }
  .side-nav:not([hidden]) {
    display: flex; flex-direction: column; gap: 2px; position: sticky; top: 14px;
    max-height: calc(100vh - 28px); overflow-y: auto; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  .side-nav a {
    display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px;
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  }
  .side-nav a svg { flex: none; color: var(--accent); }
  .side-nav a[aria-current] { background: var(--accent); color: var(--accent-ink); }
  .side-nav a[aria-current] svg { color: inherit; }
  .side-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .side-nav hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
  .side-list { display: flex; flex-direction: column; gap: 2px; }
  .side-edit { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border: 0; background: none; color: var(--muted);
    font-weight: 600; font-size: .85rem; border-radius: 10px; cursor: pointer; text-align: left; }
  .side-edit svg { flex: none; }
  .side-edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px; }
  .side-edit-help { margin: 2px 8px 4px; font-size: .75rem; }
  .side-nav.editing .side-list a { cursor: grab; outline: 1px dashed var(--line); outline-offset: -1px; touch-action: none; user-select: none; }
  .side-nav.editing .side-list a::after { content: "⠿"; margin-left: auto; color: var(--muted); }
  .side-list a { -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
  .side-nav .side-list a.dragging { cursor: grabbing; position: relative; z-index: 2; background: var(--surface); box-shadow: 0 8px 22px rgba(3, 40, 80, .22); }
  .side-nav.dragging-on, .side-nav.dragging-on a { cursor: grabbing; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  /* La barre latérale mène déjà à l'accueil : la flèche de retour devient superflue sur les écrans principaux. */
  .shell .screen-head .back[href="#/"] { display: none; }
  .who.motto { font-size: 1.15rem; margin-bottom: 16px; }
  .mic-fab { width: 56px; height: 56px; right: 24px; bottom: 24px; }
  .sheet { max-width: 680px; }
}

/* Ordinateur (souris) : la barre latérale se replie en une colonne d'icônes et s'ouvre au survol, par-dessus le contenu,
   pour laisser toute la place à l'écran. Sur tablette (pas de survol), elle reste ouverte. */
@media (min-width: 1100px) and (hover: hover) {
  .shell { grid-template-columns: 62px minmax(0, 1fr); gap: 22px; }
  .shell main { max-width: 1000px; }
  .side-nav:not([hidden]) { width: 62px; overflow-x: hidden; z-index: 40; transition: width .18s ease, box-shadow .18s ease; }
  .side-nav a span, .side-edit span { white-space: nowrap; opacity: 0; transition: opacity .12s ease; }
  .side-nav:not([hidden]):is(:hover, :focus-within, .editing) { width: 236px; box-shadow: 0 14px 40px rgba(3, 40, 80, .22); }
  .side-nav:is(:hover, :focus-within, .editing) a span, .side-nav:is(:hover, :focus-within, .editing) .side-edit span { opacity: 1; }
  .side-nav:not(:hover):not(:focus-within):not(.editing) .side-edit-help { display: none; }
}


/* Souris et pavé tactile : survols visibles, rangées cliquables mises en évidence. */
@media (hover: hover) and (pointer: fine) {
  .tile { transition: border-color .15s, box-shadow .15s, transform .15s; }
  .tile:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(3, 40, 80, .1); transform: translateY(-2px); }
  .tiles.editing .tile:hover { transform: none; }
  button:not(:disabled):hover, .btn:hover { filter: brightness(.96); }
  button.primary:not(:disabled):hover { filter: brightness(1.08); }
  /* Le fond déborde de 10 px de chaque côté (ombres) sans décaler le contenu. */
  .p-row:hover, .act:hover, .trip:hover { background: var(--surface-2); box-shadow: -10px 0 0 var(--surface-2), 10px 0 0 var(--surface-2); }
  .gd-chapter:hover { border-color: var(--accent); }
  .side-nav a:not([aria-current]):hover { background: var(--surface-2); }
  .side-edit:hover { background: var(--surface-2); color: var(--ink); }
  .screen-head .back:hover, .screen-head .help:hover { border-color: var(--accent); }
  .tile:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .tile:hover { transform: none; } }

/* ================================================================ ClaudIA (service à la clientèle)
   « Claud » en mauve Odoo, « IA » en terracotta Claude, étincelle au-dessus du I. Tableau de bord sur ordinateur. */
:root { --cl-odoo: #714b67; --cl-claude: #d97757; --cl-odoo-soft: #f3ecf2; }
@media (prefers-color-scheme: dark) { :root { --cl-odoo: #c59bbb; --cl-claude: #ec9474; --cl-odoo-soft: #2a1f29; } }
.cl-logo { color: var(--cl-odoo); font-weight: 700; letter-spacing: -.01em; }
.cl-logo b { color: var(--cl-claude); font-weight: 900; position: relative; }
.cl-logo b::before { content: "✦"; position: absolute; left: -.05em; top: -.62em; font-size: .5em; color: var(--cl-claude); }
.tile-claudia .tile-icon, .tile-claudia.alert .tile-icon { background: var(--cl-odoo-soft); color: var(--cl-claude); }
.cl-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cl-pill { border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-pill.ok { color: var(--ok); }
.cl-pill.busy { color: var(--cl-claude); }
.cl-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--muted); user-select: none; }
.cl-switch.on { color: var(--ok); }
.cl-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cl-switch-track { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.cl-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.cl-switch input:checked + .cl-switch-track { background: var(--ok); }
.cl-switch input:checked + .cl-switch-track::after { transform: translateX(18px); }
.cl-switch input:focus-visible + .cl-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-eteinte { margin: 0 0 12px; }
.cl-ask.off { opacity: .55; border-color: var(--line); }
@media (prefers-reduced-motion: reduce) { .cl-switch-track, .cl-switch-track::after { transition: none; } }
.cl-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.cl-kpi { margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.cl-kpi b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.cl-kpi small { font-size: .75rem; font-weight: 500; color: var(--muted); }
.cl-kpi .cl-par-modele { display: block; margin-top: 2px; }
.cl-kpi.alert b { color: var(--cl-claude); }
button.cl-kpi { text-align: left; font: inherit; color: var(--ink); cursor: pointer; border: 1px solid var(--line); align-items: flex-start; justify-content: flex-start; width: 100%; }
button.cl-kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-kpi-plus { color: var(--muted); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { button.cl-kpi:hover { border-color: var(--cl-odoo); } }
.cl-sheet-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.cl-sheet-tete h2 { margin: 0; }
.cl-jours { display: flex; flex-direction: column; gap: 4px; }
.cl-jour { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: center; font-size: .85rem; }
.cl-barre { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.cl-barre span { display: block; height: 100%; background: var(--cl-claude); border-radius: 999px; }
.cl-row-actions { display: inline-flex; align-items: center; gap: 6px; }
.cl-doc-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 4px; }
.cl-doc-tete .cl-voir:only-child { margin-left: auto; }
.cl-voir { border: 1px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-size: .8rem;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; }
@media (hover: hover) and (pointer: fine) { .cl-voir:hover { border-color: var(--accent); } }
.cl-docu-tete { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--cl-odoo); }
.cl-docu-num { text-align: right; }
.cl-mail-champ { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cl-mail-champ .meta { display: inline-block; min-width: 56px; }
.cl-mail-corps { white-space: pre-wrap; line-height: 1.55; padding-top: 14px; }
.cl-plein { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: flex; flex-direction: column; }
.cl-plein-tete { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.cl-plein-tete b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-plein-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1.2rem; line-height: 1; padding: 0; cursor: pointer; flex: none; }
.cl-plein-corps { flex: 1; overflow: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.cl-plein-page { max-width: 900px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.cl-plein-page .table-wrap { margin: 0; padding: 0; }
body.cl-plein-ouvert { overflow: hidden; }
.cl-vise { box-shadow: 0 0 0 2px var(--cl-claude); }
.cl-ajuster-astuce { margin: 12px 0 0; }
.cl-kpi.live b { color: var(--ok); }
.cl-ask { border-color: var(--cl-odoo); }
.cl-ask-label { font-weight: 700; color: var(--cl-odoo); }
.cl-ask textarea { min-height: 60px; }
.cl-ask-bar { display: flex; gap: 10px; margin-top: 8px; align-items: center; justify-content: space-between; }
.cl-ask-bar .meta { margin: 0; }
.cl-ask-bar select { flex: 1; min-width: 0; }
.cl-sugg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.cl-sugg button { font-size: .82rem; text-align: left; }
.cl-board { display: grid; gap: 12px; }
.cl-col { margin: 0; padding: 12px; }
.cl-col h3 { margin: 4px 6px 8px; display: flex; align-items: center; gap: 8px; }
.cl-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cl-filtres button { padding: 4px 10px; font-size: .78rem; }
.cl-count { background: var(--cl-claude); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; }
.cl-row { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.cl-row + .cl-row { border-top: 1px solid var(--line); }
.cl-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
.cl-kind { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cl-odoo); }
.cl-vide { padding: 14px 6px; }
.cl-voir-tout { display: block; margin-top: 8px; padding: 8px 6px 2px; border-top: 1px solid var(--line); font-size: .88rem; font-weight: 600; text-align: right; }
.cl-histo { padding: 12px; }
.cl-histo-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.cl-histo-bar input { flex: 1; min-width: 200px; }
.cl-histo-compte { margin: 4px 6px 6px; }
.cl-pages { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.cl-log { margin: 0; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.cl-log .meta { display: block; margin-top: 2px; }
.cl-moteur { margin-top: 18px; }
.cl-pulse { animation: cl-pulse 1.6s ease-in-out infinite; }
@keyframes cl-pulse { 50% { opacity: .45; } }
.cl-card h2, .cl-appro h3 { margin: 6px 0 2px; }
.cl-narrow { max-width: 760px; }
.cl-why { border-left: 3px solid var(--cl-claude); background: var(--cl-odoo-soft); border-radius: 0 10px 10px 0; padding: 10px 12px; margin: 12px 0; }
.cl-why p { margin: 4px 0 0; }
.cl-mail { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.cl-draft { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin: 6px 0 10px; }
.cl-ops { margin: 10px 0; font-size: .88rem; }
.cl-ops summary, .cl-steps summary, .cl-version summary { cursor: pointer; }
.cl-ops ol { margin: 6px 0 0; padding-left: 22px; }
.cl-note-label { display: block; margin-top: 10px; }
.cl-actions { margin-top: 10px; }
.cl-tache { max-width: 860px; }
.cl-fil { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.cl-fil > .card { margin: 0; }
.cl-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; }
.cl-msg .meta { display: block; font-size: .72rem; margin-top: 4px; }
.cl-msg p { margin: 0 0 6px; }
.cl-msg.moi { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.cl-msg.moi .meta { color: inherit; opacity: .75; }
.cl-msg.elle { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cl-msg.question { border-color: var(--cl-claude); }
.cl-qui { display: block; font-size: .78rem; margin-bottom: 4px; }
.cl-choix { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cl-steps { align-self: flex-start; font-size: .82rem; color: var(--muted); padding: 0 6px; }
.cl-steps p { margin: 4px 0 0 14px; }
.cl-decision { align-self: center; font-size: .85rem; color: var(--muted); margin: 0; text-align: center; }
.cl-dots { display: flex; gap: 5px; padding: 14px 16px; }
.cl-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--cl-claude); animation: cl-pulse 1.2s infinite; }
.cl-dots span:nth-child(2) { animation-delay: .2s; } .cl-dots span:nth-child(3) { animation-delay: .4s; }
.cl-repondre form { display: flex; gap: 10px; align-items: flex-end; }
.cl-repondre textarea { flex: 1; }
.cl-repondre { margin-right: 72px; }  /* laisse la place au bouton micro */
.cl-repondre.collant { position: sticky; bottom: 8px; }
.cl-skills { display: grid; gap: 10px; }
.cl-skill { margin: 0; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.cl-skill.off { opacity: .6; }
.cl-skill-new { border-style: dashed; }
.cl-suppr { margin: 16px 0 0; text-align: right; }
.cl-plan { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.cl-plan.off { opacity: .65; }
.cl-check { display: flex; align-items: center; gap: 8px; }
.cl-check input { flex: none; width: 20px; height: 20px; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--accent); }
.cl-version { border-bottom: 1px solid var(--line); padding: 8px 0; }
.cl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }
.cl-tabs { margin-bottom: 14px; }
@media (min-width: 700px) {
  .cl-kpis { grid-template-columns: repeat(4, 1fr); }
  .cl-skills { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .cl-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .9fr); align-items: start; }
  .cl-skills { grid-template-columns: repeat(3, 1fr); }
  .cl-split { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
  .cl-split-rules { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
  .cl-split > .card { margin-top: 0; }
}

#cl-det h3 { margin: 16px 0 6px; }
.inv-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 2px 0 10px; }
.inv-progress span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.inv-todo.done b { color: var(--muted); }
.inv-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* Fiche produit */
.pc-photo { display: grid; place-items: center; min-height: 200px; max-height: 46vh; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; cursor: zoom-in; }
.pc-photo img { width: 100%; max-height: 46vh; object-fit: contain; display: block; }
.pc-none { color: var(--muted); text-align: center; font-size: .95rem; padding: 24px; }
.pc-name { font-size: 1.1rem; margin-bottom: 8px; }
.pc-table { font-size: .92rem; }
.pc-table th { text-transform: none; letter-spacing: 0; font-size: .85rem; width: 42%; padding: 7px 8px 7px 0; vertical-align: top; }
.pc-table td { padding: 7px 0; }
[data-fiche] { cursor: pointer; }
.fiche-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; padding: 0; font-weight: 700; color: var(--accent); }
.inv-img-wrap { flex: none; display: inline-flex; cursor: zoom-in; }
.inv-head .grow { flex: 1; min-width: 0; }
.fiche-link { text-decoration: underline dotted; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- commander (portail de commande de l'équipe Clean) */
a.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; text-decoration: none; text-align: center; }
.cm-acc { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.cm-acc .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cm-num { flex: none; min-width: 58px; height: 52px; padding: 0 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.cm-go { color: var(--muted); font-size: 1.4rem; flex: none; }
.cm-found { display: block; padding: 9px 2px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.cm-pill { display: inline-block; border-radius: 20px; padding: 1px 8px; font-size: .74rem; font-weight: 600; width: fit-content; }
.cm-pill.ok { background: var(--ok-soft); color: var(--ok); }
.cm-pill.wait { background: var(--warn-soft); color: var(--warn); }
.search-row { margin-bottom: 10px; }
.search-row input { width: 100%; }
.cm-list { padding-top: 4px; padding-bottom: 4px; }
.cm-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cm-item:last-child { border-bottom: 0; }
.cm-item .grow { min-width: 0; }
.cm-item b, .cm-tmpl b { display: block; font-size: .93rem; line-height: 1.25; }
.cm-var { display: block; font-size: .8rem; color: var(--muted); }
.cm-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; font-size: .8rem; }
.cm-code { color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 0 6px; }
.cm-price { font-weight: 700; }
.cm-price small { font-weight: 500; color: var(--muted); }
.cm-item .meta { font-size: .76rem; margin-top: 2px; }
.cm-step { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.cm-step button { border: 0; border-radius: 0; background: var(--surface-2); color: var(--accent); width: 34px; height: 38px; padding: 0; font-size: 1.15rem; font-weight: 700; }
.cm-step input { width: 46px; border: 0; border-radius: 0; text-align: center; font-weight: 700; padding: 0; height: 38px; background: var(--surface); }
.cm-redo { margin-bottom: 12px; }
.cm-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; }
.cm-cats button { flex: none; border-radius: 20px; padding: 6px 12px; font-size: .84rem; }
.cm-cats button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cm-cats .cal-hidex { margin-left: auto; }
.cm-cats .cal-hidex.on { background: var(--surface-2); color: var(--ink); border-color: var(--accent); }
.cm-tmpl { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 10px 0; color: inherit; }
.cm-tmpl:last-child { border-bottom: 0; }
.cm-tmpl .grow { min-width: 0; }
.cm-thumb { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.cm-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.cm-acc .grow, .cm-item .grow, .cm-tmpl .grow { flex: 1; }
.cm-sheet-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.cm-hero { width: 84px; height: 84px; object-fit: contain; border-radius: 12px; background: #fff; flex: none; }
.cm-desc { font-size: .88rem; color: var(--muted); white-space: pre-line; }
.cm-docs { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 10px; }
.cm-docs a { padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9rem; }
.cm-bar-sum { display: flex; flex-direction: column; line-height: 1.2; padding-left: 4px; }
.cm-bar-sum .meta { font-size: .78rem; }
.liv-bar a.btn.primary { flex: 1; }
.cm-total { display: flex; justify-content: space-between; padding: 12px 0 6px; border-top: 2px solid var(--line); margin-top: 2px; }
#cm-send label { display: block; margin-top: 10px; }
#cm-send select, #cm-send input, #cm-send textarea { width: 100%; }
.cm-order { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cm-order-h { display: flex; justify-content: space-between; gap: 8px; width: 100%; align-items: baseline; }
.cm-track { display: flex; width: 100%; gap: 4px; font-size: .7rem; color: var(--muted); }
.cm-track span { flex: 1; border-top: 4px solid var(--line); padding-top: 4px; }
.cm-track span.done { border-color: var(--ok); color: var(--ok); }
.cm-track span.now { border-color: var(--sky); color: var(--ink); font-weight: 700; }
.cm-lines { width: 100%; font-size: .85rem; }
.cm-lines summary { color: var(--accent); font-weight: 600; cursor: pointer; padding: 2px 0; }
.cm-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.cm-alt { display: block; font-size: .8rem; padding: 4px 0 0; text-align: left; }
.cm-why { font-size: .8rem; color: var(--info); margin-top: 3px; }
.cm-bo { border-color: var(--sky); background: var(--info-soft); }
.cm-bo-btns { display: flex; flex-direction: column; gap: 8px; }
.cm-bo-btns button { width: 100%; display: block; text-align: center; }
.cm-bo-btns small { display: block; font-weight: 500; font-size: .76rem; color: var(--muted); }
.segmented .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; line-height: 18px; }

/* calendrier des commandes */
.cm-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; border: 1px solid rgba(0,0,0,.12); }
.cm-cal { margin: 0 0 10px; }
.cal-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.cal-kpis span { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; font-size: .88rem; }
.cal-kpis .ok { background: var(--ok-soft); color: var(--ok); }
.cal-kpis .wait { background: var(--info-soft); color: var(--info); }
.cal-kpis .bad { background: var(--danger-soft); color: var(--danger); }
.cal-h { margin: 14px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-miss { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cal-miss .grow { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cal-c { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 800; font-size: .8rem; flex: none; }
.cal-c.ok { background: var(--ok); color: #fff; }
.cal-c.retard { background: var(--warn); color: #fff; }
.cal-c.manquante { background: var(--danger); color: #fff; }
.cal-c.attente { background: var(--info-soft); color: var(--info); border: 1px solid var(--info); }
.cal-c.futur { color: var(--muted); border: 1px dashed var(--line); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; text-transform: none; letter-spacing: 0; }
.cal-legend .cal-c { width: 16px; height: 16px; font-size: .65rem; }
.cal-grid th, .cal-grid td { text-align: center; white-space: nowrap; padding: 6px 4px; }
.cal-grid th:first-child, .cal-grid td:first-child { text-align: left; white-space: normal; min-width: 200px; }
.cal-grid th { font-size: .72rem; font-weight: 600; color: var(--muted); }
.cal-grid .now { background: var(--accent-soft); }
.cal-wk { display: block; height: 5px; border-radius: 3px; margin: 0 2px 3px; }
.cal-x { color: var(--muted); font-weight: 800; }
.cal-client { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-client.off { opacity: .55; }
.cal-client .grow { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
.cal-cycle { font-weight: 600; }
.cal-ctrls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cal-prog { display: inline-flex; gap: 4px; }
.cal-prog button { padding: 5px 9px; font-size: .8rem; border-radius: 8px; }
.cal-prog button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cal-colors { display: inline-flex; gap: 6px; }
.cal-colors button { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 3px solid var(--c); background: var(--surface); opacity: .55; }
.cal-colors button.on { background: var(--c); opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }

/* ------------------------------------------------ Dashboard Admin (tableau.js) */
.tb-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tb-nav { display: flex; align-items: center; gap: 8px; }
.tb-nav button { min-width: 36px; font-size: 1.1rem; line-height: 1; }
.tb-label { font-size: 1rem; text-align: center; min-width: 11em; }
.tb-tools { display: flex; gap: 8px; }
.tb-note { margin: -4px 0 10px; }
.tb-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 2px; }
@media (max-width: 900px) { .tb-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tb-gauges { gap: 8px; } .tb-gauge { padding: 12px 10px; } .tb-g-status { font-size: .74rem; } }
.tb-gauge { padding: 14px 14px 12px; margin-bottom: 12px; display: flex; flex-direction: column; }
.tb-g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tb-gauge svg { width: 100%; height: auto; display: block; margin: 4px 0 0; overflow: visible; }
.tb-zone { fill: none; stroke-width: 14; }
.tb-zone.ok { stroke: var(--ok); opacity: .55; }
.tb-zone.warn { stroke: var(--warn); opacity: .55; }
.tb-zone.bad { stroke: var(--danger); opacity: .55; }
.tb-tick { stroke: var(--muted); stroke-width: 1.2; }
.tb-ref { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.tb-ref-l { fill: var(--muted); font-size: 8.5px; }
.tb-end { fill: var(--muted); font-size: 10px; font-weight: 600; }
.tb-needle { transform: rotate(0deg); transition: transform 1.1s cubic-bezier(.3, 1.4, .5, 1); }
.tb-needle line { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.tb-hub { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.tb-big { fill: var(--ink); font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; }
.tb-g-sub { margin: 2px 0 6px; text-align: center; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tb-g-status { margin: auto 0 0; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.tb-g-status b { color: var(--ink); }
.tb-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.tb-g-status.ok .tb-dot { background: var(--ok); }
.tb-g-status.warn .tb-dot { background: var(--warn); }
.tb-g-status.bad .tb-dot { background: var(--danger); }
.tb-pl td { vertical-align: middle; }
.tb-pl .tb-sec td { font-weight: 700; background: var(--surface-2); }
.tb-pl .tb-total td { font-weight: 750; border-top: 2px solid var(--line); }
.tb-pl .tb-net td { font-size: 1.02rem; border-bottom: 0; }
.tb-pl .tb-grp td:first-child { padding-left: 22px; font-weight: 600; }
.tb-pl .tb-acc td:first-child { padding-left: 40px; }
.tb-pl .tb-acc td { font-size: .86rem; }
.tb-click { cursor: pointer; }
.tb-click:hover td { background: var(--accent-soft); }
.tb-caret { display: inline-block; width: 1em; color: var(--accent); }
.tb-code { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.tb-go { color: var(--accent); font-size: .8rem; font-weight: 600; }
.tb-delta { font-weight: 650; display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.tb-delta small { font-weight: 500; font-size: .74rem; color: var(--muted); }
.tb-delta.ok { color: var(--ok); }
.tb-delta.bad { color: var(--danger); }
.tb-sub > td { padding: 0 0 8px 22px; background: var(--surface-2); }
.tb-fam { font-size: .86rem; }
.tb-fam th, .tb-fam td { padding: 7px 8px; }
@media (max-width: 640px) {
  .tb-prev { display: none; }
  .tb-pl, .tb-fam { font-size: .82rem; }
  .tb-pl td, .tb-pl th { padding: 8px 3px; }
  .tb-pl .tb-acc td:first-child { padding-left: 18px; }
  .tb-pl .tb-grp td:first-child { padding-left: 10px; }
  .tb-sub > td { padding-left: 0; }
  .tb-label { min-width: 0; }
}
.tb-entries { display: flex; flex-direction: column; }
.tb-entry { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.tb-entry:hover { background: var(--accent-soft); }
.tb-entry .grow { flex: 1; min-width: 0; }
.tb-entry .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-entry .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-odoo { color: var(--accent); font-weight: 600; }
#tb-chart { position: relative; }
.tb-legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: .82rem; margin-bottom: 6px; }
.tb-legend .sw { display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: 0; }
.tb-legend .sw.real { background: var(--accent); border-radius: 3px 3px 0 0; }
.tb-legend .sw.bud { height: 0; border-top: 3px solid var(--ink); vertical-align: 3px; }
.tb-chart { width: 100%; height: auto; display: block; }
.tb-grid { stroke: var(--line); stroke-width: 1; }
.tb-grid.zero { stroke: var(--muted); }
.tb-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tb-colbar { fill: var(--accent); opacity: .45; }
.tb-col.sel .tb-colbar { opacity: 1; }
.tb-bud { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.tb-col.future .tb-bud { stroke-dasharray: 3 3; opacity: .6; }
.tb-hit { fill: transparent; cursor: pointer; }
.tb-col.future .tb-hit { cursor: default; }
.tb-col:hover .tb-hit { fill: var(--accent-soft); opacity: .5; }
.tb-col.sel .tb-axis { fill: var(--ink); font-weight: 700; }
.tb-tip { position: absolute; top: 28px; width: 190px; white-space: pre-line; background: var(--ink); color: var(--bg); font-size: .8rem;
  padding: 8px 10px; border-radius: 10px; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); font-variant-numeric: tabular-nums; }
.tb-budget input { width: 100%; min-width: 92px; text-align: right; padding: 7px 8px; font-variant-numeric: tabular-nums; }
.tb-budget td { padding: 4px 4px; vertical-align: middle; }
.tb-budget tfoot th { text-transform: none; font-size: .85rem; color: var(--ink); }
@media (max-width: 640px) { .tb-delta { flex-direction: row; gap: 3px; } .tb-dm { display: none; } .tb-delta small { font-size: .8rem; font-weight: 650; color: inherit; } #tb-chart-kind { display: flex; width: 100%; } #tb-chart-kind button { flex: 1; padding: 7px 4px; font-size: .8rem; } }
@media (max-width: 640px) { .tb-pl { font-size: .78rem; } .tb-pl .tb-net td { font-size: .86rem; } .tb-pl .tb-sec .meta { display: none; }
  .tb-pl .tb-total small { display: block; font-size: .7rem; } .tb-pl th { font-size: .66rem; letter-spacing: 0; } }
/* Ventes par vendeur */
.tb-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tb-filters > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tb-filters .eyebrow { min-width: 72px; }
.tb-chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 5px 11px; font-size: .82rem; font-weight: 600;
  text-decoration: line-through; display: inline-flex; gap: 6px; align-items: baseline; }
.tb-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); text-decoration: none; }
.tb-chip small { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.tb-legend .sw.sales { background: var(--accent); opacity: .35; border-radius: 0 3px 3px 0; }
.tb-sgrid { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.tb-plwrap { margin: 0; padding: 0; }
.tb-sinner { min-width: var(--minw); }
.tb-shead, .tb-srow { display: grid; grid-template-columns: var(--cols); gap: 10px; align-items: center; }
.tb-shead { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tb-srow { padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tb-srow .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-srow[data-user] { cursor: pointer; }
.tb-srow[data-user]:hover { background: var(--accent-soft); }
.tb-steam { background: var(--surface-2); font-weight: 700; margin-top: 6px; }
.tb-stotal { font-weight: 750; border-top: 2px solid var(--line); border-bottom: 0; }
.tb-srow[data-user] .tb-sname { padding-left: 12px; }
.tb-sname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-sbar { height: 16px; }
.tb-sb { display: block; height: 100%; min-width: 2px; background: color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 0 4px 4px 0; position: relative; overflow: hidden; }
.tb-sm { display: block; height: 100%; background: var(--accent); }
@media (max-width: 640px) {
  .tb-sinner { min-width: var(--minw-phone); }
  .tb-shead, .tb-srow { grid-template-columns: var(--cols-phone); gap: 6px; font-size: .8rem; }
  .tb-shead > :nth-child(2), .tb-srow > .tb-sbar { display: none; }
  .tb-srow > .tb-sbar { display: block; grid-column: 1 / -1; grid-row: 2; height: 8px; }
  .tb-srow.tb-steam > .tb-sbar, .tb-srow.tb-stotal > .tb-sbar { display: none; }
  .tb-filters .eyebrow { width: 100%; }
}
@media (max-width: 640px) { .tb-chip { padding: 4px 8px; font-size: .74rem; min-height: 0; gap: 4px; } .tb-chip small { display: none; } }
/* Menu Comparaison (comme les rapports d'Odoo) */
.tb-sales-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tb-cmp-wrap { position: relative; }
.tb-cmp-btn { font-weight: 600; }
.tb-cmp-col { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-transform: inherit; letter-spacing: inherit; font-weight: 700; cursor: pointer; text-align: right; white-space: normal; line-height: 1.2; min-height: 0; }
.tb-pl th .tb-cmp-col { max-width: 120px; }
.tb-pl td.tb-cmpcell { min-width: 96px; }
.tb-pl .tb-cmpcell .tb-delta { font-size: .76rem; }
.tb-cmpcell .tb-delta { font-size: .78rem; }
.tb-cmp-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: 340px; max-width: calc(100vw - 32px); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 6px 0; }
.tb-cmp-item { display: flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer; font-size: .92rem; }
.tb-cmp-item:hover, .tb-cmp-item:focus { background: var(--accent-soft); outline: none; }
.tb-cmp-item .grow { flex: 1; }
.tb-check { width: 14px; color: var(--accent); font-weight: 700; }
.tb-cmp-item input[type=number] { width: 56px; padding: 4px 6px; text-align: center; }
.tb-cmp-order { cursor: default; }
.tb-cmp-order:hover { background: none; }
.tb-cmp-order select { width: auto; padding: 4px 8px; }
.tb-cmp-dates { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 14px 10px 36px; }
.tb-cmp-dates input { width: auto; padding: 5px 6px; font-size: .85rem; }
.tb-cmp-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
@media (max-width: 640px) { .tb-cmp-menu { right: auto; left: 0; } }
@media (max-width: 640px) {
  .tb-cmp-col { white-space: normal; line-height: 1.2; }
  .tb-shead > :first-child, .tb-srow > .tb-sname { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .tb-steam > .tb-sname { background: var(--surface-2); }
}
@media (max-width: 640px) {
  .tb-shead > :first-child, .tb-srow > .tb-sname { align-self: stretch; display: flex; align-items: center; box-shadow: 6px 0 0 var(--surface); }
  .tb-steam > .tb-sname { box-shadow: 6px 0 0 var(--surface-2); }
}
/* Compte de résultat large (plusieurs comparaisons) : la colonne Poste reste en place pendant qu'on glisse. */
.tb-pl > thead > tr > th:first-child, .tb-pl > tbody > tr > td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 6px 0 6px -6px rgba(0, 0, 0, .15); }
.tb-pl > tbody > tr.tb-sec > td:first-child { background: var(--surface-2); }
.tb-pl > tbody > tr.tb-sub > td:first-child { position: static; box-shadow: none; background: var(--surface-2); }
.tb-pl > tbody > tr.tb-click:hover > td:first-child { background: var(--accent-soft); }
/* Dashboard Admin : pages, tuiles, entonnoir (pages Ventes et CRM, Inventaire) */
.tb-pages { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 0 0 14px; overflow-x: auto; }
.tb-pages a { flex: 1; text-align: center; padding: 9px 14px; border-radius: 9px; font-weight: 650; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tb-pages a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tb-section { margin: 22px 0 10px; font-size: 1.15rem; }
.tb-section small { font-weight: 500; }
.tb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tb-kpi { margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: inherit; }
.tb-kpi > b { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tb-kpi > b small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tb-kpi .tb-delta { font-size: .8rem; display: inline-flex; }
button.tb-kpi { cursor: pointer; border: 1px solid var(--line); }
button.tb-kpi:hover { border-color: var(--accent); background: var(--accent-soft); }
.tb-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tb-two > .card { margin-bottom: 12px; min-width: 0; }
@media (max-width: 900px) { .tb-two { grid-template-columns: 1fr; } }
.tb-funnel { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.tb-frow { display: grid; grid-template-columns: minmax(110px, 1.3fr) 2fr 44px 64px; gap: 10px; align-items: center; font-size: .88rem; }
.tb-frow b { text-align: right; font-variant-numeric: tabular-nums; }
.tb-fbar { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.tb-fbar > span { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.tb-frow.lost .tb-fbar > span { background: var(--muted); }
.tb-ctable td, .tb-ctable th { padding: 8px 6px; }
.tb-ctable { font-size: .88rem; }
.tb-warncell { color: var(--danger); font-weight: 700; }
.tb-late { color: var(--danger); }
.tb-cats tr.on td, .tb-cats tr.on td:first-child { background: var(--accent-soft); }
.tb-wrapseg { flex-wrap: wrap; }
.tb-wrapseg button small { color: var(--muted); font-weight: 500; }
.tb-legend .sw.alt, .tb-colbar.alt { background: var(--muted); fill: var(--muted); }
.tb-colbar.alt { opacity: .7; }
.tb-repcfg { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tb-check-l { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--ink); font-size: .95rem; }
.tb-check-l input { width: auto; }
.tb-repcfg-f { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tb-repcfg-f label { margin: 6px 0 0; }
.tb-reps th sup { font-size: .6rem; }
@media (max-width: 640px) {
  .tb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tb-kpi > b { font-size: 1.1rem; }
  .tb-frow { grid-template-columns: minmax(90px, 1fr) 1.2fr 34px; }
  .tb-frow > :last-child { display: none; }
}
.tb-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; }
.tb-section-head .tb-section { margin: 0; }
