/* ══════════════════════════════════════════════════════════════════
 *  central/controle-tares.css — LE dessin du Contrôle des tares,
 *  pour le DASHBOARD et pour le POSTE. Une seule feuille, deux écrans.
 * ══════════════════════════════════════════════════════════════════
 *  Sorti de injecterStyle() de central/controle-tares-page.js le 2026-09-19,
 *  quand la page est arrivée AU POSTE : sans cette extraction, le poste
 *  aurait eu une deuxième copie du même dessin — cinquième du projet, et la
 *  première à dériver (docs/TABLEAUX.md §1, la leçon des préfixes bl- fs- ce- cj-).
 *  Les commentaires qui expliquent CHAQUE règle payée (media query inerte #299,
 *  ordre d abandon des colonnes #256, cartes en téléphone) restent dans le JS
 *  d origine, en tête de la page du dashboard.
 *
 *  ── CE QUE LA PAGE HÔTE DOIT FOURNIR ─────────────────────────────
 *  Cette feuille est écrite dans la palette du DASHBOARD. Le poste n en a pas
 *  la moitié : il ponte les siennes dans js/controle-tares-page.js, SCOPÉES à
 *  #page-controle-tares (un :root repeindrait toute l app, #32) —
 *    --panel --panel-2 --text-2 --text-3 --bad --warn --ok --info --shadow
 *  Le tableau lui-même vient de central/tableau.css (classes .gt-), chargée
 *  AVANT celle-ci des deux côtés.
 * ══════════════════════════════════════════════════════════════════ */
