/* Sova, page web des professeurs. Couleurs de Sova (ivoire et nuit, ambre
   en accent, lib/app/theme/sova_palette.dart) ; thème sombre selon le
   réglage de l'ordinateur ; fiche du QR code ou du code d'une classe
   (plein écran, impression) en bas. */
:root {
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --field: #FFFFFF;
  --text: #1E2A4A;
  --muted: #4F5970;
  --rule: #E6E1D6;
  --border: #7D849A;
  --accent: #C9741F;
  --focus: #B5620F;
  --danger: #B3261E;
  --primary: #1E2A4A;
  --on-primary: #FAF7F0;
  --bubble: #F1ECE1;
  --bubble-own: #FBE6CC;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1428;
    --surface: #16203A;
    --field: #0E1428;
    --text: #FAF7F0;
    --muted: #B9C0D2;
    --rule: #2A3659;
    --border: #7883A3;
    --accent: #F2A541;
    --focus: #F2A541;
    --danger: #FF8A80;
    --primary: #F2A541;
    --on-primary: #0E1428;
    --bubble: #22305A;
    --bubble-own: #47371F;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
.screen { max-width: 52rem; margin: 0 auto; padding: 2rem 1rem 6rem; }

/* Présentation */
.brand {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.875rem;
}
h1 { margin: 0 0 0.75rem; font-size: 1.875rem; line-height: 1.2; }
h2 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
p { margin: 0; }
.lead { color: var(--muted); }
.steps { margin: 1rem 0 0; padding-left: 1.5rem; }
.steps li { margin: 0.25rem 0; }
.lang { margin-top: 0.75rem; font-size: 0.9375rem; }
a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.notice, .note, .empty, .hint { color: var(--muted); }
.notice { margin-top: 1.5rem; }
.hint { font-size: 0.9375rem; margin-top: 0.25rem; }
main > .hint { margin: 1rem 0 0; }

/* Cadres */
.toolbar, .actions, .list-actions, .summary-row, .image-row, .voice-box,
.page-actions, .kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.toolbar { margin-top: 1.5rem; }
main > .note { margin-top: 0.75rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}
.card > h2 { margin-bottom: 0.5rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.page-head h2 { flex: 1 1 12rem; }
.page-head h2:focus { outline: none; }
.page-head h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.summary-row { margin-bottom: 0.75rem; }

/* Champs */
.field { margin-top: 0.75rem; }
.field > label, .field > .label, legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.account-author p { overflow-wrap: anywhere; }
.input-row { display: flex; gap: 0.4rem; align-items: flex-start; }
input[type="text"], input[type="email"], input[type="url"],
input[type="datetime-local"], textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  min-height: 2.75rem;
}
input[type="text"], input[type="email"], input[type="url"], textarea { flex: 1 1 auto; min-width: 0; width: 100%; }
textarea { resize: vertical; }
[lang="ru"] { font-size: 1.0625rem; }
[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.check { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); }
.item-head .check { margin-top: 0; }
.input-row .check { flex: none; margin-top: 0; min-height: 2.75rem; white-space: nowrap; }

/* Listes */
.list { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.item { border-top: 1px solid var(--rule); padding: 0.75rem 0 0.25rem; margin-top: 0.5rem; }
.item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.item-label { font-weight: 600; margin-right: auto; }
.item-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  column-gap: 1rem;
}
.list-actions { margin-top: 0.75rem; }
.paste { flex-basis: 100%; }
.paste textarea { margin-top: 0.25rem; }
.paste .actions, .paste-preview { margin-top: 0.5rem; }
.paste-issues { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.warning { color: var(--danger); font-weight: 600; }

/* Boutons */
button {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  min-height: 2.75rem;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--text); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  font-weight: 600;
}
button.quiet { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
button.quiet:hover:not(:disabled) { border-color: var(--rule); }
button.small { min-height: 2.25rem; padding: 0.25rem 0.5rem; }
button.icon { min-width: 2.75rem; padding: 0.25rem; }
button.stress { min-width: 2.75rem; font-size: 1.25rem; line-height: 1; padding: 0.25rem; }
button.voice.recording { border-color: var(--danger); color: var(--danger); font-weight: 600; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Voix, images, problèmes */
.voice-box { margin-top: 0.4rem; }
.voice-box:empty, .page-issues:empty, .answer-issues:empty { display: none; }
.timer { color: var(--muted); font-variant-numeric: tabular-nums; }
.stale { color: var(--danger); font-size: 0.9375rem; flex-basis: 100%; }
.thumb {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: #FFFFFF;
}
.issue {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 0.35rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--danger);
}
.page-issues .issue:first-child { margin-top: 0.75rem; }

/* Compte professeur (sur le serveur Sova seulement) */
.account h3 { margin: 0.25rem 0 0.25rem; font-size: 1.05rem; }
.account .actions { margin-top: 0.75rem; }
.account-message:empty { display: none; }
.account-message { margin-top: 0.5rem; font-size: 0.9375rem; }
.account-message.error {
  color: var(--danger);
  font-weight: 600;
  padding-left: 0.5rem;
  border-left: 3px solid var(--danger);
}
.account-message.info { color: var(--muted); }
button.danger { color: var(--danger); }

/* Leçons en ligne (professeur connecté, sur le serveur Sova seulement) */
.online-share { margin-bottom: 0.75rem; }
.online-link { margin: 0 0 0.5rem; font-weight: 600; overflow-wrap: anywhere; }

/* Mes leçons : la bibliothèque (lot P1, professeur connecté) */
.intro.compact .lead, .intro.compact .steps { display: none; }
.library-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.library-head h2 { flex: 1 1 10rem; }
.library-search input { width: 100%; }
input[type="search"] {
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  min-height: 2.75rem;
}
.library-filters:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
button.chip { min-height: 2.25rem; padding: 0.2rem 0.75rem; border-radius: 999px; }
button.chip[aria-pressed="true"] {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.library-list { margin-top: 0.75rem; }
.library-lessons { list-style: none; margin: 0; padding: 0; }
.library-lessons li { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.library-lessons li:first-child { border-top: 0; }
button.library-title {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 2.25rem;
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.library-meta, .library-status { color: var(--muted); font-size: 0.9375rem; }
.library-status a { color: var(--text); overflow-wrap: anywhere; }
.library-lessons .actions { margin-top: 0.25rem; gap: 0.25rem; }
.library-lessons button.quiet { min-height: 2.25rem; padding: 0.2rem 0.5rem; }
.save-status { color: var(--muted); font-size: 0.9375rem; }
.save-status.error { color: var(--danger); font-weight: 600; }
.conflict {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--danger);
  border-radius: 12px;
  background: var(--surface);
}
.conflict p { font-weight: 600; }
.conflict .actions { margin-top: 0.5rem; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.lesson-meta .field { flex: 1 1 12rem; }
.lesson-meta select { width: 100%; }

/* Mes classes (professeur connecté, sur le serveur Sova seulement) */
.classes .actions { margin-top: 0.75rem; }
.classes h3 { margin: 0.75rem 0 0.25rem; font-size: 1.15rem; }
.class-list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.class-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}
.class-list li:first-child { border-top: 0; padding-top: 0; }
.class-summary { flex: 1 1 12rem; }
.class-name { font-weight: 600; }
.class-code {
  margin: 0.25rem 0 0.5rem;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.class-lessons { border: 0; padding: 0; margin: 1.25rem 0 0; min-width: 0; }
.class-lessons legend { font-size: 1.15rem; }
.class-lessons .check { margin-top: 0.5rem; }
.class-results { margin-top: 1.25rem; }
.results-wrap { overflow-x: auto; margin-top: 0.5rem; }
table.results { border-collapse: collapse; min-width: 100%; }
table.results th, table.results td {
  text-align: left;
  vertical-align: top;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
table.results thead th { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.results .stars { color: var(--accent); font-size: 1.125rem; letter-spacing: 0.05em; }
.results summary { cursor: pointer; list-style: none; min-height: 1.75rem; }
.results summary::-webkit-details-marker { display: none; }
.results .missed {
  margin-top: 0.25rem;
  max-width: 14rem;
  white-space: normal;
  font-size: 0.9375rem;
  color: var(--muted);
}
.empty-cell { color: var(--muted); }

/* Devoirs, « En retard », « Mots les plus ratés », détail d'un élève (lots
   P2 et P3). Pas de cadre dans la carte : des filets seulement. */
.class-late, .class-assignments, .class-missed { margin-top: 1.25rem; }
.class-late h3 { color: var(--danger); }
.late-list, .assignment-list, .student-lessons, .attempts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.late-list li { padding: 0.2rem 0; }
.assignment-list > li, .student-lessons > li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}
.assignment-list > li:first-child, .student-lessons > li:first-child { border-top: 0; }
.assignment-title { font-weight: 600; }
.assignment-meta { color: var(--muted); font-size: 0.9375rem; }
.assignment-meta.late { color: var(--danger); font-weight: 600; }
.assignment-list .actions { margin-top: 0.25rem; gap: 0.25rem; }
.assign-form { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
.assign-form legend { font-size: 1.05rem; }
.assign-fields { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.assign-fields .field { flex: 1 1 12rem; }
.assign-fields select { width: 100%; }
input[type="date"] {
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  min-height: 2.75rem;
}
.due-edit { margin-top: 0.5rem; }
.due-edit .field { margin-top: 0; }
.missed-words { margin: 0.25rem 0 0; padding-left: 1.75rem; columns: 2 14rem; }
.missed-words li { padding: 0.15rem 0; break-inside: avoid; }
.missed-word { font-weight: 600; margin-right: 0.5rem; }
button.name-link {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 2.25rem;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.classes h4 { margin: 1.25rem 0 0.25rem; font-size: 1.05rem; }
.classes h3:focus { outline: none; }
.classes h3:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.student-unit, .student-progress { margin-top: 0.5rem; }
.student-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.student-progress .note { font-size: 0.9375rem; }
.sparkline { display: block; max-width: 100%; height: auto; }
.sparkline polyline { stroke: var(--accent); }
.attempts { margin-top: 0.25rem; }
.attempts li { font-size: 0.9375rem; padding: 0.1rem 0; }
.attempts .stars { color: var(--accent); letter-spacing: 0.05em; }
.print-only { display: none; }

/* Espace de classe (lot P6) : onglets de la classe ouverte, annonces,
   messages (bulles du professeur à droite, de l'élève à gauche), cours en
   visio, consigne et appréciation. Pas de cadre dans la carte : des filets,
   et la teinte des bulles. */
.classes .tabs { margin-top: 0.5rem; }
.space-panel > .check:first-child, .space-panel > p:first-child { margin-top: 0; }
.counter { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 600; }
.space-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.space-list > li { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.space-list > li:first-child { border-top: 0; }
.space-list .actions { margin-top: 0.25rem; gap: 0.25rem; }
.space-text, .assignment-note, .bubble-text { white-space: pre-line; overflow-wrap: anywhere; }
.space-meta { color: var(--muted); font-size: 0.9375rem; overflow-wrap: anywhere; }
.assignment-note { margin-top: 0.25rem; font-size: 0.9375rem; }
button.link-button {
  min-height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.unread-count { font-weight: 600; }
.class-summary .unread-count { display: block; margin-top: 0.15rem; }
.conversation-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.75rem; }
.write-to { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 1rem; margin-top: 1rem; }
.write-to .field { flex: 1 1 12rem; margin-top: 0; }
.write-to select { width: 100%; }
.thread-panel h4 { margin-top: 0.75rem; }
.thread { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.bubble {
  align-self: flex-start;
  max-width: min(85%, 36rem);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: var(--bubble);
}
.bubble.from-teacher { align-self: flex-end; background: var(--bubble-own); }
.bubble-text.removed { font-style: italic; color: var(--muted); }
.bubble-meta { margin-top: 0.15rem; font-size: 0.875rem; color: var(--muted); }
.report-excerpt { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.report-excerpt li + li { margin-top: 0.5rem; }
.report-excerpt li.reported { padding-left: 0.5rem; border-left: 3px solid var(--danger); }
.admin-reports > p { margin-top: 0.5rem; font-weight: 600; font-size: 0.9375rem; }
.admin-reports > p:first-child { margin-top: 0; }
.admin-reports blockquote.reported { color: var(--text); }
.admin-reports details { margin-top: 0.5rem; }
.admin-reports summary { cursor: pointer; min-height: 2.25rem; }

/* Administration (administrateur seulement, sur le serveur Sova) */
.tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0.25rem 0 0.75rem;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
}
.tabs .tab {
  flex: none;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 0.45rem 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}
.tabs .tab:hover:not(:disabled) { color: var(--text); }
.tabs .tab.selected { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.admin-panel:focus { outline: none; }
.admin-panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.admin h3 { margin: 1.25rem 0 0.25rem; font-size: 1.05rem; }
.admin .actions { margin-top: 0.5rem; }
.admin .actions button.quiet { text-align: left; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}
.admin-list > li:first-child { border-top: 0; padding-top: 0; }
.admin-list .actions { margin-top: 0; }
.admin-summary { flex: 1 1 14rem; min-width: 0; }
.admin-name { font-weight: 600; overflow-wrap: anywhere; }
.admin-summary .note { font-size: 0.9375rem; overflow-wrap: anywhere; }
a.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
a.button:hover { border-color: var(--text); }
.admin-reports { flex-basis: 100%; list-style: none; margin: 0; padding: 0 0 0 0.75rem; border-left: 3px solid var(--rule); }
.admin-reports li + li { margin-top: 0.5rem; }
.admin-reports blockquote { margin: 0.15rem 0 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.admin-stats { margin: 0; }
.admin-stats > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--rule);
}
.admin-stats > div:first-child { border-top: 0; padding-top: 0; }
.admin-stats dt { flex: 0 0 11rem; color: var(--muted); }
.admin-stats dd { flex: 1 1 12rem; margin: 0; font-variant-numeric: tabular-nums; }

/* Partage */
.share > .note { margin-top: 0.5rem; }
.status {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 30rem) {
  .screen { padding: 1.25rem 0.75rem 6rem; }
  h1 { font-size: 1.5rem; }
  .card { padding: 0.75rem; }
  .item-fields { grid-template-columns: 1fr; }
  .tabs { gap: 0; }
  .tabs .tab { padding: 0.45rem 0.45rem; font-size: 0.9375rem; }
}

/* Modèles et mots du cours (lot P4) : choix du modèle d'une nouvelle
   leçon (fenêtre), panneau « Ajouter des mots du cours » d'une page de
   vocabulaire, ligne d'une page qui se remplit d'après une autre. */
dialog.chooser {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
dialog.chooser::backdrop { background: rgba(14, 20, 40, 0.55); }
dialog.chooser h2 { margin-bottom: 0.75rem; }
.templates { display: grid; gap: 0.5rem; }
button.template {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.65rem 0.8rem;
  text-align: left;
}
.template-name { font-weight: 600; }
.template-hint { color: var(--muted); font-size: 0.9375rem; }
dialog.chooser .actions { margin-top: 0.75rem; justify-content: flex-end; }
.paste-tools, .course-tools { display: contents; }
.course-panel { flex-basis: 100%; }
.course-panel input[type="search"] { width: 100%; }
.course-results { margin-top: 0.5rem; }
.course-results:empty { display: none; }
.course-list { list-style: none; margin: 0; padding: 0; }
.course-list li + li { margin-top: 0.25rem; }
button.course-word {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border-color: var(--rule);
}
button.course-word .ru { font-size: 1.0625rem; font-weight: 600; }
button.course-word .meta { color: var(--muted); font-size: 0.9375rem; }
.course-lesson { margin-top: 0.75rem; }
.course-selects { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.course-selects .field { flex: 1 1 12rem; min-width: 0; }
.course-selects select { width: 100%; }
.course-preview { margin-top: 0.5rem; }
.course-lesson .actions, .course-panel > .actions { margin-top: 0.75rem; }
.link-hint { margin: 0.5rem 0 0; }

/* Fiche du QR code en plein écran, à projeter en classe : titre, QR code,
   où le scanner ; toujours noir sur blanc (le thème sombre ne s'applique
   pas : le QR code se lit mieux ainsi). */
body.sheet-open { overflow: hidden; }
.qr-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  overflow: auto;
  background: #FFFFFF;
  color: #000000;
  text-align: center;
}
.qr-sheet .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #FFFFFF;
  color: #000000;
  border-color: #000000;
}
.qr-sheet .brand { margin: 0; color: #000000; }
.qr-sheet h1 { margin: 0; font-size: clamp(1.5rem, 4vmin, 2.5rem); }
.qr-sheet .qr-picture svg {
  display: block;
  width: min(calc(100vh - 13rem), calc(100vw - 2rem), 40rem);
  min-width: 12rem;
  height: auto;
}
.qr-sheet .instruction { font-size: clamp(1rem, 2.5vmin, 1.5rem); max-width: 40rem; }
.qr-sheet .class-code-big {
  margin: 0;
  font-size: clamp(3rem, 16vmin, 12rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.qr-sheet :focus-visible { outline-color: #000000; }

/* Impression depuis la fiche (Ctrl+P) : la fiche seule. */
/* Lot S6 : pied de page du serveur Sova (pages publiques). */
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: inherit; }
@media print {
  .site-footer { display: none !important; }
  body.sheet-open { background: #FFFFFF; color: #000000; }
  body.sheet-open .screen, .status { display: none !important; }
  .qr-sheet { position: static; display: block; padding-top: 2cm; }
  .qr-sheet .close { display: none; }
  .qr-sheet h1 { font-size: 24pt; margin: 0.5cm 0 1cm; }
  .qr-sheet .qr-picture svg { width: 9cm; height: 9cm; min-width: 0; margin: 0 auto 1cm; }
  .qr-sheet .instruction { font-size: 14pt; max-width: 15cm; margin: 0 auto; }
  .qr-sheet .class-code-big { font-size: 72pt; margin: 1cm 0; }

  /* « Imprimer » une classe ou un élève (lot P3) : A4, noir sur blanc,
     la classe seule, sans boutons ni formulaires. */
  @page { size: A4; margin: 15mm; }
  body.print-classes { background: #FFFFFF; color: #000000; font-size: 11pt; }
  body.print-classes .intro,
  body.print-classes main > :not(.classes),
  body.print-classes .classes > h2,
  body.print-classes .no-print,
  body.print-classes .account-message { display: none !important; }
  body.print-classes .screen { max-width: none; padding: 0; }
  body.print-classes .classes { border: 0; border-radius: 0; padding: 0; margin: 0; }
  body.print-classes .classes * {
    color: #000000 !important;
    background: transparent !important;
    border-color: #000000 !important;
  }
  body.print-classes .print-only { display: block; }
  body.print-classes .class-code { font-size: 18pt; }
  body.print-classes button.name-link { text-decoration: none; min-height: 0; }
  body.print-classes .results-wrap { overflow: visible; }
  body.print-classes table.results th,
  body.print-classes table.results td { border: 1px solid #000000; white-space: normal; }
  body.print-classes .sparkline polyline { stroke: #000000; }
  body.print-classes li, body.print-classes tr { break-inside: avoid; }
}
