/* 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: 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: 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: 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: 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: 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; }
