/* Styles propres aux écrans */

/* ---- Tableau de bord ---- */
.hero { position: relative; height: 164px; overflow: hidden; background: #0e1829; }
.hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10, 19, 33, .25) 0%, rgba(10, 19, 33, 0) 30%), linear-gradient(90deg, rgba(10, 19, 33, .35) 0%, rgba(10, 19, 33, 0) 25%, rgba(10, 19, 33, 0) 75%, rgba(10, 19, 33, .25) 100%); }
.hero .strip { position: absolute; left: 0; bottom: 0; width: 420px; height: 34px; z-index: 2; background: linear-gradient(90deg, #d4151c 0%, #e11d24 70%, #c8141b 100%); clip-path: polygon(0 0, 93% 0, 100% 100%, 0 100%); }
.hero h1 { position: absolute; left: 22px; bottom: 0; height: 34px; margin: 0; z-index: 3; display: flex; align-items: center; font-family: var(--cond); font-size: 21px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { height: 84px; display: flex; align-items: center; gap: 16px; padding: 0 20px; text-decoration: none; }
.kpi .ico { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--navy); background: radial-gradient(circle at 35% 30%, #fff, #eceff4); box-shadow: inset 0 0 0 1px #e1e6ed, 0 2px 6px rgba(16, 27, 45, .08); }
.kpi .lbl { font-size: 13.5px; color: var(--text-3); font-weight: 500; }
.kpi .val { font-family: var(--cond); font-size: 30px; line-height: 32px; font-weight: 700; color: var(--red-text); }
.kpi .val.blue { color: var(--blue); }

.flow { display: flex; gap: 12px; align-items: flex-start; padding: 0 2px; }
.tile { position: relative; flex: 1 1 0; min-width: 0; height: 116px; border-radius: 6px; padding: 9px 4px 10px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-decoration: none; color: #fff;
  box-shadow: 0 6px 14px rgba(16, 27, 45, .22), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .15); transition: transform .25s ease, filter .25s ease; }
.tile:hover { transform: translateY(-6px) scale(1.04); filter: brightness(1.1); color: #fff; }
.tile:hover .gi { animation: gJelly .6s ease both; animation-delay: 0s !important; }
.tile.big { height: 132px; margin-top: -8px; }
.tile .t-label { font-family: var(--cond); font-size: 13px; line-height: 12px; font-weight: 700; letter-spacing: .3px; text-align: center; min-height: 24px; display: flex; align-items: center; text-transform: uppercase; }
.tile .t-label.sm { font-size: 11px; }
.tile .t-count { position: absolute; top: -8px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--navy); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); z-index: 5; }
.tile .bars { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 60%; }
.tile .bars i { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .85); width: 100%; }
.tile .bars i + i { width: 60%; background: rgba(255, 255, 255, .35); }
.tile .prog { display: flex; align-items: center; gap: 5px; width: 80%; }
.tile .prog .track { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.tile .prog .fill { height: 100%; background: #fff; border-radius: 3px; }
.tile .prog span { font-size: 9px; font-weight: 700; }
.tile .arrow { position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; transform: rotate(45deg); border-radius: 2px; z-index: 2; }
.tile .gloss { position: absolute; left: 0; right: 0; top: 0; height: 45%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)); pointer-events: none; }
.tile .sheen-wrap { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; pointer-events: none; }
.tile .sheen-wrap div { position: absolute; top: -10%; bottom: -10%; left: 0; width: 34%; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .32), rgba(255, 255, 255, 0)); }

.dash-bottom { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.05fr; gap: 14px; }
.dash-bottom > .card { min-height: 290px; display: flex; flex-direction: column; gap: 6px; }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.legend .sw { width: 9px; height: 9px; border-radius: 50%; }
.legend b { margin-left: auto; font-weight: 600; color: var(--navy); }
.list-row { display: flex; align-items: center; gap: 12px; min-height: 38px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--text-2); }
.list-row b { margin-left: auto; font-weight: 600; color: var(--navy); }
.notif { display: flex; align-items: center; gap: 12px; min-height: 34px; font-size: 13.5px; color: var(--text-2); text-decoration: none; }
.notif:hover { color: var(--red); }
.notif .d { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }

