/* Dictée arabe (assets/dictee.js) — utilise les couleurs des jeux (assets/jeux.css) quand elles existent. */
.dct { --dct-ink: var(--ink, #13233f); --dct-card: var(--card, #fff); --dct-line: var(--line, #d5dde8); --dct-muted: var(--muted, #4a5a73);
  --dct-ok: #1c7a4a; --dct-ok-soft: #ddf3e6; --dct-ko: #b3541e; --dct-ko-soft: #fde9d9; --dct-ar: var(--font-ar, "Noto Naskh Arabic", serif);
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; color: var(--dct-ink); }
.dct [lang="ar"], .dct-ar { font-family: var(--dct-ar); }
.dct :where(button) { font: inherit; cursor: pointer; }   /* :where = sans priorité, les classes ci-dessous l'emportent */
.dct button:disabled { cursor: default; }
.dct button:focus-visible { outline: 3px solid var(--gold, #d4a647); outline-offset: 2px; }

/* Clavier sur les côtés (écran large) */
.dct-g, .dct-d { display: flex; gap: 6px; }
.dct-col { display: flex; flex-direction: column; gap: 6px; }
.dct-k { width: 50px; height: 50px; border-radius: 12px; border: 2px solid rgba(19,35,63,.14); color: #13233f; font-family: var(--dct-ar);
  font-weight: 700; font-size: 2.25rem; line-height: 1; display: grid; place-items: center; padding: 0; overflow: hidden; box-shadow: 0 2px 0 rgba(19,35,63,.18); }
.dct-k:active { transform: translateY(2px); box-shadow: none; }
.dct-k:disabled { opacity: .6; }
.dct-k.f1 { background: #fff4d6; } .dct-k.f2 { background: #e3f0ff; } .dct-k.f3 { background: #fde7e4; }
.dct-k.f4 { background: #e6f6ec; } .dct-k.f5 { background: #f1e9fb; } .dct-k.f6 { background: #f3f4f6; }
.dct-k.dct-hz { border-color: #b8892b; }
.dct-bas { display: none; }

/* Centre */
.dct-c { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dct-tete { display: flex; gap: 14px; align-items: center; }
.dct-img { position: relative; width: 110px; height: 100px; flex: none; border-radius: 14px; border: 2px solid transparent; background: rgba(127,140,160,.12);
  display: grid; place-items: center; padding: 0; }
.dct-img:hover { border-color: var(--gold, #d4a647); }
.dct-img img { width: 80px; height: 80px; object-fit: contain; pointer-events: none; }
.dct-oreille { font-size: 3rem; }
.dct-son { position: absolute; right: -6px; bottom: -6px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy, #13233f); color: #fff;
  display: grid; place-items: center; font-size: .95rem; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.dct-langue { background: rgba(127,140,160,.16); color: var(--dct-ink); border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 800; min-height: 44px; }
.dct-tete-d { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dct-consigne { margin: 0; font-weight: 700; color: var(--dct-muted); }
.dct-sons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dct-ecoute { background: var(--navy, #13233f); color: #fff; border: 0; border-radius: 999px; padding: 8px 18px; font-weight: 800; display: inline-flex; gap: 8px; align-items: center; }
.dct-ecoute [lang="ar"] { font-size: 1.3rem; }
.dct-sens { font-weight: 700; color: var(--dct-muted); }
.dct-b { background: rgba(127,140,160,.16); color: var(--dct-ink); border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 800; min-height: 44px; }
.dct-zone { min-height: 84px; border: 3px solid var(--dct-line); border-radius: 16px; display: flex; align-items: center; justify-content: center; padding: 4px 12px; background: rgba(255,255,255,.6); }
.dct-zone.ok { border-color: var(--dct-ok); } .dct-zone.ko { border-color: var(--dct-ko); }
.dct-texte { font-family: var(--dct-ar); font-weight: 700; font-size: 3.2rem; line-height: 1.4; white-space: pre; color: var(--dct-ink); }
.dct-texte.moyen { font-size: 2.5rem; } .dct-texte.petit { font-size: 1.9rem; }
.dct-vide { color: var(--dct-muted); font-size: 1rem; font-family: var(--font-body, system-ui, sans-serif); }
.dct-curseur { width: 3px; height: 2.6rem; background: #2f6fd6; margin-inline-start: 4px; animation: dct-cli 1s steps(2) infinite; }
@keyframes dct-cli { 50% { opacity: 0; } }
.dct-puces { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; min-height: 44px; }
.dct-p { min-width: 40px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-family: var(--dct-ar); font-weight: 700; font-size: 1.5rem;
  padding: 0 5px 5px; box-sizing: border-box; border: 2px solid var(--dct-line); background: rgba(127,140,160,.10); color: var(--dct-ink); }
.dct-p.donne { opacity: .45; border-style: dashed; }
.dct-p.juste { background: var(--dct-ok-soft); border-color: var(--dct-ok); color: #13233f; }
.dct-p.faux { background: var(--dct-ko-soft); border-color: var(--dct-ko); color: #7a3410; }
.dct-p.manque { border: 2px dashed var(--dct-ko); color: var(--dct-ko); font-family: inherit; font-size: 1.1rem; font-weight: 800; }
.dct-esp { min-width: 22px; border: 0; border-bottom: 3px dotted var(--dct-muted); border-radius: 0; background: none; }
.dct-msg { text-align: center; font-weight: 800; }
.dct-msg.ok { color: var(--dct-ok); } .dct-msg.ko { color: var(--dct-ko); }
.dct-msg .dct-ar { font-size: 1.4rem; margin-inline-end: 6px; }
.dct-recopie { text-align: center; font-weight: 700; background: #fff4d6; color: #13233f; border-radius: 12px; padding: 6px; }
.dct-recopie .dct-ar { font-size: 1.8rem; }
.dct-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dct-espace { min-width: 140px; }
.dct-valider { background: var(--dct-ok); color: #fff; border: 0; border-radius: 12px; padding: 10px 22px; font-weight: 800; min-height: 44px; }

/* Fenêtres : choix du son, de la hamza, blocage */
.dct-voile { position: absolute; inset: -8px; z-index: 5; background: rgba(19,35,63,.5); border-radius: 18px; display: grid; place-items: center; padding: 8px; }
.dct-boite { background: #f7f9fc; color: #13233f; border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.28); max-width: 100%; }
.dct-titre { font-weight: 800; font-size: 1.1rem; } .dct-titre small { font-weight: 600; color: #4a5a73; }
.dct-gros { font-weight: 800; font-size: 1.4rem; text-align: center; } .dct-note { color: #4a5a73; }
.dct-cartes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dct-r2 { padding-top: 10px; border-top: 2px dashed #d5dde8; }
.dct-r2 .dct-carte { background: #fbf7ec; }
.dct-carte { width: 96px; min-height: 112px; border-radius: 16px; border: 3px solid #c9d3e0; background: #fff; color: #13233f; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0; box-shadow: 0 3px 0 rgba(19,35,63,.15); padding: 4px; }
.dct-carte [lang="ar"] { font-size: 3.2rem; line-height: 1.35; font-weight: 700; }
.dct-carte small { font-size: .78rem; font-weight: 700; color: #4a5a73; text-align: center; }
.dct-pied { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
/* Chadda : couleur bien visible (violet), plein quand elle est active */
.dct-chadda { min-height: 48px; border-radius: 12px; padding: 6px 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px;
  background: #f1e9fb; color: #4b2a86; border: 3px solid #6c3fb5; }
.dct-chadda [lang="ar"] { font-size: 1.8rem; line-height: 1; }
.dct-chadda.on { background: #6c3fb5; color: #fff; }

/* Écran étroit (téléphone, petite tablette) : le clavier passe sous le mot, 7 touches par rangée */
@media (max-width: 760px) {
  .dct { grid-template-columns: minmax(0, 1fr); }
  .dct-g, .dct-d { display: none; }
  .dct-bas { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
  .dct-bas .dct-k { width: auto; height: 46px; font-size: 2rem; }
  .dct-texte { font-size: 2.6rem; } .dct-texte.moyen { font-size: 2rem; } .dct-texte.petit { font-size: 1.5rem; }
  .dct-img { width: 72px; height: 66px; } .dct-img img { width: 54px; height: 54px; }
  .dct-zone { min-height: 66px; } .dct-c { gap: 8px; }
  .dct-carte { width: 78px; min-height: 96px; } .dct-carte [lang="ar"] { font-size: 2.6rem; }
  .dct-voile { position: fixed; inset: 0; border-radius: 0; }
}
