/* teacher/grading.css

   Correction : copies, question par question, notation.

   Chargé par index.html, dans l'ordre de css/README.md. Ne pas changer cet
   ordre sans relire la section « Ordre de chargement ». */

/* ---------- carte de correction ---------- */

.grade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-color .15s ease;
}

.grade-card:focus-within { border-color: var(--border-strong); }

.grade-card.is-graded { opacity: .82; }

.grade-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.grade-meta { font-size: var(--fs-1); color: var(--muted); margin: 2px 0 0; }

.grade-question {
  font-size: var(--fs-4);
  font-weight: 500;
  line-height: 1.45;
  margin: 0 0 10px;
}

.answer {
  margin: 0 0 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-left: 2px solid var(--border-strong);
  border-radius: 0 6px 6px 0;
  font-size: var(--fs-3);
  line-height: 1.6;
  color: var(--muted);
  white-space: pre-wrap;
  max-height: 160px;
  overflow-y: auto;
}

.answer-audio { width: 100%; margin-bottom: 10px; }

.expected { margin: 0 0 12px; }

.expected summary {
  font-size: var(--fs-2);
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
}

.expected p {
  margin: 6px 0 0;
  font-size: var(--fs-3);
  color: var(--text);
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
}

.grade-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.score input {
  width: 62px;
  padding: 7px 10px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: var(--fs-4);
  color: var(--text);
}

@media (max-width: 760px) {
  .grade-foot { gap: 8px; }
  .grade-foot .btn { flex: 1; }
}

.review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 22px 0 18px;
}

.review-student { font-size: var(--fs-2); color: var(--muted); margin: 0 0 2px; }

.review-title { font-size: var(--fs-7); font-weight: 600; margin: 0; letter-spacing: -.01em; }

.review-sub { font-size: var(--fs-2); color: var(--muted); margin: 4px 0 0; }

.review-count { text-align: right; }

.review-count-value { display: block; font-size: var(--fs-3); font-weight: 500; }

/* Progression : une barre segmentée, un segment par question, cliquable. */

.qbar { display: flex; gap: 3px; margin-bottom: 44px; }

.qseg {
  flex: 1;
  height: 3px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: var(--border);
  cursor: pointer;
}

.qseg.is-right { background: var(--green); }

.qseg.is-wrong { background: var(--red); }

.qseg.is-pending { background: var(--border-strong); }

.qseg.is-current { height: 5px; margin: -1px 0; background: var(--primary); }

.qpane { max-width: 40rem; }

.qpane-step {
  font-size: var(--fs-1);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.qpane-prompt {
  font-size: var(--fs-8);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0 0 40px;
}

.qpane-block { margin-bottom: 32px; }

.qlabel {
  font-size: var(--fs-1);
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 400;
}

.answer-plain {
  margin: 0;
  font-size: var(--fs-6);
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}

.answer-plain.is-empty { color: var(--muted); font-size: var(--fs-5); font-style: italic; }

.qpane-text { margin: 0; font-size: var(--fs-3); line-height: 1.6; color: var(--muted); }

.answer-audio { width: 100%; }

/* Notation : un clic, pas un champ numérique à sélectionner puis remplir. */

.score-choice { display: flex; align-items: center; gap: 8px; }

.score-opt {
  min-width: 44px;
  padding: 9px 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-4);
  cursor: pointer;
}

.score-opt:hover { border-color: var(--border-strong); color: var(--text); }

.score-opt.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
}

.score-of { font-size: var(--fs-2); color: var(--muted); margin-left: 4px; }

.qpane textarea {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 0;
  font: inherit;
  font-size: var(--fs-4);
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
}

.qpane textarea:focus { outline: none; border-bottom-color: var(--border-strong); }

.verdict { font-size: var(--fs-4); font-weight: 500; margin: 0 0 32px; }

.verdict.is-right { color: var(--green); }

.verdict.is-wrong { color: var(--red); }

.verdict .review-line { font-weight: 400; }

.qmove {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
}

@media (max-width: 640px) {
  .review-count { text-align: left; }
  .qpane-prompt { font-size: var(--fs-7); margin-bottom: 30px; }
  .answer-plain { font-size: var(--fs-5); }
}
