/* Leçons de la 2e année (app/ecrans.js) : écrans les uns sous les autres (onglets الدّرس / التّمارين), grandes cibles tactiles.
   Couleurs de domaine héritées (--dom). */
.ecrans .hero { margin-bottom: 12px; }
.ecran-stage { display: grid; gap: 12px; }
.ecran { display: grid; align-content: start; gap: 14px; padding: 18px; }
.ecran-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ecran-text { font-size: 1.7rem; line-height: 1.9; margin: 0; }
.ecran figure { margin: 0; text-align: center; }
.ecran figure svg { max-width: min(100%, 420px); height: auto; }
/* Cartes-images des supports (français de 2e) : en rangée, fond blanc du papier */
.ecran-imgs { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.ecran-imgs img { max-height: 190px; max-width: min(100%, 260px); object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; }
@media (max-width: 600px) { .ecran-imgs img { max-height: 130px; max-width: calc(50% - 8px); } .ecran-imgs img:only-child { max-height: 220px; max-width: 100%; } }
.ecran .ex .opt, .ecran .ex .tok { min-height: 56px; font-size: 1.4rem; }
.ecran .ex button, .ecran .ex input.blank { font-size: 1.3rem; }

/* Pavé numérique : chiffres de 0 à 9, trois colonnes. */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; margin: 14px auto 0; }
.kp { min-height: 58px; font-size: 1.6rem; font-weight: 700; border-radius: 14px; border: 2px solid var(--dom, var(--accent)); background: var(--paper, #fff); color: inherit; cursor: pointer; }
.kp:active { background: var(--dom-soft, #eef); }

/* Blocs de base dix comme dans le livre : l'unité est un carré jaune, la dizaine un rectangle rouge de 10 carrés, la
   centaine un grand carré bleu de 100 carrés (10 × 10). --q = côté d'un carreau. */
.b10 { display: grid; gap: 12px; justify-items: center; }
.b10-view { display: flex; gap: 22px; align-items: flex-end; justify-content: center; min-height: 96px; }
.b10-col { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; max-width: 120px; }
.b10-col.u { width: 70px; }
.b10 { --b: var(--dom, #2f6fdc); }
.b10 { --q: 8px; --bl: #1c2838; }
.b10 span.u, .b10 span.d, .b10 span.c { box-sizing: content-box; border: 1px solid var(--bl); }
.b10 span.u { width: var(--q); height: var(--q); background: #f4d21f; }
.b10 span.d { width: var(--q); height: calc(var(--q) * 10); background-color: #e5423b;
  background-image: linear-gradient(to bottom, var(--bl) 1px, transparent 1px); background-size: 100% var(--q); }
.b10 span.c { width: calc(var(--q) * 10); height: calc(var(--q) * 10); background-color: #4ba9de;
  background-image: linear-gradient(to right, var(--bl) 1px, transparent 1px), linear-gradient(to bottom, var(--bl) 1px, transparent 1px);
  background-size: var(--q) var(--q); }
.b10-n { font-size: 2.2rem; font-weight: 800; margin: 0; }
.b10-ctl { display: flex; gap: 18px; justify-content: center; }
.b10-c { display: grid; gap: 6px; justify-items: center; }
.b10-btn { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 14px; border: 2px solid var(--b); background: var(--paper, #fff); color: inherit; cursor: pointer; }
.b10-msg { min-height: 1.6em; font-size: 1.3rem; font-weight: 700; margin: 0; }
.b10-msg.ok { color: var(--ok, #1c8a4a); }
.b10-msg.no { color: var(--bad, #c0392b); }
.b10-step { width: auto; min-width: 72px; padding: 0 14px; font-size: 1.5rem; font-weight: 800; }
/* Vues du même nombre : tableau عشرات | آحاد (couleurs des blocs), décomposition, nombre en lettres. */
.b10-views { display: grid; gap: 8px; justify-items: center; }
.b10-views:empty { display: none; }
.b10-tab { border-collapse: collapse; font-size: 1.15rem; }
.b10-tab th, .b10-tab td { border: 2px solid var(--line, #c9d3e0); padding: 4px 18px; text-align: center; }
.b10-tab th { font-weight: 700; border-bottom-width: 4px; }
.b10-tab th.u { border-bottom-color: #f4d21f; }
.b10-tab th.d { border-bottom-color: #e5423b; }
.b10-tab th.c { border-bottom-color: #4ba9de; }
.b10-tab td { font-size: 1.8rem; font-weight: 800; }
.b10-sum { margin: 0; font-size: 1.6rem; font-weight: 700; color: var(--b); }
.b10-words { margin: 0; font-size: 1.5rem; font-weight: 700; }

@media (max-width: 480px) {
  .ecran { padding: 14px; }
  .ecran-text { font-size: 1.5rem; }
  .b10-view { gap: 12px; }
  .b10 { --q: 5.6px; }
}
