/* Traducteur morse : styles propres à l'outil. */
.o-morse [hidden] { display: none !important; }
.o-morse .o-morse-aide { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; }
.o-morse-zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.o-morse-zone { display: grid; gap: 6px; align-content: start; }
.o-morse-zone label { font-weight: 600; font-size: .95rem; }
.o-morse-zone textarea { min-height: 150px; font: 500 1.15rem/1.5 var(--police); overflow-wrap: anywhere; }
.o-morse-zone textarea.o-morse-code { font: 700 1.5rem/1.6 var(--mono); letter-spacing: .06em; }
.o-morse textarea:focus-visible, .o-morse input:focus-visible, .o-morse button:focus-visible { outline: 3px solid var(--marque); outline-offset: 1px; }
.o-morse-actions, .o-morse-commandes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.o-morse-inconnus { display: block; margin-top: 12px; padding: 8px 12px; border-radius: var(--rayon-petit); background: var(--erreur-fond); color: var(--erreur-texte); font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.o-morse-inconnus:empty, .o-morse-note:empty, .o-morse-duree:empty, .o-morse-retour:empty { display: none; }

.o-morse-bande { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; max-height: 236px; overflow-y: auto; margin-top: 16px; padding: 12px; border-radius: var(--rayon-petit); background: var(--surface-2); }
.o-morse-case { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 44px; padding: 6px 8px; border: 2px solid transparent; border-radius: 8px; background: var(--surface); }
.o-morse-case b { font: 700 1.15rem/1.2 var(--police); }
.o-morse-case i { font: 700 1.35rem/1.1 var(--mono); font-style: normal; letter-spacing: .08em; white-space: nowrap; color: var(--marque); }
.o-morse-case.inconnu { background: var(--erreur-fond); color: var(--erreur-texte); }
.o-morse-case.inconnu i { color: inherit; }
.o-morse-case.actif { border-color: var(--marque); background: var(--marque); color: var(--sur-marque); }
.o-morse-case.actif i { color: inherit; }
.o-morse-mot { display: grid; place-items: center; min-width: 18px; color: var(--texte-2); font: 700 1.3rem var(--mono); }

.o-morse-lecteur { display: grid; justify-items: center; gap: 10px; padding: 18px 0; text-align: center; }
.o-morse-lecteur .o-morse-commandes { justify-content: center; }
.o-morse-lecteur .btn-outline { min-height: 44px; font-weight: 600; }
.o-morse-duree { color: var(--texte-2); font-size: .95rem; font-variant-numeric: tabular-nums; }
/* Témoin lumineux : objet volontairement coloré, sans transition pour suivre le rythme exact */
.o-morse-temoin { width: 132px; height: 132px; margin-top: 6px; border: 4px solid var(--bord); border-radius: 50%; background: var(--surface-2); }
.o-morse-temoin.allume { border-color: #f5a400; background: #ffd23f; box-shadow: 0 0 34px 8px rgb(255 200 40 / 55%); }
.o-morse .reglages output { display: inline; font-weight: 700; color: var(--texte); font-variant-numeric: tabular-nums; }
.o-morse .reglages label:not(.case) { display: block; }
.o-morse-note { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: var(--rayon-petit); background: var(--surface-2); color: var(--texte-2); font-size: .92rem; line-height: 1.5; }

.o-morse-bloc { margin-top: 26px; padding-top: 8px; border-top: 1px solid var(--bord); }
.o-morse-bloc h2 { margin: 12px 0 8px; font-size: 1.25rem; }
.o-morse-bloc h3 { margin: 16px 0 8px; font-size: .95rem; color: var(--texte-2); }
.o-morse-ref { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.o-morse-signe { display: grid; justify-items: center; gap: 2px; min-height: 58px; padding: 6px 4px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface); color: var(--texte); font: inherit; cursor: pointer; }
.o-morse-signe:hover { background: var(--surface-2); }
.o-morse-signe b { font: 700 1.1rem/1.2 var(--police); }
.o-morse-signe i { font: 700 1.2rem/1.1 var(--mono); font-style: normal; letter-spacing: .06em; white-space: nowrap; color: var(--marque); }
.o-morse-signe.actif { border-color: var(--marque); background: var(--marque); color: var(--sur-marque); }
.o-morse-signe.actif i { color: inherit; }

.o-morse-reponse { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.o-morse-reponse input { width: 64px; min-height: 48px; text-align: center; text-transform: uppercase; font: 700 1.4rem var(--mono); }
.o-morse-score { margin: 12px 0 0; color: var(--texte-2); font-size: .95rem; }
.o-morse-retour { display: block; margin-top: 10px; padding: 10px 12px; border-radius: var(--rayon-petit); font-weight: 600; }
.o-morse-retour.juste { background: var(--ok-fond); color: var(--ok-texte); }
.o-morse-retour.faux { background: var(--erreur-fond); color: var(--erreur-texte); }
.o-morse .o-morse-prive { margin-top: 20px; text-align: center; }

@media (max-width: 720px) {
  .o-morse-zones { grid-template-columns: minmax(0, 1fr); }
  .o-morse-zone textarea { min-height: 110px; }
  .o-morse-zone textarea.o-morse-code { font-size: 1.3rem; }
  .o-morse-ref { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .o-morse-signe i { font-size: 1.05rem; letter-spacing: .02em; }
  .o-morse-temoin { width: 110px; height: 110px; }
}
