/* teacher/students.css

   Élèves : liste, fiche, travaux.

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

/* =========================================================
   Élèves : liste de profils
   ========================================================= */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.avatar-lg { width: 40px; height: 40px; font-size: var(--fs-2); }

.avatar-xl { width: 56px; height: 56px; font-size: var(--fs-5); }

.student-list { display: grid; gap: 8px; }

.student-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
}

.student-row:hover { border-color: var(--border-strong); }

.student-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.student-main { flex: 1; min-width: 0; }

.student-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.student-name { font-size: var(--fs-4); font-weight: 600; margin: 0; }

.student-mail { font-size: var(--fs-2); color: var(--muted); margin: 2px 0 0; word-break: break-all; }

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

.student-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 10px 0 0;
  padding: 0;
  font-size: var(--fs-2);
  color: var(--muted);
}

.fact-alert { color: var(--primary); font-weight: 500; }

.student-go { color: var(--muted); font-size: var(--fs-5); align-self: center; flex: 0 0 auto; }

/* ---------- fiche élève ---------- */

.student-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  margin: 18px 0 24px;
}

.student-head > div:first-of-type { flex: 1; min-width: 200px; }

.student-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.work-list { display: grid; gap: 8px; }

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
}

.work-card:hover { border-color: var(--border-strong); }

.work-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.work-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.work-title { font-size: var(--fs-4); font-weight: 600; margin: 0; }

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

.work-score { font-size: var(--fs-5); font-weight: 600; margin: 8px 0 0; }

.work-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .student-head-actions { width: 100%; }
  .student-head-actions .btn { flex: 1; }
  .work-card-top { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- formule de l'élève ---------- */

.plan-tag { font-size: var(--fs-1); }
.plan-tag.plan-free { color: var(--muted); background: var(--surface-2); }
.plan-tag.plan-essentiel,
.plan-tag.plan-speaking { color: var(--primary); background: var(--primary-tint); }
.plan-tag.plan-intensif { color: var(--green); background: var(--green-tint); }

.plan-box {
  max-width: var(--w-read);
  margin: 0 0 var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.plan-box-title { margin: 0 0 2px; }
.plan-box-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--s-3); }
.plan-box-row .field { margin: 0; flex: 1 1 160px; }
.plan-box-row .btn { flex: none; height: 42px; }
.plan-box .meta { margin: var(--s-2) 0 0; }

/* Dernière activité : la ligne qui range la liste. */
.student-seen { margin: 2px 0 0; font-size: var(--fs-2); color: var(--text); font-variant-numeric: tabular-nums; }
.student-seen.is-never { color: var(--muted); }
