/* MOC CAISSE — prototype cliquable, charte ÉMAIL.
   Toute valeur vient de tokens.css. Aucune couleur écrite en dur ici. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #1A1A18;
  font-family: var(--police-libelle);
  color: var(--couleur-encre);
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--police-chiffre); }

/* ═══════════ Barre de démonstration — HORS PRODUIT ═══════════ */
#demobar {
  position: fixed; inset: 0 0 auto 0; z-index: 200; height: 46px;
  background: var(--couleur-encre); color: var(--couleur-papier);
  display: flex; align-items: center; gap: var(--espace-3); padding: 0 var(--espace-3);
  font-size: var(--taille-note);
}
#demobar .tag {
  font-family: var(--police-chiffre); font-size: var(--taille-mini);
  font-weight: var(--graisse-forte); letter-spacing: .12em;
  border: 1px solid var(--couleur-trait); padding: 3px 7px; color: var(--couleur-filet);
}
#demobar .note { color: var(--couleur-trait); font-size: var(--taille-mini); }
#demobar .sp { margin-left: auto; }
#demobar button {
  padding: 9px 13px; border: 1px solid var(--couleur-trait); color: var(--couleur-filet);
  font-weight: var(--graisse-moyenne);
}
#demobar button:hover { background: var(--couleur-texte-secondaire); color: var(--couleur-papier); }
#demobar button.on { background: var(--couleur-papier); color: var(--couleur-encre); border-color: var(--couleur-papier); }
#demobar button.primaire { background: var(--couleur-accent); color: var(--couleur-sur-accent); border-color: var(--couleur-accent); }
#demobar button.primaire:hover { background: var(--couleur-accent-survol); }

/* Menu de navigation de démonstration */
#menu {
  position: fixed; top: 46px; left: 0; z-index: 199; width: 300px;
  background: var(--couleur-encre); color: var(--couleur-papier);
  padding: var(--espace-3); display: none; max-height: calc(100vh - 46px); overflow-y: auto;
}
#menu.on { display: block; }
#menu h4 {
  margin: var(--espace-3) 0 var(--espace-1); font-family: var(--police-chiffre);
  font-size: var(--taille-mini); letter-spacing: .12em; color: var(--couleur-trait);
  font-weight: var(--graisse-forte);
}
#menu h4:first-child { margin-top: 0; }
#menu button {
  display: block; width: 100%; text-align: left; padding: 7px var(--espace-2);
  border: 0; color: var(--couleur-filet); font-size: var(--taille-tableau);
}
#menu button:hover { background: var(--couleur-texte-secondaire); color: var(--couleur-papier); }
#menu button.on { background: var(--couleur-papier); color: var(--couleur-encre); font-weight: var(--graisse-forte); }
#menu button .ref { font-family: var(--police-chiffre); color: var(--couleur-trait); margin-right: var(--espace-2); }
#menu button.on .ref { color: var(--couleur-texte-secondaire); }

/* ═══════════ Scène ═══════════ */
#wrap { position: fixed; inset: 46px 0 0 0; display: flex; align-items: center; justify-content: center; }
#stage {
  background: var(--couleur-papier); border: 1px solid var(--couleur-encre);
  overflow: hidden; transform-origin: center center; position: relative;
  width: 1280px; height: 800px;
}
#stage.large { width: 1920px; height: 1080px; }
.ecran { position: absolute; inset: 0; display: none; flex-direction: column; background: var(--couleur-papier); }
.ecran.on { display: flex; }

/* Trames — jamais décoratives, elles portent l'information */
.tr-img   { background: var(--hachure-image); }
.tr-imgkg { background: var(--hachure-image-poids); }
.tr-etat  { background: var(--hachure-etat); }
.tr-dense { background: var(--hachure-dense); }
.tr-exc   { background: var(--hachure-excedent); }
.tr-des   { background: var(--hachure-desactive); }

.gl { width: 22px; height: 22px; display: block; }
.gl.grand { width: 34px; height: 34px; }

