/*
 * Espace profs (`/profs/...`) : en-tete, etapes de creation, accueil,
 * reglages d'une classe, code au tableau, etats vides.
 * Uniquement des jetons de `tokens.css` ; les formulaires, cartes, puces et
 * choix sont ceux de `components.css`.
 *
 * Mobile d'abord (390 px) ; deux colonnes a partir de 960 px.
 */

/* --- En-tete de l'espace ------------------------------------------------- */
.teacher-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) max(var(--content-gutter), calc((100% - var(--content-max-width)) / 2 + var(--content-gutter)));
  border-bottom: 1px solid var(--divider);
}

.teacher-header__end {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}

.teacher-header__name {
  font-weight: 800;
}

.teacher-nav {
  display: flex;
  gap: var(--sp-1);
  order: 1;
  flex-basis: 100%;
  overflow-x: auto;
}

.teacher-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 var(--sp-4);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.teacher-nav__link[aria-current="page"] {
  background: var(--sel-bg);
  color: var(--sel-text);
}

/* Etiquette « Espace profs », a cote de la marque */
.teacher-badge {
  align-self: flex-start;
}

.teacher-badge img {
  width: 16px;
  height: 16px;
}

/* Sur mobile, le nom se reduit a l'avatar ; il reste lu */
@media (max-width: 599px) {
  .teacher-header__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* --- Contenu ------------------------------------------------------------- */
.teacher-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-6) var(--content-gutter) var(--space-8);
}

.teacher-columns {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

/* --- Etapes de « Créer ma classe » --------------------------------------- */
.teacher-steps {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
  gap: var(--sp-2);
}

.teacher-steps__item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--muted);
  font-weight: 800;
}

.teacher-steps__number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--soft);
  color: var(--muted);
}

.teacher-steps__item[aria-current="step"] {
  color: var(--text);
}

.teacher-steps__item[aria-current="step"] .teacher-steps__number {
  background: var(--violet);
  color: var(--on-accent);
}

/* Pastille de couleur de la matiere dans un choix (`data-subject`) */
.teacher-subject-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-sm);
  background: var(--subject-color);
}

/* Liste « Ce qui vous attend » */
.teacher-promises {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 800;
}

.teacher-promises li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* --- Etat vide ----------------------------------------------------------- */
.teacher-empty {
  align-items: flex-start;
  padding: var(--space-6);
}

.teacher-empty__title {
  font-size: 1.75rem;
  line-height: 1.15;
}

.teacher-empty__text {
  color: var(--muted);
}

/* Etape deja faite dans le fil */
.teacher-steps__item--done .teacher-steps__number {
  background: var(--sel-bg);
  color: var(--sel-text);
}

/* --- Formulaire de la classe ------------------------------------------- */
.teacher-game {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  border: 0;
}

.teacher-switch {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
  justify-content: flex-start;
}

.teacher-switch__hint {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.teacher-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}

.teacher-preview__identity {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.teacher-preview__name,
.teacher-preview__line {
  display: block;
}

.teacher-preview__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.teacher-preview__line {
  color: var(--muted);
  font-size: 0.875rem;
}

/* --- Code de la classe ------------------------------------------------- */
.teacher-code {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0;
  padding: var(--sp-3) var(--sp-5);
  border: 2px dashed var(--violet-light);
  border-radius: var(--radius-lg);
  background: var(--sel-bg);
  color: var(--sel-text);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.teacher-code::before {
  content: '';
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: url('/icones/saphir.svg?v=ccfeeac274') center / contain no-repeat;
}

.teacher-code--small {
  font-size: 1.5rem;
}

.teacher-code--board {
  font-size: clamp(3rem, 12vw, 9rem);
}

.teacher-code--board::before {
  width: 0.8em;
  height: 0.8em;
}

.teacher-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.teacher-code-step {
  align-items: flex-start;
}

.teacher-code-step .field {
  align-self: stretch;
}

.teacher-message {
  min-height: 12rem;
  font-family: var(--font-body);
  white-space: pre-wrap;
  resize: vertical;
}

/* Calque plein ecran du code, pour le videoprojecteur */
.teacher-board {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--space-6) var(--content-gutter);
  background: var(--bg);
}

.teacher-board[hidden] {
  display: none;
}

.teacher-board__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.teacher-board__lead {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 2.5rem);
  font-weight: 800;
}

.teacher-board__note {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.5rem);
}

/* --- Accueil : la semaine ---------------------------------------------- */
.teacher-week__title {
  font-size: 2rem;
  line-height: 1.15;
}

.teacher-week__lead {
  margin: 0;
  color: var(--muted);
}

.teacher-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-stat {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  border-bottom: var(--relief) solid var(--border);
  background: var(--soft);
}

.teacher-stat__value,
.teacher-stat__label {
  display: block;
}

.teacher-stat__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}

.teacher-stat__label {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

/* --- Accueil : a faire maintenant -------------------------------------- */
.teacher-todo {
  border-color: var(--warm-border);
  background: var(--warm-bg);
}

.teacher-todo__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--warm-text);
  font-size: 1.375rem;
}

.teacher-todo__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-todo__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.teacher-todo__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.teacher-todo__text span {
  color: var(--muted);
  font-size: 0.875rem;
}

/* --- Accueil : cartes des classes -------------------------------------- */
.teacher-classes {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.teacher-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.teacher-section-head__title {
  font-size: 1.75rem;
}

.teacher-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-class-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: var(--relief) solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.teacher-class-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--subject-color, var(--violet));
  color: var(--on-accent);
}

.teacher-class-card__head .subject-tile {
  background: var(--subject-edge, var(--violet-dark));
}

.teacher-class-card__name {
  margin: 0;
  font-size: 1.5rem;
}

.teacher-class-card__line {
  margin: 0;
  font-weight: 700;
}

.teacher-class-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-4);
}

.teacher-class-card__actions {
  margin-top: auto;
  display: flex;
  gap: var(--sp-2);
}

.teacher-class-card__stats {
  display: flex;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-class-card__stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 96px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  background: var(--soft);
}

.teacher-class-card__stats strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.teacher-class-card__stats span {
  color: var(--muted);
  font-size: 0.8125rem;
}

.teacher-goal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-2);
  font-weight: 800;
}

