/* Scène « Les tickets remontent » — Caisse Cauris LinkUp. À plat : traits, aplats, aucune ombre. Classes préfixées k-. */
.k-voies, .k-noeud, .k-panneau, .k-caisse, .k-ticket, .k-jeton, .k-note { position: absolute; left: 0; top: 0; box-sizing: border-box; }

/* Les voies : des caisses au nœud, du nœud au stock et au journal */
.k-voies { width: 100%; height: 100%; }
.k-voies svg { display: block; width: 100%; height: 100%; overflow: visible; }
.k-voies path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.k-noeud { width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }

/* Les deux panneaux du haut : le stock (dépôt) et le journal (bureau) */
.k-panneau { z-index: 2; display: flex; flex-direction: column; padding: 14px 16px 12px; border-radius: var(--r-2); background: var(--surface); border: 1px solid var(--line-fort); color: var(--ink); line-height: 1.2; white-space: nowrap; }
.k-tete { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.k-tete em { font-style: normal; font-weight: 600; color: var(--muted); }
.k-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.k-pied { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); }
.k-pied b { font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.k-journal .k-pied b { color: var(--accent-texte); }

/* L’étagère : des cases pleines posées sur leur planche ; une case vendue ne garde que son contour */
.k-stock .k-corps { justify-content: space-evenly; }
.k-rang { display: flex; align-items: center; gap: 10px; }
.k-art { width: 58px; font-size: 11.5px; font-weight: 600; color: var(--text); }
.k-cases { display: flex; gap: 6px; padding: 0 4px 3px; border-bottom: 2px solid var(--ink); }
.k-case { position: relative; width: 18px; height: 18px; border-radius: 4px; border: 1px dashed var(--line-fort); box-sizing: border-box; }
.k-case i { position: absolute; inset: -1px; border-radius: 4px; background: var(--accent); will-change: transform, opacity; }
.k-reste { margin-left: auto; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Le journal : des lignes réglées, une écriture par ticket */
.k-ligne { height: 18px; border-bottom: 1px solid var(--line); box-sizing: border-box; }
.k-ecrit { display: flex; justify-content: space-between; align-items: center; height: 100%; font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; opacity: 0; will-change: transform, opacity; }
.k-ecrit b { font-weight: 700; color: var(--ink); }

/* Les caisses, vues de dessus. Le ticket glisse dessous et sort par la fente. */
.k-caisse { z-index: 2; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-fort); }
.k-fente { position: absolute; left: 50%; top: -1px; width: 68px; height: 4px; margin-left: -34px; border-radius: 0 0 2px 2px; background: var(--ink); }
.k-ecran { position: absolute; left: 14px; top: 20px; width: 52px; height: 26px; border-radius: 5px; background: var(--bg-doux); border: 1px solid var(--line); box-sizing: border-box; }
.k-ecran::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 22px; height: 3px; border-radius: 2px; background: var(--accent); }
.k-touches { position: absolute; right: 14px; top: 20px; display: grid; grid-template-columns: repeat(3, 6px); gap: 4px; }
.k-touches i { width: 6px; height: 6px; border-radius: 2px; background: var(--line-fort); }
.k-nom { position: absolute; left: 0; right: 0; top: 100%; margin-top: 9px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.2; white-space: nowrap; }

/* Le ticket, puis ses deux parts */
.k-ticket { z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line-fort); color: var(--ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.k-ticket i { width: 22px; height: 2px; border-radius: 1px; background: var(--line-fort); }
.k-ticket b { font-weight: 700; }
.k-jeton { z-index: 3; display: grid; place-items: center; border-radius: 6px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.k-jeton.s { background: var(--accent-fonce); color: #fff; }
.k-jeton.j { background: var(--surface); border: 1px solid var(--line-fort); color: var(--ink); }

/* L’ancien monde : le ticket coincé à la caisse, en ambre, et sa note */
.k-ticket.alerte { border-color: var(--ambre); color: var(--ambre-texte); }
.k-ticket.alerte i { background: var(--ambre); }
/* La note est un point d’ancrage sans dimension : sa pastille s’y aligne par la mise en page (à droite du ticket, puis centrée),
   sans décalage en pourcentage dans un transform — le texte reste net. */
.k-note { z-index: 3; width: 0; height: 0; display: flex; align-items: center; justify-content: flex-start; opacity: 0; }
.k-note span { flex: none; margin-left: var(--cote, 36px); padding: 5px 11px; border-radius: var(--r-pilule); background: var(--surface); border: 1px solid var(--ambre); color: var(--ambre-texte); font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
/* Temps fort : le dernier ticket est remonté ; le même témoin revient en aplat, à la sortie de la caisse */
.k-note.regle { justify-content: center; }
.k-note.regle span { margin-left: 0; padding: 6px 14px; background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; font-size: 12.5px; }

/* Relief : les voies sont tracées au sol ; les panneaux sont posés ; les caisses ont du volume et le ticket sort de dessous ;
   les deux parts volent vers leur panneau ; le témoin est au-dessus de tout. */
.k-panneau { translate: 0 0 calc(12px * var(--relief)); }
.k-ticket { translate: 0 0 calc(28px * var(--relief)); }
.k-caisse { translate: 0 0 calc(32px * var(--relief)); }
.k-jeton { translate: 0 0 calc(36px * var(--relief)); }
.k-note { translate: 0 0 calc(44px * var(--relief)); }

/* Petit écran : une seule caisse, deux panneaux serrés, tailles propres à la composition compacte */
.k-compact .k-panneau { padding: 10px 12px 9px; border-radius: 10px; }
.k-compact .k-tete { margin-bottom: 6px; font-size: 10.5px; }
.k-compact .k-pied { margin-top: 6px; padding-top: 7px; font-size: 10.5px; }
.k-compact .k-pied b { font-size: 14px; }
.k-compact .k-reste { font-size: 12px; }
.k-compact .k-ligne { height: 19px; }
.k-compact .k-ecrit { font-size: 10.5px; }
.k-compact .k-caisse { border-radius: 10px; }
.k-compact .k-fente { width: 60px; margin-left: -30px; }
.k-compact .k-ecran, .k-compact .k-touches { display: none; }
.k-compact .k-nom { top: 0; bottom: 0; margin: 0; display: grid; place-items: center; font-size: 10.5px; }
.k-compact .k-ticket { font-size: 11px; gap: 4px; }
.k-compact .k-ticket i { width: 18px; }
.k-compact .k-jeton { font-size: 10.5px; border-radius: 5px; }
.k-compact .k-note span { padding: 4px 9px; font-size: 10.5px; }
.k-compact .k-note.regle span { padding: 4px 11px; font-size: 11px; }

/* Firefox : sans hauteur propre, ce calque est peint hors de la scène dès que ses voisins sont en relief. */
.k-voies { translate: 0 0 .01px; }