/* ---- bandeau des listes ---- */
.banner { position: relative; height: 70px; overflow: hidden; background: #0e1829; }
.banner img { position: absolute; right: 0; top: 0; width: 900px; height: 70px; object-fit: cover; object-position: right center; }
.banner::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #0f1a2c 0%, #0f1a2c 30%, rgba(15, 26, 44, .55) 60%, rgba(15, 26, 44, .1) 100%); }
.banner::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 2; background: linear-gradient(90deg, #e11d24, rgba(225, 29, 36, .2)); }
.banner h1 { position: absolute; left: 26px; top: 0; bottom: 0; margin: 0; z-index: 2; display: flex; align-items: center; font-family: var(--cond); font-size: 24px; font-weight: 700; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.list-head { padding: 18px 20px 14px; }
.filters { display: flex; gap: 12px; padding: 0 20px 18px; flex-wrap: wrap; }

/* ---- en-tête des écrans métier ---- */
.wf-head { display: flex; align-items: center; gap: 18px; padding: 20px 24px 16px; flex-wrap: wrap; }
.wf-head .date { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-3); }
.wf-body { padding: 0 24px 22px; }
.cols { display: flex; }
.cols > section { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.cols > section + section { border-left: 1px solid var(--line); }
.h3 { margin: 0 0 4px; font-family: var(--cond); font-size: 17px; font-weight: 700; color: var(--navy); }

/* ---- diagnostic ---- */
.diag-row { display: grid; grid-template-columns: 30px minmax(140px, 1fr) auto; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line-2); padding: 0 6px; gap: 8px; }
.diag-row .ok-c { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.diag-row .item { font-size: 14.5px; font-weight: 500; color: var(--text-2); }
.res-group { display: flex; gap: 4px; }
.res-group button { height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 600; border: 1px solid #dfe4eb; background: #fff; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.res-group button.on.ok { background: #e3f6e8; color: #1a8a3a; border-color: #b9e5c5; }
.res-group button.on.a_verifier { background: #fff4dc; color: #c77c00; border-color: #f7dca3; }
.res-group button.on.anomalie { background: #fdeaea; color: #d7141b; border-color: #f7c6c8; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.photo-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 12px rgba(16, 27, 45, .2); }
.photo-main { position: relative; height: 200px; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 16px rgba(16, 27, 45, .25); background: #0e1829; }
.photo-main img { width: 100%; height: 100%; object-fit: cover; }

/* ---- devis / facture ---- */
.doc-grid { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 6px 16px rgba(16, 27, 45, .05); }
.doc-grid .lines { flex: 1; min-width: 0; border-right: 1px solid var(--line); }
.doc-grid aside { width: 330px; padding: 18px 22px; background: linear-gradient(180deg, #fff, #fafbfc); display: flex; flex-direction: column; }
.sum-row { display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line-2); font-size: 14px; font-weight: 700; color: var(--navy); }
.sum-row span + span { font-weight: 600; }
.total-ttc { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; }
.total-ttc .l { font-family: var(--cond); font-size: 22px; font-weight: 600; color: var(--navy); }
.total-ttc .l b { color: var(--red-text); }
.total-ttc .v { font-family: var(--cond); font-size: 28px; font-weight: 800; color: var(--red-text); }
.cat-cell { background: #f8f9fb; border-right: 1px solid var(--line); font-size: 12.5px !important; font-weight: 600; color: var(--text-3) !important; letter-spacing: .3px; text-transform: uppercase; }
.line-input { width: 100%; height: 32px; border: 1px solid transparent; border-radius: 4px; padding: 0 8px; font-size: 13.5px; color: var(--text); background: transparent; }
.line-input:hover { border-color: #e0e5ec; }
.line-input:focus { outline: none; border-color: #7aa2e3; background: #fff; }
.line-input.num { text-align: right; }
.print-only { display: none; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 0 18px; border-bottom: 3px solid var(--red); margin-bottom: 18px; }
.print-head img { height: 54px; }

/* ---- planning & atelier ---- */
.board { display: flex; gap: 14px; padding: 0 24px 22px; align-items: flex-start; }
.board-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; border-radius: 8px; background: #f1f3f7; border: 1px solid #e3e7ee; overflow: hidden; min-height: 300px; }
.board-col h2 { margin: 0; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 16px; font-family: var(--cond); font-size: 17px; font-weight: 700; color: var(--navy); background: linear-gradient(180deg, #eef1f5, #e5e9ef); }
.board-col .cnt { font-family: var(--font); font-size: 12px; font-weight: 700; background: #fff; border: 1px solid #dfe4eb; border-radius: 10px; padding: 1px 8px; }
.board-col .items { display: flex; flex-direction: column; gap: 10px; padding: 12px; flex: 1; min-height: 80px; }
.board-col.drop-over .items { background: rgba(31, 99, 201, .06); outline: 2px dashed #9dbbef; outline-offset: -6px; border-radius: 6px; }
.job { display: flex; gap: 12px; padding: 12px; align-items: flex-start; cursor: grab; text-decoration: none; color: inherit; }
.job:active { cursor: grabbing; }
.job .car { width: 48px; height: 24px; object-fit: contain; margin-top: 3px; flex-shrink: 0; }
.job .t { overflow: hidden; text-overflow: ellipsis; }
.job .t { font-size: 14px; font-weight: 600; color: var(--navy); }
.job .s { font-size: 12px; color: var(--muted); }
.job .h { font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.job .h.late { color: var(--red-text); }
.col-travaux { background: #fdeaea88; border-color: #f6c4c6; }
.col-travaux h2 { background: #fdeaea; color: #d7141b; }
.col-controle { background: #fff3e288; border-color: #f8d7ae; }
.col-controle h2 { background: #fff3e2; color: #e0620e; }
.col-livraison { background: #e5f6ea88; border-color: #bfe5ca; }
.col-livraison h2 { background: #e5f6ea; color: #1a8a3a; }
.mini-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; padding: 0 24px 18px; }
.mini-kpi { height: 78px; display: flex; align-items: center; gap: 14px; padding: 0 18px; }
.mini-kpi .ico { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.mini-kpi .n { font-family: var(--cond); font-size: 28px; line-height: 30px; font-weight: 700; }
.mini-kpi .l { font-size: 12.5px; color: var(--muted); }
.status-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; }
.timer { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; border: 1px solid #dfe4eb; background: #fff; font-size: 12px; font-weight: 600; color: var(--text-3); }

/* ---- paramètres ---- */
.settings-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-weight: 500; }
.run-row { border-bottom: 1px solid var(--line-2); padding: 10px 0; font-size: 13px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #0f1a2c; color: #d3d9e3; padding: 12px; border-radius: 6px; overflow: auto; max-height: 320px; white-space: pre; }

@media (max-width: 1280px) {
  .dash-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { flex-wrap: wrap; }
  .tile { flex: 0 0 calc(25% - 9px); }
  .cols { flex-direction: column; }
  .cols > section + section { border-left: 0; border-top: 1px solid var(--line); }
  .board { overflow-x: auto; }
  .board-col { min-width: 220px; }
  .doc-grid { flex-direction: column; }
  .doc-grid aside { width: auto; }
}
.exp-fs { border: 1px solid #e3e7ee; border-radius: 10px; padding: 8px 12px 12px; margin: 0; } .exp-fs legend { font-size: 13px; font-weight: 700; padding: 0 6px; color: #14223b; } .exp-fs legend .muted { font-weight: 400; font-size: 12px; }
.pa-msg { padding: 8px 10px; border-radius: 8px; background: #f7f9fb; border: 1px solid #eef1f5; }
.pa-pin { font: 800 24px/1 'Barlow Semi Condensed', sans-serif; letter-spacing: .3em; }
.doc-grid .lines { overflow-x: auto; }

/* Paramètres › Rôles : liste + arbre de droits */
.rl-split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0; }
.rl-list { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-right: 1px solid var(--line, #e3e8ef); background: #f7f9fc; }
.rl-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.rl-item b { font-size: 14px; } .rl-item span { font-size: 11.5px; color: #6b7686; }
.rl-item:hover { background: #eef2f8; } .rl-item.on { background: #fff; border-color: #e3222a; box-shadow: 0 2px 8px rgba(225, 29, 36, .15); }
.rl-detail { padding: 14px 16px; min-width: 0; }
@media (max-width: 860px) { .rl-split { grid-template-columns: minmax(0, 1fr); } .rl-list { border-right: 0; border-bottom: 1px solid #e3e8ef; flex-direction: row; flex-wrap: wrap; } }

/* Scanner de carte grise */
.scan-fs { border: 1px dashed #b8c2d1; border-radius: 8px; padding: 10px 12px; background: #f7f9fc; display: flex; flex-direction: column; gap: 8px; }
.scan-fs legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.scan-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.scan-btn { cursor: pointer; }
.scan-msg { font-size: 12.5px; padding: 8px 10px; border-radius: 6px; background: #eef2f8; color: #33415a; }
.scan-msg.ok { background: #e7f6ec; color: #1f6b3a; } .scan-msg.warn { background: #fdeceb; color: #a4161d; }
.scan-paste summary { cursor: pointer; font-size: 12.5px; color: #55627a; } .scan-paste textarea { width: 100%; margin: 6px 0; }
.scan-filled { background: #fff8d6 !important; box-shadow: 0 0 0 2px #f5c542 inset; }

/* Nature de la réception */
.kind-card{flex:1;display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1.5px solid var(--line,#d9dee7);border-radius:10px;cursor:pointer;font-size:13px;background:#fff}
.kind-card input{position:absolute;opacity:0;pointer-events:none}
.kind-card.on{border-color:#c8202f;background:#fff5f5;box-shadow:0 0 0 2px rgba(200,32,47,.12)}
.badge-retour{background:#fde8e8;color:#b91c1c;border:1px solid #f5b5b5;border-radius:999px;padding:1px 8px;font-size:11px;font-weight:700;white-space:nowrap}

/* RH : contrats & documents */
.ctr-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;align-items:start}
.cni-slot{border:2px dashed #c3ccd9;border-radius:12px;min-height:130px;display:grid;place-items:center;text-align:center;padding:8px;cursor:pointer;background:#f8fafc;overflow:hidden}
.cni-slot img{max-width:100%;max-height:150px;border-radius:8px;display:block}
.cni-slot.has{border-style:solid;border-color:#bfe6cc;background:#f2fbf5}
.ctr-step{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:12px}
.ctr-step span{padding:3px 10px;border-radius:999px;background:#eef1f6;color:#6b7688;font-weight:700}
.ctr-step span.on{background:#e6f6ec;color:#1b7a3e}
.sig-pad{border:1.5px solid #b9c1ce;border-radius:10px;background:#fff;width:100%;height:170px;touch-action:none;display:block}
.js-sheet h4{margin:10px 0 4px;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#c8202f}
/* Base technique : définitions des codes défaut (FR + anglais) toujours lisibles, retour à la ligne */
.table.tdb-dtc td { white-space: normal; word-break: break-word; vertical-align: top; }
@media (max-width: 760px) { .tdb-dtc th:nth-child(3), .tdb-dtc td:nth-child(3) { display: none; } .tdb-dtc td:first-child { width: 72px; } }

/* Statistiques pièces (préfixe ps-) */
.ps-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ps-kpis > div { background: #fff; border: 1px solid #e3e8f0; border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(15,27,47,.04); }
.ps-kpis b { display: block; font-size: 22px; color: #0f1b2f; font-family: var(--cond, inherit); }
.ps-kpis span { font-size: 12px; color: #6b7688; }
.ps-note { font-size: 12px; margin: 2px 0 12px; }
.ps-bars { display: flex; flex-direction: column; gap: 8px; }
.ps-bar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.ps-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-bl small { display: block; color: #7a8699; font-size: 11px; }
.ps-bt { height: 12px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.ps-bt i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #e11d24, #9e1015); }
.ps-bt i.svc { background: linear-gradient(90deg, #2f5d9e, #0f1b2f); }
.ps-bar > b { text-align: right; }
.ps-top3 { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-top3 span { background: #fdeced; color: #9e1015; border-radius: 999px; padding: 2px 9px; font-size: 12px; white-space: nowrap; }
.ps-top3 span.svc { background: #e8eef8; color: #1f3f73; }
.ps-top3 em { font-style: normal; font-weight: 700; }
.ps-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.ps-list { overflow: hidden; position: sticky; top: 8px; }
.ps-find { padding: 10px; border-bottom: 1px solid #eef1f5; }
.ps-items { max-height: 640px; overflow: auto; }
.ps-items button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 9px 12px; border: 0; border-bottom: 1px solid #f1f3f7; background: #fff; text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.ps-items button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-items button b { color: #6b7688; font-size: 12px; }
.ps-items button.on { background: #0f1b2f; color: #fff; box-shadow: inset 3px 0 0 #e11d24; }
.ps-items button.on b { color: #fff; }
.ps-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.ps-h3 { font-size: 14px; margin: 14px 0 0; }
.ps-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.ps-spark i { width: 5px; background: #2f5d9e; border-radius: 1px; }
.ps-spark i.z { background: #d9dee7; }
.ps-up { color: #b3141a; font-weight: 600; } .ps-down { color: #1f7a3a; font-weight: 600; }
.ps-buy { color: #fff; background: #e11d24; border-radius: 6px; padding: 2px 8px; }
.table.ps-table td { vertical-align: top; }
@media (max-width: 900px) { .ps-split { grid-template-columns: minmax(0, 1fr); } .ps-list { position: static; } .ps-items { max-height: 220px; } .ps-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ps-bar { grid-template-columns: minmax(0, 1fr) 70px 48px; } .table.ps-table td { white-space: normal; } }
.ps-split > * { min-width: 0; }
.ps-lh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Prévention (préfixe pv-) : recommandations à la réception et à la création du véhicule */
.pv-card { border: 1px solid #e3e8f0; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: inset 4px 0 0 #e11d24; }
.pv-hd { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: linear-gradient(90deg, #0f1b2f, #1a2b46); color: #fff; }
.pv-hd b { display: block; font-size: 14.5px; } .pv-hd small { color: #c3cddd; font-size: 12px; }
.pv-ic { width: 34px; height: 34px; border-radius: 9px; background: #e11d24; display: grid; place-items: center; flex: none; }
.pv-list { display: flex; flex-direction: column; }
.pv-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 64px auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid #eef1f5; }
.pv-row.on { background: #fff6f6; }
.pv-lvl { font-size: 11.5px; font-weight: 700; text-align: center; padding: 4px 6px; border-radius: 999px; }
.pv-l1 { background: #e11d24; color: #fff; } .pv-l2 { background: #fff0e3; color: #c2560c; } .pv-l3 { background: #e8eef8; color: #1f3f73; }
.pv-main b { display: block; font-size: 13.5px; color: #0f1b2f; } .pv-main small { display: block; color: #6b7688; font-size: 11.5px; line-height: 1.35; }
.pv-arts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .pv-arts i { font-style: normal; font-size: 11px; background: #f2f4f8; border-radius: 6px; padding: 1px 6px; color: #44526a; }
.pv-pct { text-align: right; } .pv-pct b { display: block; font-size: 15px; color: #0f1b2f; } .pv-pct small { color: #7a8699; font-size: 11px; }
.pv-btn { border: 1px solid #d5dbe5; background: #fff; border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; color: #0f1b2f; white-space: nowrap; }
.pv-row.on .pv-btn { background: #e11d24; border-color: #e11d24; color: #fff; }
.pv-empty, .pv-ft { margin: 0; padding: 10px 16px; font-size: 12px; color: #6b7688; } .pv-ft { border-top: 1px solid #eef1f5; background: #fafbfd; }
@media (max-width: 760px) { .pv-row { grid-template-columns: auto 1fr auto; grid-template-areas: 'lvl pct btn' 'main main main'; row-gap: 6px; } .pv-lvl { grid-area: lvl; } .pv-pct { grid-area: pct; text-align: left; display: flex; gap: 6px; align-items: baseline; } .pv-main { grid-area: main; } .pv-btn { grid-area: btn; } .pv-hd b { font-size: 14px; } }

/* Réception : CS = utilisateur connecté (non modifiable) */
.rc-cs { display: flex; gap: 8px; align-items: center; height: 40px; padding: 0 12px; border: 1px solid #d5dce6; border-radius: 8px; background: #f4f6f9; color: #0f1b2f; font-size: 13.5px; }
.rc-cs .muted { margin-left: auto; font-size: 11.5px; }

/* Enquêtes clients (préfixe sv-) */
.sv-tabn { color: #e11d24; font-weight: 800; }
.sv-flt { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-flt select, .sv-flt input { height: 36px; border: 1px solid #d5dce6; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; background: #fff; color: #0f1b2f; }
.sv-flt input { flex: 1; min-width: 200px; }
.sv-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sv-kpis > div { background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 10px 12px; }
.sv-kpis > div.dk { background: #0b1020; color: #fff; border-color: #0b1020; border-bottom: 3px solid #e11d24; }
.sv-kpis > div.hot b { color: #e11d24; }
.sv-kpis b { display: block; font-size: 22px; }
.sv-kpis span { font-size: 11.5px; color: #6b7688; } .sv-kpis .dk span { color: #aab4c6; }
.sv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sv-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.sv-card { padding: 12px 14px; }
.sv-card h3 { margin: 0 0 10px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.sv-card h3 small { color: #6b7688; font-weight: 500; }
.sv-rk { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 0; border-top: 1px solid #f1f3f7; }
.sv-rk:first-of-type { border-top: 0; }
.sv-rk b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-rk small { color: #6b7688; min-width: 52px; text-align: right; }
.sv-bar { width: 90px; height: 7px; background: #eef1f6; border-radius: 4px; overflow: hidden; flex: 0 0 auto; }
.sv-bar i { display: block; height: 100%; background: #0b1020; } .sv-bar i.r { background: #e11d24; }
.sv-sc { width: 40px; text-align: right; font-weight: 800; }
.sv-av { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 210px minmax(0, 1fr) 190px; gap: 14px; }
.sv-av.hot { border-left: 4px solid #e11d24; }
.sv-nm { font-weight: 700; font-size: 13.5px; } .sv-nm a { color: #0f1b2f; }
.sv-mt { font-size: 11.5px; color: #6b7688; margin-top: 2px; }
.sv-pills { margin-top: 4px; }
.sv-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin: 4px 4px 0 0; }
.sv-pill.g { background: #e6f6ea; color: #15702c; } .sv-pill.o { background: #fff4dc; color: #6b4a00; } .sv-pill.r { background: #fde8e9; color: #9b1116; } .sv-pill.n { background: #eef1f6; color: #3b4658; }
.sv-quote { font-size: 13px; line-height: 1.45; background: #f7f8fb; border-left: 3px solid #e11d24; padding: 8px 10px; border-radius: 6px; }
.sv-sx { font-size: 12px; color: #3b4658; margin-top: 6px; line-height: 1.5; } .sv-sx b { color: #0f1b2f; }
.sv-handled { font-size: 11.5px; color: #15702c; margin-top: 6px; }
.sv-act { display: flex; flex-direction: column; gap: 6px; }
.sv-cfg { display: flex; flex-direction: column; gap: 8px; }
.sv-q { display: grid; grid-template-columns: 22px 230px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #f1f3f7; font-size: 13px; }
.sv-q input[type=text], .sv-q input:not([type]), .sv-cfg2 input { height: 36px; border: 1px solid #d5dce6; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; width: 100%; }
.sv-qk { font-weight: 700; }
.sv-cfg2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; font-size: 12.5px; font-weight: 600; }
.sv-cfg2 label { display: flex; flex-direction: column; gap: 4px; } .sv-cfg2 small { color: #6b7688; font-weight: 400; }
.sv-cfg2 input[type=number] { width: 90px; }
@media (max-width: 980px) { .sv-grid, .sv-grid2 { grid-template-columns: minmax(0, 1fr); } .sv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sv-kpis .dk { grid-column: 1 / -1; } }
@media (max-width: 820px) { .sv-av { grid-template-columns: minmax(0, 1fr); gap: 8px; } .sv-act { flex-direction: row; flex-wrap: wrap; } .sv-q { grid-template-columns: 22px 1fr; } .sv-q input[name^=label] { grid-column: 1 / -1; } .sv-cfg2 { grid-template-columns: minmax(0, 1fr); } }

/* Packs à créer (préfixe pp-) */
.pp-wrap { overflow: hidden; }
.pp-intro { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-left: 4px solid #e11d24; }
.pp-intro > div { flex: 1; } .pp-intro p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; }
.pp-intro select { height: 34px; border: 1px solid #d5dce6; border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; }
.pp-card { border-top: 1px solid #eef1f6; padding: 12px 16px; }
.pp-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.pp-head b { font-size: 14.5px; } .pp-sub { font-size: 12px; margin-top: 2px; }
.pp-total { text-align: right; } .pp-total span { display: block; font-size: 11px; } .pp-total b { font-size: 16px; }
.pp-warn { margin-top: 6px; font-size: 12px; color: #a86b00; }
.pp-table { margin-top: 8px; } .pp-table td { vertical-align: middle; font-size: 12.5px; }
.pp-rare td { padding-top: 2px; padding-bottom: 2px; }
.pp-qty { width: 56px; height: 28px; border: 1px solid #d5dce6; border-radius: 6px; text-align: right; padding: 0 6px; font: inherit; font-size: 12.5px; }
.pp-proof { margin-top: 6px; font-size: 12px; } .pp-proof summary { cursor: pointer; color: #1f63c9; } .pp-proof .pdr-ref { margin-top: 4px; }
.pp-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12.5px; flex-wrap: wrap; } .pp-actions .spacer { flex: 1; }
@media (max-width: 820px) { .pp-head { flex-direction: column; } .pp-total { text-align: left; } .pp-table { display: block; overflow-x: auto; } }
.pp-card > summary { cursor: pointer; list-style: none; } .pp-card > summary::-webkit-details-marker { display: none; }
.pp-name::before { content: '▸ '; color: #e11d24; } .pp-card[open] .pp-name::before { content: '▾ '; }
.pp-intro select + select { margin-left: 6px; }
/* tableau virtualisé (components/virtual-table.js) : en-tête fixe pendant le défilement */
.vt-scroll { overflow: auto; position: relative; }
.vt-scroll thead th { position: sticky; top: 0; z-index: 1; background: #f6f8fb; }

/* v1.97 — Paramètres › Rôles : grille détaillée façon Dolibarr */
.rg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.rg-tools [data-rg-q] { flex: 1 1 200px; max-width: 320px; }
.rg-cmpsel { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #4a5566; } .rg-cmpsel select { width: auto; min-width: 140px; }
.rg-count { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #0f1b2d; background: #eef2f8; border-radius: 999px; padding: 4px 10px; }
.rg-wrap { overflow-x: auto; border: 1px solid #e3e8ef; border-radius: 8px; }
.rg { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.rg thead th { position: sticky; top: 0; background: #0f1b2d; color: #fff; font-weight: 700; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 9px 6px; text-align: center; }
.rg thead th.rg-mod { text-align: left; padding-left: 12px; }
.rg td { border-top: 1px solid #eef1f5; padding: 7px 6px; vertical-align: middle; }
.rg td.rg-mod { padding-left: 10px; min-width: 200px; } .rg td.rg-mod small { display: block; color: #7a8596; font-size: 11.5px; margin-left: 22px; }
.rg-tg { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit; cursor: pointer; color: #0f1b2d; text-align: left; }
.rg-chev { width: 7px; height: 7px; border-right: 2px solid #8a95a6; border-bottom: 2px solid #8a95a6; transform: rotate(-45deg); margin: 0 5px 0 3px; transition: transform .15s; flex: none; }
.rg-m.open .rg-chev { transform: rotate(45deg); border-color: #e3222a; }
.rg-c { text-align: center; width: 76px; position: relative; } .rg-na { color: #c3cad5; }
.rg-ck { width: 17px; height: 17px; accent-color: #e3222a; cursor: pointer; vertical-align: middle; }
.rg-ck:disabled { cursor: not-allowed; }
.rg-more { width: 120px; text-align: right; white-space: nowrap; padding-right: 10px !important; }
.rg-n { font-size: 11.5px; color: #7a8596; margin-right: 6px; }
.rg-mini { border: 1px solid #d6dce6; background: #fff; border-radius: 6px; padding: 3px 7px; font: 600 11px/1.2 inherit; cursor: pointer; color: #0f1b2d; }
.rg-mini:hover { border-color: #e3222a; color: #e3222a; }
.rg-row:hover td { background: #f8fafd; } .rg-m.open .rg-row td { background: #f3f6fb; }
.rg-adv td { background: #fbfcfe; padding: 10px 14px 12px 34px !important; }
.rg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.rg-li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.8px; line-height: 1.35; cursor: pointer; } .rg-li .rg-ck { margin-top: 1px; flex: none; }
.rg-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 12.8px; } .rg-scope > span { font-weight: 700; }
.rg-scope label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; } .rg-scope input { accent-color: #e3222a; }
.rg-lim { display: grid; grid-template-columns: minmax(180px, 260px) 150px 1fr; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.8px; }
.rg-limin { display: flex; align-items: center; gap: 6px; } .rg-limin .input { width: 110px; } .rg-limin em { font-style: normal; font-weight: 700; color: #4a5566; }
.rg-cmp { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #9aa5b5; margin-left: 5px; vertical-align: middle; }
.rg-cmp.on { background: #1f6feb; border-color: #1f6feb; }
.rg-legend { font-size: 12px; margin-top: 8px; }
@media (max-width: 860px) { .rg-lim { grid-template-columns: minmax(0, 1fr); } .rg-count { margin-left: 0; } }

/* v1.98 — réception : choix de l'atelier, signature du client par WhatsApp */
.rc-ws { display: grid; gap: 8px; margin-bottom: 10px; }
.ws-card input { position: absolute; opacity: 0; pointer-events: none; }
.ws-card { position: relative; }
.ws-card.on { border-color: #e11d24; background: #fdeeee; box-shadow: 0 0 0 1px #e11d24 inset; }
.sig-remote { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid #bfe5ca; background: #f1faf4; border-radius: 12px; padding: 12px 14px; }
.sig-remote b { display: block; font-size: 15px; } .sig-remote span { display: block; font-size: 13px; color: #3b4658; margin-top: 3px; }
html[data-theme="dark"] .ws-card.on { background: #2a1418 !important; }
html[data-theme="dark"] .sig-remote { background: #10241a !important; border-color: #29663b !important; } html[data-theme="dark"] .sig-remote span { color: #b9c3d3 !important; }
/* v1.98 — modèles compatibles d'un article */
.mg-fit { grid-column: 1 / -1; border-top: 1px solid #eef1f5; padding-top: 10px; margin-top: 4px; display: grid; gap: 8px; }
.fit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fit-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: #f3f6fa; border: 1px solid #e0e6ee; padding: 4px 10px; font-size: 13px; }
.fit-table .input { min-width: 110px; }
html[data-theme="dark"] .fit-chip { background: #131c2b !important; border-color: #2b384f !important; }
html[data-theme="dark"] .mg-fit { border-color: #26324a !important; }
/* v1.98.3 : « Déjà venu chez KAMSA » (fiche de réception) */
.gh-box { margin-top: 12px; overflow: hidden; border: 1px solid #d7e0ec }
.gh-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: #0f1a2e; color: #fff } .gh-head b { font-size: 14px } .gh-head span { font-size: 12px; opacity: .75 }
.gh-how { padding: 6px 14px 4px; font-size: 12px; color: #6b7485 } .gh-how.warn { color: #b45309; font-weight: 600 }
.gh-visit { border-top: 1px solid #e3e8f0; padding: 8px 14px }
.gh-visit summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; list-style: none; font-size: 12.5px } .gh-visit summary::-webkit-details-marker { display: none }
.gh-visit summary b { color: #13203a; font-size: 13.5px } .gh-n { margin-left: auto; font-size: 12px }
.gh-visit ul { margin: 8px 0 2px; padding-left: 20px; color: #2b3445; font-size: 13px; line-height: 1.6 }
.gh-foot { border-top: 1px solid #e3e8f0; padding: 8px 14px; font-size: 12px; color: #6b7485 }
html[data-theme="dark"] .gh-box { border-color: #26324a } html[data-theme="dark"] .gh-visit, html[data-theme="dark"] .gh-foot { border-color: #26324a }
html[data-theme="dark"] .gh-visit summary b { color: #e6ebf3 } html[data-theme="dark"] .gh-visit ul { color: #c9d2e0 }
/* v1.98.4 : panneau « Pièces » (planification) */
.pp-badge { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 999px } .pp-badge:hover { box-shadow: 0 0 0 2px #d7141b }
.pp-back { position: fixed; inset: 0; background: rgba(6,10,20,.45); z-index: 70 }
.pp-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #fff; box-shadow: -20px 0 50px rgba(6,10,20,.45); z-index: 71; display: flex; flex-direction: column; font-size: 13.5px; color: #2b3445 }
.pp-h { background: #0b1220; color: #fff; padding: 16px 48px 16px 18px; border-bottom: 3px solid #d7141b } .pp-h b { font-size: 17px } .pp-h small { display: block; opacity: .75; margin-top: 2px }
.pp-x { position: absolute; right: 12px; top: 12px; border: 0; background: rgba(255,255,255,.1); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; display: grid; place-items: center }
.pp-body { padding: 14px 18px; overflow: auto; flex: 1; display: grid; gap: 12px; align-content: start }
.pp-sum { display: flex; gap: 8px; flex-wrap: wrap } .pp-sum span { border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 12px }
.pp-sum .ok { background: #dcfce7; color: #15803d } .pp-sum .mid { background: #e0ecff; color: #1f4f9a } .pp-sum .ko { background: #fee2e2; color: #991b1b }
.pp-req { display: flex; gap: 8px; align-items: center; background: #ecfdf3; color: #166534; border-radius: 10px; padding: 8px 12px; font-size: 12.5px } .pp-req.wait { background: #fff7ed; color: #9a3412 }
.pp-line { border: 1px solid #e3e8f0; border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px }
.pp-line h4 { margin: 0; font-size: 14.5px; color: #13203a; display: flex; justify-content: space-between; gap: 8px } .pp-line h4 em { font-style: normal; font-weight: 600; color: #6b7485; font-size: 12px }
.pp-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px } .pp-steps span { font-size: 10.5px; text-align: center; padding: 5px 2px; border-radius: 6px; background: #eef1f5; color: #8a94a6; font-weight: 600 }
.pp-steps span.done { background: #dcfce7; color: #15803d } .pp-steps span.now { background: #d7141b; color: #fff }
.pp-act { display: flex; align-items: center; gap: 10px; justify-content: space-between } .pp-act .muted { font-size: 12px }
.pp-foot { border-top: 1px solid #e3e8f0; padding: 12px 18px; display: flex; gap: 8px; justify-content: space-between; align-items: center; background: #f7f9fc; flex-wrap: wrap }
html[data-theme="dark"] .pp-drawer { background: #111825; color: #c9d2e0 } html[data-theme="dark"] .pp-line { border-color: #26324a } html[data-theme="dark"] .pp-line h4 { color: #e6ebf3 }
html[data-theme="dark"] .pp-foot { background: #0b111c; border-color: #26324a } html[data-theme="dark"] .pp-steps span { background: #1a2335 }
/* v1.98.4 : alerte « Demande de pièces » du magasinier */
.pa-back { position: fixed; inset: 0; background: rgba(6,10,20,.55); z-index: 90 }
.pa { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); width: min(660px, calc(100vw - 24px)); z-index: 91; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 4px rgba(215,20,27,.55); animation: paPulse 1.2s ease-in-out infinite; font-size: 13.5px; color: #2b3445 }
@keyframes paPulse { 50% { box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 10px rgba(215,20,27,.25) } }
@media (prefers-reduced-motion: reduce) { .pa { animation: none } }
.pa-h { background: linear-gradient(135deg, #e11d24, #9f0f15); color: #fff; padding: 16px 20px; display: flex; gap: 14px; align-items: center }
.pa-bell { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none } .pa-h b { font-size: 18px; display: block } .pa-h small { opacity: .9 }
.pa-more { margin-left: auto; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.25); border-radius: 999px; padding: 3px 10px }
.pa-ctx { padding: 12px 20px; background: #f7f9fc; border-bottom: 1px solid #e3e8f0; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px } .pa-ctx b { color: #13203a }
.pa-items { padding: 6px 20px 4px; max-height: 45vh; overflow: auto }
.pa-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed #e3e8f0 } .pa-item b { color: #13203a; font-size: 14.5px } .pa-sub { font-size: 12.5px; color: #6b7485; margin-top: 2px }
.pa-kind { color: #fff; font-weight: 800; font-size: 11px; border-radius: 6px; padding: 4px 8px; white-space: nowrap }
.pa-f { display: flex; gap: 10px; align-items: center; padding: 14px 20px; flex-wrap: wrap } .pa-f .muted { font-size: 12px; flex-basis: 100% } .pa-f [data-pa-take] { margin-left: auto }
.pa-snd { position: fixed; left: 50%; transform: translateX(-50%); top: 40px; z-index: 91; background: #d7141b; color: #fff; border: 0; border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center }
.pa-snd.on { background: #0b1220; font-weight: 600; cursor: default }

/* v1.98.7 : révision d'un devis validé (versions, changements surlignés) */
.qv-badge { font: 800 13px var(--cond); background: var(--navy); color: #fff; border-radius: 7px; padding: 3px 9px; }
.qv-banner { display: flex; gap: 10px; align-items: flex-start; margin: 0 24px 10px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.qv-banner.blue { background: #eef4ff; color: #1d3f7a; } .qv-banner.grey { background: #f1f3f7; color: #3b4658; } .qv-banner.lock { background: #f7f9fc; color: #3b4658; border: 1px solid var(--line); }
.qv-banner a { font-weight: 700; color: inherit; } .qv-delta { display: block; margin-top: 3px; }
tr.qv-add td { background: #effaf2; } tr.qv-add td:first-child { box-shadow: inset 4px 0 0 #1f9a3e; }
tr.qv-chg td:first-child { box-shadow: inset 4px 0 0 #f5a524; }
.qv-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.qv-tag.a { background: #1f9a3e; color: #fff; } .qv-tag.c { background: #f5a524; color: #2a1800; } .qv-tag.l { background: #eef1f5; color: #3b4658; }
.qv-old { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.qv-removed { margin: 10px 16px; padding: 10px 12px; border-radius: 10px; background: #fdf0f0; color: #7a1016; font-size: 13px; }
.qv-removed > b { display: block; margin-bottom: 6px; } .qv-rm { display: flex; align-items: center; gap: 12px; padding: 4px 0; } .qv-rm span:first-child { flex: 1; }
.qv-hist { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13px; } .qv-hist > b { display: block; margin-bottom: 6px; }
.qv-hv { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; color: inherit; text-decoration: none; } .qv-hv:hover, .qv-hv.on { background: var(--line-2); }
.qv-hv small { display: block; color: var(--muted); } .qv-hv .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: #9aa3b2; } .qv-hv .dot.valide, .qv-hv .dot.facture { background: #1f9a3e; } .qv-hv .dot.brouillon, .qv-hv .dot.en_attente { background: #f5a524; } .qv-hv .dot.refuse { background: #e11d24; }
html[data-theme="dark"] .qv-banner.blue { background: #14243f; color: #b9cdf3; } html[data-theme="dark"] tr.qv-add td { background: #10291a; } html[data-theme="dark"] .qv-removed { background: #2a1416; color: #f3b5b8; }

/* v1.98.18 : prestations externes sous un service du devis (internes) */
.qx-row td { border-top: 0 !important; }
.qx-box { border: 1px dashed #b9a8ec; background: #f7f4ff; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.qx-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: #5a3fb8; }
.qx-tag { font-size: 11.5px; font-weight: 600; color: #fff; background: #5a3fb8; padding: 2px 8px; border-radius: 10px; }
.qx-grid { display: grid; grid-template-columns: minmax(160px, 1.4fr) minmax(150px, 1fr) 130px 34px; gap: 8px; align-items: center; }
.qx-grid .input { height: 36px; width: 100%; }
.qx-ro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 130px; gap: 8px; font-size: 13.5px; }
.qx-ro b { text-align: right; }
.qx-add { align-self: flex-start; background: none; border: 1px dashed #b9a8ec; border-radius: 6px; padding: 5px 10px; color: #5a3fb8; font-weight: 600; font-size: 13px; cursor: pointer; }
html[data-theme="dark"] .qx-box { background: rgba(90, 63, 184, .12); }
@media print { .qx-row { display: none !important; } }

/* v1.98.47 : RH & paie › Paiement techniciens */
.tpy-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.tpy-f{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;color:#4a5568;flex:1 1 170px}
.tpy-f select,.tpy-f input{height:40px;border:1px solid #cfd6e0;border-radius:8px;background:#fff;padding:0 10px;font:inherit;font-size:14px;font-weight:500;color:#14223b}
.tpy-wide{flex:2 1 300px}
.tpy-seg{display:flex;border:1px solid #cfd6e0;border-radius:8px;overflow:hidden;height:40px}
.tpy-seg button{flex:1;border:0;border-right:1px solid #cfd6e0;background:#fff;color:#14223b;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.tpy-seg button:last-child{border-right:0}
.tpy-seg button.on{background:#0f1b2f;color:#fff}
.tpy-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.tpy-kpis .card{padding:12px 14px;display:flex;flex-direction:column;gap:3px}
.tpy-kpis small,.tpy-dk small{font-size:12.5px;font-weight:600;color:#4a5568}
.tpy-kpis b{font-size:22px}.tpy-kpis span{font-size:12px;color:#5b6578}
.tpy-kpis b.ok,.tpy-dk b.ok{color:#1b6b35}.tpy-kpis b.due,.tpy-dk b.due,.tpy-rest b{color:#9a3d00}.tpy-kpis b.grey,.tpy-dk b.grey{color:#3d4657}.tpy-kpis b.blue{color:#1d43a8}
.tpy-main{display:flex;gap:16px;align-items:flex-start}
.tpy-list{width:320px;flex-shrink:0;overflow:hidden;padding:0}
.tpy-list-h{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid #e3e8ef;font-size:15px}
.tpy-list-h span{font-size:12.5px;color:#5b6578}
.tpy-tech{width:100%;display:flex;gap:12px;align-items:center;padding:12px 14px;border:0;border-bottom:1px solid #edf0f4;background:#fff;color:#14223b;font:inherit;cursor:pointer;text-align:left}
.tpy-tech:hover{background:#f7f9fb}.tpy-tech.on{background:#f1f4f9;box-shadow:inset 4px 0 0 #e11d24}
.tpy-av{width:40px;height:40px;border-radius:50%;background:#2a3b58;color:#fff;display:grid;place-items:center;font-weight:700;font-size:14px;flex-shrink:0}
.tpy-av.lg{width:52px;height:52px;font-size:17px;background:#0f1b2f}
.tpy-tn{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.tpy-tn b{font-size:15px}.tpy-tn>span{font-size:12.5px;color:#5b6578}
.tpy-bar{display:block;height:5px;border-radius:3px;background:#e6eaf0;overflow:hidden;margin-top:4px}.tpy-bar i{display:block;height:100%;background:#1b8a4a}
.tpy-rest{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}.tpy-rest span{font-size:11.5px;color:#5b6578}
.tpy-detail{flex:1;min-width:0;padding:0;overflow:hidden;display:flex;flex-direction:column}
.tpy-dh{display:flex;gap:14px;align-items:center;padding:16px 18px;border-bottom:1px solid #e3e8ef}
.tpy-name{font-size:20px}
.tpy-dk{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid #e3e8ef}
.tpy-dk>div{padding:12px 18px;display:flex;flex-direction:column;gap:3px;border-right:1px solid #edf0f4}.tpy-dk b{font-size:19px}
.tpy-table td{vertical-align:middle}.tpy-table tr.sel td{background:#fff6f6}
.tpy-table input[type=checkbox]{width:18px;height:18px;accent-color:#e11d24}
.tpy-pill{display:inline-block;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.tpy-p-ok{background:#e5f5ea;color:#1b6b35}.tpy-p-part{background:#fff4dc;color:#7a5200}.tpy-p-blue{background:#e8efff;color:#1d43a8}
.tpy-p-grey{background:#eef0f4;color:#3d4657}.tpy-p-due{background:#fff1e0;color:#8a3f00}.tpy-p-wait{background:#fff4dc;color:#7a5200}
.tpy-confirm{margin:14px 18px 0;border:1px solid #f3b3b5;background:#fff6f6;border-radius:10px;padding:14px;display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.tpy-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 18px;background:#f7f9fb;border-top:1px solid #e3e8ef;margin-top:14px}
.tpy-sum{font-size:20px}
@media (max-width:1100px){.tpy-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.tpy-main{flex-direction:column}.tpy-list{width:100%}.tpy-dk{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.tpy-foot{position:sticky;bottom:0;z-index:5}.tpy-dh{flex-wrap:wrap}}
html[data-theme="dark"] .tpy-tech,html[data-theme="dark"] .tpy-seg button,html[data-theme="dark"] .tpy-f select,html[data-theme="dark"] .tpy-f input{background:#111825;color:#e6ebf2;border-color:#2a374e}
html[data-theme="dark"] .tpy-tech.on{background:#18233a}html[data-theme="dark"] .tpy-foot{background:#0f1726}html[data-theme="dark"] .tpy-table tr.sel td{background:#2a1a1d}

/* v1.98.50 : techniciens sur la facture */
.inv-techs{margin:0 24px 18px;padding:0;overflow:hidden}
.inv-techs-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid var(--line,#e3e8ef)}
.inv-techs-h h2{margin:0;font-size:17px}
.inv-techs-src{padding:3px 9px;border-radius:999px;background:#eef0f4;color:#3d4657;font-size:12px;font-weight:600}
.inv-techs-g{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.inv-tech{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;border-right:1px solid #edf0f4;border-bottom:1px solid #edf0f4}
.inv-tech-av{width:44px;height:44px;min-height:44px;max-height:44px;align-self:flex-start;border-radius:50%;background:#2a3b58;color:#fff;display:grid;place-items:center;font-weight:700;flex-shrink:0}
.inv-tech-av.is-main{box-shadow:0 0 0 3px #e11d24}
.inv-tech-b{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:13.5px}.inv-tech-b b{font-size:15.5px}
.inv-role{padding:2px 8px;border-radius:999px;background:#e8efff;color:#1d43a8;font-size:11.5px;font-weight:600}.inv-role.is-main{background:#0f1b2f;color:#fff}
.inv-ok{color:#1b6b35;font-weight:600}.inv-due{color:#8a3f00;font-weight:600}
.inv-staff{flex-direction:column;gap:5px;background:#fbfcfd;font-size:13.5px}
.inv-staff-t{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#4a5568}
.inv-chips{white-space:normal;max-width:300px}
.inv-chip{display:inline-flex;align-items:center;gap:5px;padding:2px 8px 2px 2px;border-radius:999px;background:#eef2f8;font-size:12px;font-weight:600;margin:2px 4px 2px 0;white-space:nowrap}
.inv-chip i{width:20px;height:20px;border-radius:50%;background:#5b6b85;color:#fff;display:grid;place-items:center;font-style:normal;font-size:10px}
.inv-chip.is-main i{background:#0f1b2f}
html[data-theme="dark"] .inv-tech{border-color:#2a374e}html[data-theme="dark"] .inv-staff{background:#0f1726}html[data-theme="dark"] .inv-chip,html[data-theme="dark"] .inv-techs-src{background:#1b2638;color:#e6ebf2}
.inv-techs-tot{font-size:13.5px;color:#4a5568;margin-right:12px}.inv-techs-tot b{color:#14223b;font-size:15px}
.inv-tech-rm{width:26px;height:26px;border-radius:50%;border:1px solid #d9dee7;background:#fff;color:#8a3f00;display:grid;place-items:center;cursor:pointer;padding:0}
.inv-tech-rm:hover{background:#fff1e0}

/* v1.98.52 : filtres par dates des listes */
.flt-date{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#4a5568;width:210px;white-space:nowrap}
.flt-date .field{flex:1;margin:0;min-width:0}

/* v1.98.85 — signature du client sur le devis */
.q-sign { margin-top: 14px; border: 1px solid var(--line, #dfe3ea); border-radius: 12px; padding: 12px; background: #fff; }
.q-sign-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7689; margin-bottom: 8px; }
.q-sign img { display: block; width: 100%; max-height: 120px; object-fit: contain; background: #f8fafc; border: 1px dashed #d5dbe4; border-radius: 8px; }
.q-sign-m { font-size: 12.5px; color: #4a5568; margin-top: 8px; line-height: 1.45; }
html[data-theme="dark"] .q-sign { background: #121a2b; border-color: #26324a; }
html[data-theme="dark"] .q-sign img { background: #fff; }
/* v1.98.106 : fiche salarié › Interventions : filtres (facture client, paiement technicien) et sélection des commissions */
.ecf-filters{display:grid;gap:8px;padding:12px 16px;border-bottom:1px solid #e3e8ef}
.ecf-row{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.ecf-row>b{font-size:12.5px;color:#6b7280;font-weight:600;min-width:132px}
.ecf-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #d9dfe8;background:#fff;color:#14223b;border-radius:99px;padding:5px 11px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.ecf-chip i{font-style:normal;font-size:11.5px;background:#eef0f4;color:#4b5563;border-radius:99px;padding:0 7px}
.ecf-chip.on{background:#0f1b2f;border-color:#0f1b2f;color:#fff}.ecf-chip.on i{background:rgba(255,255,255,.2);color:#fff}
.ecf-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.ecf-table tr.sel td{background:#fffaf0}
.ecf-table input[type=checkbox],.ecf-filters+div input[type=checkbox]{width:17px;height:17px;accent-color:#d7141b}
html[data-theme="dark"] .ecf-chip{background:#111825;color:#e6ebf2;border-color:#2a374e}html[data-theme="dark"] .ecf-chip.on{background:#e6ebf2;color:#0f1b2f}
html[data-theme="dark"] .ecf-table tr.sel td{background:#2a1a1d}
/* v1.98.107 : techniciens en double : bandeau + fenêtre de fusion */
.tmg-warn{background:#fff7e8;border-color:#f5d9a6;padding:14px 16px;display:grid;gap:10px}
.tmg-title{color:#8a4a00;font-size:16px}
.tmg-pairs{display:grid;gap:8px}
.tmg-pair{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #f5d9a6;border-radius:8px;padding:8px 12px}
.tmg-who{display:grid;min-width:0}.tmg-who b{font-size:14.5px}.tmg-who small{color:#6b7280;font-size:12px}
.tmg-arrow{color:#8a4a00;font-weight:700}
.tmg-body{display:grid;gap:12px}
.tmg-cols{display:grid;grid-template-columns:1fr 40px 1fr;gap:10px;align-items:stretch}
@media(max-width:700px){.tmg-cols{grid-template-columns:1fr}.tmg-mid{transform:rotate(90deg)}}
.tmg-side{border:2px solid #e3e7ee;border-radius:10px;padding:12px;display:grid;gap:8px;align-content:start}
.tmg-side.keep{border-color:#16794a;background:#e8f5ee}
.tmg-side h3{margin:0;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#6b7280}.tmg-side.keep h3{color:#16794a}
.tmg-side select{font:inherit;font-size:14px;border:1px solid #cfd6e0;border-radius:8px;padding:8px;background:#fff;color:#14223b;width:100%}
.tmg-kv{display:grid;font-size:13.5px}.tmg-kv>div{display:flex;justify-content:space-between;gap:8px;padding:4px 0;border-bottom:1px dashed #dfe3ea}
.tmg-mid{display:grid;place-items:center;font-size:24px;color:#6b7280}
.tmg-swap{justify-self:start;font:inherit;font-size:13.5px;background:none;border:0;color:#1f4f9a;text-decoration:underline;cursor:pointer;padding:0}
.tmg-res{border:1px solid #e3e7ee;border-radius:10px;overflow:hidden}.tmg-res h3{margin:0;padding:10px 12px;background:#f7f8fa;font-size:14px;border-bottom:1px solid #e3e7ee}
.tmg-res ul{margin:0;padding:10px 12px 10px 30px;display:grid;gap:4px;font-size:14px}.tmg-err{color:#d7141b;font-weight:600}
html[data-theme="dark"] .tmg-warn,html[data-theme="dark"] .tmg-pair{background:#1d1608;border-color:#5a4318}html[data-theme="dark"] .tmg-side select{background:#111825;color:#e6ebf2;border-color:#2a374e}
html[data-theme="dark"] .tmg-side.keep{background:#0f2219}html[data-theme="dark"] .tmg-res h3{background:#111825}
/* v1.98.110 : Accueil du chef d'atelier : carte « Ma prime » */
.mp-host:empty{display:none}.mp-host{padding:14px 20px 0}
.mpc{display:grid;grid-template-columns:1.2fr 1fr;overflow:hidden;border:2px solid #16794a}
@media(max-width:800px){.mpc{grid-template-columns:1fr}}
.mpc-l{padding:16px 18px;background:linear-gradient(135deg,#e8f5ee,#fff);display:grid;gap:6px;align-content:start}
.mpc-l small{font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#16794a;font-size:12px}
.mpc-amt{font-size:36px;color:#16794a;line-height:1.05;font-variant-numeric:tabular-nums}
.mpc-sub{color:#6b7280;font-size:14px}
.mpc-pill{font-size:12.5px;font-weight:600;border-radius:99px;padding:3px 10px;background:#fff6e0;color:#9a6200;justify-self:start}.mpc-pill.ok{background:#e8f5ee;color:#16794a}
.mpc-r{padding:16px 18px;border-left:1px solid #e3e7ee;display:grid;gap:8px;align-content:start}.mpc-r>b{font-size:14px;color:#14223b}
.mpc-bar{display:grid;grid-template-columns:60px 1fr 96px;gap:8px;align-items:center;font-size:13.5px}
.mpc-tr{height:10px;background:#eef0f4;border-radius:6px;overflow:hidden}.mpc-tr i{display:block;height:100%;background:#16794a;border-radius:6px}
html[data-theme="dark"] .mpc{background:#111825}html[data-theme="dark"] .mpc-l{background:linear-gradient(135deg,#0f2219,#111825)}html[data-theme="dark"] .mpc-l small,html[data-theme="dark"] .mpc-amt{color:#3ccf7f}
html[data-theme="dark"] .mpc-r{border-color:#2a374e}html[data-theme="dark"] .mpc-r>b{color:#e6ebf2}html[data-theme="dark"] .mpc-tr{background:#1f2a3d}
/* v1.98.111 : bulletin dont les commissions ont changé depuis sa préparation */
.pb-drift{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:#fff6e0;border:1px solid #f3d38a;color:#7a4a00;border-radius:8px;padding:10px 12px}
.pb-drift>div{flex:1;min-width:220px}
html[data-theme="dark"] .pb-drift{background:#2a2110;border-color:#5a4318;color:#f3d38a}
/* v1.98.112 : module « Paiements des techniciens » (calqué sur Dolibarr) */
.tl-layout{display:grid;grid-template-columns:220px 1fr;gap:16px;align-items:start}
@media(max-width:900px){.tl-layout{grid-template-columns:1fr}.tl-side{display:flex;flex-wrap:wrap;gap:4px}.tl-side h3{width:100%}}
.tl-side{background:#fff;border:1px solid #e3e7ee;border-radius:10px;padding:10px 0;position:sticky;top:80px}
.tl-side h3{margin:0;padding:6px 16px 10px;font-size:14px;color:#14223b;display:flex;gap:8px;align-items:center}
.tl-side button{display:flex;gap:8px;align-items:center;width:100%;text-align:left;font:inherit;font-size:14px;border:0;background:none;padding:8px 16px 8px 22px;cursor:pointer;color:#374151}
.tl-side button[aria-current=page]{background:#fdecec;color:#d7141b;font-weight:700;box-shadow:inset 3px 0 0 #d7141b}
.tl-back{display:block;padding:8px 22px;font-size:13px;color:#1f4f9a;border-top:1px solid #eef0f4;margin-top:6px}
.tl-main{min-width:0}
.tl-h1{margin:0 0 12px;font-size:19px;color:#14223b;font-weight:600;display:flex;gap:8px;align-items:center}.tl-h1 small{color:#6b7280;font-weight:400}
.tl-h2{font-size:16px;color:#14223b;margin:14px 0 8px;font-weight:600}
.tl-boxes{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:14px}
.tl-box{background:#fff;border:1px solid #e3e7ee;border-left:4px solid #14223b;border-radius:6px;padding:12px 14px}
.tl-box b{display:block;font-size:22px;color:#14223b;font-variant-numeric:tabular-nums}.tl-box span{font-size:12.5px;color:#6b7280}
.tl-box.g{border-left-color:#16794a}.tl-box.o{border-left-color:#f59e0b}.tl-box.b{border-left-color:#1f4f9a}.tl-box.r{border-left-color:#d7141b}
.tl-card{overflow:hidden;padding:0}
.tl-scroll{overflow-x:auto}
.tl-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:13.5px}
.tl-table th{background:#f1f3f7;color:#374151;font-weight:600;text-align:left;padding:9px 8px;white-space:nowrap;border-bottom:1px solid #e3e7ee}
.tl-table td{padding:8px;border-bottom:1px solid #eef0f4;white-space:nowrap}
.tl-table tr.sel td{background:#fffaf0}
.tl-table input[type=checkbox]{width:16px;height:16px;accent-color:#d7141b}
.tl-f td{background:#f8f9fb;padding:6px 6px}
.tl-f input,.tl-f select{font:inherit;font-size:12.5px;border:1px solid #e3e7ee;border-radius:5px;padding:4px 6px;width:100%;min-width:64px;box-sizing:border-box;background:#fff;color:#14223b}
.tl-tot td{font-weight:700;background:#f8f9fb}
.tl-amt{background:#16794a;color:#fff;font-weight:700;border-radius:4px;padding:2px 7px;font-size:12px}
.tl-st{font-size:12px;font-weight:600;border-radius:4px;padding:2px 8px;display:inline-block;white-space:nowrap}
.tl-st.v{background:#16794a;color:#fff}.tl-st.p{background:#d1d5db;color:#374151}.tl-st.b{border:1px solid #9ca3af;color:#4b5563}.tl-st.x{background:#fde8ec;color:#d7141b}
.tl-st.np{background:#f5b301;color:#3b2a00}.tl-st.pp{background:#e5e7eb;color:#4b5563}
.tl-a{color:#1f4f9a;font-weight:600}
.tl-job{font-size:11px;background:#9ca3af;color:#fff;border-radius:3px;padding:1px 6px;font-weight:600}
.tl-src{font-size:10.5px;color:#6b7280;border:1px solid #e3e7ee;border-radius:3px;padding:0 4px;margin-left:5px}
.tl-mono{font-family:ui-monospace,Menlo,monospace;font-size:12.5px}
.tl-prog{height:4px;background:#e5e7eb;border-radius:3px;width:120px;margin-top:3px}.tl-prog i{display:block;height:100%;background:#f59e0b;border-radius:3px}
.tl-ic{display:flex;gap:5px}.tl-ic button{width:26px;height:26px;border:0;border-radius:5px;background:#eef0f4;display:grid;place-items:center;cursor:pointer;color:#374151}.tl-ic button.pay{background:#16794a}
.tl-filter{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;background:#fff;border:1px solid #e3e7ee;border-radius:8px;padding:10px 12px;margin-bottom:12px}
.tl-filter label{display:grid;gap:3px;font-size:11px;font-weight:700;text-transform:uppercase;color:#4b5563}
.tl-filter input,.tl-filter select{font:inherit;font-size:13px;border:1px solid #e3e7ee;border-radius:5px;padding:6px 8px;min-width:110px;background:#fff;color:#14223b}
.tl-period{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:10px;font-size:13.5px}.tl-period input{font:inherit;border:1px solid #e3e7ee;border-radius:5px;padding:5px 8px}
.tl-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#0f1a30;color:#fff;padding:10px 14px;position:sticky;bottom:0}
.tl-bar b{font-size:20px}.tl-bar select{font:inherit;font-size:13px;border-radius:5px;padding:6px}
.tl-yr{display:flex;gap:8px;margin:4px 0 6px}.tl-yr button{font:inherit;border:1px solid #e3e7ee;border-radius:4px;padding:6px 12px;font-weight:700;font-size:12.5px;background:#f3f4f6;cursor:pointer}.tl-yr button.on{background:#d7141b;color:#fff;border-color:#d7141b}
.tl-rank{font-weight:700}.tl-rank.r0{color:#d4a017}.tl-rank.r2{color:#b45309}
html[data-theme="dark"] .tl-side,html[data-theme="dark"] .tl-box,html[data-theme="dark"] .tl-filter{background:#111825;border-color:#2a374e}
html[data-theme="dark"] .tl-table th,html[data-theme="dark"] .tl-f td,html[data-theme="dark"] .tl-tot td{background:#152036;color:#d6deea;border-color:#2a374e}
html[data-theme="dark"] .tl-table td{border-color:#1f2a3d}html[data-theme="dark"] .tl-box b,html[data-theme="dark"] .tl-h1,html[data-theme="dark"] .tl-h2,html[data-theme="dark"] .tl-side h3{color:#e6ebf2}
html[data-theme="dark"] .tl-f input,html[data-theme="dark"] .tl-f select,html[data-theme="dark"] .tl-filter input,html[data-theme="dark"] .tl-filter select{background:#0f1726;color:#e6ebf2;border-color:#2a374e}
/* v1.98.113 : sur téléphone, le menu du module devient une rangée d'onglets qui ne recouvre plus les filtres ; filtres en panneau */
@media(max-width:900px){.tl-side{position:static;display:flex;flex-wrap:nowrap;overflow-x:auto;padding:4px;gap:4px;-webkit-overflow-scrolling:touch}.tl-side h3,.tl-side .tl-back{display:none}
.tl-side button{width:auto;flex:none;white-space:nowrap;padding:8px 12px;border-radius:7px}.tl-side button[aria-current=page]{box-shadow:inset 0 -3px 0 #d7141b}
.tl-table .tl-f{display:none}.tl-filter label{flex:1 1 140px}.tl-filter input,.tl-filter select{min-width:0;width:100%;box-sizing:border-box}}
.tl-panel{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));align-items:end}
.tl-panel input,.tl-panel select{width:100%;min-width:0;box-sizing:border-box}
.tl-quick{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}
.tl-quick button{font:inherit;font-size:13px;border:1px solid #d6dbe3;background:#fff;color:#374151;border-radius:99px;padding:5px 12px;cursor:pointer}
.tl-quick button.on{background:#14223b;border-color:#14223b;color:#fff;font-weight:600}
.tl-f select[data-f=source]{margin-top:4px}
html[data-theme="dark"] .tl-quick button{background:#111825;border-color:#2a374e;color:#d6deea}html[data-theme="dark"] .tl-quick button.on{background:#d7141b;border-color:#d7141b;color:#fff}

/* v1.98.125 : journal d'audit lisible (phrases, filtres par type, résumé de l'utilisateur) */
.al-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.al-chip{border:1px solid var(--line);border-radius:999px;padding:5px 11px;font:600 12.5px var(--font,inherit);background:var(--card);color:var(--text);cursor:pointer}
.al-chip.on{background:var(--navy,#0f1d3a);color:#fff;border-color:var(--navy,#0f1d3a)}
.al-tog{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);margin-top:10px;font-weight:500}
.al-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
.al-grid>aside[hidden]{display:none}
.al-grid:has(>aside[hidden]){grid-template-columns:minmax(0,1fr)}
@media (max-width:900px){.al-grid{grid-template-columns:1fr}}
.al-list{padding-top:4px}
.al-day{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:14px 0 4px}
.al-ev{display:grid;grid-template-columns:48px 34px minmax(0,1fr) auto;gap:10px;align-items:start;padding:10px 0;border-top:1px solid var(--line-2,var(--line))}
.al-day+.al-ev{border-top:0}
.al-t{font-weight:700;font-variant-numeric:tabular-nums;color:var(--muted);padding-top:7px}
.al-av{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;font-size:12px}
.al-s{min-width:0}.al-s p{margin:0;font-size:14.5px;line-height:1.45;color:var(--text);overflow-wrap:anywhere}
.al-meta{color:var(--muted);font-size:12.5px;margin-top:2px}
.al-mt{display:none}
.al-link{border:0;background:none;padding:0;color:var(--blue,#2457c5);font:600 12.5px var(--font,inherit);cursor:pointer}
.al-tech{color:var(--muted);font-weight:500;font-size:12px}
.al-tag{font-size:11.5px;font-weight:700;border-radius:999px;padding:3px 9px;white-space:nowrap;margin-top:6px}
.al-pay{background:#e6f5ec;color:#1b7a3e}.al-fac{background:#e8eefb;color:#2457c5}.al-cai{background:#fff1df;color:#a85d06}.al-or{background:#efeafd;color:#5b3fc4}
.al-cli{background:#e5f4f4;color:#0f7070}.al-del{background:#fde8e8;color:#b3121a}.al-adm{background:#eceff4;color:#3b4456}
.al-det{margin-top:8px;background:var(--line-2,#f6f8fb);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:13px;display:grid;gap:5px}
.al-det>div{display:flex;gap:8px;flex-wrap:wrap}.al-det>div>span{color:var(--muted);min-width:120px}
.al-chg{display:grid!important;grid-template-columns:120px 1fr 1fr;gap:6px}
.al-chg .h{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase}
.al-old{text-decoration:line-through;color:#b3121a}.al-new{color:#1b7a3e;font-weight:600}
.al-side h3{margin:0 0 10px;font-size:15px}
.al-who{display:flex;gap:10px;align-items:center;margin-bottom:12px}
.al-kp{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.al-kp>div{background:var(--line-2,#f6f8fb);border:1px solid var(--line);border-radius:10px;padding:8px 10px;min-width:0}
.al-kp small{color:var(--muted);font-size:11.5px;display:block}.al-kp b{font-size:16px}
.al-l{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:6px;font-size:13px}
.al-l li{display:flex;justify-content:space-between;gap:8px;border-bottom:1px dashed var(--line);padding-bottom:5px}
@media (max-width:700px){
  .al-ev{grid-template-columns:30px minmax(0,1fr)}
  .al-t,.al-tag{display:none}
  .al-mt{display:inline}
  .al-f .nw-form{grid-template-columns:1fr 1fr!important;gap:8px}
  .al-f .nw-form>label:first-child,.al-f .nw-form>label:last-child{grid-column:1/-1}
  .al-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .al-chip{flex:none}
  .al-av{width:30px;height:30px;font-size:11px}
  .al-s p{font-size:13.5px}
  .al-chg{grid-template-columns:90px 1fr 1fr}
}
/* v1.98.170 : régularisations de commission (commission versée puis facture annulée / avoir) */
.tpy-regul td,.tl-regul td{background:rgba(215,25,32,.06)}
.tpy-regul td:first-child,.tl-regul td:first-child{box-shadow:inset 4px 0 0 #d71920}
.tpy-neg,.tl-neg{color:#c4161d;font-weight:700}
.tpy-regul-alert{margin:12px 18px 0;padding:11px 14px;border-radius:10px;background:rgba(240,170,40,.12);border:1px solid rgba(214,150,30,.45);font-size:13px}
.tl-why{display:block;font-size:11.5px;color:#6b7688;max-width:340px;white-space:normal}