.teacher-goal__value {
  color: var(--muted);
}

.teacher-goal .progress {
  grid-column: 1 / -1;
}

.teacher-waiting {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}

.teacher-waiting__text {
  margin: 0;
  color: var(--muted);
}

/* --- Accueil : classement et archives ---------------------------------- */
.teacher-ranking {
  display: grid;
  gap: var(--sp-4);
}

.teacher-ranking__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.5rem;
}

.teacher-ranking__list,
.teacher-archived__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-ranking__row {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) minmax(64px, 2fr) auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
  font-weight: 800;
}

.teacher-ranking__row:first-child {
  background: var(--warm-bg);
  color: var(--warm-text);
}

.teacher-archived {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.teacher-archived__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

/* --- Reglages d'une classe --------------------------------------------- */
.teacher-settings {
  display: grid;
  gap: var(--space-6);
}

.teacher-settings__nav {
  display: flex;
  gap: var(--sp-1);
  overflow-x: auto;
}

.teacher-settings__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--touch-min);
  padding: 0 var(--sp-4);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.teacher-settings__link:hover {
  background: var(--sel-bg);
  color: var(--sel-text);
}

.teacher-settings__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-width: 0;
}

.teacher-settings__content > .text-link {
  align-self: flex-start;
}

.teacher-settings__title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.teacher-settings__heading {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
}

.teacher-settings__card {
  scroll-margin-top: var(--space-6);
}

.teacher-settings__card-title {
  font-size: 1.375rem;
}

