


.texte-zone {
  position: relative;
  padding: 26px 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 14px;
  font-family: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, 'Liberation Mono', 'DejaVu Sans Mono', monospace;
  font-size: 1.15rem;
  line-height: 1.9;
  text-align: left;
  color: #94a3b8;
  min-height: 140px;
  margin-bottom: 16px;
  user-select: none;
  word-wrap: break-word;
  white-space: pre-wrap;
  cursor: text;
}
.texte-zone.desactive { opacity: 0.5; }

.char {
  position: relative;
  transition: color 0.08s ease, background 0.08s ease;
}
.char.tape-ok { color: #e2e8f0; }
.char.tape-ok.avec-erreur {
  color: #f87171;
  text-decoration: underline;
  text-decoration-color: rgba(248, 113, 113, 0.6);
}
.char.actuel {
  background: color-mix(in srgb, var(--color-mid) 35%, transparent);
  color: #fff;
  border-radius: 3px;
  padding: 2px 1px;
  animation: curseur-blink 1s ease-in-out infinite;
}
.char.actuel.erreur {
  background: rgba(239, 68, 68, 0.45);
  color: #fff;
  animation: shake-erreur 0.2s ease;
}
.char.espace.actuel { background: rgba(103, 232, 249, 0.35); }
@keyframes curseur-blink {
  0%, 100% { box-shadow: 0 0 0 2px var(--color-mid); }
  50% { box-shadow: 0 0 0 2px transparent; }
}
@keyframes shake-erreur {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@media (max-width: 600px) {
  .texte-zone { font-size: 1rem; padding: 20px 16px; line-height: 1.8; }
}


.texte-zone .mot {
  display: inline-block;
  white-space: pre;
}


.saisie-cachee {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
  resize: none;
  overflow: hidden;
  pointer-events: none;
}


.aide-frappe {
  color: #94a3b8;
  font-size: 0.82rem;
  margin-bottom: 10px;
}
.aide-frappe strong { color: #cbd5e1; }


.texte-zone .zone-erreur {
  text-align: center;
  color: #f87171;
  padding: 16px;
  font-family: 'Inter', sans-serif;
  white-space: normal;
}
.texte-zone .zone-erreur button { margin-top: 12px; }
