/* Scène « La balance » — Comptabilité. À plat : traits, aplats, aucune ombre colorée. Classes préfixées b-. */
.b-poteau, .b-socle, .b-pivot, .b-fleau, .b-etat, .b-carte, .b-jeton { position: absolute; left: 0; top: 0; }
.b-poteau { width: 4px; margin-left: -2px; border-radius: 2px; background: var(--line-fort); }
.b-socle { width: 132px; height: 4px; margin-left: -66px; border-radius: 2px; background: var(--line-fort); }
.b-pivot { width: 16px; height: 16px; margin: -8px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--ink); }
.b-fleau { height: 6px; margin-top: -3px; border-radius: 3px; background: var(--ink); transform-origin: 50% 50%; will-change: transform; }

/* Les suspentes restent verticales pendant que le fléau penche */
.b-suspente { position: absolute; top: 2px; width: 0; transform-origin: 0 0; }
.b-fil { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--line-fort); }
.b-plateau { position: absolute; left: -92px; bottom: -6px; width: 184px; height: 6px; border-radius: 3px; background: var(--ink); }
.b-nom { position: absolute; left: 0; top: 18px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.b-total { position: absolute; right: 0; top: 13px; font-size: 19px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }

/* La pièce d’origine, puis ses deux jetons */
.b-carte, .b-jeton { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-fort); color: var(--ink); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; opacity: 0; white-space: nowrap; will-change: transform, opacity; }
.b-carte { border-radius: 10px; box-shadow: var(--flottant); font-size: 13.5px; }
.b-carte b { font-weight: 700; }
.b-carte span, .b-jeton span { font-weight: 600; color: var(--text); }
.b-jeton b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 10.5px; color: #fff; background: var(--accent-fonce); flex: none; }
.b-jeton.c b { background: var(--ink); }
:root[data-theme="dark"] .b-jeton.c b { color: var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .b-jeton.c b { color: var(--bg); } }

/* L’écriture incomplète : en ambre ; la contrepartie manquante en pointillé */
.b-jeton.alerte { border-color: var(--ambre); }
.b-jeton.alerte b { background: var(--ambre); }
.b-jeton.manque { background: transparent; border-style: dashed; }
.b-jeton.manque span, .b-jeton.manque b { visibility: hidden; }

.b-etat { transform: translateX(-50%); padding: 6px 14px; border-radius: var(--r-pilule); background: var(--surface); border: 1px solid var(--line-fort); font-size: 12.5px; font-weight: 700; color: var(--accent-texte); white-space: nowrap; opacity: 0; transition: opacity var(--d-2); }
.b-etat.alerte { color: var(--ambre-texte); border-color: var(--ambre); }
/* Temps fort : équilibre atteint, l’état passe en aplat d’accent */
.b-etat.juste { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
.b-total { transition: color var(--d-2); }
.b-total.juste { color: var(--accent-texte); }

/* Relief : la balance est une maquette. Le fléau, les jetons et la pièce d’origine sont à des hauteurs différentes. */
.b-fleau { translate: 0 0 calc(12px * var(--relief)); }
.b-pivot { translate: 0 0 calc(16px * var(--relief)); }
.b-jeton { translate: 0 0 calc(34px * var(--relief)); }
.b-carte { translate: 0 0 calc(70px * var(--relief)); }
.b-etat { translate: 0 0 calc(24px * var(--relief)); }

/* Petit écran : mêmes éléments, tailles propres à la composition compacte */
.b-compact .b-plateau { left: -62px; width: 124px; }
.b-compact .b-nom { font-size: 9.5px; top: 13px; }
.b-compact .b-total { font-size: 14px; top: 10px; }
.b-compact .b-carte { font-size: 11.5px; padding: 0 10px; }
.b-compact .b-jeton { font-size: 10.5px; padding: 0 7px; gap: 6px; border-radius: 6px; }
.b-compact .b-jeton b { width: 14px; height: 14px; font-size: 9px; border-radius: 4px; }
.b-compact .b-socle { width: 96px; margin-left: -48px; }
.b-compact .b-etat { font-size: 11px; padding: 4px 10px; }
