/* Rituels (0.9.7) : la dictée de mots. Préfixes : rt- (page, choix, tableau), bdl- (bandelettes).
   0.9.10 : le rituel du jour (rj-, fenêtre et tableau) et le bilan de la semaine (bs-). */

/* ---------- journée : le bouton « 🔔 Rituel » d'un créneau (0.9.10 : ses règles tiennent au bouton
   lui-même, pas à la carte du créneau, que la journée peut redessiner autrement) */
.btn.rt-slot { position: relative; }
/* La place du bouton : la case « Séance prévue » part de 200 px et s'élargit jusqu'à ses 320 px
   s'il reste de la place (avant l'espace vide qui la suit). Sans cela, sur l'iPad (1080 px), la
   tête du créneau en cours (« En cours ») ou d'une matière au nom long passait sur deux lignes,
   « Donner une activité » dessous. */
.slot-head .plan-input { flex: 100 1 200px; }
/* Déjà fait à ce créneau : vert, et une coche en pastille (le bouton garde sa largeur : la ligne du
   créneau ne passe pas à la ligne). */
.btn.rt-slot.done { background: var(--leaf-soft); border-color: var(--leaf-line); color: var(--leaf-ink); }
.btn.rt-slot.done::after { content: '✓'; position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; border-radius: 50%; background: var(--leaf); color: #fff; font-size: 12px; font-weight: 700; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px #fff; }

/* 0.9.10 : le rituel du jour sur le bouton, « 🔔 Rituel : Mot mystère » puis « — 2 élèves ne l'ont
   pas encore fait » (à la ligne s'il le faut) ; 44 px de haut au doigt. Fait par tous les présents :
   vert. */
.btn.rt-slot { flex-wrap: wrap; justify-content: flex-start; column-gap: .35em; row-gap: 0; max-width: 360px; min-height: 44px; white-space: normal; text-align: left; line-height: 1.2; }
.rt-slot-nom { font-weight: 600; }
.rt-slot-etat { font-weight: 500; color: var(--ink-2); }
.btn.rt-slot.tous { background: var(--leaf-soft); border-color: var(--leaf-soft); color: var(--leaf); }
/* deux journées côte à côte : plus étroit */
.jours-2 .btn.rt-slot { max-width: 240px; font-size: 13px; }

/* ---------- choisir une dictée (depuis un créneau) */
.rt-choix-modal .loading { min-height: 140px; }
.rt-choix-aide { margin: 0 0 12px; }
.rt-choix-liste { display: flex; flex-direction: column; gap: 8px; }
.rt-choix { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 64px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; text-align: left; color: inherit; }
.rt-choix:hover { border-color: var(--brand); background: #fbfaf7; }
.rt-choix:first-child { border-color: var(--brand); box-shadow: 0 0 0 1.5px var(--brand); }
.rt-choix-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--title-font); font-weight: 700; font-size: 17.5px; }
.rt-choix-n { font-family: var(--ui-font); font-weight: 400; font-size: 14.5px; }
.rt-choix-statut { font-size: 14.5px; }

/* ---------- le rituel du jour dans la fenêtre « 🔔 Rituel » (0.9.10) */
.rj-jour { display: flex; flex-direction: column; gap: 12px; padding: 0 0 16px; margin: 0 0 14px; border-bottom: 1px solid var(--line-2); }
.rj-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rj-titre { margin: 0 auto 0 0; font-size: 20px; }
.rj-etat { font-weight: 600; color: var(--ink-2); }
.rj-etat.tous { color: var(--leaf); }
.rj-deja { margin: -4px 0 0; }
.rj-types { display: flex; flex-wrap: wrap; gap: 6px; }
.rj-type { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-family: var(--title-font); font-weight: 500; font-size: 14.5px; }
.rj-type[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.rj-type:disabled { opacity: .4; cursor: default; }
.rj-mots-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.rj-mot { display: inline-flex; align-items: center; gap: 2px; }
.rj-mot .input { width: 11.5em; min-height: 44px; font-size: 17px; }
.rj-mot-x { width: 44px; height: 44px; font-size: 22px; line-height: 1; }
.rj-mots-outils { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rj-mots-outils .btn.small { min-height: 44px; }
.rj-apercu { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); font-size: 15.5px; }
.rj-apercu.bad { background: var(--coral-soft); color: var(--coral); }
.rj-faire { align-self: flex-start; }
.rj-jour > .muted.small { margin: -4px 0 0; }
.rj-vide { margin: 0 0 12px; }
.rj-dictees > summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink-2); }
.rj-dictees[open] > summary { margin-bottom: 6px; }