/* ═══════════ E-03 VENTE ═══════════ */
.v-bandeau {
  height: 76px; flex: none; border-bottom: var(--trait-zone) solid var(--couleur-encre);
  display: flex; align-items: center; gap: var(--espace-3); padding: 0 var(--espace-3);
  position: relative;
}
.v-bandeau::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--trait-filet-marque));
  height: var(--trait-filet-marque); background: var(--couleur-accent);
}
.v-nom { font-size: var(--taille-titre); font-weight: var(--graisse-forte); }
.v-sep { width: 1px; height: 44px; background: var(--couleur-filet); }
.v-photo { width: 52px; height: 52px; flex: none; border: var(--trait-zone) solid var(--couleur-encre); }
.v-qui { font-size: var(--taille-libelle); font-weight: var(--graisse-moyenne); }
.v-heure { font-family: var(--police-chiffre); font-size: var(--taille-montant-s); font-weight: var(--graisse-forte); margin-left: auto; }
.v-cote {
  height: 60px; min-width: 196px; border: var(--trait-zone) solid var(--couleur-encre);
  background: var(--couleur-fond); display: flex; align-items: center; gap: var(--espace-2);
  padding: 0 var(--espace-3);
}
.v-cote .n { font-family: var(--police-chiffre); font-size: 30px; font-weight: var(--graisse-forte); }
.v-cote .l { font-size: var(--taille-mini); font-weight: var(--graisse-moyenne); line-height: 1.2; text-align: left; }
.v-cote .im { width: 36px; height: 36px; flex: none; border: 1px solid var(--couleur-encre); }

.v-corps { flex: 1; display: flex; min-height: 0; margin-top: var(--trait-filet-marque); }

.v-rail { width: 200px; flex: none; border-right: 1px solid var(--couleur-encre); display: flex; flex-direction: column; background: var(--couleur-fond); }
.v-cat {
  height: var(--cible-rail-categorie); flex: none; border-bottom: var(--trait-separation) solid var(--couleur-filet);
  display: flex; align-items: center; gap: var(--espace-2); padding: 0 var(--espace-2); text-align: left;
}
.v-cat .im { width: 56px; height: 56px; flex: none; border: 1px solid var(--couleur-encre); display: flex; align-items: center; justify-content: center; }
.v-cat .l { font-size: var(--taille-libelle); font-weight: var(--graisse-moyenne); line-height: 1.1; }
.v-cat.on { background: var(--couleur-encre); color: var(--couleur-papier); }
.v-cat.on .im { border-color: var(--couleur-papier); }
.v-cat.on .l { font-weight: var(--graisse-forte); }
.v-cat.on .gl { filter: invert(1); }
.v-rail .pied { margin-top: auto; padding: var(--espace-2); font-size: var(--taille-mini); line-height: var(--interligne-note); color: var(--couleur-texte-secondaire); }

.v-zone { flex: 1; min-width: 0; display: flex; flex-direction: column; border-right: var(--trait-separation-majeure) solid var(--couleur-encre); }
.v-grille { flex: 1; padding: var(--espace-3); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); gap: var(--espace-3); min-height: 0; }
.p-tuile { border: var(--trait-zone) solid var(--couleur-encre); display: flex; flex-direction: column; background: var(--couleur-papier); text-align: left; position: relative; }
.p-tuile.poids { border: var(--trait-double); background: var(--couleur-fond); }
.p-tuile:active { transform: translateY(var(--etat-enfonce-decalage)); background: var(--etat-enfonce-surface); }
.p-tuile.touche::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: var(--trait-liseré-marque); background: var(--couleur-accent);
}
.p-tuile .vue { flex: 1; border-bottom: 1px solid var(--couleur-filet); display: flex; align-items: flex-end; position: relative; }
.p-tuile .bande { width: 100%; background: var(--couleur-encre); color: var(--couleur-papier); padding: var(--espace-1) var(--espace-2); display: flex; align-items: center; justify-content: space-between; }
.p-tuile .bande b { font-family: var(--police-chiffre); font-size: 20px; }
.p-tuile .bande i { font-family: var(--police-chiffre); font-size: var(--taille-mini); font-style: normal; letter-spacing: .1em; }
.p-tuile .gl { position: absolute; left: var(--espace-2); bottom: var(--espace-2); }
.p-tuile.poids .gl { bottom: 38px; }
.p-tuile .lig { flex: none; padding: 9px var(--espace-3); display: flex; align-items: baseline; justify-content: space-between; gap: var(--espace-1); }
.p-tuile .lig .n { font-size: 19px; font-weight: var(--graisse-forte); }
.p-tuile .lig .n.lg { font-size: var(--taille-libelle); }
.p-tuile .lig .p { font-family: var(--police-chiffre); font-size: var(--taille-montant-s); font-weight: var(--graisse-forte); }
.p-tuile.poids .lig .p { font-size: var(--taille-titre); }
.p-tuile .lig .p .u { font-size: var(--taille-tableau); }
.v-pages { height: 38px; flex: none; border-top: 1px solid var(--couleur-filet); display: flex; align-items: center; justify-content: center; gap: var(--espace-2); font-size: var(--taille-note); color: var(--couleur-texte-secondaire); }
.v-pages .pt { width: 14px; height: 12px; border: 1px solid var(--couleur-trait); }
.v-pages .pt.on { width: 26px; background: var(--couleur-encre); border-color: var(--couleur-encre); }

