/* 0.9.16 — lot « remise » (docs/lots-0.9.16/CONTRAT.md) : remise validée par l'enseignant, copie
   renvoyée à refaire, copies d'un élève à l'autre. Gros boutons pour l'iPad (44 px au moins), les
   couleurs de la charte (variables de base.css, redéfinies par sombre.css). */

/* ---------- la copie (teacher/copy.js) : d'un élève à l'autre, en haut de la barre */
.viewer-bar .cv-nav { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; min-width: 0; }
.viewer-bar .cv-nav:empty { display: none; }
.cv-fleche { flex: none; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 30px; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0 0 4px; }
.cv-fleche:hover:not(:disabled) { border-color: var(--line-strong); background: var(--paper-2); }
.cv-fleche:active:not(:disabled) { transform: scale(.96); }
.cv-fleche:disabled { opacity: .35; cursor: default; }
.cv-rang { flex: none; min-width: 52px; text-align: center; font-family: var(--title-font); font-weight: 700; font-size: 16px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cv-puces { position: relative; flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; padding: 2px; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cv-puce { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 42px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 14.5px/1.2 var(--ui-font); white-space: nowrap; }
button.cv-puce:hover { border-color: var(--line-strong); }
.cv-puce small { font-weight: 500; font-size: 12px; color: var(--muted); }
.cv-puce .cv-ico { font-size: 15px; }
.cv-puce.rendue .cv-ico { color: var(--leaf-text); }
.cv-puce.attente { border-color: var(--sun-deep); background: var(--sun-soft); color: var(--sun-ink); }
.cv-puce.a-refaire { border-color: var(--coral-line); background: var(--coral-tint); color: var(--coral-ink); }
.cv-puce.pas-commence { border-style: dashed; background: transparent; color: var(--muted); opacity: .6; cursor: default; }
.cv-puce.ici, .cv-puce.ici .cv-ico, .cv-puce.ici small { background: var(--brand); border-color: var(--brand); color: var(--on-color); }
.cv-puce.ici small { opacity: .85; }
.copy-layout.cv-charge .copy-stage { opacity: .45; transition: opacity .15s; }
/* La barre grandit avec la rangée des prénoms (hauteur mesurée : --cv-barre) : le panneau de droite
   se place dessous (sur un grand écran ; en dessous de 1 100 px, il suit la copie). */
@media (min-width: 1101px) {
  .copy-layout .copy-panel { top: calc(var(--topbar-h, 56px) + var(--cv-barre, 56px) + 8px); max-height: calc(100vh - var(--topbar-h, 56px) - var(--cv-barre, 56px) - 14px); }
  html.en-simulation .copy-layout .copy-panel { top: calc(var(--topbar-h, 56px) + var(--sim-h, 56px) + var(--cv-barre, 56px) + 8px); max-height: calc(100vh - var(--topbar-h, 56px) - var(--sim-h, 56px) - var(--cv-barre, 56px) - 14px); }
}

/* ---------- la copie : remise à valider, renvoyée, historique */
.viewer-bar .rv-valider, .viewer-bar .rv-reprendre { min-height: 48px; padding: 8px 18px; font-size: 16px; }
.rv-carte { border: 2px solid var(--sun-line); background: var(--sun-tint); }
.rv-a-refaire { color: var(--coral-ink); }
.rv-faite { border: 2px solid var(--leaf-line); background: var(--leaf-tint); display: flex; flex-direction: column; gap: 10px; }
.rv-faite p { margin: 0; }
.rv-suivante { width: 100%; justify-content: center; }
.rv-histo summary { cursor: pointer; font-family: var(--title-font); font-weight: 600; }
.rv-histo-ligne { border-top: 1px solid var(--line-2); padding-top: 8px; margin-top: 8px; }
.rv-histo-ligne p { margin: 0 0 6px; }
.btn.rv-renvoyer { color: var(--coral-ink); border-color: var(--coral-line); }
.btn.rv-renvoyer:hover:not(:disabled) { background: var(--coral-tint); }

/* La fenêtre « ↩ » : les messages tout prêts, un toucher chacun, puis un message écrit. */
.rv-messages { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 16px; }
@media (max-width: 520px) { .rv-messages { grid-template-columns: 1fr; } }
.rv-messages .btn { justify-content: center; white-space: normal; }
.rv-libre { display: flex; gap: 8px; }
.rv-libre .input { flex: 1; min-height: 48px; font-size: 16px; }
.rv-libre .btn { min-height: 48px; }

/* ---------- Copies (teacher/copies.js) : à valider d'abord, puis à refaire */
.rv-liste { margin: 0 0 22px; }
.rv-liste h2 { display: flex; align-items: center; gap: 8px; }
.copy-row.rv-attente { border: 2px solid var(--sun-line); background: var(--sun-tint); }
.copy-row.rv-attente .rv-quand { color: var(--sun-ink); font-weight: 600; white-space: nowrap; }
.rv-refaire { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.rv-refaire .btn { min-height: 40px; }

/* ---------- Élèves → sa fiche (teacher/student.js) et son travail */
.tag.rv-attente-tag { background: var(--sun-soft); color: var(--sun-ink); }
.tag.rv-refaire-tag { background: var(--coral-soft); color: var(--coral-ink); }

/* ---------- l'élève (student/work.js, student/home.js) */
.rv-attente-ecran { max-width: 560px; margin: 48px auto; padding: 36px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rv-attente-ecran .rv-main { font-size: 72px; line-height: 1; animation: rv-coucou 2.4s ease-in-out infinite; transform-origin: 70% 90%; }
.rv-attente-ecran h2 { font-size: 26px; margin: 0; }
.rv-attente-ecran p { font-size: 19px; margin: 0; color: var(--ink-2); }
.rv-attente-ecran .btn { margin-top: 10px; }
@keyframes rv-coucou { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-12deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .rv-attente-ecran .rv-main { animation: none; } }
.rv-bandeau { margin: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--coral-soft); color: var(--coral-ink); border-radius: 14px; padding: 12px 16px; font-size: 16px; }
.rv-bandeau strong { font-weight: 700; }
.task .rv-message { margin: 8px 0 0; background: var(--coral-soft); color: var(--coral-ink); border-radius: 12px; padding: 8px 12px; font-size: calc(15px * var(--taille, 1)); }
