:root {
  --fond: #f7f6f3; --panneau: #ffffff; --texte: #1f2328; --doux: #6a737d; --bord: #e1e0dc;
  --accent: #2f5bd3; --rouge: #c62828; --note-fond: #fff6d6; --note-bord: #e0b400;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; display: flex; min-height: 100vh; background: var(--fond); color: var(--texte); }
#barre { width: 280px; flex-shrink: 0; background: var(--panneau); border-right: 1px solid var(--bord);
  padding: 16px; overflow-y: auto; }
#barre h1 { font-size: 20px; margin: 0 0 16px; }
#barre h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); margin: 20px 0 8px; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { padding: 7px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.liste li:hover { background: #f0efeb; }
.liste li.actif { background: #e6ecfb; color: var(--accent); font-weight: 600; }
.liste .meta { color: var(--doux); font-size: 12px; font-weight: normal; }
.ajout { display: flex; gap: 6px; margin-top: 8px; }
input { font: inherit; padding: 7px 9px; border: 1px solid var(--bord); border-radius: 6px; min-width: 0; flex: 1; }
button, .bouton { font: inherit; padding: 7px 12px; border: 1px solid var(--bord); border-radius: 6px;
  background: var(--panneau); cursor: pointer; color: inherit; text-decoration: none; font-size: 14px; }
button:disabled { opacity: .5; cursor: default; }
.principal { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.principal.enregistre { background: var(--rouge); border-color: var(--rouge); }
.discret { border: none; background: none; color: var(--doux); padding: 6px; }
.danger:hover { color: var(--rouge); }

#vue { flex: 1; padding: 20px 28px 0; display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.vide { margin: auto; color: var(--doux); }
#entretien { display: flex; flex-direction: column; height: 100%; }
#entretien[hidden] { display: none; }
.entete { display: flex; align-items: center; gap: 12px; }
.titre { font-size: 22px; font-weight: 600; border-color: transparent; background: transparent; }
.titre:focus { border-color: var(--bord); background: var(--panneau); }
.pastille { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: #eee; color: var(--doux); white-space: nowrap; }
.pastille.enregistrement { background: #fde2e2; color: var(--rouge); }
.pastille.finalisation { background: #e6ecfb; color: var(--accent); }
.pastille.termine { background: #e3f4e6; color: #1a7f37; }
.commandes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 8px; }
.espace { flex: 1; }
#chrono { font-variant-numeric: tabular-nums; font-size: 18px; color: var(--doux); }
.bascule { font-size: 14px; color: var(--doux); display: flex; align-items: center; gap: 4px; }
#lecteur { width: 100%; margin: 4px 0; }
.info { font-size: 13px; color: var(--doux); margin: 4px 0 8px; }

#transcription { flex: 1; overflow-y: auto; background: var(--panneau); border: 1px solid var(--bord);
  border-radius: 8px; padding: 16px 20px; line-height: 1.65; font-size: 16px; }
.seg { display: flex; gap: 12px; margin: 0 0 6px; }
.horodatage { font-family: ui-monospace, monospace; font-size: 12px; color: var(--doux); padding-top: 4px;
  white-space: nowrap; cursor: pointer; }
.seg .horodatage:hover { color: var(--accent); }
.seg.provisoire .texte { color: #555; }
.note { display: flex; gap: 12px; margin: 6px 0 10px; padding: 6px 10px; background: var(--note-fond);
  border-left: 3px solid var(--note-bord); border-radius: 4px; font-size: 15px; }
.note .texte::before { content: "Note — "; font-weight: 600; }
.note .suppr { margin-left: auto; border: none; background: none; color: var(--doux); padding: 0 4px; }
#transcription.sans-notes .note { display: none; }

.note-saisie { display: flex; align-items: center; gap: 10px; padding: 12px 0 16px; }
.note-saisie input { font-size: 16px; padding: 10px 12px; border-color: var(--note-bord); background: #fffdf3; }

.voile { position: fixed; inset: 0; background: var(--fond); display: flex; align-items: center;
  justify-content: center; z-index: 10; padding: 16px; }
.voile[hidden] { display: none; }
.carte-connexion { background: var(--panneau); border: 1px solid var(--bord); border-radius: 10px;
  padding: 28px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.carte-connexion h1 { margin: 0; font-size: 22px; }
.carte-connexion label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--doux); }
.erreur { color: var(--rouge); font-size: 14px; margin: 0; min-height: 1em; }
.compte { font-size: 13px; color: var(--doux); margin: -8px 0 8px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 4px; word-break: break-all; }

@media (max-width: 760px) {
  body { flex-direction: column; }
  #barre { width: auto; border-right: none; border-bottom: 1px solid var(--bord); }
  #vue { padding: 12px; height: auto; min-height: 70vh; }
}