.v-panier { width: 400px; flex: none; display: flex; flex-direction: column; background: var(--couleur-surface-alternee); }
.v-ph { height: 40px; flex: none; background: var(--couleur-fond-attenue); border-bottom: 1px solid var(--couleur-encre); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--espace-3); }
.v-ph .t { font-size: var(--taille-note); font-weight: var(--graisse-forte); letter-spacing: .08em; }
.v-ph .n { font-family: var(--police-chiffre); font-size: 20px; font-weight: var(--graisse-forte); }
.v-lignes { flex: 1; min-height: 0; overflow-y: auto; }
.v-lig { height: var(--cible-ligne-panier); border-bottom: 1px solid var(--couleur-filet); display: flex; align-items: center; gap: var(--espace-2); padding: 0 6px 0 var(--espace-2); }
.v-lig.poids { height: var(--cible-ligne-au-poids); border-left: var(--trait-ligne-au-poids) solid var(--couleur-encre); background: var(--couleur-fond); padding-left: 6px; }
.v-lig .vg { width: 60px; height: 60px; flex: none; border: 1px solid var(--couleur-encre); display: flex; align-items: flex-end; justify-content: center; position: relative; }
.v-lig .vg .gl { position: absolute; left: 2px; bottom: 2px; width: 16px; height: 16px; }
.v-lig .vg .kg { width: 100%; background: var(--couleur-encre); color: var(--couleur-papier); font-family: var(--police-chiffre); font-size: var(--taille-mini); font-weight: var(--graisse-forte); text-align: center; }
.v-lig .q { font-family: var(--police-chiffre); font-size: 26px; font-weight: var(--graisse-forte); width: 46px; }
.v-lig .nm { flex: 1; min-width: 0; font-size: var(--taille-corps); font-weight: var(--graisse-moyenne); }
.v-lig .calc { font-family: var(--police-chiffre); font-size: var(--taille-libelle); font-weight: var(--graisse-forte); margin-top: 2px; }
.v-lig .mt { font-family: var(--police-chiffre); font-size: 21px; font-weight: var(--graisse-forte); }
.v-lig .x { width: var(--cible-minimale); height: var(--cible-minimale); flex: none; border: 1px solid var(--couleur-trait); background: var(--couleur-fond); font-size: var(--taille-titre); font-weight: var(--graisse-forte); color: var(--couleur-texte-secondaire); }
.v-lignes .vide { padding: var(--espace-4); font-size: var(--taille-mini); line-height: var(--interligne-note); color: var(--couleur-texte-secondaire); }

