/* 0.9.17 — lot « copie et carnet » (docs/lots-0.9.17/CONTRAT.md) : la barre de la copie plus basse,
   l'orthographe corrigée en rouge par l'enseignant, la discussion d'une note du carnet. */

/* ---------- la barre de la copie (teacher/copy.js, note 89110f3b du 13 novembre : « réduire la
   taille du volet du haut pour mieux voir la fiche ! ») : une seule ligne de 44 pixels de haut
   (cibles au doigt), la rangée des prénoms sur cette ligne, qui défile de côté ; « ⋯ » ouvre une
   seconde ligne (l'activité, imprimer, PDF). Sur un écran étroit (iPad debout, téléphone), « ‹ 3 / 8 › »
   et les prénoms passent au-dessus, sur leur ligne à eux. */
.viewer-bar.cv-barre { display: block; padding: 6px 12px; }
.cv-barre .cv-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
/* (la navigation : flèches et rang, 140 pixels, et au moins un prénom ; elle prend la place qui reste) */
.viewer-bar.cv-barre .cv-nav { flex: 1 1 252px; min-width: 252px; gap: 6px; }
.cv-barre .cv-fleche { width: 44px; height: 44px; border-radius: 12px; font-size: 28px; }
.cv-barre .cv-rang { min-width: 46px; font-size: 15px; }
/* (les prénoms coupés au bord de la rangée s'effacent : on voit qu'elle défile) */
.cv-barre .cv-puces { min-width: 100px; -webkit-mask-image: linear-gradient(to right, transparent, #000 10px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(to right, transparent, #000 10px, #000 calc(100% - 14px), transparent); padding-inline: 10px 14px; }
.cv-barre .cv-puce { min-height: 44px; padding: 4px 12px; }
.cv-barre .cv-qui { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.viewer-bar.cv-barre .title { margin: 0; font-size: 17px; max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-barre .cv-ligne > .tag { flex: none; }
/* (la place libre va à la rangée des prénoms : plus de prénoms visibles) */
.cv-barre .cv-ligne > .spacer { display: none; }
.cv-barre .score-pill { flex: none; }
.cv-barre .small-check { min-height: 44px; padding: 0 4px; gap: 8px; white-space: nowrap; flex: none; cursor: pointer; }
/* (le contour du zoom dessiné en dedans : ses deux boutons gardent 44 pixels de haut) */
.cv-barre .zoom-group { height: 44px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); }
.cv-barre .zoom-group button { min-width: 44px; }
.cv-barre .cv-plus-btn { flex: none; width: 44px; min-height: 44px; padding: 0; }
.cv-barre .cv-plus-btn .ico { width: 22px; height: 22px; }
.cv-barre .cv-plus-btn[aria-expanded="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.cv-barre .cv-plus { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.cv-barre .cv-plus .btn { min-height: 44px; }
.cv-barre .cv-plus .cp-criteres { align-items: center; }
.cv-barre .cv-activite { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--ink-2); }
.cv-barre .cp-avert { margin: 6px 0 0; }
@media (max-width: 980px) {
  .viewer-bar.cv-barre .cv-nav { order: -1; flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .viewer-bar.cv-barre { padding: 6px 10px; }
  .viewer-bar.cv-barre .title { font-size: 16px; max-width: 8em; }
}

/* ---------- la barre du site sur un écran peu haut (PC du collège : 1280 × 585) : 4 pixels au lieu de
   10 au-dessus et au-dessous (53 pixels de haut au lieu de 65). Tout ce qu'elle contient reste à 44
   pixels au plus (le logo, les rubriques, « Noter », « Quitter », l'avatar) : rien ne se coupe ; les
   barres collées dessous suivent (--topbar-h, mesurée par app.js à chaque changement de taille). */
@media (max-height: 700px) {
  .topbar, .topbar.slim { padding-top: 4px; padding-bottom: 4px; }
}

/* ---------- la discussion d'une note du carnet (teacher/discussion.js, note 3e2dc5f7 du 19 octobre) :
   tout en haut de la fenêtre, ce qu'elle est (une discussion à part, sur cette note seulement) et
   comment en parler à Claude dans le projet (« ⬇ Exporter cette note »). Clavier de l'iPad ouvert
   (peu de place) : cachée, comme les autres lignes d'information ; le titre le dit encore. */
.disc-apart { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--sky-soft); color: var(--sky-ink); line-height: 1.45; overflow-wrap: anywhere; }
.disc-apart .disc-exporter { display: flex; width: fit-content; max-width: 100%; margin-top: 8px; min-height: 44px; white-space: normal; }
dialog.modal.disc-modal.disc-serre .disc-apart { display: none; }

/* ---------- l'orthographe corrigée en rouge (teacher/orthographe.js, sheet/render.js) : sur la fiche,
   le rouge de l'enseignant (.ink-teacher : penché, comme toute sa correction, ce qui se reconnaît
   aussi sur une photocopie en noir et blanc) au-dessus du trou ou sous la ligne de l'élève, à la place
   de la réponse attendue. Sur la copie de l'enseignant, une réponse tapée se touche pour l'écrire. */
.copy-stage.ortho-actif .sheet:not(.annex) .blank:has(> .ink-student):not([data-trancher]),
.copy-stage.ortho-actif .sheet:not(.annex) .lines:has(> .lines-text.ink-student):not([data-trancher]) { cursor: pointer; }
@media (hover: hover) {
  .copy-stage.ortho-actif .sheet:not(.annex) .blank:has(> .ink-student):not([data-trancher]):hover,
  .copy-stage.ortho-actif .sheet:not(.annex) .lines:has(> .lines-text.ink-student):not([data-trancher]):hover { background-color: rgb(192 57 43 / 7%); border-radius: 3pt; }
}
/* Le petit champ, sous la réponse touchée (dans la page : il défile avec elle). */
.ortho-pop { position: absolute; z-index: 60; width: min(460px, calc(100vw - 16px)); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow-lift, 0 10px 30px rgb(0 0 0 / 18%)); }
.ortho-pop p { margin: 0; }
.ortho-titre { font-family: var(--title-font); font-weight: 700; font-size: 15.5px; color: var(--coral-ink); }
.ortho-eleve { color: var(--ink-2); overflow-wrap: anywhere; }
.ortho-reponse { color: var(--pen); font-weight: 700; }
.ortho-pop .ortho-champ { min-height: 48px; font-size: 17px; color: var(--red); font-weight: 600; }
.ortho-pop textarea.ortho-champ { resize: vertical; line-height: 1.4; }
.ortho-boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ortho-boutons .spacer { flex: 1; }
.ortho-boutons .btn { min-height: 44px; }
/* Dans la liste des réponses (panneau de la copie) : ce qui est écrit en rouge, et le bouton. */
.unit-ortho { color: var(--red); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; margin: 2px 0; }
.unit-ortho-mot { font-weight: 500; color: var(--ink-2); }
.unit-marks:has(> .ortho-btn) { flex-wrap: wrap; }
.unit-marks .ortho-btn { margin-left: auto; min-height: 34px; white-space: nowrap; }
@media (pointer: coarse) { .unit-marks .ortho-btn { min-height: 44px; } }