#pesees-subtabs{display:flex;gap:4px;background:var(--panel-2);border:1px solid var(--border);border-radius:10px;padding:3px;margin-bottom:14px;width:max-content;max-width:100%;overflow-x:auto}
#pesees-subtabs .ct-st{padding:6px 13px;border-radius:8px;cursor:pointer;color:var(--text-2);font-weight:600;font-size:12.5px;display:flex;align-items:center;gap:6px;white-space:nowrap}
#pesees-subtabs .ct-st.on{background:var(--panel);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.25)}
.ct-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.ct-date-inp{background:var(--panel);border:1px solid var(--border);color:var(--text);border-radius:8px;font-size:11px;height:28px;padding:0 6px;width:135px}
.ct-per-chips{display:contents}
.ct-per-sel,.ct-verd-sel{display:none;background:var(--panel);border:1px solid var(--border);color:var(--text);border-radius:99px;font-size:12px;font-weight:600;height:30px;padding:0 8px;max-width:100%}
@media (max-width:1010px){.ct-per-chips{display:none}
.ct-per-sel{display:inline-block}}
@media (max-width:700px){.ct-kpis{grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:8px}
.ct-kpi{padding:9px 10px}
.ct-kpi .v{font-size:18px}}
.ct-bandeau{display:flex;align-items:flex-start;gap:10px;padding:10px 14px;border-radius:10px;margin-bottom:14px;background:rgba(239,68,68,.12);border:1px solid var(--bad);font-size:13px}
.ct-bandeau .ico{font-size:18px;line-height:1}
.ct-bandeau b{color:var(--bad)}
.ct-tronque{background:var(--panel-2);border:1px solid var(--border);border-left:3px solid var(--brand);border-radius:8px;padding:7px 11px;font-size:12px;color:var(--text-2);margin-bottom:8px}
.ct-tronque b{color:var(--text)}
.ct-v{display:inline-flex;align-items:center;gap:4px;padding:1px 7px;border-radius:99px;font-size:10.5px;font-weight:700;white-space:nowrap}
.ct-v.hors_habitude{background:rgba(239,68,68,.16);color:var(--bad)}
.ct-v.a_verifier{background:rgba(217,119,6,.16);color:var(--warn)}
.ct-v.ok{background:rgba(34,197,94,.14);color:var(--ok)}
.ct-src{font-size:10px;color:var(--text-3);border:1px dashed var(--border-soft);border-radius:99px;padding:0 6px;white-space:nowrap}
.ct-plus{color:var(--bad)}
.ct-moins{color:var(--info)}
.ct-sous{display:block;font-size:10.5px;color:var(--text-3)}
.ct-lien{color:var(--brand);cursor:pointer;font-weight:600}
.ct-split{display:block}
.ct-menu{display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px;background:var(--panel-2);border:1px solid var(--border);border-radius:10px;padding:3px;margin-bottom:10px;max-width:100%}
.ct-menu .it{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:8px;cursor:pointer;font-size:12.5px;font-weight:600;color:var(--text-2);white-space:nowrap;border:1px solid transparent}
.ct-menu .it:hover{color:var(--text);background:var(--bg)}
.ct-menu .it.on{background:var(--panel);color:var(--text);border-color:var(--brand);font-weight:700;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.ct-menu .it .pt{width:8px;height:8px;border-radius:99px;background:var(--text-3);flex:0 0 auto}
.ct-menu .it.v-hors_habitude .pt{background:var(--bad)}
.ct-menu .it.v-a_verifier .pt{background:var(--warn)}
.ct-menu .it.v-ok .pt{background:var(--ok)}
.ct-menu .it .nb{font-family:Consolas,monospace;font-size:11.5px;color:var(--text-3);background:var(--panel);border-radius:99px;padding:0 6px;min-width:20px;text-align:center}
.ct-menu .it.on .nb{color:var(--text)}
.ct-menu .sep{width:1px;align-self:stretch;background:var(--border);margin:2px 3px}
@media (max-width:1010px){.ct-menu{flex-wrap:nowrap;overflow-x:auto;width:100%;scrollbar-width:thin}
.ct-menu .it{padding:6px 8px;gap:6px}
.ct-menu .it .nb{padding:0 5px;min-width:18px}
.ct-menu .sep{display:none}}
@media (max-width:700px){.ct-menu{display:none}
.ct-verd-sel{display:inline-block}}
.ct-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:14px}
.ct-kpi{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:11px 13px;box-shadow:var(--shadow)}
.ct-kpi .l{font-size:10px;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em}
.ct-kpi .v{font-family:Consolas,monospace;font-variant-numeric:tabular-nums;font-size:21px;font-weight:700;margin-top:3px}
.ct-kpi .s{font-size:11px;color:var(--text-3);margin-top:2px}
.ct-kpi.bad{border-color:var(--bad)}
.ct-kpi.bad .v{color:var(--bad)}
.ct-kpi.warn{border-color:var(--warn)}
.ct-kpi.warn .v{color:var(--warn)}
.ct-kpi.ok .v{color:var(--ok)}
.ct-pan{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:13px 15px;box-shadow:var(--shadow);margin-top:14px}
.ct-pan h3{margin:0 0 2px;font-size:13px;font-weight:700}
.ct-pan .d{font-size:11.5px;color:var(--text-3)}
.ct-deux{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
@media (max-width:900px){.ct-deux{grid-template-columns:1fr}}
.ct-fiche-t{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.ct-fiche-t .plaque{font-family:Consolas,monospace;font-size:20px;font-weight:800}
.ct-fiche-t .couple{font-size:12px;color:var(--text-2)}
.ct-graph svg{width:100%;height:auto;max-height:230px;display:block}
.ct-lg{display:flex;gap:14px;flex-wrap:wrap;font-size:11px;color:var(--text-3);margin-top:6px}
.ct-lg i{display:inline-block;width:12px;height:8px;border-radius:2px;margin-right:4px;vertical-align:middle}
@media (min-width:701px) and (max-width:1180px){.ct-tbl thead th:nth-child(6),.ct-tbl tbody tr.gt-op td:nth-child(6){display:none}}
@media (min-width:701px) and (max-width:1010px){.ct-tbl thead th:nth-child(3),.ct-tbl tbody tr.gt-op td:nth-child(3){display:none}
.ctf-tbl thead th:nth-child(5),.ctf-tbl tbody tr.gt-op td:nth-child(5),.ctf-tbl thead th:nth-child(6),.ctf-tbl tbody tr.gt-op td:nth-child(6),.ctp-tbl thead th:nth-child(6),.ctp-tbl tbody tr.gt-op td:nth-child(6),.ctp-tbl thead th:nth-child(7),.ctp-tbl tbody tr.gt-op td:nth-child(7){display:none}}
@media (min-width:701px) and (max-width:860px){.ct-tbl tbody tr.gt-op td .ct-sous{display:none}}
@media (max-width:700px){.ct-tbl tbody tr.gt-op{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:10px 12px;grid-template-areas:"camion heure" "tare ecart" "hab hab" "chauf peseur" "poste poste"}
.ct-tbl tbody tr.gt-op td{padding:0;min-width:0}
.ct-tbl tbody tr.gt-op td[data-l]:before{min-width:0;margin-right:5px}
.ct-tbl tbody tr.gt-op td:nth-child(1){grid-area:heure;text-align:right;font-size:11.5px}
.ct-tbl tbody tr.gt-op td:nth-child(1):before{display:none}
.ct-tbl tbody tr.gt-op td:nth-child(1) .ct-sous{display:inline;margin-left:4px}
.ct-tbl tbody tr.gt-op td:nth-child(2){grid-area:camion;font-size:14px;font-weight:700}
.ct-tbl tbody tr.gt-op td:nth-child(2):before{display:none}
.ct-tbl tbody tr.gt-op td:nth-child(3){grid-area:chauf}
.ct-tbl tbody tr.gt-op td:nth-child(4){grid-area:peseur;text-align:right;color:var(--text-2);font-size:11.5px}
.ct-tbl tbody tr.gt-op td:nth-child(3):before,.ct-tbl tbody tr.gt-op td:nth-child(4):before{content:none}
.ct-tbl tbody tr.gt-op td:nth-child(4):after{content:" · peseur";color:var(--text-3);font-size:10.5px}
.ct-tbl tbody tr.gt-op td:nth-child(5){grid-area:tare}
.ct-tbl tbody tr.gt-op td:nth-child(6){grid-area:hab;font-size:11.5px;color:var(--text-2)}
.ct-tbl tbody tr.gt-op td:nth-child(7){grid-area:ecart;text-align:right}
.ct-tbl tbody tr.gt-op td:nth-child(8){grid-area:poste;margin-top:4px;padding-top:5px;border-top:1px dashed var(--border) !important}
.ct-tbl tbody tr.gt-op td:nth-child(5),.ct-tbl tbody tr.gt-op td:nth-child(7){display:flex;flex-direction:column-reverse;align-items:flex-start;font-size:17px;font-weight:700;line-height:1.15;margin-top:3px}
.ct-tbl tbody tr.gt-op td:nth-child(7){align-items:flex-end}
.ct-tbl tbody tr.gt-op td:nth-child(5):before,.ct-tbl tbody tr.gt-op td:nth-child(7):before{margin:0 0 1px}
.ctf-tbl tbody tr.gt-op{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:3px 12px;padding:10px 12px;grid-template-areas:"date date ecart" "tare brut net" "chauf chauf peseur"}
.ctf-tbl tbody tr.gt-op td{padding:0;min-width:0}
.ctf-tbl tbody tr.gt-op td[data-l]:before{min-width:0;margin-right:5px}
.ctf-tbl tbody tr.gt-op td:nth-child(1){grid-area:date;font-weight:700}
.ctf-tbl tbody tr.gt-op td:nth-child(1):before{display:none}
.ctf-tbl tbody tr.gt-op td:nth-child(2){grid-area:chauf}
.ctf-tbl tbody tr.gt-op td:nth-child(3){grid-area:peseur;text-align:right;color:var(--text-2);font-size:11.5px}
.ctf-tbl tbody tr.gt-op td:nth-child(2):before,.ctf-tbl tbody tr.gt-op td:nth-child(3):before{content:none}
.ctf-tbl tbody tr.gt-op td:nth-child(3):after{content:" · peseur";color:var(--text-3);font-size:10.5px}
.ctf-tbl tbody tr.gt-op td:nth-child(4){grid-area:tare}
.ctf-tbl tbody tr.gt-op td:nth-child(5){grid-area:brut}
.ctf-tbl tbody tr.gt-op td:nth-child(6){grid-area:net}
.ctf-tbl tbody tr.gt-op td:nth-child(7){grid-area:ecart;text-align:right}
.ctf-tbl tbody tr.gt-op td:nth-child(4),.ctf-tbl tbody tr.gt-op td:nth-child(5),.ctf-tbl tbody tr.gt-op td:nth-child(6),.ctf-tbl tbody tr.gt-op td:nth-child(7){display:flex;flex-direction:column-reverse;align-items:flex-start;font-size:14px;font-weight:700;line-height:1.15;margin-top:3px}
.ctf-tbl tbody tr.gt-op td:nth-child(7){align-items:flex-end;font-size:15px}
.ctf-tbl tbody tr.gt-op td:nth-child(4):before,.ctf-tbl tbody tr.gt-op td:nth-child(5):before,.ctf-tbl tbody tr.gt-op td:nth-child(6):before,.ctf-tbl tbody tr.gt-op td:nth-child(7):before{margin:0}
.ctp-tbl tbody tr.gt-op{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 10px;padding:10px 12px;grid-template-areas:"nom nom nom" "a b c" "d e f" "motifs motifs motifs"}
.ctp-tbl tbody tr.gt-op td{padding:0;min-width:0}
.ctp-tbl tbody tr.gt-op td:nth-child(1){grid-area:nom;font-size:14px;font-weight:700}
.ctp-tbl tbody tr.gt-op td:nth-child(1):before{display:none}
.ctp-tbl tbody tr.gt-op td:nth-child(2){grid-area:a}
.ctp-tbl tbody tr.gt-op td:nth-child(3){grid-area:b}
.ctp-tbl tbody tr.gt-op td:nth-child(4){grid-area:c}
.ctp-tbl tbody tr.gt-op td:nth-child(5){grid-area:d}
.ctp-tbl tbody tr.gt-op td:nth-child(6){grid-area:e}
.ctp-tbl tbody tr.gt-op td:nth-child(7){grid-area:f}
.ctp-tbl tbody tr.gt-op td:nth-child(8){grid-area:motifs;margin-top:4px;padding-top:5px;border-top:1px dashed var(--border) !important}
.ctp-tbl tbody tr.gt-op td:nth-child(n+2):nth-child(-n+7){display:flex;flex-direction:column-reverse;align-items:flex-start;text-align:left;font-size:15px;font-weight:700;line-height:1.1}
.ctp-tbl tbody tr.gt-op td:nth-child(n+2):nth-child(-n+7):before{margin:0}
.ctc-tbl tbody tr.gt-op{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;padding:9px 12px}
.ctc-tbl tbody tr.gt-op td{padding:0;min-width:0}
.ctc-tbl tbody tr.gt-op td:nth-child(1){font-weight:700}
.ctc-tbl tbody tr.gt-op td:nth-child(1):before{display:none}
.ctc-tbl tbody tr.gt-op td[data-l]:before{min-width:0;margin-right:4px}}

/* ══════════════════════════════════════════════════════════════════
 *  CODE COULEUR DES LIGNES — option « C », choisie par l'utilisateur
 *  le 2026-09-19 après avoir comparé trois traitements côte à côte
 *  (mockup-controle-tares-couleurs.html).
 * ══════════════════════════════════════════════════════════════════
 *  La couleur ne sert QU'À CE QUI APPELLE UNE ACTION : fond teinté +
 *  filet sur « hors habitude » et « à vérifier », simple filet vert sur
 *  « dans l'habitude », RIEN sur « pas encore d'habitude ».
 *
 *  ⚠ Pourquoi pas un fond plein partout (l'option A, regardée puis
 *    écartée) : « dans l'habitude » est la MAJORITÉ des lignes — ~95 %
 *    en exploitation réelle. Un tableau majoritairement vert noie le
 *    rouge : plus on colore, moins l'alerte ressort.
 *
 *  ⚠ Le fond est posé sur le <tr>, le survol de tableau.css sur les <td> :
 *    le survol reste donc visible PAR-DESSUS la teinte (il gagne parce
 *    que les cellules sont au-dessus de la ligne, pas par spécificité).
 *
 *  ⚠ La couleur ne porte JAMAIS l'information seule — le badge de verdict
 *    .ct-v reste dans la dernière colonne (daltonisme, photocopie).
 *    Et à l'impression, ni un fond ni un box-shadow ne sortent (#206) :
 *    le filet redevient une VRAIE bordure, en noir, plus bas.
 * ══════════════════════════════════════════════════════════════════ */
.gt-tbl tbody tr.gt-op.v-hors_habitude { background:rgba(222,53,11,.10); box-shadow:inset 3px 0 0 var(--bad); }
.gt-tbl tbody tr.gt-op.v-a_verifier    { background:rgba(183,116,12,.10); box-shadow:inset 3px 0 0 var(--warn); }
.gt-tbl tbody tr.gt-op.v-ok            { box-shadow:inset 3px 0 0 rgba(0,135,90,.55); }
/* « pas encore d'habitude » : rien. Ce n'est pas un verdict, c'est une
   absence de verdict — la colorer ferait croire à un jugement. */

/* En SOMBRE, 10 % d'un rouge vif sur un fond presque noir ne se voit plus :
   on monte la teinte, et le filet prend la couleur claire du thème. */
[data-theme="dark"] .gt-tbl tbody tr.gt-op.v-hors_habitude { background:rgba(248,113,113,.15); }
[data-theme="dark"] .gt-tbl tbody tr.gt-op.v-a_verifier    { background:rgba(251,191,36,.13); }
[data-theme="dark"] .gt-tbl tbody tr.gt-op.v-ok            { box-shadow:inset 3px 0 0 rgba(52,211,153,.55); }

/* Téléphone : la ligne devient une carte, le filet passe en bordure gauche
   (un box-shadow inset se perd sous le fond de la carte). */
@media (max-width:700px) {
  .gt-tbl tbody tr.gt-op.v-hors_habitude { border-left:3px solid var(--bad); }
  .gt-tbl tbody tr.gt-op.v-a_verifier    { border-left:3px solid var(--warn); }
  .gt-tbl tbody tr.gt-op.v-ok            { border-left:3px solid rgba(0,135,90,.55); }
}

/* Impression : les navigateurs ne sortent ni les fonds ni les ombres.
   Le verdict doit rester lisible sur le papier → une vraie bordure noire,
   dont l'épaisseur distingue l'alerte de l'ordinaire. */
@media print {
  .gt-tbl tbody tr.gt-op { background:#fff !important; box-shadow:none !important; }
  .gt-tbl tbody tr.gt-op.v-hors_habitude td:first-child { border-left:3px solid #000 !important; }
  .gt-tbl tbody tr.gt-op.v-a_verifier    td:first-child { border-left:2px solid #000 !important; }
  .gt-tbl tbody tr.gt-op.v-ok            td:first-child { border-left:1px solid #000 !important; }
}