.v-modes { flex: none; border-top: 1px solid var(--couleur-encre); display: flex; height: 66px; }
.v-mode { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.v-mode + .v-mode { border-left: 1px solid var(--couleur-encre); }
.v-mode .f { border: 1px solid var(--couleur-encre); }
.v-mode .l { font-size: var(--taille-mini); font-weight: var(--graisse-moyenne); letter-spacing: .04em; }
.v-mode.on { background: var(--couleur-encre); color: var(--couleur-papier); }
.v-mode.on .f { border-color: var(--couleur-papier); }
.v-mode.on .l { font-weight: var(--graisse-forte); }
.f-place { width: 26px; height: 16px; }
.f-emp { width: 20px; height: 18px; border-radius: 3px 3px 0 0; }
.f-liv { width: 28px; height: 14px; border-radius: 2px; }

.v-total { flex: none; border-top: var(--trait-separation-majeure) solid var(--couleur-encre); padding: 6px var(--espace-3) var(--espace-2); display: flex; align-items: flex-end; justify-content: space-between; }
.v-total .l { font-size: var(--taille-tableau); font-weight: var(--graisse-forte); letter-spacing: .14em; color: var(--couleur-texte-secondaire); padding-bottom: 6px; }
.v-total .n { font-family: var(--police-chiffre); font-size: var(--taille-grande); font-weight: var(--graisse-forte); line-height: 1; }

.v-actions { flex: none; padding: 0 var(--espace-2) var(--espace-2); display: flex; flex-direction: column; gap: 6px; }
.b-encaisser {
  height: var(--cible-action); background: var(--couleur-accent); color: var(--couleur-sur-accent);
  display: flex; align-items: center; justify-content: center; gap: var(--espace-3); width: 100%;
}
.b-encaisser:hover { background: var(--couleur-accent-survol); }
.b-encaisser:active { background: var(--couleur-accent-enfonce); transform: translateY(var(--etat-enfonce-decalage)); }
.b-encaisser .bl { width: 44px; height: 30px; border: var(--trait-zone) solid var(--couleur-sur-accent); display: flex; align-items: center; justify-content: center; font-family: var(--police-chiffre); font-size: var(--taille-mini); }
.b-encaisser .l { font-size: 30px; font-weight: var(--graisse-forte); letter-spacing: .04em; }
.b-encaisser[disabled] { background: transparent; color: var(--etat-desactive-texte); border: var(--trait-zone) solid var(--etat-desactive-trait); background-image: var(--hachure-desactive); cursor: not-allowed; }
.b-encaisser[disabled] .bl { border-color: var(--etat-desactive-trait); }
.v-actions .duo { display: flex; gap: 6px; }
.b-sec { flex: 1; height: 56px; border: var(--trait-zone) solid var(--couleur-encre); background: var(--couleur-fond-attenue); font-size: var(--taille-note); font-weight: var(--graisse-forte); line-height: 1.2; }
.b-ter { flex: 1; height: 56px; border: var(--trait-zone) dashed var(--couleur-trait); color: var(--couleur-texte-secondaire); font-size: var(--taille-note); font-weight: var(--graisse-moyenne); line-height: 1.2; }

/* ═══════════ E-05 ENCAISSEMENT ═══════════ */
.e-bande { height: 330px; flex: none; background: var(--couleur-encre); color: var(--couleur-papier); display: flex; border-bottom: var(--trait-separation-majeure) solid var(--couleur-encre); }
.e-bande .pr { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.e-bande .pr .l { font-size: 19px; font-weight: var(--graisse-forte); letter-spacing: .28em; color: var(--couleur-filet); }
.e-bande .pr .rg { display: flex; align-items: baseline; gap: var(--espace-3); }
.e-bande .pr .n { font-family: var(--police-chiffre); font-size: var(--taille-monnaie); font-weight: var(--graisse-forte); line-height: 1; letter-spacing: -.04em; }
.e-bande .pr .n.sm { font-size: 112px; }
.e-bande .pr .c { font-family: var(--police-chiffre); font-size: var(--espace-8); font-weight: var(--graisse-forte); }
.e-bande .sd { width: 300px; flex: none; border-left: 1px solid var(--couleur-texte-secondaire); display: flex; flex-direction: column; justify-content: center; gap: var(--espace-3); padding: 0 var(--espace-4); }
.e-bande .sd .t { font-family: var(--police-chiffre); font-size: var(--taille-mini); font-weight: var(--graisse-forte); letter-spacing: .14em; color: var(--couleur-filet); }
.e-bande .sd .it { display: flex; align-items: center; gap: var(--espace-3); }
.e-bande .sd .bi { border: var(--trait-zone) solid var(--couleur-papier); display: flex; align-items: center; justify-content: center; font-family: var(--police-chiffre); font-size: 20px; font-weight: var(--graisse-forte); }
.e-bande .sd .pi { border: var(--trait-zone) solid var(--couleur-papier); border-radius: 50%; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-family: var(--police-chiffre); font-size: var(--taille-libelle); font-weight: var(--graisse-forte); }
.e-bande .sd .xx { font-family: var(--police-chiffre); font-size: var(--taille-titre); font-weight: var(--graisse-forte); }
.e-bande .sd .nt { font-family: var(--police-chiffre); font-size: var(--taille-mini); line-height: 1.4; color: var(--couleur-trait); }

.e-som { height: 76px; flex: none; border-bottom: 1px solid var(--couleur-encre); display: flex; }
.e-som .c { flex: 1; display: flex; align-items: center; gap: var(--espace-3); padding: 0 var(--espace-4); }
.e-som .c.du { border-right: 1px solid var(--couleur-filet); }
.e-som .c.re { background: var(--couleur-fond); }
.e-som .c .l { font-size: var(--taille-note); font-weight: var(--graisse-moyenne); letter-spacing: .14em; color: var(--couleur-texte-secondaire); }
.e-som .c .n { font-family: var(--police-chiffre); font-size: var(--taille-montant); font-weight: var(--graisse-forte); }
.e-som .cur { width: var(--trait-zone); height: 34px; background: var(--couleur-encre); animation: cl 1s steps(1) infinite; }
@keyframes cl { 50% { opacity: 0; } }
.e-som .rt { width: 180px; flex: none; border-left: 1px solid var(--couleur-encre); background: var(--couleur-fond-attenue); font-size: 14px; font-weight: var(--graisse-moyenne); }

.e-corps { flex: 1; display: flex; min-height: 0; }
.e-g { flex: 1; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--couleur-encre); }
.e-moyens { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--espace-2); padding: var(--espace-2) var(--espace-3); }
.e-moyen { height: 96px; border: var(--trait-zone) solid var(--couleur-encre); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.e-moyen .im { width: 38px; height: 38px; border: 1px solid var(--couleur-encre); }
.e-moyen.esp .im { width: 46px; height: 28px; border-width: var(--trait-zone); }
.e-moyen .l { font-size: var(--taille-note); font-weight: var(--graisse-moyenne); }
.e-moyen.ard { border-style: dashed; border-color: var(--couleur-trait); color: var(--couleur-texte-secondaire); }
.e-moyen.ard .im { border-style: dashed; border-color: var(--couleur-trait); }
.e-moyen.on { background: var(--couleur-encre); color: var(--couleur-papier); border-color: var(--couleur-encre); border-style: solid; }
.e-moyen.on .im { border-color: var(--couleur-papier); }
.e-moyen.on .l { font-weight: var(--graisse-forte); }
.e-billets { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--espace-2); padding: 0 var(--espace-3) var(--espace-3); min-height: 0; }
.e-billet { border: var(--trait-zone) solid var(--couleur-encre); background: var(--couleur-fond); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--espace-2); }
.e-billet .r { border: 1px solid var(--couleur-encre); }
.e-billet .n { font-family: var(--police-chiffre); font-size: var(--taille-titre); font-weight: var(--graisse-forte); }
.e-billet:active { background: var(--couleur-fond-attenue); transform: translateY(var(--etat-enfonce-decalage)); }