.teacher-members {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-members__item {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.teacher-members__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.teacher-members__who {
  flex: 1;
  min-width: 0;
}

.teacher-members__date {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.teacher-confirm {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding: var(--sp-3);
  border: 2px solid var(--warm-border);
  border-radius: var(--radius-lg);
  background: var(--warm-bg);
  color: var(--warm-text);
}

.teacher-confirm[hidden] {
  display: none;
}

.teacher-confirm p {
  margin: 0;
  font-weight: 700;
}

.teacher-info {
  display: grid;
  gap: var(--sp-4);
  align-items: end;
}

.teacher-info .button {
  justify-self: start;
}

.teacher-danger {
  border-color: var(--red-strong);
}

.teacher-danger__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.teacher-danger__row--alert {
  background: var(--red-bg);
}

.teacher-danger__row > div {
  flex: 1 1 260px;
}

.teacher-danger__title {
  margin: 0;
  font-size: 1.0625rem;
}

/* --- Suivi : tableau de bord, detail d'un devoir, fiche eleve ------------ */
.teacher-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.teacher-dashboard[hidden] {
  display: none;
}

.teacher-dashboard__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.teacher-dashboard__actions {
  margin-left: auto;
  align-items: center;
}

.teacher-dashboard__grid,
.teacher-dashboard__pair {
  display: grid;
  gap: var(--sp-5);
  align-items: start;
}

.teacher-dashboard__main,
.teacher-dashboard__side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-width: 0;
}

.teacher-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-assignments {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-assignment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.teacher-assignment__who {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  min-width: 0;
}

.teacher-assignment__title {
  color: var(--text);
  font-weight: 800;
}

.teacher-assignment__line {
  color: var(--muted);
  font-size: 0.875rem;
}

.teacher-assignment__progress {
  display: flex;
  flex: 0 1 160px;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: 0.875rem;
  font-weight: 800;
}

.teacher-tabs {
  display: inline-flex;
  padding: var(--sp-1);
  border-radius: var(--radius-pill);
  background: var(--soft);
}

.teacher-tab {
  min-height: var(--touch-min);
  padding: 0 var(--sp-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
}

.teacher-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
}

.teacher-grid-scroll {
  overflow-x: auto;
}

.teacher-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: var(--sp-1);
  font-size: 0.875rem;
}

.teacher-grid th {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.teacher-grid th a {
  color: inherit;
}

.teacher-grid tbody th {
  text-align: left;
  white-space: nowrap;
}

.teacher-grid__member {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
}

.teacher-grid__cell,
.teacher-grid__xp {
  min-width: 56px;
  padding: var(--sp-2);
  border-radius: var(--radius-md);
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.teacher-grid__cell[data-band="high"],
.teacher-legend__swatch[data-band="high"] {
  background: var(--green-bg);
  color: var(--green-text);
}

.teacher-grid__cell[data-band="mid"],
.teacher-legend__swatch[data-band="mid"] {
  background: var(--sel-bg);
  color: var(--sel-text);
}

.teacher-grid__cell[data-band="low"],
.teacher-legend__swatch[data-band="low"] {
  background: var(--red-bg);
  color: var(--red-strong);
}

.teacher-grid__xp {
  color: var(--warm-text);
}

.teacher-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: var(--sp-3) 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.875rem;
  list-style: none;
}

.teacher-legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.teacher-legend__swatch {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.teacher-questions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 140px) auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.teacher-question-detail summary {
  grid-template-columns: auto minmax(0, 1fr) minmax(60px, 140px) auto;
  cursor: pointer;
  list-style: none;
}

.teacher-question-detail summary::-webkit-details-marker {
  display: none;
}

.teacher-question-detail[open] summary {
  outline: 2px solid var(--violet);
  background: var(--sel-bg);
}

.teacher-question__prompt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.teacher-question__prompt span {
  color: var(--muted);
  font-size: 0.875rem;
}

.teacher-question__rate {
  font-weight: 800;
  text-align: right;
}

.teacher-choices {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
  padding: 0 var(--sp-4);
  list-style: none;
}

.teacher-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 140px) 3ch;
  align-items: center;
  gap: var(--sp-3);
}

.teacher-choice[data-correct] .teacher-choice__label {
  color: var(--green-text);
  font-weight: 800;
}

.teacher-choice__count {
  font-weight: 800;
  text-align: right;
}

.teacher-hard {
  flex-direction: column;
  align-items: flex-start;
}

.teacher-hard__rate {
  color: var(--warm-text);
}

/* Mobile : la barre de reussite passe sous l'enonce, qui garde la largeur */
@media (max-width: 599px) {
  .teacher-question,
  .teacher-question-detail summary,
  .teacher-choice {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .teacher-question {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .teacher-question .progress,
  .teacher-choice .progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .teacher-choice {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.teacher-top__row {
  grid-template-columns: 2ch auto minmax(0, 1fr) auto;
}

.teacher-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-badge-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-3);
  border-radius: var(--radius-lg);
  background: var(--soft);
  font-weight: 700;
  text-align: center;
  border-bottom: var(--relief) solid var(--border);
}

.teacher-badge-count strong {
  font-family: var(--font-display);
  font-size: 2rem;
}

.teacher-histogram {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: var(--sp-1);
  height: 180px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-histogram__item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.75rem;
  font-weight: 800;
}

.teacher-histogram__bar {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--red-strong);
}

.teacher-histogram__bar[data-band="mid"] {
  background: var(--violet-light);
}

.teacher-histogram__bar[data-band="high"] {
  background: var(--success);
}

.teacher-histogram__bar[data-value="0"] { height: 2%; }
.teacher-histogram__bar[data-value="10"] { height: 10%; }
.teacher-histogram__bar[data-value="20"] { height: 20%; }
.teacher-histogram__bar[data-value="30"] { height: 30%; }
.teacher-histogram__bar[data-value="40"] { height: 40%; }
.teacher-histogram__bar[data-value="50"] { height: 50%; }
.teacher-histogram__bar[data-value="60"] { height: 60%; }
.teacher-histogram__bar[data-value="70"] { height: 70%; }
.teacher-histogram__bar[data-value="80"] { height: 80%; }
.teacher-histogram__bar[data-value="90"] { height: 90%; }
.teacher-histogram__bar[data-value="100"] { height: 100%; }

.teacher-histogram__score {
  color: var(--muted);
}

.teacher-member-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
}

.teacher-member {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: var(--sp-4);
  border-color: var(--sel-border);
  background: var(--hero);
}

.teacher-member__who {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  gap: var(--sp-2);
}

@media (min-width: 960px) {
  .teacher-dashboard__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  .teacher-dashboard__pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .teacher-settings {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }

  .teacher-settings__nav {
    position: sticky;
    top: var(--space-6);
    flex-direction: column;
  }

  .teacher-info {
    grid-template-columns: 1fr 1fr auto;
  }

  .teacher-ranking {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }

  /* En-tete des maquettes offre/Prof* : sans filet, menu centre dans un
     bloc arrondi, onglet courant en relief doux (refonte 2026, phase 12). */
  .teacher-header {
    padding-block: var(--sp-5) 0;
    border-bottom: 0;
  }

  .teacher-nav {
    order: 0;
    flex-basis: auto;
    gap: var(--sp-1);
    margin-inline: auto;
    padding: 5px;
    border-radius: var(--r-md);
    background: var(--surface);
  }

  .teacher-nav__link {
    min-height: 44px;
    padding: 0 14px;
    border-radius: var(--r-sm);
    font-family: var(--font-display);
    font-size: 16px;
  }

  .teacher-nav__link[aria-current="page"] {
    background: var(--soft);
    color: var(--text);
  }

  .teacher-header__end {
    margin-left: 0;
  }

  .teacher-columns {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

/* --- Eleve : rejoindre une classe (`/rejoindre`) ----------------------- */
.class-join {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.class-join__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.class-join__form[hidden] {
  display: none;
}

.class-join__title {
  margin: 0;
  font-size: 2rem;
}

.class-join__code {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.class-join__found {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--green-bg);
  color: var(--green-text);
}

.class-join__found[hidden] {
  display: none;
}

.class-join__teacher {
  display: block;
  font-size: 0.875rem;
}

.class-join__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* --- Eleve : mes devoirs (`/mes-devoirs`) ------------------------------- */
.my-assignments {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.my-assignments__lists {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.my-assignments__lists[hidden] {
  display: none;
}

.my-assignments__count {
  color: var(--muted);
  font-weight: 800;
}

.my-assignments__todo,
.my-assignments__done {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: var(--sp-3) 0 0;
  padding: 0;
  list-style: none;
}

.assignment-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-bottom: var(--relief) solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.assignment-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.assignment-card__title {
  margin: 0;
  font-size: 1.125rem;
}

.assignment-card__line {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.assignment-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.assignment-card__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.assignment-done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.assignment-done__title {
  flex: 1 1 140px;
  min-width: 0;
  font-weight: 800;
}

/* --- Nouveau devoir (`/profs/nouveau-devoir`) ---------------------------- */
.teacher-back {
  align-self: flex-start;
}

.teacher-assign {
  gap: var(--space-6);
}

.teacher-assign__step {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.teacher-assign__step[hidden] {
  display: none;
}

.teacher-assign__legend {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.teacher-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-3);
}

.teacher-kind[hidden] {
  display: none;
}

.teacher-kind__box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  height: 100%;
  padding: var(--sp-3);
  text-align: left;
}

.teacher-kind__box span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.teacher-contents {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-height: 420px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.teacher-content,
.teacher-content__box {
  width: 100%;
}

.teacher-content__box {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-align: left;
}

.teacher-content__title,
.teacher-content__detail {
  display: block;
}

.teacher-content__detail {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.teacher-boost {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 2px solid var(--warm-border);
  border-radius: var(--radius-lg);
  background: var(--warm-bg);
}

.my-assignments__adoptable {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-assignments__adopt {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* --- Jeu de classe : ligue et semaine ------------------------------------ */
.teacher-league {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--sel-bg);
  color: var(--sel-text);
}

.teacher-league[hidden] {
  display: none;
}

.teacher-league strong {
  font-family: var(--font-display);
  font-size: 1.375rem;
}

.teacher-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-week-day {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
}

.teacher-week-day[data-played="true"] {
  background: var(--warm-bg);
  color: var(--warm-text);
}

.teacher-week-day[data-played="true"]::before {
  content: '';
  width: 16px;
  height: 16px;
  background: url('/icones/glyphes/flamme.svg?v=0feccccaad') center / contain no-repeat;
}

.teacher-week-day[data-future="true"] {
  opacity: 0.6;
}

.my-assignments__classes {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-class {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.my-class__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}

.my-class__goal {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

/* --- Defi de classe au tableau (phase 6) ---------------------------------- */
/* Le tableau se lit de loin, au videoprojecteur (16:9) : grands caracteres,
   le code et les choix d'abord. */
.teacher-ranking__live {
  justify-self: start;
}

.live-new {
  display: grid;
  gap: var(--sp-5);
  max-width: 760px;
}

.live-board {
  display: grid;
  gap: var(--sp-5);
}

.live-board__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-3) var(--sp-5);
  min-height: 40px;
}

.live-board__title {
  flex: 1 1 320px;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
}

.live-board__progress {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.live-board__timer {
  min-width: 4ch;
  margin: 0;
  color: var(--flame-text);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  text-align: right;
}

.live-board__join {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-5);
}

.live-board__qr {
  width: 160px;
  height: 160px;
  padding: var(--sp-2);
  border-radius: var(--radius-md);
  background: var(--panel-card); /* blanc dans les deux themes : marge claire du QR code */
}

.live-board__join-lead,
.live-board__pin-label {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.live-board__pin {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.live-board[data-phase="question"] .live-board__pin,
.live-board[data-phase="reveal"] .live-board__pin {
  font-size: 2rem;
}

.live-board[data-phase="question"] .live-board__qr,
.live-board[data-phase="reveal"] .live-board__qr {
  width: 96px;
  height: 96px;
}

.live-board__live {
  display: grid;
  gap: var(--sp-4);
}

.live-board__prompt {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.25;
}

.live-board__answered {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.live-board__controls {
  justify-content: flex-end;
}

.live-board__final {
  display: grid;
  gap: var(--sp-5);
}

.live-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  min-height: var(--touch-min);
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.live-choice .progress {
  grid-column: 2 / 3;
}

.live-choice__letter {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--soft);
  font-family: var(--font-display);
  font-weight: 800;
}

.live-choice__count {
  grid-column: 3;
  grid-row: 1 / 3;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.live-choice[data-state="correct"] {
  border-color: var(--success);
  background: var(--green-bg);
  color: var(--green-text);
}

.live-choice[data-state="wrong"] {
  border-color: var(--red-border);
  background: var(--red-bg);
  color: var(--red-strong);
}

.live-choice[data-state="idle"] {
  opacity: 0.6;
}

.live-choice[data-state="chosen"] {
  border-color: var(--sel-border);
  background: var(--sel-bg);
  color: var(--sel-text);
}

.live-choices--compact .live-choice {
  grid-template-columns: auto minmax(0, 1fr);
}

.live-podium {
  display: grid;
  gap: var(--sp-3);
}

.live-podium__list {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-podium__row {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--soft);
  font-weight: 800;
}

.live-podium__row[data-rank="1"] {
  background: var(--warm-bg);
  color: var(--warm-text);
}

.live-hardest {
  display: grid;
  justify-items: start;
  gap: var(--sp-3);
}

.live-hardest__prompt {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.my-assignments__lives {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-assignments__live {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  border-color: var(--warm-border);
  background: var(--warm-bg);
  color: var(--warm-text);
}

.my-assignments__live-text {
  flex: 1 1 200px;
  margin: 0;
}

/* Pendant les questions, le code reste visible pour les retardataires, en petit. */
.live-board[data-phase="question"] .live-board__join,
.live-board[data-phase="reveal"] .live-board__join {
  justify-content: flex-start;
  padding: var(--sp-3) var(--sp-4);
}

.live-board[data-phase="lobby"] .live-board__join {
  justify-content: center;
}

/* --- Alignement sur les maquettes de l'espace profs (refonte 2026) -------- */
/* Accueil : trophee du bandeau, ligne d'etat et actions des cartes de classe */
.teacher-week { position: relative; }
.teacher-week__art { display: none; }
.teacher-class-card__status { display: flex; align-items: center; gap: var(--sp-2); margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); background: var(--soft); font-size: 0.875rem; font-weight: 700; }
.teacher-class-card__status[hidden] { display: none; }
.teacher-class-card__actions .teacher-class-card__open { flex: 1; }
.teacher-class-card__actions .teacher-class-card__live { flex: 0 0 auto; width: var(--touch-min); padding: 0; }

@media (min-width: 900px) {
  .teacher-week__art { position: absolute; top: var(--space-6); right: var(--space-8); display: block; width: 120px; height: 120px; }
  .teacher-week > .teacher-stats { max-width: calc(100% - 180px); }
}

/* Reglages du jeu : icone en carre, interrupteurs verts (maquettes Reglages, Creer ma classe) */
.teacher-switch > span:not(.teacher-switch__icon) { flex: 1; min-width: 0; }
.teacher-switch__icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--bg); }
.teacher-switch .switch[aria-checked="true"] { background: var(--success-action); }

/* Etapes reliees par un trait (maquette Creer ma classe) */
.teacher-steps__item + .teacher-steps__item::before { content: ''; width: 32px; height: 3px; margin-right: var(--sp-2); border-radius: var(--radius-pill); background: var(--soft); }
.teacher-steps .teacher-steps__number { border-bottom: var(--relief) solid var(--border); }

@media (max-width: 480px) {
  .teacher-steps__item + .teacher-steps__item::before { width: 12px; }
  .teacher-steps__item:not([aria-current="step"]) { font-size: 0; gap: 0; }
  .teacher-steps__item:not([aria-current="step"]) .teacher-steps__number { font-size: 0.875rem; }
}

/* Suivi d'une classe : pastilles des classes, actions dans « Devoirs en cours »,
   icones des chiffres en carres de couleur (maquette « Exemple de suivi ») */
.teacher-class-switch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-left: auto; }
.teacher-class-switch__pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--sp-4); border: 2px solid var(--border); border-radius: var(--radius-pill); background: var(--soft); color: var(--text); font-weight: 800; text-decoration: none; }
.teacher-class-switch__pill[aria-current="page"] { border-color: var(--violet); background: var(--sel-bg); color: var(--sel-text); }
.teacher-class-switch__new[hidden] { display: none; }
.teacher-section-head .teacher-dashboard__actions { align-items: center; margin-left: 0; }
.teacher-dashboard__actions .button { gap: var(--sp-1); }
.teacher-dashboard .teacher-stat > img { box-sizing: content-box; flex-shrink: 0; padding: 10px; border-bottom: var(--relief) solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
.teacher-dashboard .teacher-stat:first-child > img { border-bottom-color: var(--violet-dark); background: var(--violet); }
.teacher-dashboard .teacher-stat[data-role="goal-stat"] > img { border-bottom-color: var(--cyan-edge); background: var(--cyan); }

/* Detail d'un devoir (maquette « Detail d'un devoir ») : anneau des rendus,
   tuiles des badges aux couleurs des scores, barres sur fond rouge */
.teacher-stat__ring { width: 48px; height: 48px; }
.teacher-stat__ring .ring__arc { stroke: var(--success); }
.teacher-title-icon { display: flex; align-items: center; gap: var(--sp-2); }
.teacher-badge-count[data-band="low"] { border-color: var(--red-border); background: var(--red-bg); color: var(--red-strong); }
.teacher-badge-count[data-band="mid"] { border-color: var(--sel-border); background: var(--sel-bg); color: var(--sel-text); }
.teacher-badge-count[data-band="high"] { border-color: var(--success-dark); background: var(--green-bg); color: var(--green-strong); }
.teacher-badge-count__icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); }
.teacher-badge-count__icon .site-icon { width: 18px; height: 18px; }
.teacher-question .progress { background: var(--red-bg); }
.teacher-choice .progress { background: var(--track); }
@media (min-width: 600px) {
  .teacher-question-detail summary { grid-template-columns: auto minmax(0, 1fr) minmax(80px, 200px) 5ch; }
  .teacher-question { grid-template-columns: minmax(0, 1fr) minmax(80px, 200px) 5ch; }
}
.teacher-question-detail[open] > .teacher-choices,
.teacher-question-detail[open] > .notice { margin-left: var(--space-6); }

/* Fiche eleve (maquette « Fiche eleve ») : bandeau, grand avatar, chiffres
   en tuiles a icone, alerte a l'eclair, pseudo au cadenas, retrait pleine largeur */
.teacher-member .avatar--large { width: 112px; height: 112px; border-bottom: 6px solid var(--violet-dark); font-size: 2.75rem; }
.teacher-member .teacher-settings__heading { font-size: clamp(2rem, 5vw, 2.75rem); }
.teacher-member__stats { display: flex; flex: 0 1 auto; margin-left: auto; }
.teacher-member__stats .teacher-stat { flex-direction: column; justify-content: center; min-width: 110px; padding: var(--sp-3); text-align: center; }
.teacher-member__alert { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-width: 2px; }
.teacher-member__alert img { flex-shrink: 0; }
.teacher-member__pseudo,
.teacher-member__alert { flex-wrap: nowrap; }
.teacher-member__pseudo > span,
.teacher-member__alert > span { flex: 1; min-width: 0; }
.teacher-member__pseudo img { flex-shrink: 0; margin-top: 2px; }
.teacher-dashboard__side .teacher-danger__row { flex-direction: column; align-items: stretch; border: 2px solid var(--red-border); color: var(--red-strong); }
.teacher-dashboard__side .teacher-danger__row p { margin: 0; }
.teacher-dashboard__side .teacher-badges { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.teacher-dashboard__side .teacher-badge-count strong { font-family: var(--font-body); font-size: 0.9375rem; }

@media (max-width: 599px) {
  .teacher-member { flex-direction: column; text-align: center; }
  .teacher-member__who { flex: none; align-items: center; }
  .teacher-member__stats .teacher-stat { flex: 1; }
  .teacher-member .teacher-chips { justify-content: center; }
  .teacher-member__stats { width: 100%; margin-left: 0; }
}

/* Nouveau devoir (maquette « Assigner un devoir ») : types en tuiles de
   couleur, etapes violettes, apercu dans un cadre de telephone */
.teacher-assign__legend .teacher-steps__number { border-bottom: var(--relief) solid var(--violet-dark); background: var(--violet); color: var(--on-accent); }
.teacher-kind__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-bottom: var(--relief) solid var(--violet-dark); border-radius: var(--radius-md); background: var(--violet); }
.teacher-kind__icon img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.teacher-kind[data-kind="work"] .teacher-kind__icon { border-bottom-color: var(--subject-francais-edge); background: var(--subject-francais); }
.teacher-kind[data-kind="automatismes"] .teacher-kind__icon { border-bottom-color: var(--cyan-edge); background: var(--cyan); }
.teacher-kind[data-kind="exam"] .teacher-kind__icon { border-bottom-color: var(--flame-dark); background: var(--flame); }
.teacher-kind[data-kind="automatismes"] .teacher-kind__icon img,
.teacher-kind[data-kind="exam"] .teacher-kind__icon img { filter: brightness(0); }
.teacher-kind .choice__input:checked + .teacher-kind__box { background: var(--sel-bg); }
.teacher-preview--phone { align-items: stretch; }
.teacher-phone { display: flex; flex-direction: column; gap: var(--sp-3); width: 100%; max-width: 300px; padding: var(--sp-5) var(--sp-4); border: 8px solid var(--soft); border-radius: 40px; background: var(--bg); }
.teacher-phone__brand { margin: 0; font-family: var(--font-display); font-size: 0.875rem; font-weight: 800; }
.teacher-phone__banner { display: flex; align-items: center; gap: var(--sp-2); margin: 0; padding: var(--sp-3); border-radius: var(--radius-lg); background: var(--sel-bg); color: var(--sel-text); font-size: 0.875rem; font-weight: 700; }
.teacher-assign__actions .button { gap: var(--sp-2); }

@media (min-width: 900px) {
  .teacher-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .teacher-columns--phone { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .teacher-assign__actions { flex-direction: row-reverse; align-items: center; justify-content: space-between; }
  .teacher-assign__actions .button { width: auto; }
  .teacher-preview--phone { position: sticky; top: var(--space-6); }
}

@media (max-width: 899px) {
  .teacher-phone { margin-inline: auto; }
}

/* Fin du defi au tableau (maquette « Defi de classe · fin et podium ») :
   gagnant en titre, marches du podium (2, 1, 3), meilleur joueur en violet */
.live-final__head { text-align: center; }
.live-final__title { margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; }
.live-final__winner { color: var(--flame-text); }
.live-final__line { margin: var(--sp-2) 0 0; color: var(--muted); font-weight: 800; }
.live-final__grid { display: grid; gap: var(--sp-5); align-items: stretch; }
.live-final__podium { display: flex; flex-direction: column; justify-content: flex-end; padding: var(--sp-5) var(--sp-5) 0; border: 2px solid var(--warm-border); border-radius: var(--radius-xl); background: var(--warm-bg); }
.live-steps { display: flex; align-items: flex-end; justify-content: center; gap: var(--sp-3); min-height: 380px; margin: 0; padding: 0; list-style: none; }
.live-step { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: var(--sp-1); min-width: 0; max-width: 220px; text-align: center; }
.live-step[data-rank="1"] { order: 2; }
.live-step[data-rank="2"] { order: 1; }
.live-step:not([data-rank="1"]):not([data-rank="2"]) { order: 3; }
.live-step__crown { width: 48px; height: 48px; }
.live-step__name { max-width: 100%; overflow-wrap: anywhere; color: var(--warm-text); font-family: var(--font-display); font-size: 1.375rem; font-weight: 800; }
.live-step__score { color: var(--warm-text); font-weight: 800; }
.live-step__block { display: grid; place-items: center; width: 100%; height: 110px; margin-top: var(--sp-2); border-bottom: 10px solid var(--cyan-edge); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--cyan); color: var(--on-flame); font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; }
.live-step[data-rank="1"] .live-step__block { height: 200px; border-bottom-color: var(--flame-dark); background: var(--flame); }
.live-step[data-rank="2"] .live-step__block { height: 150px; border-bottom-color: var(--violet-dark); background: var(--violet); color: var(--on-accent); }
.live-final__side { display: flex; flex-direction: column; gap: var(--sp-3); }
.live-final__facts { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.live-final__best { border: 2px solid var(--violet); background: var(--sel-bg); }
.live-final__best .teacher-stat__label { color: var(--sel-text); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.live-final__best .teacher-stat__value { font-size: 1.5rem; }
.live-final__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: auto; }
.live-final__actions .button { flex: 1 1 240px; }

@media (min-width: 900px) {
  .live-final__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

@media (max-width: 599px) {
  .live-steps { min-height: 300px; gap: var(--sp-2); }
  .live-step__name { font-size: 1rem; }
  .live-step[data-rank="1"] .live-step__block { height: 150px; }
  .live-step[data-rank="2"] .live-step__block { height: 110px; }
  .live-step__block { height: 80px; font-size: 2rem; }
}
.live-final__facts .teacher-stat__value { font-size: 1.125rem; }
.live-final__facts .live-final__best .teacher-stat__value { font-size: 1.5rem; }
.live-final__side .live-hardest { gap: var(--sp-2); }
.live-final__side .live-hardest > :is(h4, p) { margin: 0; }
.live-final__side .live-hardest__prompt { font-size: 1.0625rem; }

/* « Ce qui vous attend » (maquette « Creer ma classe ») : fond violet, icones en carres */
.teacher-promises-card { border-color: var(--sel-border); background: var(--hero); }
.teacher-promises img { box-sizing: content-box; flex-shrink: 0; width: 22px; height: 22px; padding: 9px; border-bottom: var(--relief) solid var(--violet-dark); border-radius: var(--radius-md); background: var(--violet); filter: none; }
.teacher-promises li:nth-child(2) img { border-bottom-color: var(--flame-dark); background: var(--flame); }
.teacher-promises li:nth-child(3) img { border-bottom-color: var(--success-dark); background: var(--success); }

/* Reglages (maquette « Reglages de la classe ») : section courante, objectif en or */
.teacher-settings__link[aria-current] { background: var(--sel-bg); color: var(--sel-text); }
[data-role="goals"] .choice__input:checked + .choice__box { border-color: var(--flame-dark); background: var(--flame); color: var(--on-flame); }

/* Mes devoirs : la note reste a droite quand le badge passe a la ligne */
.assignment-done__score { margin-left: auto; }

/* Tableau du defi : quatre reponses en grille 2 x 2, une couleur par lettre,
   les memes que sur le telephone (jetons --game-answer-*, jeu.css) ; a la
   correction, la bonne en vert, les autres estompees, avec leur nombre de
   reponses. */
.live-choices--board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.live-choices--board .live-choice { --tile: var(--game-answer-a); --tile-edge: var(--game-answer-a-edge); --tile-ink: var(--game-answer-a-ink); min-height: 112px; padding: var(--sp-4) var(--sp-5); border: 0; border-bottom: var(--relief-lg) solid var(--tile-edge); background: var(--tile); color: var(--tile-ink); font-size: clamp(1.125rem, 2vw, 1.625rem); font-weight: 800; }
.live-choices--board .live-choice[data-index="1"] { --tile: var(--game-answer-b); --tile-edge: var(--game-answer-b-edge); --tile-ink: var(--game-answer-b-ink); }
.live-choices--board .live-choice[data-index="2"] { --tile: var(--game-answer-c); --tile-edge: var(--game-answer-c-edge); --tile-ink: var(--game-answer-c-ink); }
.live-choices--board .live-choice[data-index="3"] { --tile: var(--game-answer-d); --tile-edge: var(--game-answer-d-edge); --tile-ink: var(--game-answer-d-ink); }
.live-choices--board .live-choice__letter { background: var(--tile-edge); color: var(--tile-ink); }
.live-choices--board .live-choice[data-state="correct"] { --tile: var(--success); --tile-edge: var(--success-dark); --tile-ink: var(--on-accent); }
.live-choices--board .live-choice[data-state="wrong"] { opacity: 0.45; }
.live-choices--board .progress { background: var(--tile-edge); }
.live-choices--board .progress__bar { background: var(--tile-ink); }

@media (max-width: 599px) {
  .live-choices--board { gap: var(--sp-2); }
  .live-choices--board .live-choice { min-height: 88px; padding: var(--sp-3); }
}

/* « ? » a cote d'une fonction du jeu : ouvre son explication (teacher-help.js) */
.teacher-switch__name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.teacher-help {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid var(--sel-border);
  border-radius: 50%;
  background: var(--sel-bg);
  color: var(--sel-text);
  font: inherit;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.teacher-help:hover { border-color: var(--violet); }
.info-dialog__close { font-size: 1.5rem; line-height: 1; }

/* --- Defi au tableau : salle d'attente (refonte v2, phase 9, maquette
   partie/TableauLobby). Le tableau porte sa marque, sans l'en-tete prof. --- */
.live-main:has(> .live-board:not([hidden])) {
  max-width: 1276px;
  padding: var(--sp-6) 48px 40px;
  gap: var(--sp-6);
}

.live-board__brand {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.live-board[data-phase="lobby"] { gap: var(--sp-6); }
.live-board[data-phase="lobby"] .live-board__head { align-items: center; justify-content: space-between; }
.live-board[data-phase="lobby"] .live-board__brand { display: inline-flex; }
.live-board[data-phase="lobby"] .live-board__title {
  flex: 0 1 auto;
  color: var(--muted);
  font-size: 20px;
}
.live-board[data-phase="lobby"] .live-board__progress,
.live-board[data-phase="lobby"] .live-board__timer { display: none; }

.live-lobby { display: grid; gap: var(--sp-6); line-height: normal; }
.live-lobby[hidden] { display: none; }

.live-lobby__join {
  display: grid;
  grid-template-columns: 1fr 380px;
  align-items: center;
  gap: 40px;
  margin-top: 10px;
}

.live-lobby__steps { display: flex; flex-direction: column; gap: 18px; }
.live-lobby__steps > p { margin: 0; }

.live-lobby__lead { color: var(--violet-light); font-family: var(--font-display); font-size: 30px; font-weight: 800; }

.live-lobby__step { display: flex; align-items: center; gap: var(--sp-4); font-family: var(--font-display); font-weight: 800; }

.live-lobby__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--flame);
  box-shadow: 0 5px 0 var(--flame-edge);
  color: var(--on-flame);
  font-size: 28px;
}

.live-lobby__url { font-size: 40px; }
.live-lobby__path { color: var(--flame-text); }
.live-lobby__type { font-size: 30px; }

.live-lobby__pin { display: flex; gap: var(--sp-3); }

.live-lobby__digit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 115px;
  border-radius: 16px;
  background: var(--panel-card);
  box-shadow: 0 5px 0 var(--code-box-edge);
  color: var(--on-flame);
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
}

.live-lobby__digit:nth-child(4) { margin-left: 22px; }

.live-lobby__qr { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); margin: 0; }

.live-lobby__qr-frame {
  display: flex;
  padding: 22px;
  border-radius: 28px;
  background: var(--panel-card);
  box-shadow: 0 8px 0 var(--code-box-edge);
}

.live-lobby__qr-frame img { width: 290px; height: 290px; }

.live-lobby__qr-caption { color: var(--muted); font-size: 17px; font-weight: 800; }

.live-lobby__bar { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }

.live-lobby__count { margin: 0; font-size: 26px; }

.live-lobby__launch { min-height: 64px; padding: 0 34px; font-size: 22px; }

.live-lobby__players { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 46px;
  padding: 0 var(--sp-4) 0 6px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.live-chip .live-chip__avatar { width: 34px; height: 34px; font-size: 15px; }

.live-chip[data-visitor="true"] { padding-right: var(--sp-4); border: 0; }

.live-chip__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  cursor: pointer;
  width: 0;
  margin-left: -8px;
  overflow: hidden;
  opacity: 0;
}

.live-rename { max-width: 480px; }
.live-rename[hidden] { display: none; }

@media (max-width: 1100px) {
  .live-lobby__join { grid-template-columns: 1fr; }
  .live-lobby__digit { width: 64px; height: 80px; font-size: 44px; }
  .live-lobby__url { font-size: 28px; }
}

/* Tableau ouvert sur un telephone : code, QR et barre tiennent dans 390 px */
@media (max-width: 600px) {
  .live-lobby__join { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .live-lobby__lead, .live-lobby__type { font-size: 22px; }
  .live-lobby__url { font-size: 22px; overflow-wrap: anywhere; }
  .live-lobby__pin { gap: 6px; }
  .live-lobby__digit { flex: 1 1 0; width: auto; min-width: 0; height: 64px; font-size: 34px; }
  .live-lobby__digit:nth-child(4) { margin-left: 10px; }
  .live-lobby__qr-frame { padding: 14px; }
  .live-lobby__qr-frame img { width: 200px; height: 200px; }
  .live-lobby__bar { flex-wrap: wrap; gap: var(--sp-3); }
  .live-lobby__launch { flex: 1 1 100%; }
}

.live-board__brand .site-icon { width: 40px; height: 40px; }
.live-lobby__qr-frame img.site-icon,
.live-lobby__qr-frame img { flex-shrink: 0; }
.live-lobby__count .site-icon { width: 30px; height: 30px; }

/* Les actions d'un invite de passage se montrent au survol ou au clavier :
   la salle d'attente reste lisible de loin. */

.live-chip:hover .live-chip__action,
.live-chip:focus-within .live-chip__action {
  width: 34px;
  margin-left: 0;
  opacity: 1;
}

.live-chip[data-visitor="true"]:hover,
.live-chip[data-visitor="true"]:focus-within { padding-right: 6px; }

/* =============================================================================
   Devoirs de chapitre par etapes (refonte de 2026, phase 12)
   Maquettes offre/ProfDonnerDesktop, offre/ProfSuiviDesktop.
   ========================================================================== */

/* Carre d'etape plus petit (listes de devoirs, suivi) */
.step-icon--small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.step-icon--small .site-icon {
  width: 20px;
  height: 20px;
}

/* --- Donner un chapitre --------------------------------------------------- */

.give {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.give__chapter {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.give__back {
  align-self: flex-start;
  display: flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

.give__back:hover {
  color: var(--text);
}

.give__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 0.95;
}

.give__lead {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
}

/* Le chapitre en quatre etapes, en retrait derriere la carte (maquette) */
.give__overview {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0.55;
}

.give-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.give-step .step-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.give-step > span:last-child {
  display: flex;
  flex-direction: column;
}

.give-step__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
}

.give-step__detail {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.give__card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: 22px;
  border: 2px solid var(--sel-border);
  border-radius: 28px;
  background: var(--nav);
}

.give__eyebrow {
  margin: 0 0 -14px;
  color: var(--accent-text);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.give__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
}

.give__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.give__label {
  padding: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.05;
}

.give__select,
.give__date {
  box-sizing: border-box;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}

.give__date {
  height: 52px;
}

.give__choices {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.give-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  cursor: pointer;
}

.give-choice:has(:checked) {
  border-color: var(--sel-border);
}

.give-choice__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.give-choice__box {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  border: 2px solid var(--border);
  border-radius: 8px;
}

.give-choice__box,
.follow-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.give-choice__input:checked + .give-choice__box {
  border-color: var(--sel-border);
  background: var(--sel-border);
}

.give-choice__input:checked + .give-choice__box::before,
.follow-box[data-state="done"]::before {
  width: 16px;
  height: 16px;
  background: var(--on-accent);
  content: '';
  mask: url('/icones/interface/valider.svg?v=720fe4c2e8') center / contain no-repeat;
}

.give-choice__input:focus-visible + .give-choice__box {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.give-choice__input:disabled + .give-choice__box {
  opacity: 0.8;
}

.give-choice__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.give-choice__text strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.1;
}

.give-choice__note {
  color: var(--warm-strong);
  font-weight: 800;
}

.give__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.give__bonus {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.give-bonus {
  position: relative;
}

.give-bonus__input {
  position: absolute;
  opacity: 0;
}

.give-bonus__box {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--muted);
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.give-bonus__input:checked + .give-bonus__box {
  background: var(--flame);
  color: var(--on-flame);
}

.give-bonus__input:focus-visible + .give-bonus__box {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.give__send {
  height: 60px;
  border-radius: var(--r-lg);
  font-size: 19px;
}

.give__message {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg);
}

.give__message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-size: 15px;
}

.give__copy {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 36px;
  padding: 0 var(--sp-4);
  border: 0;
  border-radius: var(--r-md);
  background: var(--soft);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.give__copy:disabled {
  opacity: 0.5;
  cursor: default;
}

.give__message-text {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.give__note {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

@media (min-width: 960px) {
  .give {
    flex-direction: row;
    align-items: flex-start;
  }

  .give__card {
    flex-shrink: 0;
    width: 500px;
    box-sizing: border-box;
  }
}

@media (max-width: 599px) {
  .give__title {
    font-size: 40px;
  }

  .give__row {
    grid-template-columns: 1fr;
  }

  .give__select {
    font-size: 14px;
  }
}

/* --- Suivi du chapitre ---------------------------------------------------- */

.follow {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.follow__main,
.follow__side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-width: 0;
}

.follow__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--surface);
}

.follow__title,
.follow__subtitle {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.05;
}

.follow__subtitle {
  padding-top: 18px;
  border-top: 2px solid var(--border);
  font-size: 18px;
}

.follow__lead {
  margin: -12px 0 0;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.follow__line {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  font-size: 15px;
}

.follow-steps,
.follow-members,
.follow-rates {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.follow-members {
  gap: 6px;
}

.follow-step {
  display: grid;
  grid-template-columns: auto 120px 1fr 70px;
  align-items: center;
  gap: 14px;
}

.follow-step__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
}

.follow-step__bar,
.follow-rate__bar {
  height: 14px;
}

.follow-step__fill {
  background: var(--step);
}

.follow-step__count {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}

.follow-step__untracked {
  grid-column: 2 / -1;
  margin-top: -10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.follow-member {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.follow-member__name {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
}

.follow-member__untracked {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.follow-member__steps {
  display: flex;
  gap: 5px;
}

.follow-box {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--soft);
}

.follow-box[data-state="done"] {
  background: var(--step);
}

/* Non suivi : un trait, jamais une case vide qui passerait pour un zero */
.follow-box[data-state="untracked"] {
  box-sizing: border-box;
  border: 2px dashed var(--border);
  background: transparent;
}

.follow-member__score {
  width: 56px;
  text-align: right;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}

.follow__more {
  align-self: center;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
}

.follow__note {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
}

.follow-rate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 52px;
  align-items: center;
  gap: 14px;
}

.follow-rate__prompt {
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.follow-rate__fill[data-band="low"] { background: var(--danger); }
.follow-rate__fill[data-band="mid"] { background: var(--flame); }
.follow-rate__fill[data-band="high"] { background: var(--success); }

.follow-rate__value {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}

.follow__review {
  display: flex;
  gap: 14px;
  padding: var(--sp-5);
  border: 2px solid var(--warm-border);
  border-radius: var(--r-xl);
  background: var(--warm-bg);
  color: var(--warm-text);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
}

.follow__review p {
  margin: 0;
}

.follow__review-title {
  margin: 0 0 var(--sp-1);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}

@media (min-width: 960px) {
  .follow {
    flex-direction: row;
    align-items: flex-start;
  }

  .follow__main {
    flex: 1;
  }

  .follow__side {
    flex-shrink: 0;
    width: 400px;
  }
}

@media (max-width: 599px) {
  .follow-step {
    grid-template-columns: auto 1fr 60px;
  }

  .follow-step__bar {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .follow-rate {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .follow-rate__bar {
    display: none;
  }
}

/* --- Etapes d'un devoir cote eleve (« Mes devoirs ») ---------------------- */

.assignment-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.assignment-done .assignment-steps {
  flex-basis: 100%;
}

/* Etat sous le nom : « Sur cet appareil » ou « À faire » tiennent dans une
   colonne de 150 px (deux colonnes sur mobile). */
.assignment-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-height: 52px;
  padding: 6px 10px 6px var(--sp-3);
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.assignment-step[data-state="done"] {
  border-color: var(--good-border);
}

.assignment-step .step-icon {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
}

.assignment-step .step-icon__number {
  width: 20px;
  height: 20px;
}

.assignment-step__name {
  align-self: end;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}

.assignment-step__state {
  grid-column: 2;
  align-self: start;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.assignment-step[data-state="done"] .assignment-step__state {
  color: var(--green-strong);
}

/* Explications du defi au tableau : texte enrichi (x<sup>2</sup>) en ligne,
   pas en elements flexibles de `.notice` */
.live-board__explanation:not([hidden]),
.live-board [data-role="hardest-explanation"] { display: block; }