/* ---------- la page Rituels */
.rt-jour { margin: 0 0 14px; padding: 10px 16px; border-radius: 14px; background: var(--bg-2); font-size: 15.5px; }
.rt-jour.fait { background: var(--leaf-soft); color: #1d4f33; }
.rt-ordre { margin: 0 0 8px; }
.rt-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.rt-carte { display: flex; flex-direction: column; gap: 8px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.rt-carte-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rt-carte-head h3 { font-size: 19px; margin-right: auto; overflow-wrap: anywhere; }
.rt-carte-mots { margin: 0; color: var(--ink-2); font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rt-carte-quand { margin: 0; font-size: 14.5px; }
.rt-carte-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.rt-carte-actions .btn.small { min-height: 44px; }
.rt-carte-actions .btn.quiet { margin-left: auto; min-width: 44px; }

/* fenêtre « Nouvelle dictée » */
.rt-edit .field { margin-bottom: 12px; }
.rt-mots { min-height: 190px; font-size: 18px; line-height: 1.5; }
.rt-compte { margin: 2px 0 0; font-size: 14px; color: var(--leaf); font-weight: 600; }
.rt-compte.bad { color: #a33a26; }
.rt-phrases-box { margin: 4px 0 6px; padding: 10px 14px; border-radius: 14px; background: var(--bg); }
.rt-phrases-box summary { cursor: pointer; font-weight: 600; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; }
.rt-phrases { display: grid; gap: 8px; }
.rt-phrase { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; align-items: center; gap: 10px; }
.rt-phrase > span { font-weight: 700; overflow-wrap: anywhere; }

/* ---------- au tableau : plein écran, lisible de loin */
.rt-board { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: max(14px, 2.2vh) max(16px, 2.4vw); background: #0f3d43; color: #fff; flex-direction: column; gap: 1.8vh; font-family: var(--title-font); }
.rt-board[open] { display: flex; }
.rt-board::backdrop { background: #0f3d43; }
.rt-b-top { display: flex; align-items: center; gap: 14px; min-height: 52px; }
.rt-b-top .rt-b-btn[hidden] { display: inline-flex !important; visibility: hidden; }
.rt-b-titre { flex: 1; min-width: 0; text-align: center; font-weight: 700; font-size: clamp(18px, 3.2vh, 30px); color: #cfe7e4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* centré ; s'il ne tient pas (téléphone), il défile au lieu d'être coupé en haut */
.rt-b-scene { flex: 1; min-height: 0; container-type: size; display: flex; overflow: auto; }
.rt-b-scene > * { margin: auto; }
.rt-b-cmd { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 14px; min-height: 64px; }
.rt-b-cmd:empty { display: none; }
.rt-b-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 8px 26px; border-radius: 999px; border: 2px solid rgb(255 255 255 / 38%); background: rgb(255 255 255 / 10%); color: #fff; font-family: var(--title-font); font-weight: 600; font-size: clamp(18px, 2.7vh, 25px); line-height: 1.1; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) {
  .rt-b-btn:not(.rt-b-primary):not(.rt-b-sun):hover:not(:disabled) { background: rgb(255 255 255 / 18%); }
  .rt-b-btn.rt-b-primary:hover:not(:disabled) { background: #e6f2f0; }
  .rt-b-etape:not(.next):hover { background: rgb(255 255 255 / 16%); }
}
.rt-b-btn:active:not(:disabled) { transform: scale(.98); }
.rt-b-btn:disabled { opacity: .3; cursor: default; }
.rt-b-btn.rt-b-primary { background: #fff; border-color: #fff; color: #0f3d43; }
.rt-b-btn.rt-b-sun { background: var(--sun); border-color: var(--sun); color: #3a2b00; }
.rt-b-btn.rt-b-rond { width: 64px; padding: 0; }
.rt-b-btn.rt-b-small { min-height: 48px; padding: 6px 18px; font-size: 17px; }
.rt-board :focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.rt-b-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / 12%); }
.rt-b-seg button { min-height: 52px; min-width: 64px; padding: 4px 16px; white-space: nowrap; border: 0; border-radius: 999px; background: transparent; color: #e3f1ef; font-family: var(--title-font); font-weight: 600; font-size: clamp(16px, 2.3vh, 21px); }
.rt-b-seg button[aria-pressed="true"] { background: #fff; color: #0f3d43; }

/* les étapes */
.rt-b-menu { width: min(100%, 1180px); display: flex; flex-direction: column; align-items: center; gap: 2.2cqh; text-align: center; }
.rt-b-fin { margin: 0; padding: 6px 18px; border-radius: 999px; background: rgb(38 134 79 / 45%); font-size: clamp(16px, 3.4cqh, 24px); font-weight: 600; }
.rt-b-nom { font-size: clamp(26px, min(9cqh, 7cqw), 64px); line-height: 1.1; overflow-wrap: break-word; }
.rt-b-info { margin: -1cqh 0 0; color: #cfe7e4; font-size: clamp(16px, 4cqh, 26px); }
/* cinq étapes sur une ligne (iPad, PC) ; deux par ligne sur un téléphone */
.rt-b-etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 40%), 1fr)); gap: 14px; width: 100%; }
.rt-b-etape { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: clamp(96px, 20cqh, 150px); padding: 10px 6px; border-radius: 22px; border: 2px solid rgb(255 255 255 / 30%); background: rgb(255 255 255 / 9%); color: #fff; font-family: var(--title-font); font-weight: 700; font-size: clamp(17px, 4.2cqh, 27px); }
.rt-b-etape.next { background: var(--sun); border-color: var(--sun); color: #3a2b00; }
.rt-b-etape.faite:not(.next) { opacity: .75; }
.rt-b-ico { font-size: 1.35em; line-height: 1; }
.rt-b-ok { position: absolute; top: 8px; right: 12px; font-size: .8em; }
.rt-b-reglages { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; }
.rt-b-reglage { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; font-size: clamp(15px, 3.2cqh, 21px); color: #cfe7e4; }
/* téléphone : le nom du réglage au-dessus de ses boutons (sinon il sortait de l'écran) */
@media (max-width: 600px) { .rt-b-reglage { flex-direction: column; gap: 6px; } }
.rt-b-aide { margin: 0; color: #a9cdc9; font-family: var(--ui-font); font-size: clamp(14px, 2.8cqh, 18px); }
.rt-b-alerte { margin: 0; padding: 8px 16px; border-radius: 14px; background: rgb(196 81 47 / 55%); font-family: var(--ui-font); font-size: clamp(14px, 3cqh, 19px); }
/* pendant une étape, sur sa propre ligne sous les boutons */
.rt-b-cmd .rt-b-muette { flex-basis: 100%; text-align: center; font-size: clamp(14px, 2.2vh, 18px); }

/* un mot en grand (Découvrir, Correction) ; sa taille suit sa longueur et la place */
.rt-b-mot-box { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh; text-align: center; }
.rt-b-mot { max-width: 94cqw; font-weight: 700; line-height: 1.15; white-space: nowrap; letter-spacing: .01em; font-size: min(34cqh, calc(92cqw / (var(--len) * .64))); }
.rt-b-phrase { max-width: 94cqw; font-family: var(--ui-font); font-weight: 600; font-size: clamp(20px, 6.5cqh, 46px); line-height: 1.3; color: #d9eeeb; }
.rt-b-vide { width: 100%; height: 100%; }
.rt-b-num { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 1.6em; height: 1.6em; padding: 0 .3em; border-radius: 999px; background: var(--sun); color: #3a2b00; font-weight: 700; line-height: 1; }
.rt-b-num.big { font-size: clamp(28px, 10cqh, 80px); }

/* une écoute : le numéro seul, et le temps pour écrire */
.rt-b-numero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqh; width: 100%; height: 100%; }
.rt-b-numero-mot { font-size: clamp(24px, 11cqh, 90px); font-weight: 600; color: #cfe7e4; line-height: 1; }
.rt-b-numero-n { font-size: 52cqh; font-weight: 700; line-height: .95; font-variant-numeric: tabular-nums; }
.rt-b-temps { width: min(70cqw, 720px); height: 14px; border-radius: 999px; background: rgb(255 255 255 / 14%); overflow: hidden; margin-top: 2cqh; }
.rt-b-temps-in { width: 100%; height: 100%; border-radius: 999px; background: var(--sun); }

/* tous les mots (Correction) */
.rt-b-tous { list-style: none; margin: 0; padding: 0; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: 1.6cqh 2cqw; }
/* (les marges de la case en px : ses unités cq se rapportent au tableau entier, pas à elle) */
.rt-b-tous-item { container-type: size; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 0; padding: 0 16px 0 14px; border-radius: 18px; background: rgb(255 255 255 / 8%); overflow: hidden; }
.rt-b-tous-item .rt-b-num { font-size: min(30cqh, 12cqw); }
.rt-b-tous-mot { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; white-space: nowrap; line-height: 1.15; font-size: 52cqh; }

/* ---------- le rituel du jour au tableau (0.9.10, rituels-jour-tableau.js) : les styles rt-b-* de la
   dictée, et ce qui est propre à chaque type. */
.rj-board .rj-consigne { margin: 0; max-width: 92cqw; font-family: var(--ui-font); font-weight: 600; font-size: clamp(18px, 5cqh, 34px); color: #e6f2f0; }
.rj-board .rj-commencer { min-width: 240px; }
.rj-carte { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh; text-align: center; }
.rj-indice { margin: 0; max-width: 92cqw; font-weight: 700; font-size: clamp(24px, 8.5cqh, 62px); line-height: 1.2; }
.rj-indice strong { color: var(--sun); }
.rj-phrase { margin: 0; max-width: 92cqw; font-family: var(--ui-font); font-weight: 600; font-size: clamp(20px, 6.2cqh, 44px); line-height: 1.3; color: #d9eeeb; }
/* la place du mot mystère dans sa phrase */
.rj-blanc { display: inline-block; width: 3.6em; height: .9em; margin: 0 .1em; border-bottom: 4px solid var(--sun); vertical-align: baseline; }
.rj-nb { margin: 0; padding: 4px 18px; border-radius: 999px; background: rgb(255 255 255 / 12%); font-family: var(--ui-font); font-size: clamp(16px, 4cqh, 28px); }
.rj-board .rj-reponse { color: var(--sun); }
.rj-pour-toi { margin: 2cqh 0 0; padding: 6px 16px; border-radius: 12px; background: rgb(0 0 0 / 28%); color: #cfe7e4; font-family: var(--ui-font); font-weight: 600; font-size: clamp(15px, 3.4cqh, 22px); text-align: center; }
.rj-tuiles { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.6cqh 1.2cqw; }
.rj-tuile { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3em; padding: .08em .22em; border-radius: 14px; background: #fff; color: #0f3d43; font-weight: 700; font-size: clamp(30px, 13cqh, 104px); line-height: 1.15; }
.rj-devant { margin-right: .2em; font-weight: 600; font-size: clamp(26px, 9cqh, 76px); color: #cfe7e4; }
.rj-vf { margin: 0; font-weight: 700; font-size: clamp(22px, 7cqh, 52px); color: var(--sun); }
.rj-reponse-vf { margin: 0; font-weight: 700; font-size: clamp(30px, 12cqh, 96px); }
.rj-reponse-vf.vrai { color: #8fe3b0; }
.rj-reponse-vf.faux { color: #ffb8a3; }
.rj-texte { width: min(100%, 1200px); display: flex; flex-direction: column; gap: 3cqh; font-family: var(--ui-font); font-weight: 600; font-size: clamp(22px, 7.2cqh, 52px); line-height: 1.5; text-align: left; }
.rj-texte p { margin: 0; }
.rj-trou { display: inline-flex; justify-content: center; min-width: 3em; padding: 0 .25em; margin: 0 .08em; border-bottom: 4px solid var(--sun); color: var(--sun); font-weight: 700; }
.rj-trou.rempli { color: #fff; border-bottom-color: #8fe3b0; }
.rj-phrase-jour { margin: 0; max-width: 92cqw; font-weight: 700; font-size: clamp(26px, 9cqh, 64px); line-height: 1.3; }
.rj-phrase-jour strong { color: var(--sun); }
.rj-tri { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3cqh; }
.rj-tuile-mot { padding: .12em .5em; font-size: clamp(22px, 6.5cqh, 46px); }
.rj-colonnes { width: 100%; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 2cqw; }
.rj-colonne { min-height: 18cqh; padding: 1.5cqh 1cqw; border: 2px dashed rgb(255 255 255 / 40%); border-radius: 18px; text-align: center; }
.rj-colonne-titre { margin: 0 0 1cqh; font-weight: 700; font-size: clamp(17px, 4.6cqh, 32px); color: var(--sun); }
.rj-colonne-mot { margin: .5cqh 0; font-weight: 600; font-size: clamp(18px, 5.4cqh, 38px); }
.rj-ordre { margin: 0; padding-left: 1.6em; columns: 2; column-gap: 3em; font-weight: 600; font-size: clamp(20px, 6cqh, 40px); }
.rj-lecture { width: min(100%, 1250px); display: flex; flex-direction: column; gap: 1.5cqh; }
.rj-lecture-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rj-lecture-titre { margin: 0; font-weight: 700; font-size: clamp(18px, 4.5cqh, 32px); color: #cfe7e4; }
.rj-chrono { margin: 0; padding: 4px 22px; border-radius: 999px; background: rgb(255 255 255 / 12%); font-weight: 700; font-variant-numeric: tabular-nums; font-size: clamp(22px, 7cqh, 52px); }
.rj-chrono.fini { background: var(--sun); color: #3a2b00; }
/* le texte en colonne, le nombre de mots juste à droite de la ligne la plus longue */
.rj-lignes { display: grid; grid-template-columns: minmax(0, max-content) max-content; justify-content: center; align-items: baseline; column-gap: 1.4em; row-gap: .5cqh; font-family: var(--ui-font); font-weight: 600; font-size: clamp(18px, 5.2cqh, 40px); line-height: 1.35; text-align: left; }
.rj-ligne { display: contents; }
.rj-ligne-texte { min-width: 0; white-space: nowrap; overflow: hidden; }
.rj-total { color: #8fb9b4; font-size: .6em; font-variant-numeric: tabular-nums; text-align: right; }
.rj-correction { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 2cqh; }
.rj-correction .rt-b-tous { flex: 1; min-height: 0; height: auto; }

/* ---------- le bilan de la semaine (0.9.10, bilan-semaine.js) : sobre, lisible sur l'iPad */
.bs-page { max-width: 1040px; }
.bs-dates { margin: 2px 0 0; }
.bs-h2 { margin: 0 0 6px; font-size: 18px; }
.bs-rituels { margin: 0 0 22px; padding: 14px 18px; border-radius: var(--radius-s); background: var(--paper); box-shadow: var(--shadow); }
.bs-jour { margin: 0 0 24px; }
.bs-jour-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 21px; }
.bs-jour-titre a { color: inherit; text-decoration: none; }
.bs-jour-titre a:hover { text-decoration: underline; }
.bs-vide { margin: 0 0 8px; }
.bs-creneau { margin: 0 0 10px; padding: 12px 18px 14px; border-radius: var(--radius-s); background: var(--paper); box-shadow: var(--shadow); }
.bs-creneau.hors { background: var(--bg); box-shadow: none; border: 1px dashed var(--line); }
.bs-creneau-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 4px; font-size: 16.5px; }
.bs-heure { font-family: var(--title-font); font-weight: 700; }
.bs-matiere { color: var(--ink-2); font-weight: 600; }
.bs-compte { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 500; }
.bs-activite { margin: 6px 0 2px; }
.bs-ligne { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; margin: 5px 0 0; font-size: 15.5px; line-height: 1.45; }
.bs-sous { margin-left: 14px; }
.bs-quoi { font-weight: 600; }
.bs-code { font-weight: 500; }
.bs-etiq { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.bs-etiq.fait { background: var(--leaf-soft); color: var(--leaf-text); }
.bs-etiq.commence { background: var(--sun-soft); color: var(--ink-2); }
.bs-etiq.pas-fait { background: var(--coral-soft); color: var(--coral-text); }
.bs-etiq.absent { background: var(--bg-2); color: var(--muted); }
.bs-noms { min-width: 0; }
.bs-nom { color: inherit; text-decoration: none; white-space: nowrap; }
.bs-nom:hover { text-decoration: underline; }
.bs-ancienne { margin: 30px 0 8px; font-size: 14px; }
/* (discrets, mais assez grands au doigt : la marge intérieure agrandit la zone à toucher) */
.bs-ancienne a { display: inline-block; padding: 12px 0; }
/* l'ancienne vue (semaine.js) : le retour au bilan, discret, à côté de « Semaine A » */
.wk-bilan { margin-left: 8px; padding: 14px 4px; font-family: var(--ui-font); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.bs-ancienne a { color: var(--muted); }
@media (max-width: 600px) { .bs-compte { margin-left: 0; flex-basis: 100%; } .bs-sous { margin-left: 6px; } }

/* ---------- bandelettes à coller (A4 portrait ; mesures reprises dans bandelettes.js) */
.bdl-bar-nom { font-family: var(--title-font); font-weight: 700; font-size: 18px; }
.bdl-bar .bdl-bar-titre { min-width: 0; color: var(--ink-2); font-weight: 600; margin-right: 6px; overflow-wrap: anywhere; }
.bdl-bar-break { flex-basis: 100%; height: 0; }
.bdl-bar .check { margin-left: 8px; }
.bdl-pas { display: inline-flex; align-items: center; gap: 6px; }
.bdl-pas .btn { min-width: 44px; padding: 0 12px; font-size: 20px; }
.bdl-nombre { min-width: 118px; text-align: center; font-family: var(--title-font); font-weight: 700; }
.bdl-apercu { --z: 1; overflow-x: hidden; }
.bdl-root { --ec: 1; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 12px 40px; }
.bdl-page { position: relative; flex: none; box-sizing: border-box; width: 210mm; height: 297mm; padding-top: 12mm; background: #fff; color: #252525; font-family: SheetSans, 'DejaVu Sans', Verdana, sans-serif; line-height: 1.2; box-shadow: 0 10px 34px rgb(30 40 50 / 12%); zoom: var(--z, 1); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bdl-consigne { position: absolute; top: 4.2mm; left: 25mm; right: 25mm; margin: 0; display: flex; align-items: center; justify-content: center; gap: 2mm; font-size: 8.5pt; line-height: 1; color: #6a6a6a; }
.bdl-ciseaux svg { display: block; width: 4.2mm; height: 4.2mm; fill: none; stroke: #6a6a6a; stroke-width: 1.7; stroke-linecap: round; }
.bdl-pile { width: 160mm; margin: 0 auto; }
.bdl-strip { box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; border: .7pt dashed #8a8a8a; padding: 2.6mm 3mm 3mm; }
.bdl-strip + .bdl-strip { margin-top: -.7pt; }
.bdl-head { flex: none; height: 7mm; display: flex; align-items: center; gap: 6mm; font-size: 10.5pt; line-height: 1; }
.bdl-titre { flex: 1; min-width: 0; font-size: 12pt; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bdl-date { flex: none; white-space: nowrap; }
.bdl-dots { letter-spacing: .02em; }
.bdl-cases { margin-top: 1.8mm; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 1.6mm 2.4mm; }
.bdl-case { box-sizing: border-box; height: calc(2.4mm + 30.7pt * var(--ec)); display: flex; align-items: flex-start; gap: 1.8mm; padding: 1.2mm 2mm .8mm 1.6mm; border: .5pt solid #a5a5a5; border-radius: 1.6mm; overflow: hidden; }
/* le numéro, au niveau de la bande d'écriture (entre les deux traits foncés) */
.bdl-num { flex: none; box-sizing: border-box; min-width: 6.2mm; height: 6.2mm; padding: 0 .9mm; margin-top: calc(19.7pt * var(--ec) - 3.1mm); display: flex; align-items: center; justify-content: center; border: .7pt solid #252525; border-radius: 1.2mm; font-size: 10.5pt; font-weight: 700; line-height: 1; }
.bdl-ligne { flex: 1; min-width: 0; }
body[data-role="print"] .bdl-root { padding: 0; gap: 0; display: block; }
body[data-role="print"] .bdl-page { box-shadow: none; zoom: 1; }
@media print {
  .bdl-apercu { overflow: visible; }
  .bdl-root { display: block; padding: 0; gap: 0; }
  /* Un A4 d'imprimante fait un peu moins de 297 mm (voir sheet.css) : sans ce point de moins,
     chaque page débordait sur une page blanche. */
  .bdl-page { zoom: 1 !important; width: 594pt; height: 841pt; box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  .bdl-page:last-child { break-after: auto; page-break-after: auto; }
}

/* ---------- 0.9.11 : les rituels refaits (rituels2.js, rituels2-tableau.js, rituels-creneau.js) */

/* le bouton du créneau et son « ▾ » : un seul bloc, deux touches (44 px de haut) */
.rt-slot-box { display: inline-flex; align-items: stretch; max-width: 400px; }
.rt-slot-box .btn.rt-slot { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rt-slot-box .rt-slot-autre { min-width: 40px; min-height: 44px; padding: 0 10px; margin-left: -1.5px; border-top-left-radius: 0; border-bottom-left-radius: 0; font-size: 16px; }
.rt-slot-box .btn.rt-slot.done + .rt-slot-autre { border-color: var(--leaf-line); }
.jours-2 .rt-slot-box .rt-slot-autre { min-width: 34px; padding: 0 6px; }

/* la fenêtre « 🔔 Rituel » : pour qui, la matière, les six ateliers */
.r2-choix { display: flex; flex-direction: column; gap: 12px; padding: 0 0 16px; margin: 0 0 14px; border-bottom: 1px solid var(--line-2); }
.r2-choix-pour { margin: 0; font-size: 16px; }
.r2-choix-faits { color: var(--leaf-ink, var(--leaf)); font-weight: 600; }
.r2-choix-matiere { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--sun-soft); font-size: 15.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.r2-ateliers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.r2-atelier { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 84px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--paper, #fff); color: inherit; text-align: left; }
.r2-atelier:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.r2-atelier.propose { border-color: var(--brand); box-shadow: 0 0 0 1.5px var(--brand); }
.r2-atelier:disabled { opacity: .55; cursor: default; }
.r2-atelier-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.r2-atelier-ico { font-size: 22px; line-height: 1; }
.r2-atelier-nom { font-family: var(--title-font); font-weight: 700; font-size: 17.5px; }
.r2-atelier-min { color: var(--ink-2); font-size: 14px; margin-left: auto; }
.r2-atelier-ligne { color: var(--ink-2); font-size: 14.5px; line-height: 1.35; }
.r2-choix-aide { margin: 0; }

/* ---------- au tableau (styles rt-b-* de la dictée, et ce qui est propre aux ateliers) */
.r2-board strong { color: var(--sun); font-weight: 800; }
.r2-board .r2-consigne { margin: 0; max-width: 92cqw; font-family: var(--ui-font); font-weight: 600; font-size: clamp(18px, 4.6cqh, 32px); color: #e6f2f0; }
.r2-board .r2-commencer { min-width: 240px; }
.r2-question { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.6cqh; text-align: center; }
.r2-tag { margin: 0; padding: 4px 16px; border-radius: 999px; background: rgb(255 255 255 / 12%); color: #cfe7e4; font-family: var(--ui-font); font-weight: 600; font-size: clamp(14px, 3.2cqh, 22px); }
.r2-ecoute { margin: 0; font-size: clamp(40px, 16cqh, 120px); line-height: 1; }
.r2-q { margin: 0; max-width: 92cqw; font-weight: 700; font-size: clamp(24px, 8cqh, 60px); line-height: 1.2; }
.r2-montrez { margin: 0; color: #a9cdc9; font-family: var(--ui-font); font-weight: 600; font-size: clamp(16px, 4cqh, 28px); }
.r2-indice { margin: 0; padding: 6px 20px; border-radius: 14px; background: rgb(242 184 75 / 22%); font-family: var(--ui-font); font-weight: 600; font-size: clamp(18px, 5cqh, 36px); }
.r2-reponse { display: flex; flex-direction: column; align-items: center; gap: 1.6cqh; max-width: 94cqw; }
.r2-reponse-txt { font-weight: 700; font-size: clamp(26px, 9cqh, 70px); line-height: 1.2; }
.r2-explication { margin: 0; max-width: 88cqw; color: #d9eeeb; font-family: var(--ui-font); font-weight: 500; font-size: clamp(16px, 4.2cqh, 30px); line-height: 1.35; }
.r2-rappel-phrase { margin: 0; padding: 6px 18px; border-radius: 14px; background: rgb(255 255 255 / 10%); font-family: var(--ui-font); font-weight: 600; font-size: clamp(18px, 4.6cqh, 34px); }
.r2-phrase-depart { margin: 0; max-width: 94cqw; font-weight: 700; font-size: clamp(28px, 10cqh, 76px); line-height: 1.25; }

/* Mes mots : les cinq étapes, le mot en grand */
.r2-mot { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4cqh; text-align: center; }
.r2-phases { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.r2-phases li { padding: 4px 14px; border-radius: 999px; background: rgb(255 255 255 / 9%); color: #a9cdc9; font-family: var(--ui-font); font-weight: 600; font-size: clamp(13px, 2.8cqh, 19px); }
.r2-phases li.on { background: var(--sun); color: #3a2b00; }
.r2-phases li.fait { color: #8fe3b0; }
.r2-mot-grand { max-width: 94cqw; font-weight: 700; line-height: 1.1; white-space: nowrap; font-size: min(30cqh, calc(92cqw / (var(--len) * .62))); }
.r2-cache { display: flex; flex-direction: column; align-items: center; gap: 1.4cqh; width: min(80cqw, 900px); padding: 4cqh 2cqw; border: 3px dashed rgb(255 255 255 / 40%); border-radius: 24px; font-family: var(--ui-font); font-weight: 600; font-size: clamp(20px, 6cqh, 44px); color: #e6f2f0; }
.r2-cache span:first-child { font-size: 1.6em; }
.r2-epelle { margin: 0; font-weight: 700; letter-spacing: .08em; font-size: clamp(22px, 7cqh, 54px); color: #cfe7e4; }
.r2-photo { margin: 0; font-family: var(--ui-font); font-weight: 600; font-size: clamp(18px, 5cqh, 36px); color: #cfe7e4; }
.r2-photo .r2-chrono { display: inline-block; min-width: 1.6em; margin-left: .3em; padding: 0 .3em; border-radius: 12px; background: var(--sun); color: #3a2b00; font-weight: 800; }
.r2-aide { margin: 0; max-width: 92cqw; color: #a9cdc9; font-family: var(--ui-font); font-weight: 600; font-size: clamp(15px, 3.6cqh, 26px); }

/* Dictée flash : je regarde (les mots, la phrase), je corrige */
.r2-etude { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3cqh; text-align: center; }
.r2-liste-mots { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6cqh 1.6cqw; }
.r2-chip { display: inline-flex; align-items: center; gap: .3em; padding: .12em .55em; border-radius: 18px; background: rgb(255 255 255 / 12%); font-weight: 700; font-size: clamp(24px, 7.5cqh, 58px); }
.r2-chip .rt-b-num { font-size: .6em; }
.r2-phrase { margin: 0; max-width: 94cqw; font-weight: 700; font-size: clamp(22px, 6.6cqh, 50px); line-height: 1.3; }
.r2-defi { color: #e6f2f0; font-size: clamp(18px, 5cqh, 40px); }
.r2-defi-tag { display: inline-block; margin-right: .3em; padding: 2px 12px; border-radius: 999px; background: rgb(242 184 75 / 25%); color: var(--sun); font-family: var(--ui-font); font-weight: 700; font-size: .6em; vertical-align: middle; }
.r2-defi-tag.grand { font-size: clamp(18px, 4.6cqh, 32px); }
.r2-chrono-ligne { margin: 0; font-weight: 700; font-size: clamp(22px, 6cqh, 44px); font-variant-numeric: tabular-nums; }
.r2-dicte { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh; text-align: center; }
.r2-dicte-quoi { margin: 0; font-weight: 700; font-size: clamp(28px, 11cqh, 84px); }
.r2-points { display: flex; gap: 14px; }
.r2-points span { width: clamp(16px, 3.4cqh, 26px); height: clamp(16px, 3.4cqh, 26px); border-radius: 50%; background: rgb(255 255 255 / 18%); }
.r2-points span.on { background: var(--sun); }
.r2-points span.fait { background: #8fe3b0; }

/* Copie express : le texte des deux niveaux côte à côte, le chronomètre */
.r2-copie { width: 100%; display: flex; flex-direction: column; gap: 1.6cqh; }
.r2-copie-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.r2-copie-aide { margin: 0; color: #cfe7e4; font-family: var(--ui-font); font-weight: 600; font-size: clamp(15px, 3.4cqh, 24px); }
.r2-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2cqw; align-items: start; }
.r2-col { min-width: 0; padding: 1.4cqh 1.4cqw 1.8cqh; border-radius: 18px; background: rgb(255 255 255 / 7%); }
.r2-col-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 1cqh; color: var(--sun); font-weight: 700; font-size: clamp(16px, 3.8cqh, 28px); }
.r2-col-n { color: #a9cdc9; font-family: var(--ui-font); font-weight: 600; font-size: .7em; }
.r2-lignes { justify-content: stretch; grid-template-columns: minmax(0, 1fr) max-content; font-size: clamp(16px, 4.6cqh, 36px); }
.r2-copie:not(.deux) .r2-lignes { font-size: clamp(18px, 5.2cqh, 40px); }
.r2-compter { margin: 0; padding-left: 1.4em; color: #e6f2f0; font-family: var(--ui-font); font-weight: 600; font-size: clamp(15px, 3.4cqh, 24px); line-height: 1.4; }
.r2-recues { margin: 0; color: #cfe7e4; font-family: var(--ui-font); font-weight: 600; font-size: clamp(14px, 3cqh, 21px); }

/* Quiz éclair : les réponses à la fin */
.r2-bilan { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2cqh; }
.r2-bilan-liste { margin: 0; padding-left: 1.6em; columns: 2; column-gap: 3em; font-weight: 600; font-size: clamp(18px, 5cqh, 36px); line-height: 1.5; }

/* sombre : rien de plus (le tableau est toujours sombre) ; impression : jamais */
@media print { .r2-board { display: none !important; } }

/* ---------- la copie express à l'ordinateur (élève, student/copie.js) : au-dessus de la page,
   sous l'écran figé (« Regarde le tableau », z-index 2000) */
.cpx { position: fixed; inset: 0; z-index: 1950; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
.cpx-inner { max-width: 1100px; margin: 0 auto; padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 14px; }
.cpx-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cpx-titre { margin: 0; font-size: clamp(20px, 2.6vw, 28px); }
.cpx-sous { color: var(--ink-2); font-weight: 600; font-size: .8em; }
.cpx-temps { margin: 0; padding: 4px 18px; border-radius: 999px; background: var(--brand); color: #fff; font-family: var(--title-font); font-weight: 700; font-size: clamp(22px, 3vw, 34px); font-variant-numeric: tabular-nums; }
.cpx-modele { margin: 0; padding: 16px 20px; border-radius: 18px; background: var(--paper, #fff); box-shadow: var(--shadow); font-family: SheetSans, var(--ui-font), sans-serif; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.55; user-select: none; -webkit-user-select: none; }
.cpx-consigne { margin: 0; color: var(--ink-2); font-weight: 600; font-size: 17px; }
.cpx-saisie { width: 100%; min-height: 9em; padding: 14px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--paper, #fff); color: var(--ink); font-family: SheetSans, var(--ui-font), sans-serif; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.5; resize: vertical; }
.cpx-saisie:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cpx-saisie:disabled { background: var(--bg-2); color: var(--ink-2); }
.cpx-actions { display: flex; justify-content: flex-end; gap: 10px; }
.cpx-actions .btn { min-height: 48px; padding: 0 22px; font-size: 17px; }
.cpx-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cpx-niveau { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 96px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 18px; background: var(--paper, #fff); color: inherit; text-align: left; font-size: 17px; }
.cpx-niveau strong { font-family: var(--title-font); font-size: 21px; }
.cpx-niveau:hover { border-color: var(--brand); }
.cpx-resultat { display: flex; flex-direction: column; gap: 14px; }
.cpx-score { margin: 0; font-family: var(--title-font); font-weight: 700; font-size: clamp(22px, 3vw, 32px); }
.cpx-score-n { font-size: 2em; color: var(--brand); }
.cpx-progres { margin: 0; font-weight: 600; font-size: 18px; color: var(--ink-2); }
.cpx-progres.plus { color: var(--leaf-text, var(--leaf)); }
.cpx-erreurs { padding: 12px 16px; border-radius: 16px; background: var(--paper, #fff); box-shadow: var(--shadow); }
.cpx-erreurs ul { margin: 6px 0 0; padding-left: 1.2em; columns: 2; font-size: 18px; line-height: 1.6; }
.cpx-erreurs s { color: var(--coral-text, var(--coral)); }
.cpx-erreurs-t { margin: 0; font-weight: 700; }
.cpx-bravo { margin: 0; font-weight: 700; font-size: 19px; color: var(--leaf-text, var(--leaf)); }
.cpx-remarque { margin: 0; padding: 8px 14px; border-radius: 12px; background: var(--sun-soft); font-weight: 600; }
.cpx-erreur { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--coral-soft); color: var(--coral-text, var(--coral)); font-weight: 600; }
.cpx-courbe { padding: 12px 16px; border-radius: 16px; background: var(--paper, #fff); box-shadow: var(--shadow); }
.cpx-barres { display: flex; align-items: flex-end; gap: 8px; height: 140px; margin-top: 30px; }   /* (la place du nombre au-dessus de la plus haute barre) */
.cpx-barre { position: relative; flex: 1; max-width: 46px; min-height: 6px; border-radius: 8px 8px 3px 3px; background: var(--brand-soft); border: 1.5px solid var(--brand); }
.cpx-barre.der { background: var(--brand); }
.cpx-barre-n { position: absolute; top: -22px; left: 0; right: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 700px) { .cpx-erreurs ul { columns: 1; } }

/* ---------- la page Rituels (0.9.11, rituels.js) : des sections alignées, des actions nommées */
.r2p-section { margin: 0 0 26px; padding: 16px 20px 18px; border-radius: var(--radius); background: var(--paper, #fff); box-shadow: var(--shadow); }
.r2p-section > h2, .r2p-titre-ligne h2 { margin: 0 0 6px; font-size: 21px; }
.r2p-section > .muted { margin: 0 0 12px; max-width: 900px; }
.r2p-titre-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.r2p-sem-label { font-weight: 600; min-width: 190px; text-align: center; }
.r2p-banques { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; margin: 0 0 12px; }
.r2p-banque { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; }
.r2p-banque.a-installer { border-style: dashed; border-color: var(--brand); background: var(--brand-soft); }
.r2p-banque p { margin: 0; }
.r2p-banque-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.r2p-banque-tete h3 { margin: 0 auto 0 0; font-size: 18px; }
.r2p-ok { color: var(--leaf-text, var(--leaf)); font-weight: 600; }
.r2p-attente { color: var(--ink-2); font-weight: 600; }
.r2p-details summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; color: var(--ink-2); font-weight: 600; }
.r2p-details ul { margin: 4px 0 0; padding-left: 1.2em; columns: 2; font-size: 14.5px; }
.r2p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.r2p-actions .btn, .r2p-actions .input { min-height: 44px; }
.r2p-actions .input { width: auto; }
.r2p-rapport { max-height: 50vh; overflow: auto; padding-left: 1.2em; }
.r2p-rapport.bad li { color: var(--coral-text, var(--coral)); }
.r2p-table-box { overflow-x: auto; }
.r2p-table { border-collapse: collapse; min-width: 640px; width: 100%; font-size: 15px; }
.r2p-table th, .r2p-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-2, var(--line)); text-align: center; }
.r2p-table thead th { font-family: var(--title-font); font-weight: 600; font-size: 13.5px; color: var(--ink-2); vertical-align: bottom; }
.r2p-table thead th > span { display: block; }
.r2p-table tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.r2p-cible { color: var(--muted); font-weight: 500; }
.r2p-table td.ok { color: var(--leaf-text, var(--leaf)); font-weight: 800; }
.r2p-table td.en-cours { color: var(--ink); font-weight: 600; }
.r2p-table td:not(.ok):not(.en-cours) { color: var(--muted); }
.r2p-h3 { margin: 16px 0 6px; font-size: 16.5px; }
.r2p-copies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.r2p-copies li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2, var(--line)); }
.r2p-copie-quand { font-weight: 600; min-width: 200px; }
.r2p-copies .btn.small { min-height: 40px; margin-left: auto; }
.r2p-scores { display: flex; flex-direction: column; gap: 8px; }
.r2p-score-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0; border-bottom: 1px solid var(--line-2, var(--line)); }
.r2p-score-nom { min-width: 160px; font-weight: 600; }
.r2p-niveau { width: auto; min-height: 44px; }
.r2p-score { width: 6.5em; min-height: 44px; font-size: 18px; text-align: center; }

/* ---------- la copie express sur papier (A4 portrait, copie-impression.js) */
.cpi-root { display: flex; flex-direction: column; align-items: center; gap: 0; }
.cpi-page { position: relative; box-sizing: border-box; width: 210mm; height: 297mm; padding: 14mm 14mm 12mm; overflow: hidden; display: flex; flex-direction: column; gap: 5mm; background: #fff; color: #222; font-family: SheetSans, 'DejaVu Sans', Verdana, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-after: page; page-break-after: always; }
.cpi-page:last-child { break-after: auto; page-break-after: auto; }
.cpi-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 6mm; border-bottom: .6mm solid #0f6b73; padding-bottom: 2mm; }
.cpi-tete h1 { margin: 0; font-family: SheetSans, sans-serif; font-size: 20pt; color: #0f6b73; }
.cpi-nom { margin: 0; font-size: 14pt; font-weight: 700; }
.cpi-nom span { font-weight: 400; color: #555; }
.cpi-consigne, .cpi-pied { margin: 0; font-size: 11.5pt; line-height: 1.4; color: #333; }
.cpi-pied { margin-top: auto; color: #555; font-size: 10.5pt; }
.cpi-graphe { flex: 1; min-height: 0; display: grid; grid-template-columns: 11mm 1fr; gap: 2mm; }
.cpi-axe { position: relative; }
.cpi-grad { position: absolute; right: 0; transform: translateY(50%); font-size: 9pt; color: #555; }
.cpi-zone { position: relative; border-left: .5mm solid #333; border-bottom: .5mm solid #333; }
.cpi-ligne { position: absolute; left: 0; right: 0; height: 0; border-top: .2mm solid #d6d6d6; }
.cpi-ligne.forte { border-top-color: #a9a9a9; }
.cpi-colonnes { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.cpi-col { position: relative; border-right: .2mm dashed #cfcfcf; }
.cpi-col:not(.seconde) { border-left: .4mm solid #9d9d9d; }
.cpi-barre { position: absolute; left: 18%; right: 18%; bottom: 0; background: #bfe0dc; border: .4mm solid #0f6b73; border-bottom: 0; }
.cpi-barre span { position: absolute; top: -5mm; left: -2mm; right: -2mm; text-align: center; font-size: 9pt; font-weight: 700; color: #0f6b73; }
.cpi-bas { display: grid; grid-template-columns: 13mm repeat(var(--cols), minmax(0, 1fr)); }
.cpi-bas::before { content: ''; }
.cpi-case { display: flex; flex-direction: column; align-items: center; gap: .6mm; padding-top: 1mm; font-size: 8.5pt; color: #444; }
.cpi-sem { font-weight: 700; color: #0f6b73; min-height: 3.6mm; }
.cpi-cond { min-height: 3.4mm; max-width: 100%; font-size: 7.5pt; line-height: 1.15; color: #666; text-align: center; white-space: pre-line; }
.cpi-col.change { border-left: .9mm solid #d68910; }
.cpi-change { margin: 0; font-size: 9.5pt; color: #8a5a00; }
.cpi-textes { gap: 7mm; }
.cpi-texte { display: flex; flex-direction: column; gap: 2mm; padding: 4mm 5mm; border: .4mm solid #cfcfcf; border-radius: 3mm; }
.cpi-niveau { margin: 0; font-weight: 700; color: #0f6b73; font-size: 12pt; }
.cpi-lignes { display: grid; grid-template-columns: max-content max-content; column-gap: 7mm; row-gap: 1.6mm; font-size: 15pt; line-height: 1.35; }
.cpi-lignes.grand { font-size: 18pt; }
.cpi-l { display: contents; }
.cpi-n { color: #8a8a8a; font-size: .62em; align-self: baseline; text-align: right; }
body[data-role="print"] .cpi-root { display: block; }
/* (un A4 d'imprimante fait un peu moins de 297 mm : voir les bandelettes) */
@media print { .cpi-root { display: block; } .cpi-page { margin: 0; width: 594pt; height: 841pt; } }

/* la copie express sur la fiche de l'élève (copie-carte.js) */
.cpc { margin: 14px 0; }
.cpc-titre { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; font-family: var(--title-font); font-weight: 700; font-size: 18px; }
.cpc-corps { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.cpc-corps p { margin: 0; }
.cpc-barres { height: 110px; margin-top: 22px; }
.cpc-groupe { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; border-top: 1px solid var(--line); }
.cpc-cond { font-size: 14.5px; }