.e-d { width: 400px; flex: none; display: flex; flex-direction: column; }
.e-pad { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 6px; padding: var(--espace-2); min-height: 0; }
.k { border: 1px solid var(--couleur-encre); font-family: var(--police-chiffre); font-size: 28px; font-weight: var(--graisse-forte); display: flex; align-items: center; justify-content: center; }
.k.sm { font-size: var(--taille-titre); }
.k.eff { background: var(--couleur-fond-attenue); font-family: var(--police-libelle); font-size: var(--taille-titre); }
.k:active { background: var(--couleur-fond-attenue); transform: translateY(var(--etat-enfonce-decalage)); }
.e-valwrap { flex: none; padding: 0 var(--espace-2) var(--espace-2); }
.b-valider { height: 84px; width: 100%; background: var(--couleur-accent); color: var(--couleur-sur-accent); display: flex; align-items: center; justify-content: center; gap: var(--espace-3); }
.b-valider:hover { background: var(--couleur-accent-survol); }
.b-valider .t { width: 34px; height: 42px; border: var(--trait-zone) solid var(--couleur-sur-accent); }
.b-valider .l { font-size: 26px; font-weight: var(--graisse-forte); letter-spacing: .04em; }
.b-valider[disabled] { background: transparent; background-image: var(--hachure-desactive); color: var(--etat-desactive-texte); border: var(--trait-zone) solid var(--etat-desactive-trait); cursor: not-allowed; }
.b-valider[disabled] .t { border-color: var(--etat-desactive-trait); }

/* ═══════════ Écrans patron — trame commune ═══════════ */
.p-top { height: 70px; flex: none; border-bottom: var(--trait-zone) solid var(--couleur-encre); display: flex; align-items: center; gap: var(--espace-4); padding: 0 var(--espace-6); background: var(--couleur-fond); }
.p-top .t { font-size: 20px; font-weight: var(--graisse-forte); letter-spacing: .04em; }
.p-top .s { font-family: var(--police-chiffre); font-size: var(--taille-tableau); color: var(--couleur-texte-secondaire); }
.p-top .r { margin-left: auto; font-family: var(--police-chiffre); font-size: var(--taille-note); color: var(--couleur-texte-secondaire); }
.p-corps { flex: 1; min-height: 0; padding: var(--espace-6); display: flex; flex-direction: column; gap: var(--espace-3); overflow-y: auto; }
.bloc { border: 1px solid var(--couleur-encre); }
.bloc .hd { padding: var(--espace-2) var(--espace-4); font-size: var(--taille-libelle); font-weight: var(--graisse-moyenne); border-bottom: 1px solid var(--couleur-filet); background: var(--couleur-surface-alternee); }
.bloc .bd { padding: var(--espace-3) var(--espace-4); }
.ligne { display: flex; align-items: center; gap: var(--espace-4); padding: var(--espace-3) var(--espace-4); border: 1px solid var(--couleur-encre); }
.ligne .g { flex: 1; }
.ligne .g .t { font-size: var(--taille-libelle); font-weight: var(--graisse-moyenne); }
.ligne .g .s { font-family: var(--police-chiffre); font-size: var(--taille-mini); color: var(--couleur-texte-secondaire); margin-top: 2px; }
.ligne .n { font-family: var(--police-chiffre); font-size: var(--espace-8); font-weight: var(--graisse-forte); }

