/* Tests de français (0.9.5) : l'écran de l'élève (tq-), la page « Tests » (ts-), le bilan (bl-),
   la fluence sur la tablette (fl-). */

/* ---------------------------------------------------------------- couleurs des parties */
.c-sky { --tq: var(--sky); --tq-soft: var(--sky-soft); --tq-ink: #244d9e; }
.c-plum { --tq: var(--plum); --tq-soft: var(--plum-soft); --tq-ink: #4f3596; }
.c-coral { --tq: var(--coral); --tq-soft: var(--coral-soft); --tq-ink: #9a3a25; }
.c-sun { --tq: #9a6a00; --tq-soft: var(--sun-soft); --tq-ink: #7a5600; }
.c-leaf { --tq: var(--leaf); --tq-soft: var(--leaf-soft); --tq-ink: #1d6b41; }
.c-brand { --tq: var(--brand); --tq-soft: var(--brand-soft); --tq-ink: var(--brand-ink); }
.tq[data-partie="ecoute"] { --tq: var(--sky); --tq-soft: var(--sky-soft); --tq-ink: #244d9e; }
.tq[data-partie="mots"] { --tq: var(--plum); --tq-soft: var(--plum-soft); --tq-ink: #4f3596; }
.tq[data-partie="ortho"] { --tq: var(--coral); --tq-soft: var(--coral-soft); --tq-ink: #9a3a25; }
.tq[data-partie="vf"] { --tq: #9a6a00; --tq-soft: var(--sun-soft); --tq-ink: #7a5600; }
.tq[data-partie="textes"] { --tq: var(--leaf); --tq-soft: var(--leaf-soft); --tq-ink: #1d6b41; }
.tq[data-partie="dictee"] { --tq: var(--brand); --tq-soft: var(--brand-soft); --tq-ink: var(--brand-ink); }

/* ---------------------------------------------------------------- l'élève : accueil */
.test-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin: 18px 0; padding: 24px 26px; border-radius: var(--radius); background: linear-gradient(135deg, var(--sky-soft), var(--leaf-soft)); box-shadow: var(--shadow); }
.test-invite h2 { font-size: calc(24px * var(--taille, 1)); margin-bottom: 4px; }
.test-invite p { margin: 0; color: var(--ink-2); }
.test-invite-art { font-size: calc(56px * var(--taille, 1)); line-height: 1; animation: tq-float 3.2s ease-in-out infinite; }

/* ---------------------------------------------------------------- l'élève : le test */
body.in-test .topbar .btn.back { display: none; }
.tq { max-width: 960px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-left)) 70px; --tq: var(--brand); --tq-soft: var(--brand-soft); --tq-ink: var(--brand-ink); }
.tq-wait { pointer-events: none; opacity: .55; transition: opacity .2s; }
.tq-top { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 10px 18px; border-radius: 18px; background: var(--tq-soft); color: var(--tq-ink); }
.tq-emo { font-size: 30px; line-height: 1; }
.tq-part { font-size: 13px; font-weight: 600; letter-spacing: .02em; opacity: .8; }
.tq-title { font-family: var(--title-font); font-weight: 700; font-size: 19px; }
.tq-dots { display: flex; gap: 7px; }
.tq-dots span { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid var(--tq); opacity: .55; }
.tq-dots span.on { background: var(--tq); opacity: 1; }
.tq-dots span.now { opacity: 1; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tq); }
.tq-card { background: var(--paper); border-radius: 26px; box-shadow: var(--shadow-lift); padding: 30px clamp(18px, 4vw, 40px); }
.tq-center { display: grid; justify-items: center; text-align: center; gap: 14px; }
.tq-center h1 { font-size: clamp(26px, 4vw, 34px); }
.tq-big-emoji { font-size: 66px; line-height: 1; animation: tq-float 3.2s ease-in-out infinite; }
.tq-lead { font-size: 21px; line-height: 1.5; max-width: 44ch; margin: 0; }
.tq-step-label { margin: 10px 0 0; font-weight: 600; color: var(--ink-2); }
.tq-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tq-plan { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0; padding: 0; list-style: none; counter-reset: tq; }
.tq-plan li { counter-increment: tq; padding: 8px 16px; border-radius: 999px; background: var(--bg); font-weight: 600; }
.tq-plan li::before { content: counter(tq) ". "; color: var(--muted); }
.tq-help { background: var(--sun-soft); border-radius: 16px; padding: 14px 18px; text-align: left; font-size: 18px; }
.tq-help p { margin: 4px 0; }
/* 0.9.8.2 : l'essai du son à deux voix (un son de Gemini, la voix de l'ordinateur : les deux doivent
   sortir du casque). Les deux boutons sur une ligne, l'un sous l'autre sur un écran étroit. */
.tq-essai { display: grid; justify-items: center; gap: 12px; width: min(100%, 640px); margin-top: 4px; padding: 18px clamp(12px, 3vw, 24px) 20px; border-radius: 22px; background: var(--bg); }
.tq-essai .tq-step-label { margin: 0; }
.tq-essai-texte { margin: 0; max-width: 36ch; font-size: 19px; line-height: 1.45; }
.tq-deux-voix { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; }
.tq-deux-voix .tq-listen { flex: 1 1 210px; max-width: 280px; justify-content: center; }
.tq-voix1 { --tq: var(--sky); }
.tq-voix2 { --tq: var(--plum); }
.tq-listen.tq-entendue::after { content: '✓'; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--leaf); font-size: 18px; font-weight: 700; }
.tq-essai .tq-row .btn { max-width: 100%; white-space: normal; text-wrap: balance; }
.tq-essai .tq-help { width: 100%; }
.tq-help .tq-help-prof { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #d8c27e; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
/* 0.9.8.3 : la voix 1 pas encore préparée par Gemini : une petite ligne discrète pour l'enseignant
   (0.9.9 : en bas de la carte, plus petite). */
.tq-voix1-pas-preparee { margin: 0; max-width: 100%; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
/* 0.9.9 (audit E6, M5) : l'accueil tient sur un écran de PC de 1366 × 768 (avant : 985 pixels).
   Moins d'espace ; les trois parties en une ligne de texte ; l'essai du son plus large, pour que
   le bouton vert et « Je n'entends pas les deux » tiennent côte à côte ; sous le bouton grisé, la
   ligne qui dit pourquoi. Le bas de la page ne garde plus la place du message « Connexion perdue »
   (il passe par-dessus, le temps de reprendre). */
.page.focus:has(> .tq[data-kind="accueil"]) { padding-bottom: 0; }
.tq[data-kind="accueil"] { min-height: calc(100vh - var(--topbar-h, 57px)); min-height: calc(100dvh - var(--topbar-h, 57px)); padding-top: 12px; padding-bottom: 12px; }
.tq-welcome { gap: 10px; padding-top: 16px; padding-bottom: 14px; }
.tq-welcome .tq-big-emoji { font-size: 44px; }
.tq-welcome .tq-lead { max-width: 58ch; }
.tq-welcome .tq-plan { gap: 2px 20px; margin: 0; }
.tq-welcome .tq-plan li { padding: 0; background: none; font-size: 16px; color: var(--ink-2); }
.tq-welcome .tq-essai { width: min(100%, 720px); gap: 10px; margin-top: 2px; padding: 14px clamp(12px, 3vw, 24px); }
.tq-welcome .tq-essai-texte { max-width: 100%; text-wrap: balance; }
.tq-welcome .tq-listen.big { padding-top: 9px; padding-bottom: 9px; }
.tq-welcome .tq-row { align-items: flex-start; }
.tq-oui { display: grid; justify-items: center; gap: 4px; max-width: 100%; }
.tq-attente { margin: 0; font-size: 15px; line-height: 1.35; color: var(--ink-2); }
/* 0.9.8.1 : un son que l'ordinateur ne peut pas lire en français (pas de voix française) : en grand */
.tq-novoice { width: 100%; display: grid; justify-items: center; gap: 12px; padding: 20px clamp(16px, 3vw, 28px); border: 3px solid var(--coral); border-radius: 20px; background: var(--coral-soft); text-align: center; }
.tq-novoice-emoji { font-size: 52px; line-height: 1; }
.tq-novoice-text { margin: 0; max-width: 34ch; font-family: var(--title-font); font-weight: 700; font-size: clamp(22px, 3vw, 28px); line-height: 1.35; color: #8a2f1c; }
.tq-qzone:has(> .tq-novoice:not([hidden])) :is(.tq-choices, .tq-actions), .tq-dictee:has(> .tq-novoice:not([hidden])) :is(.tq-input, .tq-actions) { opacity: .45; }
.btn.tq-yes { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.btn.tq-yes:hover:not(:disabled) { background: #1f7243; border-color: #1f7243; }
.tq-go { margin-top: 6px; }

/* le bouton « écouter » */
.tq-listen { display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 999px; padding: 10px 22px 10px 10px; background: var(--tq); color: #fff; font-family: var(--title-font); font-weight: 600; font-size: 18px; box-shadow: 0 4px 14px rgb(0 0 0 / 12%); transition: transform .1s; }
.tq-listen:active:not(:disabled) { transform: scale(.97); }
.tq-listen:disabled { opacity: .45; cursor: default; }
.tq-listen.big { font-size: 22px; padding: 14px 30px 14px 14px; }
.tq-listen-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--tq); }
.tq-listen.big .tq-listen-ico { width: 54px; height: 54px; }
.tq-listen-ico .ico { width: 26px; height: 26px; }
.tq-listen.playing .tq-listen-ico { animation: tq-pulse 1s ease-in-out infinite; }
.tq-listen-left { font-family: var(--ui-font); font-weight: 500; font-size: 13px; opacity: .85; }
.tq-listen-left:empty { display: none; }

/* questions */
.tq-q { padding-top: 26px; }
.tq-qzone { display: grid; justify-items: center; gap: 16px; }
.tq-question { font-family: var(--title-font); font-weight: 700; font-size: clamp(22px, 3vw, 27px); text-align: center; margin: 4px 0; max-width: 34ch; }
.tq-sentence { font-size: clamp(24px, 3.4vw, 31px); text-align: center; line-height: 1.6; margin: 6px 0; }
.tq-gap { display: inline-block; min-width: 4.2em; border-bottom: 4px dashed var(--tq); color: var(--tq); font-weight: 700; text-align: center; }
.tq-choices { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tq-choices.long, .tq-with-story .tq-choices { grid-template-columns: 1fr; }
.tq-ortho .tq-choices { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tq-ortho .tq-choice { text-align: center; padding: 16px; font-size: 27px; }
.tq-choice-wrap { position: relative; }
.tq-choice { width: 100%; min-height: 78px; padding: 14px 64px 14px 20px; border: 3px solid #8a949c; border-radius: 20px; background: #fff; text-align: left; font-size: 22px; line-height: 1.3; transition: border-color .12s, background .12s, box-shadow .12s, transform .08s; }
.tq-choice:hover:not(:disabled) { border-color: color-mix(in srgb, var(--tq) 45%, var(--line)); }
.tq-choice:active:not(:disabled) { transform: scale(.99); }
.tq-choice[aria-pressed="true"], .tq-choice[aria-pressed="true"]:hover:not(:disabled) { border-color: var(--tq); background: var(--tq-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tq) 22%, transparent); }
.tq-choice.good { border-color: var(--leaf); background: var(--leaf-soft); }
.tq-choice.bad { border-color: var(--coral); background: var(--coral-soft); }
.tq-choice:disabled { cursor: default; color: var(--ink); }
.tq-choices.words .tq-choice { text-align: center; padding: 16px; font-size: clamp(26px, 4vw, 34px); letter-spacing: .03em; font-family: Verdana, 'Segoe UI', Arial, sans-serif; }
.tq-say { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tq-soft); color: var(--tq-ink); }
.tq-say .ico { width: 22px; height: 22px; }
.tq-say.inline { position: static; transform: none; display: inline-grid; width: 36px; height: 36px; vertical-align: middle; }
/* 0.9.10 : la réponse lue en ce moment (écoute, du CP au CE2, banque 5) */
.tq-choice-wrap.tq-lu .tq-choice { border-color: var(--tq); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tq) 22%, transparent); }
.tq-choice-wrap.tq-lu .tq-say { background: var(--tq); color: #fff; }
.tq-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; width: 100%; }
.tq-ok { min-width: 200px; }
.tq-dunno { font-size: 16px; }
.tq-feedback { width: 100%; display: grid; justify-items: center; gap: 6px; padding: 16px; border-radius: 18px; text-align: center; font-size: 19px; }
.tq-feedback p { margin: 0; }
.tq-feedback.yes { background: var(--leaf-soft); }
.tq-feedback.no { background: var(--sun-soft); }
.tq-feedback-line { min-height: 1.6em; font-size: 20px; font-weight: 600; margin: 0; }
.tq-feedback-line.yes { color: #1d6b41; }
.tq-feedback-line.no { color: #9a3a25; }

/* histoires */
.tq-instruction { font-size: 19px; text-align: center; margin: 0 0 16px; }
.tq-with-story { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tq-story { text-align: left; background: #fffdf6; border: 2px solid var(--line-2); border-radius: 20px; padding: 18px 22px; font-size: 19px; line-height: 1.7; max-height: calc(100vh - 230px); overflow: auto; }
.tq-story h2 { font-size: 21px; margin: 0 0 8px; }
.tq-story p { margin: 0 0 .7em; }
.tq-story.big { font-size: 22px; line-height: 1.75; max-width: 66ch; margin: 0 auto; max-height: none; padding: 24px 30px; }
.tq-story.listen { display: grid; justify-items: center; text-align: center; gap: 10px; background: var(--leaf-soft); border-color: transparent; position: sticky; top: calc(var(--topbar-h, 60px) + 12px); }
.tq-story-art { font-size: 46px; }
body.comfort-dys .tq-story, body.comfort-dys .tq-sentence, body.comfort-dys .tq-vf-sentence { letter-spacing: .05em; word-spacing: .14em; line-height: 1.9; }
.tq-waves { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.tq-waves span { width: 9px; height: 12px; border-radius: 5px; background: var(--tq); opacity: .35; }
.tq-waves.on span { opacity: 1; animation: tq-wave 1s ease-in-out infinite; }
.tq-waves.on span:nth-child(2) { animation-delay: .15s; }
.tq-waves.on span:nth-child(3) { animation-delay: .3s; }
.tq-waves.on span:nth-child(4) { animation-delay: .45s; }
.tq-waves.on span:nth-child(5) { animation-delay: .6s; }

/* vrai ou faux */
.tq-vf { display: grid; justify-items: center; gap: 16px; width: 100%; }
.tq-vf-count { margin: 0; }
.tq-vf-sentence { font-size: clamp(26px, 4vw, 34px); line-height: 1.4; min-height: 3em; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0; max-width: 26ch; }
.tq-vf-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.tq-vf-btn { min-width: 190px; min-height: 86px; border: 0; border-radius: 24px; color: #fff; font-family: var(--title-font); font-weight: 700; font-size: 28px; box-shadow: 0 6px 16px rgb(0 0 0 / 14%); transition: transform .08s; }
.tq-vf-btn:active:not(:disabled) { transform: scale(.97); }
.tq-vf-btn:disabled { opacity: .5; }
.tq-vf-btn.vrai { background: var(--leaf); }
.tq-vf-btn.faux { background: var(--coral); }
.tq-skip { font-size: 16px; }
.tq-timebar { width: 170px; height: 12px; border-radius: 999px; background: rgb(255 255 255 / 75%); overflow: hidden; }
.tq-timebar span { display: block; height: 100%; width: 100%; background: var(--tq); border-radius: 999px; transition: width .25s linear; }
.tq-timebar.low span { background: var(--sun); } /* (0.9.10 : plus de rouge, moins de pression) */

/* dictée */
.tq-input { width: min(560px, 100%); font-size: 32px; text-align: center; padding: 14px 18px; border: 3px solid var(--line); border-radius: 18px; background: #fff; font-family: Verdana, 'Segoe UI', Arial, sans-serif; }
.tq-input:focus { outline: none; border-color: var(--tq); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tq) 20%, transparent); }
.tq-input.phrase { font-size: 24px; text-align: left; resize: none; width: 100%; }
/* 0.9.10 : la barre des lettres accentuées de la dictée (au doigt : 48 px) */
.tq-accents { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(640px, 100%); }
.tq-accent { min-width: 48px; min-height: 48px; padding: 0 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 24px; line-height: 1; font-family: Verdana, 'Segoe UI', Arial, sans-serif; cursor: pointer; touch-action: manipulation; }
.tq-accent:hover { border-color: var(--tq); }
.tq-accent:active { background: var(--tq-soft); }
.tq-accent:focus-visible { outline: 3px solid var(--tq); outline-offset: 2px; }
/* 0.9.11 : l'apostrophe (’), un signe tout petit à côté d'une lettre : plus grande et plus grasse, pour
   qu'un élève la reconnaisse sur la touche */
.tq-accent.apostrophe { font-size: 34px; font-weight: 700; }

/* pauses et réseau */
.tq-breathe { display: grid; place-items: center; width: 140px; height: 140px; }
.tq-breathe span { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--sky-soft) 40%, var(--sky)); animation: tq-breathe 8s ease-in-out infinite; }
.tq-net { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; margin: 0; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lift); }

@keyframes tq-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes tq-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes tq-wave { 0%, 100% { height: 12px; } 50% { height: 44px; } }
@keyframes tq-breathe { 0%, 100% { transform: scale(.55); } 45%, 55% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .tq-big-emoji, .test-invite-art, .tq-listen.playing .tq-listen-ico, .tq-waves.on span { animation: none; }
  .tq-breathe span { animation-duration: 16s; }
}
@media (max-width: 760px) {
  .tq-with-story { grid-template-columns: 1fr; }
  .tq-story { max-height: 42vh; }
  .tq-story.listen { position: static; }
  .tq-choices { grid-template-columns: 1fr; }
  .tq-card { border-radius: 20px; padding: 22px 16px; }
  .tq-top { padding: 8px 12px; }
  .tq-vf-btn { min-width: 140px; min-height: 76px; font-size: 24px; }
}

/* ---------------------------------------------------------------- enseignant : la page « Tests » */
.ts-layout { display: grid; gap: 18px; }
.ts-today { display: grid; gap: 12px; }
.ts-today .row { gap: 8px; }
.ts-list { padding: 6px 0; overflow: hidden; }
.ts-row { display: grid; grid-template-columns: 34px minmax(170px, 1.3fr) 118px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(90px, .6fr) 92px; align-items: center; gap: 10px 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.ts-row:last-child { border-bottom: 0; }
.ts-row.head { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 4px; padding-bottom: 6px; }
.ts-row.essai { background: #faf8f2; }
.ts-row.absent .ts-who strong { color: var(--muted); text-decoration: line-through; }
/* 0.9.9 (audit du 13 octobre) : 28 px au lieu de 24 (la cellule autour se touche aussi) */
.ts-check { width: 28px; height: 28px; accent-color: var(--brand); }
.ts-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ts-who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-who small { color: var(--muted); }
.ts-depart { min-height: 38px; padding: 4px 10px; font-size: 15px; }
.ts-seance { display: grid; gap: 4px; font-size: 14px; min-width: 0; }
.ts-s2 { display: grid; gap: 4px; min-width: 0; }
.ts-s2 .check { font-size: 13.5px; }
.ts-state { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); }
.ts-state.ouverte { background: var(--sun-soft); color: #7a5600; }
.ts-state.en-cours { background: var(--sky-soft); color: #244d9e; }
.ts-state.finie { background: var(--leaf-soft); color: #1d6b41; }
.ts-state.fermee { background: var(--bg-2); color: var(--ink-2); }
.ts-levels { display: flex; flex-wrap: wrap; gap: 4px; }
.ts-levels .tag { font-size: 12px; padding: 1px 8px; }
/* 0.9.8.3 : le complément d'une séance (son état, « ➕ Paliers 4e et 3e ») ; le bouton passe à la
   ligne plutôt que de dépasser de sa colonne (iPad). */
.ts-comp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.ts-comp-btn { white-space: normal; text-align: left; max-width: 100%; border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.ts-comp-btn:hover:not(:disabled) { border-color: var(--brand-deep); background: var(--brand-soft); }
/* 0.9.8.3 : « ➕ Paliers 4e et 3e » pour les élèves cochés, comme le bouton d'une ligne */
.ts-comp-tous { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.ts-comp-tous:hover:not(:disabled) { border-color: var(--brand-deep); background: var(--brand-soft); }
@media (pointer: coarse) { .ts-comp-btn { min-height: 40px; } }
.ts-flu { font-size: 14px; }
.ts-flu strong { font-size: 17px; }
.ts-howto ol { margin: 6px 0 0; padding-left: 22px; }
.ts-howto li { margin: 4px 0; }
.ts-voice { display: grid; gap: 14px; }
.ts-voice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ts-progress { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.ts-progress span { display: block; height: 100%; background: var(--leaf); border-radius: 999px; transition: width .4s; }
.ts-key { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ts-key .input { max-width: 340px; }
.ts-suivi { display: grid; gap: 8px; }
.ts-suivi p { margin: 0; }
.ts-etat { font-weight: 600; color: var(--ink-2); }
.ts-etat.attente { color: #8a5a00; }
.ts-derniere { overflow-wrap: anywhere; }
.ts-voice select:disabled { opacity: .6; cursor: not-allowed; }
/* 0.9.8.3 : l'essai des mots seuls en français imposé (5 mots demandés à Gemini) : une ligne par mot,
   ▶ le son de Gemini, 🗣 la voix de l'iPad, puis ce qui s'est passé (le refus, en clair). Au doigt
   sur l'iPad ; rien ne dépasse (messages de Google coupés à la ligne). */
.ts-essai { display: grid; gap: 10px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--line-2); }
.ts-essai h3 { margin: 0; font-size: 17px; }
.ts-essai p { margin: 0; }
.ts-essai-aide { max-width: 80ch; }
.ts-essai .row > .muted, .ts-essai-message { min-width: 0; overflow-wrap: anywhere; }
.ts-essai-mots { display: grid; min-width: 0; }
.ts-essai-mot { display: grid; grid-template-columns: 130px auto minmax(0, 1fr); align-items: center; gap: 6px 14px; padding: 6px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.ts-essai-mot:first-child { border-top: 0; }
.ts-essai-texte { font-family: var(--title-font); font-size: 20px; overflow-wrap: anywhere; }
.ts-essai-boutons { display: flex; gap: 6px; }
.ts-essai .btn.small.ts-essai-btn { min-height: 44px; min-width: 52px; padding: 4px 12px; font-size: 17px; }
.ts-essai-btn.playing { background: var(--brand); border-color: var(--brand); color: #fff; }
.ts-essai-mot > .tag { justify-self: start; }
.ts-essai-msg { min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.ts-essai-msg.refus { color: #9a3a25; font-weight: 600; }
.ts-essai-lecteur { display: none; }
@media (max-width: 560px) {
  .ts-essai-mot { grid-template-columns: minmax(0, 1fr) auto; }
  .ts-essai-mot > :last-child { grid-column: 1 / -1; }
}
/* 0.9.6 (audit du 10 octobre) : sur l'iPad, la liste reste un tableau (une ligne par élève) au
   lieu d'une carte de 240 px par élève (23 élèves : 6 800 px de haut). La fluence passe sous le
   prénom ; au téléphone, deux lignes par élève. Chaque ligne est sa propre grille : toutes les
   colonnes ont une largeur fixée (la dernière aussi), pour que les titres tombent au-dessus. */
.ts-row.head > span { justify-self: start; }
@media (pointer: coarse) { .ts-s2 .check { min-height: 40px; } }
.ts-check-cell { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin: -10px -7px; cursor: pointer; }
.ts-flu-inline { display: none; }
@media (max-width: 980px) {
  .ts-row { grid-template-columns: 30px minmax(120px, 1.1fr) 84px minmax(0, 1fr) minmax(0, 1fr) 86px; gap: 6px 10px; padding: 8px 14px; }
  .ts-row > .ts-flu, .ts-row.head > .ts-flu-head { display: none; }
  .ts-flu-inline { display: inline; }
  .ts-depart { padding: 4px 6px; }
  .ts-seance { font-size: 13px; }
}
@media (max-width: 620px) {
  .ts-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ts-row.head { display: none; }
  .ts-row > .ts-seance, .ts-row > .ts-s2 { grid-column: 2 / 3; }
  .ts-row > .ts-depart-cell { grid-column: 3; grid-row: 1; }
  .ts-row > .ts-open { grid-column: 3; grid-row: 2 / span 2; align-self: end; }
}

/* ---------------------------------------------------------------- enseignant : le bilan */
.bl-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bl-grid > .card { min-width: 0; }

/* 0.9.11 (carnet du 18 octobre, réf. 00c1e147 : « pas le jaune sur blanc… le gris léger sur blanc…
   s'il a réussi, ça devrait être vert ») : un état, une couleur et une forme, les mêmes dans le
   tableau « Séries passées », l'étoile, L'essentiel et le détail, toutes dans la légende : réussie en
   vert franc (texte blanc), à confirmer en orange, non réussie cette fois en rouge, à reprendre en
   bleu-gris (bord en tirets) ; chaque fois un texte et un bord foncés sur un fond très clair (AA ;
   tests/bilan-graphiques-ui.test.mjs). Le mode sombre redéfinit ces variables (sombre.css) ;
   l'impression garde celles-ci. Plus de couleur de partie dans une case. */
:root {
  --bl-reussi: #1f7a45;        /* 5,3:1 avec le texte blanc */
  --bl-reussi-bord: #1f7a45;
  --bl-reussi-encre: #ffffff;
  --bl-fragile: #ffe7cc;
  --bl-fragile-bord: #c25e00;
  --bl-fragile-encre: #6e3500; /* 8:1 sur son fond */
  --bl-echec: #fde4e4;
  --bl-echec-bord: #c62828;
  --bl-echec-encre: #8f1d1d;   /* 7,4:1 sur son fond */
  --bl-reprendre: #e8eef7;
  --bl-reprendre-bord: #3d5f93;
  --bl-reprendre-encre: #1f3b63;
  --bl-col: #fbfaf6;           /* les colonnes des paliers, en alternance */
  --bl-col-2: #f3f0e7;
  --bl-repere: #1d2b36;        /* la ligne du repère par classe (à l'écran seulement) */
  --bl-trait-reussi: #1f7a45;  /* l'étoile : les séries réussies */
  --bl-trait-repere: #6b7781;  /* les repères de la fluence (4,6:1 sur blanc) */
  --bl-s1: #1f6f78; --bl-s2: #26864f; --bl-s3: #7456c2; --bl-s4: #c4512f; --bl-s5: #2f5fb3; --bl-s6: #b0336b;
}
:is(.bl-chart, .bl-etoile, .bl-grand) svg { width: 100%; height: auto; display: block; }
:is(.bl-chart, .bl-etoile, .bl-grand) .axis { font: 13px var(--ui-font); fill: var(--ink-2); }
:is(.bl-chart, .bl-etoile, .bl-grand) .lbl { font: 600 14px var(--ui-font); fill: var(--ink); }
.bl-col { fill: var(--bl-col); }
.bl-col.pair { fill: var(--bl-col-2); }
.bl-case { stroke-width: 2; }
.bl-case.reussi { fill: var(--bl-reussi); stroke: var(--bl-reussi-bord); }
.bl-case.fragile { fill: var(--bl-fragile); stroke: var(--bl-fragile-bord); }
.bl-case.echec { fill: var(--bl-echec); stroke: var(--bl-echec-bord); }
.bl-case.reprendre { fill: var(--bl-reprendre); stroke: var(--bl-reprendre-bord); stroke-dasharray: 5 3; }
.bl-forme { font: 700 15px var(--ui-font); }
.bl-val { font: 700 16px var(--ui-font); }
:is(.bl-forme, .bl-val).reussi { fill: var(--bl-reussi-encre); }
:is(.bl-forme, .bl-val).fragile { fill: var(--bl-fragile-encre); }
:is(.bl-forme, .bl-val).echec { fill: var(--bl-echec-encre); }
:is(.bl-forme, .bl-val).reprendre { fill: var(--bl-reprendre-encre); }
line.bl-repere { stroke: var(--bl-repere); stroke-width: 2; stroke-dasharray: 5 4; }
/* la courbe de fluence */
.bl-grille { stroke: var(--line-2); }
.bl-ligne-repere { stroke: var(--bl-trait-repere); stroke-dasharray: 4 4; }
.bl-sonde { fill: none; stroke-width: 3; stroke-linejoin: round; }
.bl-sonde-point { fill: var(--paper); stroke-width: 3; }
:is(.bl-sonde, .bl-sonde-point).s0 { stroke: var(--ink-2); }
:is(.bl-sonde, .bl-sonde-point).s1 { stroke: var(--bl-s1); }
:is(.bl-sonde, .bl-sonde-point).s2 { stroke: var(--bl-s2); }
:is(.bl-sonde, .bl-sonde-point).s3 { stroke: var(--bl-s3); }
:is(.bl-sonde, .bl-sonde-point).s4 { stroke: var(--bl-s4); }
:is(.bl-sonde, .bl-sonde-point).s5 { stroke: var(--bl-s5); }
:is(.bl-sonde, .bl-sonde-point).s6 { stroke: var(--bl-s6); }
/* l'étoile (0.9.11) : la grille discrète, les séries réussies en vert plein, à confirmer en orange
   pointillé, le repère par classe en tirets fins (à l'écran seulement) */
.bl-etoile { margin: 6px 0 10px; }
.bl-etoile .bl-figure { max-width: 600px; margin: 0 auto; }
.bl-et-anneau { fill: none; stroke: var(--line); stroke-width: 1; }
.bl-et-anneau.bord { stroke: var(--line-strong); stroke-width: 1.5; }
.bl-et-axe { stroke: var(--line-strong); stroke-width: 1; }
.bl-et-repere { fill: none; stroke: var(--bl-repere); stroke-width: 1.5; stroke-dasharray: 3 4; }
.bl-et-confirmer { fill: none; stroke: var(--bl-fragile-bord); stroke-width: 2.5; stroke-dasharray: 7 5; stroke-linejoin: round; }
.bl-et-reussi { fill: var(--bl-trait-reussi); fill-opacity: .2; stroke: var(--bl-trait-reussi); stroke-width: 3; stroke-linejoin: round; }
.bl-et-point { fill: var(--bl-trait-reussi); stroke: var(--paper); stroke-width: 1.5; }
.bl-et-point-confirmer { fill: var(--paper); stroke: var(--bl-fragile-bord); stroke-width: 2.5; }
.bl-et-palier { font: 12px var(--ui-font); fill: var(--ink-2); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.bl-et-nom { font: 600 14px var(--ui-font); fill: var(--ink); }
.bl-et-nom .bl-et-valeur { font-weight: 500; font-size: 13.5px; fill: var(--ink-2); }
.bl-et-nom .bl-et-valeur.confirmer { fill: var(--bl-fragile-encre); }
.bl-et-nom.pas-passe { fill: var(--ink-2); }
/* la légende : chaque couleur affichée, avec sa forme */
.bl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.bl-leg { display: inline-flex; align-items: center; gap: 7px; }
.bl-cle { display: inline-grid; place-items: center; flex: none; width: 26px; height: 22px; border-radius: 6px; border: 2px solid; font: 700 13px/1 var(--ui-font); }
.bl-cle.reussi { background: var(--bl-reussi); border-color: var(--bl-reussi-bord); color: var(--bl-reussi-encre); }
.bl-cle.fragile { background: var(--bl-fragile); border-color: var(--bl-fragile-bord); color: var(--bl-fragile-encre); }
.bl-cle.echec { background: var(--bl-echec); border-color: var(--bl-echec-bord); color: var(--bl-echec-encre); }
.bl-cle.reprendre { background: var(--bl-reprendre); border: 2px dashed var(--bl-reprendre-bord); color: var(--bl-reprendre-encre); }
.bl-cle.vide { background: var(--bl-col); border: 1.5px solid var(--line-strong); }
.bl-trait { display: inline-block; flex: none; width: 28px; height: 0; border-top: 3px solid var(--ink-2); }
.bl-trait.reussi { border-top-color: var(--bl-trait-reussi); }
.bl-trait.confirmer { border-top: 3px dashed var(--bl-fragile-bord); }
.bl-trait.repere { border-top: 2px dashed var(--bl-repere); }
.bl-trait.repere-fluence { border-top: 2px dashed var(--bl-trait-repere); }
.bl-trait.s1 { border-top-color: var(--bl-s1); } .bl-trait.s2 { border-top-color: var(--bl-s2); } .bl-trait.s3 { border-top-color: var(--bl-s3); }
.bl-trait.s4 { border-top-color: var(--bl-s4); } .bl-trait.s5 { border-top-color: var(--bl-s5); } .bl-trait.s6 { border-top-color: var(--bl-s6); }
.bl-leg-texte { flex-basis: 100%; font-size: 13px; }
/* toucher un graphique l'affiche en grand (0.9.11) ; le bouton le dit, avec un mot */
.bl-chart-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.bl-chart-tete :is(h2, h3) { margin: 0; }
.btn.small.bl-voir-grand { min-height: 44px; padding: 4px 12px; font-size: 14px; }
.bl-figure { margin: 0; cursor: zoom-in; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.bl-figure:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
dialog.bl-grand { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 14px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); border: 0; border-radius: 0; background: var(--paper); color: var(--ink); cursor: zoom-out; }
dialog.bl-grand[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 8px; }
dialog.bl-grand::backdrop { background: rgb(var(--backdrop-rgb) / 55%); }
.bl-grand-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bl-grand-tete h2 { font-size: 22px; }
.bl-grand-corps { min-height: 0; display: grid; place-items: center; }
.bl-grand-corps svg { width: 100%; height: 100%; max-height: 100%; }
.bl-grand .bl-legend { justify-content: center; font-size: 15px; }
.bl-grand .bl-leg-texte { flex-basis: auto; }
.bl-grand-aide { margin: 0; text-align: center; }
/* « À regarder avant de conclure » (0.9.11), en tête de L'essentiel */
.bl-regarder { margin: 8px 0 12px; padding: 10px 14px 10px 16px; border-radius: 12px; border-left: 5px solid var(--bl-fragile-bord); background: var(--bg); color: var(--ink); }
.bl-regarder h3 { margin: 0 0 4px; font-size: 15.5px; }
.bl-regarder ul { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.45; }
.bl-regarder li + li { margin-top: 3px; }
.bl-alerte { color: var(--ink); font-weight: 700; }
.bl-ess-val .bl-alerte { font-size: 15px; line-height: 1.4; }
.bl-alerte::before { content: '⚠ '; }
.bl-geva { white-space: pre-wrap; font: 15px/1.55 var(--ui-font); background: #fffdf8; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 10px 0 0; max-height: 640px; overflow: auto; }
.bl-essentiel h3 { margin: 14px 0 4px; font-size: 15px; }
.bl-ess-ligne { display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.bl-ess-titre { font-weight: 600; }
.bl-ess-val { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bl-ess-val > div { flex-basis: 100%; }
.bl-geva-detail summary { cursor: pointer; font-weight: 600; }
@media (max-width: 560px) { .bl-ess-ligne { grid-template-columns: 1fr; } }
.bl-detail { font-size: 14.5px; }
.bl-detail table { width: 100%; border-collapse: collapse; }
.bl-detail td, .bl-detail th { padding: 4px 6px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.bl-detail .ok { color: #1d6b41; font-weight: 700; }
.bl-detail .ko { color: #9a3a25; font-weight: 700; }
.bl-blocks { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
/* (0.9.11 : les couleurs et les formes des états, celles des graphiques et de la légende) */
.bl-block { padding: 3px 10px; border-radius: 999px; border: 1.5px solid transparent; font-size: 13.5px; font-weight: 600; }
.bl-block.reussi { background: var(--bl-reussi); border-color: var(--bl-reussi-bord); color: var(--bl-reussi-encre); }
.bl-block.fragile { background: var(--bl-fragile); border-color: var(--bl-fragile-bord); color: var(--bl-fragile-encre); }
.bl-block.echec { background: var(--bl-echec); border-color: var(--bl-echec-bord); color: var(--bl-echec-encre); }
.bl-block.reprendre { background: var(--bl-reprendre); border: 1.5px dashed var(--bl-reprendre-bord); color: var(--bl-reprendre-encre); }
.bl-block.reussi::before { content: '✓ '; }
.bl-block.fragile::before { content: '~ '; }
.bl-block.echec::before { content: '✗ '; }
.bl-block.reprendre::before { content: '↺ '; }
/* le détail des réponses, série par série (0.9.11) */
.bl-detail .bl-serie-tete th { padding-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); border-bottom: 1.5px solid var(--line); }
.bl-notes { display: grid; gap: 8px; }
.bl-note { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 12px; background: var(--bg); }
.bl-note .grow { white-space: pre-wrap; }
.bl-hist { font-size: 14px; }
@media (max-width: 1000px) { .bl-grid { grid-template-columns: 1fr; } }
@media print {
  .bl-noprint, .topbar, .tq-net { display: none !important; }
  .bl-grid { grid-template-columns: 1fr; }
  .bl-geva { max-height: none; border: 0; padding: 0; }
  .card { box-shadow: none !important; break-inside: avoid; }
}

/* ---------------------------------------------------------------- enseignant : la fluence */
.fl-students { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-student { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-family: var(--title-font); font-weight: 500; font-size: 15.5px; }
.fl-student[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.fl-student.absent { opacity: .45; }
.fl-student small { font-family: var(--ui-font); color: var(--muted); font-weight: 500; }
.fl-probes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fl-probe-card { display: grid; gap: 6px; text-align: left; padding: 16px 18px; border-radius: 18px; border: 2px solid var(--line); background: #fff; font: inherit; }
.fl-probe-card:hover { border-color: var(--brand); }
.fl-probe-card h3 { font-size: 18px; }
.fl-probe-card .muted { font-size: 14px; }
.fl-bar { position: sticky; top: var(--topbar-h, 56px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px max(16px, env(safe-area-inset-left)); background: rgb(244 242 236 / 96%); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.fl-timer { font: 700 34px/1 var(--title-font); font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: center; }
.fl-timer.run { color: var(--brand); }
.fl-timer.done { color: var(--coral); }
.fl-mode { font-weight: 600; color: var(--ink-2); }
.fl-mode.last { color: #244d9e; }
.fl-sheet { max-width: 980px; margin: 14px auto; padding: 22px clamp(14px, 3vw, 34px); background: #fff; border-radius: 20px; box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; }
.fl-text p { font-size: clamp(22px, 2.8vw, 27px); line-height: 2.05; margin: 0 0 .6em; }
.fl-w { display: inline-block; padding: 0 3px; border-radius: 7px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fl-w.err { background: var(--coral-soft); color: #9a3a25; text-decoration: line-through 3px; }
.fl-w.last { box-shadow: inset 0 -5px 0 var(--sky); background: var(--sky-soft); }
.fl-w.after { opacity: .3; }
.fl-p { color: var(--muted); }
.fl-group { white-space: nowrap; }
.fl-grid { display: grid; gap: 6px 4px; }
.fl-grid .fl-line { display: grid; gap: 6px; align-items: center; }
.fl-grid .fl-w { text-align: center; font-size: clamp(22px, 3vw, 28px); padding: 8px 2px; border: 1.5px solid var(--line-2); }
.fl-result { display: grid; gap: 12px; }
.fl-big { font: 700 44px/1 var(--title-font); color: var(--brand-deep); }
.fl-pros { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-pros button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.fl-hist { font-size: 14px; }

/* feuille de l'élève (impression) */
.ff-page { max-width: 820px; margin: 0 auto; padding: 24px; background: #fff; }
.ff-page h1 { font-size: 26px; margin-bottom: 14px; }
.ff-count { color: #8a8f96; font-size: 12px; min-width: 2.4em; text-align: right; padding-top: .55em; }
/* Texte (0.9.10, carnet du 14 octobre) : une rangée par ligne, ses mots puis son nombre, en bas
   de la rangée (même hauteur de ligne que les mots : le nombre est en face de la ligne). Largeur
   fixe, la même à l'écran et sur le papier (A4 portrait moins les marges : 178 mm ; un peu de
   jeu pour les marges d'une autre imprimante) : les lignes, coupées une fois, ne changent pas à
   l'impression. */
.ff-scroll { overflow-x: auto; }
.ff-text { width: 170mm; }
.ff-para { margin: 0 0 10px; }
.ff-line { display: flex; align-items: flex-end; gap: 12px; break-inside: avoid; page-break-inside: avoid; }
.ff-words { flex: 1; min-width: 0; font-size: 20px; line-height: 38px; }
.ff-w { white-space: nowrap; }
.ff-line .ff-count { flex: none; line-height: 38px; padding-top: 0; }
.ff-grid { display: grid; gap: 10px; }
.ff-grid .ff-row { display: grid; gap: 8px; align-items: center; }
.ff-grid .ff-cell { font-size: 24px; text-align: center; padding: 6px 0; border-bottom: 1px dotted #ccc; }
@media print {
  .ff-noprint { display: none !important; }
  .ff-page { padding: 0; }
  .ff-scroll { overflow: visible; }
  @page { margin: 16mm; }
  /* Une feuille A4 en portrait (0.9.10), comme depuis l'iPad : sans cela, Chromium (les PC de la
     classe) prenait le paysage des fiches (sheet.css). Les lignes, elles, ne dépendent pas du
     papier. */
  .ff-page { page: fluence; }
  @page fluence { size: A4 portrait; margin: 16mm; }
}

/* ---------------------------------------------------------------- 0.9.10 : refaire le test, les
   tests d'un élève dans son bilan, l'impression du bilan et de la fiche de l'élève (lot « résultats ») */

/* Page Tests : un élève qui a refait le test (le rang du test en cours, le lien vers le précédent). */
.ts-pass { font-size: 12.5px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.ts-pass a { color: var(--brand-text); }
.ts-refaire-tous { border-color: var(--brand); color: var(--brand-ink); }
/* La fenêtre « Refaire le test » : un élève par ligne, son départ au doigt. */
.ts-refaire-liste { display: grid; gap: 0; margin: 4px 0 10px; }
.ts-refaire-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.ts-refaire-ligne:first-child { border-top: 0; }
.ts-refaire-qui { display: grid; min-width: 0; }
.ts-refaire-qui small { overflow-wrap: anywhere; }
.ts-refaire-depart { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.ts-refaire-depart .ts-depart { width: auto; min-height: 44px; }

/* Bilan : un onglet par test (le plus récent d'abord), 44 px au doigt ; un seul test se voit. */
.bl-tests { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.bl-test-onglet { display: grid; justify-items: start; gap: 0; min-height: 44px; padding: 6px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); text-align: left; }
.bl-test-onglet strong { font-family: var(--title-font); font-weight: 600; font-size: 15px; }
.bl-test-onglet small { color: var(--muted); font-size: 12.5px; }
.bl-test-onglet[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.bl-tests-aide { margin: 0 0 14px; }
.bl-passation.bl-autre { display: none; }
.bl-test-tete { margin: 0 0 12px; }
.bl-test-tete h2 { font-size: 20px; }
.bl-test-tete p { margin: 2px 0 0; }
/* (0.9.11 : plus de fond jaune ; comme « À regarder avant de conclure ») */
.bl-recalcul { margin: 4px 0 6px; padding: 6px 10px; border-left: 3px solid var(--bl-fragile-bord); background: var(--bg); border-radius: 0 8px 8px 0; color: var(--ink-2); }
.bl-hist-test th { padding-top: 10px; font-family: var(--title-font); font-size: 14px; color: var(--ink-2); }
.bl-print-tete, .el-print-tete { display: none; }

@media print {
  /* Le bilan : le nom de l'élève et sa classe (en-tête de la page), la date d'impression, le titre
     de chaque test (sa date, sa banque, ses séances) ; ni bouton, ni onglet, ni repère par classe
     (bl-noprint). La page A4 en portrait : une règle @page posée par la page du bilan le temps
     qu'elle est affichée (public/js/teacher/bilan.js ; une page nommée faisait couper Chromium après
     chaque partie repliée et ne gardait plus une carte entière). */
  .bl-page { font-size: 10.5pt; }
  .bl-page .bl-print-tete { display: block; margin: 0 0 2mm; font-size: 9pt; color: #555; }
  .bl-page .page-head { margin: 0 0 4mm; }
  .bl-page .page-head h1 { font-size: 20pt; }
  .bl-page .page-head .avatar { display: none; }
  .bl-page .bl-test-tete { margin: 0 0 3mm; padding-bottom: 2mm; border-bottom: 0.4mm solid #999; break-after: avoid; }
  .bl-page .bl-test-tete h2 { font-size: 14pt; }
  .bl-page.bl-tout .bl-passation.bl-autre { display: block; }
  .bl-page.bl-tout .bl-passation + .bl-passation { break-before: page; }
  /* (en blocs, l'un sous l'autre : une carte courte reste entière, partout) */
  .bl-page .bl-grid, .bl-page .bl-grid > div { display: block !important; }
  .bl-page .bl-grid > div > * + *, .bl-page .bl-grid > div + div { margin-top: 4mm; }
  /* Des cartes sans fond ni ombre, séparées d'un filet ; une longue carte peut passer à la page
     suivante (seuls ses petits morceaux restent entiers). */
  .bl-page .card { padding: 0 0 3mm; border-radius: 0; background: none; border-bottom: 0.3mm solid #ccc; break-inside: auto; }
  .bl-page .card h2 { font-size: 13pt; margin-bottom: 2mm; break-after: avoid; }
  .bl-page .bl-ess-ligne, .bl-page .bl-chart svg, .bl-page .bl-legend, .bl-page .bl-detail tr, .bl-page .bl-note, .bl-page .bl-detail details > summary { break-inside: avoid; }
  .bl-page :is(.bl-cle, .bl-trait, .bl-block, .bl-recalcul, .bl-regarder) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* (0.9.11 : l'étoile reste entière ; la vue en grand ne s'imprime pas) */
  .bl-page .bl-etoile { break-inside: avoid; }
  .bl-page .bl-figure { cursor: default; }
  dialog.bl-grand { display: none !important; }
  /* Détail des réponses : chaque partie en une ligne (son résumé) ; une partie ouverte s'imprime en entier. */
  .bl-page details > summary { list-style: none; }
  .bl-page details > summary::-webkit-details-marker { display: none; }
  .bl-page .bl-geva-detail:not([open]) { display: none; }
  .bl-page details:not([open]) > :not(summary) { display: none !important; }
  .bl-page .bl-chart { break-inside: avoid; }
  .bl-page .bl-geva { font-size: 10pt; line-height: 1.45; overflow: visible; }

  /* La fiche de l'élève : ses réglages (seulement la valeur choisie), son travail, ses progrès ;
     sans boutons ni cartes repliées (A4 en portrait : comme le bilan, public/js/teacher/student.js). */
  .el-fiche .back-link, .el-fiche .hero-actions, .el-fiche .student-settings .row > .btn, .el-fiche .fam-danger, .el-fiche details:not([open]) { display: none !important; }
  .el-fiche .el-print-tete { display: block; margin: 0 0 2mm; font-size: 9pt; color: #555; }
  .el-fiche .fam-hero, .el-fiche .card { box-shadow: none; border-radius: 0; padding: 2mm 0; }
  .el-fiche .seg { background: none; padding: 0; }
  .el-fiche .seg button:not([aria-pressed="true"]) { display: none; }
  .el-fiche .seg button[aria-pressed="true"] { box-shadow: none; padding: 0; font-weight: 700; }
  .el-fiche .table tr { break-inside: avoid; }
}

/* 0.9.12 : la dictée seule d'une séance 2 finie (page Tests), comme le complément */
.ts-dictee-btn, .ts-dictee-tous { white-space: normal; text-align: left; max-width: 100%; border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.ts-dictee-btn:hover:not(:disabled), .ts-dictee-tous:hover:not(:disabled) { border-color: var(--brand-deep); background: var(--brand-soft); }
@media (pointer: coarse) { .ts-dictee-btn { min-height: 40px; } }

/* 0.9.21 : « 📊 Exporter pour un tableur » (teacher/export-tableur.js ; avant, la fenêtre de la 0.9.12) */
.tb-modal .modal-body { display: grid; gap: 10px; }
.tb-modal .tb-avis, .tb-modal .tb-qui, .tb-modal .tb-resume, .tb-modal .tb-fichier, .tb-modal .tb-pre { margin: 0; }
.tb-modal .tb-fichier { overflow-wrap: anywhere; }
.tb-cocher { flex-wrap: wrap; gap: 8px; align-items: center; }
.tb-eleves { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 4px 2px; }
.tb-eleve { min-height: 36px; align-items: center; font-size: 14.5px; line-height: 1.3; }
.tb-eleve small { display: block; font-size: 12.5px; color: var(--muted); }
.tb-eleve.muted span { color: var(--ink-2); }
@media (pointer: coarse) { .tb-eleve { min-height: 44px; } }

/* 0.9.17 (lot C) : « Changer d'élève » à côté de « Supprimer » dans la carte « Fluence » du bilan
   (teacher/bilan.js) : sur deux lignes si la carte est étroite (iPad) ; 44 px au doigt. Sur un
   téléphone (390 px), le tableau défile de côté dans la carte, qui ne force plus la largeur de sa
   colonne : avant, toute la page débordait. */
.bl-fl-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.bl-fl-actions .btn { white-space: normal; text-align: center; }
@media (pointer: coarse) { .bl-fl-actions .btn { min-height: 44px; } }
.bl-fluence { min-width: 0; }
.bl-fl-defile { overflow-x: auto; }
@media print { .bl-fl-defile { overflow: visible; } }

/* 0.9.17 (lot C) : « Enchaîner la séance 2 » : la case de la classe et celle de chaque élève (page
   Tests, 44 px au doigt), et l'écran entre les deux séances (student/test.js, avec le rond des pauses). */
.ts-enchainer-tous { align-items: center; }
@media (pointer: coarse) { .ts-s2 .ts-enchainer, .ts-enchainer-tous { min-height: 44px; align-items: center; } }
.tq-enchainer .tq-row .btn { max-width: 100%; white-space: normal; }

/* ---------- 0.9.18, lot « corriger » : la fiche d'un élève (teacher/student.js) ----------
   Le suivi d'abord : « Reste à faire » au-dessus de son travail (les signes des copies), les 8 derniers
   travaux, le reste d'un toucher ; puis ses réglages, repliés sous une ligne qui dit leur état. */
.el-reste { gap: 6px 8px; margin: -4px 0 12px; }
.el-reste-titre { font-weight: 600; color: var(--ink-2); }
.el-reste .tag { font-size: 14px; padding: 4px 12px; }
.el-reste .el-reste-a-refaire { background: var(--coral-soft); color: var(--coral-ink); }
.el-reste .el-reste-attente { background: var(--sun-soft); color: var(--sun-ink); }
.el-reste .el-reste-en-cours { background: var(--sun-soft); color: var(--sun-ink); }
.el-plus-ligne { display: flex; justify-content: center; margin: 10px 0 4px; }
/* 0.9.21 (lot « papier → écran ») : sur une fiche papier pas faite d'un jour passé, « ✓ Faite » et « 💻 À
   l'écran » (ou « ✓ Faite sur papier » sur une fiche passée à l'écran) ; 44 px au doigt, sur l'iPad. */
.el-papier-gestes { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 8px; vertical-align: middle; }
.el-papier-gestes .btn.el-papier-geste { min-height: 44px; padding: 4px 12px; font-size: 14px; }
.el-papier-note { font-size: 14px; }
.el-plus-ligne .btn { min-height: 44px; }
.el-reglages { margin-top: 26px; }
.el-reglages-tete { align-items: center; }
.el-reglages-tete .grow-title { margin: 0; }
/* Le titre des réglages est le bouton qui les ouvre (44 px au doigt). */
.el-reglages-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 4px; margin-left: -4px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.el-reglages-btn:hover { background: var(--bg-2); }
.el-reglages-fleche { color: var(--muted); }
.el-reglages-resume { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.el-reglages-corps { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.el-reglages-corps[hidden] { display: none; }
.el-compte .row { gap: 8px; }
.el-compte .btn { min-height: 44px; }
@media print {
  /* Imprimée : ses réglages en entier (seulement la valeur choisie), même repliés à l'écran ; tout son
     travail ; ni le bouton qui replie, ni « Voir tout son travail », ni le compte. */
  .el-fiche .el-reglages-corps[hidden] { display: block !important; }
  .el-fiche .table tr.el-plus[hidden] { display: table-row !important; }
  .el-fiche .el-reglages-fleche, .el-fiche .el-plus-ligne, .el-fiche .el-compte, .el-fiche .el-enregistrer, .el-fiche .el-reglages-resume { display: none !important; }
  .el-fiche .el-reglages-btn { padding: 0; min-height: 0; }
}

/* ---------- 0.9.19, lot « réserves » : la fiche d'un élève (teacher/student.js) ----------
   Après « Enregistrer », ce qui avait changé ailleurs (le tableau « Tous les réglages », un autre
   appareil) depuis l'ouverture de la fiche, et qui est gardé : une ligne sous l'état des réglages, la
   boîte d'information commune (.note-box), jusqu'au geste suivant. Pas imprimée. */
.el-ailleurs { margin: 10px 0 0; line-height: 1.45; }
.el-ailleurs[hidden] { display: none; }
@media print { .el-fiche .el-ailleurs { display: none !important; } }

/* ---------- 0.9.18, lot « corriger » : la page « Tests » (teacher/tests.js) ----------
   En haut, le geste du jour et la liste ; le reste replié (« ⋯ Autres outils », « ⋯ Autres choix »,
   le « ⋯ » de chaque ligne, les voix du test et leur essai). Ces règles remplacent la grille des lignes
   d'avant (la colonne « Départ » passe sous le prénom, en mots, et dans le « ⋯ » de la ligne). */
.ts-outils { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; padding: 10px 14px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.ts-outils[hidden] { display: none; }
.ts-outils .btn, .ts-outils-btn { min-height: 44px; }
.ts-today .btn { min-height: 44px; }
.ts-autres-ligne { justify-content: space-between; align-items: center; }
.ts-enchainer-etat { margin: 0; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.ts-autres { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.ts-autres[hidden] { display: none; }
.ts-row { grid-template-columns: 34px minmax(170px, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(90px, .6fr) 92px 44px; }
.ts-reglages { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13.5px; line-height: 1.35; }
.ts-opts-btn { width: 44px; min-height: 44px; padding: 0; font-size: 20px; line-height: 1; }
.ts-opts-btn[aria-expanded="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.ts-opts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 8px 12px; border-radius: 12px; background: var(--bg); }
.ts-opts[hidden] { display: none; }
.ts-opts-depart { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); font-size: 14.5px; white-space: nowrap; }
.ts-row .ts-open { min-height: 44px; }
.ts-opts .ts-depart { min-height: 44px; }
.ts-opts .check { min-height: 44px; align-items: center; }
/* (les « summary » restent des éléments de liste : leur triangle dit qu'ils s'ouvrent) */
.ts-voix-repli > summary { min-height: 44px; cursor: pointer; }
.ts-voix-repli > summary h2 { display: inline; margin: 0; font-size: 20px; }
.ts-voix-etat { display: block; margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.ts-voix-repli[open] > summary { margin-bottom: 12px; }
.ts-essai-repli { padding-top: 12px; border-top: 1px solid var(--line-2); }
.ts-essai-repli > summary { min-height: 44px; padding: 11px 0; line-height: 1.45; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.ts-essai-repli .ts-essai { border-top: 0; padding-top: 6px; }
@media (max-width: 980px) {
  .ts-row { grid-template-columns: 30px minmax(120px, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 86px 44px; }
}
@media (max-width: 620px) {
  .ts-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ts-row > .ts-opts-btn { grid-column: 3; grid-row: 1; }
  .ts-row > .ts-open { grid-column: 3; grid-row: 2 / span 2; align-self: end; }
  .ts-row > .ts-opts { grid-column: 1 / -1; }
}

/* ---------- 0.9.18, lot « corriger » : accessibilité (fiche de l'élève, page Tests, bilan de la
   semaine) ---------- (audit du 17 novembre, section 8 et T2-16 : cibles de 24 px au moins, 44 visées
   au doigt ; contraste de 4,5:1 ; les plus petits textes importants agrandis) */
/* La fiche de l'élève : le pli « Niveau par domaine » (22 px de haut) ; les explications des réglages. */
.el-reglages-corps .domain-levels > summary { min-height: 44px; padding: 11px 0; line-height: 1.45; }
.el-reglages-corps .check small, .el-reglages-corps .check.comfort small { font-size: 13.5px; }
/* (rituels.css et consolidation.css sont chargés après ce fichier : ces règles sont rattachées à leur
   page, plus précises que les leurs) */
.el-fiche .consol-score small { font-size: 14px; }
/* La page Tests : les paliers atteints (12 px), les états des séances, les petits mots des boutons. */
.ts-levels .tag { font-size: 13.5px; padding: 2px 9px; }
.ts-state { font-size: 13.5px; }
.ts-flu small, .ts-pass { font-size: 13.5px; }
.ts-today .btn small, .ts-autres .btn small { font-size: 13.5px; }
/* Le bilan de la semaine (teacher/bilan-semaine.js) : chaque prénom, une cible de 32 px (19 avant) ;
   « Pas fait » et « Fait » à 4,5:1 au moins (3,93 et 3,98 avant) ; les étiquettes à 14 px. */
.bs-page .bs-noms { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; }
.bs-page .bs-nom { display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; border-radius: 8px; }
.bs-page .bs-nom:hover { background: var(--bg-2); text-decoration: none; }
.bs-page .bs-ligne { align-items: center; }
.bs-page .bs-etiq { font-size: 14px; padding: 2px 10px; }
.bs-page .bs-etiq.fait { color: var(--leaf-ink); }
.bs-page .bs-etiq.pas-fait { color: var(--coral-ink); }
/* Le titre d'une activité, un lien vers sa page (« À reprendre ») : souligné, une cible de 32 px. */
.bs-page .bs-activite-lien { display: inline-flex; align-items: center; min-height: 32px; color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
/* « ✍️ Copie express » sur la fiche de l'élève (teacher/copie-carte.js) : un pli qui garde son triangle,
   comme ses voisins (rituels.css en faisait une boîte flexible, sans triangle). */
.el-fiche .cpc > .cpc-titre { display: list-item; padding: 10px 0; line-height: 1.4; }

/* ---------- 0.9.19, lot « finitions » : la fiche d'un élève (teacher/student.js) sur l'iPad ----------
   « ‹ Élèves » et « Retirer l'élève du suivi » sont de petits boutons (.btn.small) : 40 px de haut au doigt
   (la règle commune des petits boutons de l'enseignant, app.css) ; 44 visés au doigt. Seulement eux, et
   seulement au doigt : à la souris et sur les autres pages, rien ne change ; l'impression les cache
   toujours (plus haut). */
@media (pointer: coarse) {
  .el-fiche > .back-link, .el-fiche .fam-danger .btn.small { min-height: 44px; }
}

/* 0.9.19.1 (chantier « impression ») : sur la fiche d'un élève, « Travail » et l'interrupteur « Résultats »
   sur la même ligne (les scores de ses travaux le suivent, comme la page d'une activité) ; imprimée, la
   fiche ne montre pas l'interrupteur. */
.el-travail-tete { gap: 10px 16px; margin: 26px 0 12px; }
.el-travail-tete .section-title { margin: 0; flex: 1 1 auto; }
@media print { .el-travail-tete .jc-resultats { display: none; } }
