/* Calcul d'échelle : styles propres à l'outil. */
.o-echelle-bloc { padding: 4px 0 18px; }
.o-echelle-bloc + .o-echelle-bloc { padding-top: 18px; border-top: 1px solid var(--bord); }
.o-echelle-bloc h2 { margin: 0 0 12px; font-size: 1.2rem; }
.o-echelle-champ-echelle { display: flex; flex-direction: column; gap: 4px; max-width: 320px; font-size: .88rem; color: var(--texte-2); }
.o-echelle-champ-echelle input { min-height: 50px; font: 700 1.5rem var(--mono); }
.o-echelle .o-echelle-aide { display: block; margin: 6px 0 0; }
.o-echelle-bloc .prereglages { padding-bottom: 0; margin-top: 10px; }
.o-echelle-bloc .prereglages strong { min-width: 7.5em; }
.o-echelle-bloc .prereglages .btn { font-family: var(--mono); }
.o-echelle-bloc .prereglages .btn span { color: var(--texte-2); font-family: var(--police); font-size: .82rem; }
.o-echelle-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.o-echelle-modes strong { margin-right: 4px; }
.o-echelle-modes .btn { min-height: 42px; border-radius: 999px; font-weight: 600; }
.atelier .o-echelle-modes .btn[aria-pressed="true"] { background: var(--marque); border-color: var(--marque); color: var(--sur-marque); }
.o-echelle-ligne { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px 10px; align-items: end; max-width: 560px; margin-top: 10px; }
.o-echelle-ligne label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--texte-2); min-width: 0; }
.o-echelle-ligne input, .o-echelle-ligne select { min-height: 46px; }
.o-echelle-ligne input { font: 600 1.2rem var(--mono); text-align: right; }
.o-echelle input.o-echelle-calcule { border-style: dashed; border-color: var(--marque); background: var(--ok-fond); color: var(--ok-texte); }
.o-echelle input[aria-invalid="true"] { border-color: var(--erreur-texte); outline: 1px solid var(--erreur-texte); }
.o-echelle input:focus-visible, .o-echelle select:focus-visible { outline: 3px solid var(--marque); outline-offset: 0; }
.o-echelle .o-echelle-erreur { margin: 10px 0 0; color: var(--erreur-texte); font-size: .95rem; }
.o-echelle-erreur:empty { display: none; }
.o-echelle-resultat { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding: 12px 14px; border-radius: var(--rayon-petit); background: var(--ok-fond); color: var(--ok-texte); }
.o-echelle-resultat > span { font-size: .85rem; font-weight: 600; }
.o-echelle-resultat output { font: 700 1.35rem/1.35 var(--mono); overflow-wrap: anywhere; }
.o-echelle-notes { margin: 6px 0 0; padding-left: 1.2em; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.o-echelle-notes:empty { display: none; }
.o-echelle-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.o-echelle-actions .tirage-message { color: var(--ok-texte); }
.o-echelle-barre { margin: 0 0 10px; font-weight: 600; }
.o-echelle-barre:empty { display: none; }
.o-echelle-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.o-echelle-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.o-echelle-table th, .o-echelle-table td { padding: 6px 10px; border-bottom: 1px solid var(--bord); text-align: left; }
.o-echelle-table td { font-family: var(--mono); }
.o-echelle-table th { background: var(--surface-2); font-weight: 600; }
.o-echelle .o-echelle-prive { display: block; margin-top: 8px; }
@media (max-width: 640px) {
  .o-echelle-tables { grid-template-columns: 1fr; }
  .o-echelle-modes .btn { flex: 1 1 100%; }
  .o-echelle-champ-echelle { max-width: none; }
  .o-echelle-ligne { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .o-echelle-bloc .prereglages strong { min-width: 0; }
}