table.tb { width: 100%; border-collapse: collapse; font-size: var(--taille-tableau); }
table.tb th {
  background: var(--couleur-encre); color: var(--couleur-papier); text-align: left;
  padding: 6px var(--espace-2); font-family: var(--police-chiffre); font-size: var(--taille-mini);
  letter-spacing: .1em; font-weight: var(--graisse-forte);
}
table.tb td { padding: 7px var(--espace-2); border-bottom: 1px solid var(--couleur-filet); }
table.tb tr:nth-child(even) td { background: var(--couleur-surface-alternee); }
table.tb td.num { font-family: var(--police-chiffre); text-align: right; }
.puce { display: inline-flex; align-items: center; gap: 6px; }
.sq { width: 10px; height: 10px; display: inline-block; }
.sq.plein { background: var(--couleur-encre); }
.sq.hach { background: repeating-linear-gradient(45deg, var(--couleur-encre) 0 2px, var(--couleur-papier) 2px 4px); border: 1px solid var(--couleur-encre); }
.sq.vide { border: 1px solid var(--couleur-encre); background: var(--couleur-papier); }
.mod { border: 1px solid var(--couleur-trait); padding: 1px 5px; font-size: var(--taille-mini); margin-right: var(--espace-1); display: inline-block; }
.barre { text-decoration: line-through; color: var(--couleur-texte-secondaire); }
.inverse { background: var(--couleur-encre); color: var(--couleur-papier); padding: 1px 6px; font-weight: var(--graisse-forte); }

.b-act { height: 74px; background: var(--couleur-accent); color: var(--couleur-sur-accent); font-size: var(--taille-titre); font-weight: var(--graisse-forte); letter-spacing: .06em; padding: 0 var(--espace-8); }
.b-act:hover { background: var(--couleur-accent-survol); }
.b-neu { height: 74px; border: var(--trait-zone) solid var(--couleur-trait); color: var(--couleur-texte-secondaire); font-size: var(--taille-corps); font-weight: var(--graisse-moyenne); padding: 0 var(--espace-6); }

/* Écart de caisse */
.ecart { border: var(--trait-separation-majeure) solid var(--couleur-encre); background: var(--hachure-dense); padding: var(--espace-4) var(--espace-6); display: flex; gap: var(--espace-6); align-items: center; }
.ecart.nul { background: var(--couleur-papier); }
.ecart.exc { background: var(--hachure-excedent); }
.ecart .g .t { font-size: var(--taille-note); font-weight: var(--graisse-forte); letter-spacing: .16em; }
.ecart .g .rw { display: flex; align-items: baseline; gap: var(--espace-2); }
.ecart .g .n { font-family: var(--police-chiffre); font-size: var(--taille-ecart); font-weight: var(--graisse-forte); line-height: 1.05; }
.ecart .g .d { font-family: var(--police-chiffre); font-size: var(--taille-note); color: var(--couleur-texte-secondaire); }
.ecart .r { flex: 1; min-width: 0; }
.ecart .r .p { font-size: 14px; line-height: var(--interligne-corps); }
.ecart .r .in { margin-top: var(--espace-2); min-height: 60px; border: var(--trait-zone) solid var(--couleur-encre); background: var(--couleur-papier); padding: var(--espace-2) var(--espace-3); font-size: var(--taille-corps); }

/* ═══════════ Console MOC ═══════════ */
.k-scr { flex-direction: row !important; }
.k-side { width: 190px; flex: none; background: var(--couleur-fond); border-right: var(--trait-zone) solid var(--couleur-encre); display: flex; flex-direction: column; }
.k-side .br { padding: var(--espace-2) var(--espace-3); border-bottom: var(--trait-zone) solid var(--couleur-encre); font-family: var(--police-chiffre); font-size: var(--taille-note); font-weight: var(--graisse-forte); letter-spacing: .12em; }
.k-side .gp { padding: var(--espace-2) var(--espace-3); font-family: var(--police-chiffre); font-size: var(--taille-mini); color: var(--couleur-texte-secondaire); letter-spacing: .1em; }
.k-side .it { padding: 6px var(--espace-3); font-family: var(--police-chiffre); font-size: var(--taille-note); display: block; width: 100%; text-align: left; }
.k-side .it.on { background: var(--couleur-encre); color: var(--couleur-papier); }
.k-side .ft { margin-top: auto; padding: var(--espace-2) var(--espace-3); font-family: var(--police-chiffre); font-size: var(--taille-mini); line-height: var(--interligne-note); color: var(--couleur-texte-secondaire); }
.k-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.k-bar { height: 36px; flex: none; border-bottom: 1px solid var(--couleur-encre); display: flex; align-items: center; gap: var(--espace-2); padding: 0 var(--espace-2); font-family: var(--police-chiffre); font-size: var(--taille-mini); color: var(--couleur-texte-secondaire); }
.k-bar .rech { width: 300px; height: 24px; border: 1px solid var(--couleur-trait); padding: 0 6px; display: flex; align-items: center; color: var(--couleur-texte-secondaire); }
.k-bar .rech:focus-visible { outline: var(--etat-focus-epaisseur) solid var(--etat-focus-trait-console); outline-offset: -3px; }
.k-bar .rt { margin-left: auto; }
.k-grp { padding: 5px var(--espace-2); background: var(--couleur-fond-attenue); border-block: 1px solid var(--couleur-encre); font-family: var(--police-chiffre); font-size: var(--taille-mini); font-weight: var(--graisse-forte); letter-spacing: .1em; }
.k-tab { width: 100%; border-collapse: collapse; font-family: var(--police-chiffre); font-size: var(--taille-tableau); }
.k-tab th { background: var(--couleur-encre); color: var(--couleur-papier); text-align: left; padding: 6px var(--espace-2); font-size: var(--taille-mini); letter-spacing: .1em; }
.k-tab td { padding: 8px var(--espace-2); border-bottom: 1px solid var(--couleur-filet); }
.k-tab tr.sel td { background: var(--couleur-surface-alternee); }
.k-tab tr.exp td:first-child { border-left: 5px solid var(--couleur-encre); }
.k-tab tr.susp td { background: var(--hachure-etat); color: var(--couleur-texte-secondaire); }
.k-tab tr:hover td { background: var(--etat-survol-surface); cursor: pointer; }
.k-leg { display: flex; gap: var(--espace-6); padding: var(--espace-2) var(--espace-3); background: var(--couleur-fond); border-bottom: 1px solid var(--couleur-filet); font-family: var(--police-chiffre); font-size: var(--taille-mini); align-items: center; }

/* Interrupteurs */
.sw { display: flex; align-items: center; gap: var(--espace-3); padding: var(--espace-3) 0; border-bottom: 1px solid var(--couleur-filet); }
.sw .lb { flex: 1; font-size: var(--taille-corps); }
.sw .bx { width: 56px; height: 30px; border: var(--trait-zone) solid var(--couleur-encre); display: flex; align-items: center; padding: 2px; }
.sw .bx i { width: 22px; height: 22px; background: var(--couleur-encre); display: block; }
.sw.off .bx { background: var(--hachure-desactive); }
.sw.off .bx i { margin-left: 0; background: var(--couleur-trait); }
.sw.on .bx i { margin-left: auto; }

/* ═══════════ Surcouches ═══════════ */
.ovl { position: absolute; inset: 0; background: rgba(22,24,26,.62); display: none; align-items: center; justify-content: center; z-index: 20; }
.ovl.on { display: flex; }
.pan { background: var(--couleur-papier); border: var(--trait-separation-majeure) solid var(--couleur-encre); max-height: 96%; overflow-y: auto; }
.pan .hd { background: var(--couleur-encre); color: var(--couleur-papier); padding: var(--espace-3) var(--espace-4); display: flex; align-items: baseline; gap: var(--espace-4); }
.pan .hd .t { font-size: 20px; font-weight: var(--graisse-forte); letter-spacing: .06em; }
.pan .hd .s { font-family: var(--police-chiffre); font-size: var(--taille-mini); color: var(--couleur-filet); margin-left: auto; }
.pan .bd { padding: var(--espace-4); }

/* Pesée — surcouche 877 px, le panier reste visible */
#ov-pesee { justify-content: flex-start; background: none; }
#ov-pesee .voile { position: absolute; inset: 0 400px 0 0; background: rgba(22,24,26,.62); }
#ov-pesee .pan { position: relative; width: 877px; height: 100%; border: 0; border-right: var(--trait-separation-majeure) solid var(--couleur-encre); display: flex; flex-direction: column; }
.pes { flex: 1; display: flex; gap: var(--espace-4); padding: var(--espace-4); min-height: 0; }
.pes .g { flex: 1; display: flex; flex-direction: column; }
.pes .val { border: var(--trait-zone) solid var(--couleur-encre); height: 120px; display: flex; align-items: center; justify-content: flex-end; padding: 0 var(--espace-4); font-family: var(--police-chiffre); font-size: var(--taille-geante); font-weight: var(--graisse-forte); }
.pes .cal { margin-top: var(--espace-3); font-family: var(--police-chiffre); font-size: var(--taille-titre); font-weight: var(--graisse-forte); }
.pes .cal .eq { display: block; margin-top: 6px; font-size: var(--taille-montant); }
.pes .avert { margin-top: auto; font-size: var(--taille-note); color: var(--couleur-texte-secondaire); line-height: var(--interligne-note); }
.pes .d { width: 330px; flex: none; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 6px; }
.pes-act { flex: none; display: flex; gap: var(--espace-2); padding: 0 var(--espace-4) var(--espace-4); }
.pes-act .ok { flex: 1; height: 76px; background: var(--couleur-accent); color: var(--couleur-sur-accent); font-size: var(--taille-titre); font-weight: var(--graisse-forte); }
.pes-act .ok[disabled] { background: transparent; background-image: var(--hachure-desactive); color: var(--etat-desactive-texte); border: var(--trait-zone) solid var(--etat-desactive-trait); cursor: not-allowed; }
.pes-act .ko { width: 220px; height: 76px; border: var(--trait-zone) dashed var(--couleur-trait); color: var(--couleur-texte-secondaire); font-weight: var(--graisse-moyenne); }

/* Tickets */
.tk-row { display: flex; gap: var(--espace-4); align-items: flex-start; }
.tk {
  width: 302px; flex: none; background: var(--couleur-papier); border: 1px solid var(--couleur-encre);
  padding: var(--espace-3); font-family: var(--police-chiffre); font-size: var(--taille-note);
  line-height: 1.45; white-space: pre-wrap; max-height: 430px; overflow-y: auto; color: var(--couleur-encre);
}
.tk-lab { font-family: var(--police-chiffre); font-size: var(--taille-mini); font-weight: var(--graisse-forte); letter-spacing: .12em; color: var(--couleur-texte-secondaire); margin-bottom: 6px; }
.tk-band { background: var(--couleur-encre); color: var(--couleur-papier); padding: var(--espace-2); text-align: center; font-weight: var(--graisse-forte); margin: var(--espace-2) 0; }
.tk-band .n { font-size: var(--espace-8); display: block; }
.tk-cadre { border: var(--trait-zone) solid var(--couleur-encre); padding: var(--espace-2); text-align: center; font-weight: var(--graisse-forte); margin: var(--espace-2) 0; }

/* Roue de teinte */
.roue-wrap { display: flex; gap: var(--espace-6); align-items: flex-start; }
.roue { width: 240px; height: 240px; border-radius: 50%; position: relative; flex: none; border: var(--trait-zone) solid var(--couleur-encre); }
.roue .cur { position: absolute; width: 26px; height: 26px; border: var(--trait-separation-majeure) solid var(--couleur-papier); outline: var(--trait-zone) solid var(--couleur-encre); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.roue-info { flex: 1; }
.apercu { border: 1px solid var(--couleur-encre); padding: var(--espace-3); margin-bottom: var(--espace-3); }
.apercu .b { background: var(--couleur-accent); color: var(--couleur-sur-accent); padding: var(--espace-3); text-align: center; font-weight: var(--graisse-forte); font-size: var(--taille-libelle); }
.avert-rouge { border: var(--trait-zone) solid var(--couleur-encre); background: var(--hachure-etat); padding: var(--espace-2) var(--espace-3); font-size: var(--taille-note); line-height: var(--interligne-note); margin-top: var(--espace-3); }
.champ { display: flex; align-items: center; gap: var(--espace-3); margin-bottom: var(--espace-2); }
.champ label { width: 190px; flex: none; font-size: var(--taille-corps); font-weight: var(--graisse-moyenne); }
.champ input { flex: 1; height: 44px; border: var(--trait-zone) solid var(--couleur-encre); padding: 0 var(--espace-3); font: var(--graisse-normale) var(--taille-corps) var(--police-libelle); background: var(--couleur-papier); }
.champ input:focus-visible { outline: var(--etat-focus-epaisseur) solid var(--etat-focus-trait); outline-offset: var(--etat-focus-decalage); }

/* Onglets */
.ong { display: flex; border-bottom: var(--trait-zone) solid var(--couleur-encre); }
.ong button { padding: var(--espace-3) var(--espace-4); font-size: var(--taille-corps); font-weight: var(--graisse-moyenne); border-bottom: var(--trait-separation-majeure) solid transparent; margin-bottom: -3px; }
.ong button.on { border-bottom-color: var(--couleur-encre); font-weight: var(--graisse-forte); }
.ong button[disabled] { color: var(--etat-desactive-texte); cursor: not-allowed; }

/* Bandeau « non maquetté » */
.provisoire {
  background: var(--couleur-encre); color: var(--couleur-papier); padding: 7px var(--espace-4);
  font-family: var(--police-chiffre); font-size: var(--taille-mini); font-weight: var(--graisse-forte); letter-spacing: .1em;
}
.provisoire span { color: var(--couleur-trait); font-weight: var(--graisse-normale); letter-spacing: 0; }

/* Focus visible partout */
:focus-visible { outline: var(--etat-focus-epaisseur) solid var(--etat-focus-trait); outline-offset: var(--etat-focus-decalage); }
