/* ============================================================
   style.css — Thème académique sobre
   Polices : Crimson Pro (titres), Source Sans 3 (corps)
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  --primary:      #1e3b6e;
  --primary-dark: #142855;
  --accent:       #c9842a;
  --accent-light: #f0c080;
  --bg:           #f7f5f0;
  --bg-card:      #ffffff;
  --text:         #222;
  --text-muted:   #6b6862;
  --border:       #dedad4;
  --success:      #2d7a4f;
  --danger:       #b53535;
  --warning:      #a06820;
  --info:         #1e5999;
  --radius:       6px;
  --radius-lg:    10px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06);
  --shadow-md:    0 3px 12px rgba(0,0,0,.1);
  --transition:   .18s ease;
  --font-serif:   'Crimson Pro', Georgia, serif;
  --font-sans:    'Source Sans 3', system-ui, sans-serif;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin-bottom: .75rem; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.page-header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: .75rem;
  margin-bottom: 2rem;
}

.page-header h1 { margin: 0; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 60px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.site-logo__tagline {
  font-size: .7rem;
  opacity: .75;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: .25rem;
  flex: 1;
}

.nav-link {
  color: rgba(255,255,255,.85);
  padding: .35rem .55rem;
  border-radius: var(--radius);
  font-size: .9rem;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
}

.header-auth { display: flex; gap: .5rem; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover  { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; }

.btn-accent   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover   { background: #a86e20; text-decoration: none; }

.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover  { background: var(--primary); color: #fff; text-decoration: none; }

.btn-ghost    { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover    { background: var(--bg-alt); color: var(--text); text-decoration: none; }

/* Versions claires uniquement dans les contextes sombres (nav, hero, bandeaux) */
.nav .btn-outline, .hero .btn-outline, .navbar .btn-outline,
.site-header .btn-outline {
  color: #fff; border-color: rgba(255,255,255,.6);
}
.nav .btn-outline:hover, .hero .btn-outline:hover, .navbar .btn-outline:hover,
.site-header .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }
.nav .btn-ghost, .hero .btn-ghost, .navbar .btn-ghost,
.site-header .btn-ghost { color: rgba(255,255,255,.8); }
.nav .btn-ghost:hover, .hero .btn-ghost:hover, .navbar .btn-ghost:hover,
.site-header .btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); }

.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm       { padding: .3rem .8rem; font-size: .85rem; }
.btn-admin    { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card__body { padding: 1.25rem; }

/* Grid de documents PDF */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.doc-card {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: var(--text);
}

.doc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  text-decoration: none;
}

.doc-card__icon {
  width: 36px;
  height: 44px;
  background: #fee2e2;
  color: #c0392b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  border-radius: 3px;
  flex-shrink: 0;
  border-bottom: 2px solid #c0392b;
}

.doc-card__meta  { flex: 1; min-width: 0; }
.doc-card__title { font-size: .95rem; font-weight: 600; color: var(--primary); margin-bottom: .2rem; }
.doc-card__desc  { font-size: .82rem; color: var(--text-muted); }
.doc-card__size  { font-size: .75rem; color: var(--text-muted); margin-top: .3rem; }

/* Groupes par sous-catégorie */
.doc-group       { margin-bottom: 2.5rem; }
.doc-group__head {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding: .3rem .75rem;
  margin-bottom: 1rem;
  background: rgba(201,132,42,.06);
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

thead th {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .88rem;
  padding: .75rem 1rem;
  text-align: left;
}

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f9f8f5; }
tbody td { padding: .7rem 1rem; font-size: .92rem; }

/* ── Formulaires ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: .4rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,59,110,.12);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-hint { font-size: .82rem; color: var(--text-muted); margin-top: .3rem; }

/* ── Flash messages ──────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  border-radius: var(--radius);
  margin: 0 0 1.5rem;
  font-weight: 600;
  font-size: .93rem;
  animation: fadeIn .25s ease;
}

.flash--success { background: #e8f5ee; color: var(--success); border: 1px solid #a8d8ba; }
.flash--danger  { background: #fce8e8; color: var(--danger);  border: 1px solid #f0aaaa; }
.flash--warning { background: #fef3e2; color: var(--warning); border: 1px solid #fbd49a; }
.flash--info    { background: #e8f0fb; color: var(--info);    border: 1px solid #9ab8e8; }

.flash__close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: inherit;
  opacity: .7;
  line-height: 1;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.6);
  padding: 1.5rem 0;
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.footer__copy { font-size: .85rem; }

.footer__nav { display: flex; gap: 1rem; }
.footer__nav a { color: rgba(255,255,255,.5); font-size: .85rem; transition: color var(--transition); }
.footer__nav a:hover { color: #fff; text-decoration: none; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.badge-primary { background: rgba(30,59,110,.12); color: var(--primary); }
.badge-accent  { background: rgba(201,132,42,.15); color: #8a5a18; }
.badge-success { background: #d4f0e0; color: var(--success); }
.badge-danger  { background: #fce8e8; color: var(--danger); }

/* ── Espace étudiant ─────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.stat-card__value {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}

.stat-card__label { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }

/* Notes table */
.note-cell {
  font-weight: 700;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.note-cell.high  { color: var(--success); }
.note-cell.mid   { color: var(--warning); }
.note-cell.low   { color: var(--danger);  }

/* ── Admin ────────────────────────────────────────────────── */
.page-admin .site-header { background: var(--primary-dark); }

.admin-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0;
  position: sticky;
  top: 76px;
  /* Hauteur bornée à l'écran + colonne flex : le menu défile, la marque et le
     pied de menu (Voir le site / Déconnexion) restent visibles. */
  max-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
}
/* Zone défilante du menu (entre la marque et le pied) */
.admin-sidebar__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.admin-sidebar__nav::-webkit-scrollbar { width: 7px; }
.admin-sidebar__nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
.admin-sidebar__nav::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
/* La marque et le pied ne se compriment pas */
.admin-sidebar__brand { flex-shrink: 0; }
.admin-sidebar__footer { flex-shrink: 0; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1.25rem;
  color: var(--text);
  font-size: .92rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.sidebar-item:hover, .sidebar-item.active {
  background: rgba(30,59,110,.06);
  border-left-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.sidebar-section {
  padding: .5rem 1.25rem .25rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .5rem;
}

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

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.upload-zone:hover, .upload-zone.dragging {
  border-color: var(--primary);
  background: rgba(30,59,110,.03);
}

.upload-zone p { color: var(--text-muted); margin: .5rem 0 0; }

/* Login forms */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-size: 1.65rem;
  margin-bottom: .35rem;
}

.auth-card p.subtitle {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: .93rem;
}

/* ── Cahier de texte ─────────────────────────────────────── */
.journal-entry {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.journal-entry__date {
  font-size: .82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.journal-entry__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--primary);
  margin: .3rem 0 .75rem;
}

.journal-entry__devoirs {
  margin-top: .75rem;
  padding: .65rem .9rem;
  background: rgba(201,132,42,.08);
  border-radius: var(--radius);
  font-size: .9rem;
  border-left: 3px solid var(--accent);
}

.journal-entry__devoirs strong { color: var(--accent); }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */


/* ============================================================
   EXTENSIONS — Composants ajoutés v2
   ============================================================ */

/* ── Utilitaires texte / layout ────────────────────────────── */
.page-subtitle   { color: var(--text-muted); margin-top: .35rem; }
.container--narrow { max-width: 480px; }

/* ── Badges ────────────────────────────────────────────────── */
.badge-success { background: rgba(22,163,74,.12); color: #15803d; }
.badge-error   { background: rgba(220,38,38,.10); color: #b91c1c; }
.badge-warning { background: rgba(234,179,8,.12); color: #a16207; }
.badge-accent  { background: rgba(201,132,42,.15); color: var(--accent); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }

/* ── Alertes ────────────────────────────────────────────────── */
.alert {
  padding: .875rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .93rem;
  border-left: 4px solid;
}
.alert-error   { background: rgba(220,38,38,.07); border-color: var(--danger); color: #991b1b; }
.alert-success { background: rgba(22,163,74,.07); border-color: var(--success); color: #166534; }
.alert-info    { background: rgba(30,59,110,.06); border-color: var(--primary); color: var(--primary); }
.alert-warning { background: rgba(234,179,8,.10); border-color: #d97706; color: #92400e; }

/* ── Boutons supplémentaires ────────────────────────────────── */
.btn-ghost    { background: transparent; color: var(--text-muted); border: none; }
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }
.btn-block    { display: block; width: 100%; text-align: center; }
.btn-outline-dark { background: transparent; border: 1px solid var(--text); color: var(--text); }
.btn-outline-dark:hover { background: var(--text); color: #fff; }

/* ── Formulaires ────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-hint  { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }
.form-check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.form-check input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--primary); }
.form-control--sm { padding: .35rem .65rem; font-size: .88rem; }

/* ── Tableau responsive ─────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Auth card (BEM) ────────────────────────────────────────── */
.auth-card__title  { font-size: 1.65rem; margin-bottom: .25rem; }
.auth-card__sub    { color: var(--text-muted); margin-bottom: 1.75rem; font-size: .93rem; }
.auth-card__footer { margin-top: 1.25rem; font-size: .88rem; color: var(--text-muted); text-align: center; }

/* ── Note cells (BEM) ───────────────────────────────────────── */
.note-cell--high { color: var(--success); }
.note-cell--mid  { color: var(--warning); }
.note-cell--low  { color: var(--danger);  }

/* ── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.stat-card--link {
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.stat-card--link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Onglets / tab bar ──────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  padding-bottom: .5rem;
}
.tab-item {
  padding: .45rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-muted);
  font-size: .9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.tab-item:hover { color: var(--primary); }
.tab-item.active {
  color: var(--primary);
  font-weight: 600;
  border-color: var(--border);
  border-bottom-color: var(--bg);
  background: var(--bg);
}

/* ── Programme de colles ────────────────────────────────────── */
.colle-week {
  margin-bottom: 2rem;
}
.colle-week__head {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.colle-week--current .colle-week__head { color: var(--primary); }
.colle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.colle-table th {
  text-align: left;
  padding: .6rem .75rem;
  background: var(--bg-alt);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.colle-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.colle-table tr:last-child td { border-bottom: none; }
.student-tag {
  display: inline-block;
  background: rgba(30,59,110,.07);
  border-radius: 100px;
  padding: .1rem .6rem;
  font-size: .8rem;
  margin: .1rem;
}

/* ── Cahier de texte (BEM) ──────────────────────────────────── */
.journal-feed { display: flex; flex-direction: column; gap: 0; }
.journal-entry {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.journal-entry:last-child { border-bottom: none; }
.journal-entry__date-col {
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}
.journal-date {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}
.journal-month {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .15rem;
}
.journal-entry__body   { flex: 1; min-width: 0; }
.journal-entry__title  { font-family: var(--font-serif); font-size: 1.15rem; color: var(--primary); margin-bottom: .5rem; }
.journal-entry__content { color: var(--text); line-height: 1.6; font-size: .95rem; }
.journal-entry__devoirs {
  margin-top: .9rem;
  padding: .75rem 1rem;
  background: rgba(201,132,42,.07);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.devoirs-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}
.devoirs-content { font-size: .9rem; color: var(--text); line-height: 1.55; }

/* ── Dashboard étudiant ─────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.dashboard-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.section-head h2 { font-size: 1.05rem; margin: 0; }

/* Colles list widget */
.colle-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.colle-item  { display: flex; flex-direction: column; font-size: .9rem; padding: .6rem .85rem; background: var(--bg-alt); border-radius: var(--radius); }
.colle-item__date  { font-weight: 700; color: var(--primary); }
.colle-item__info  { color: var(--text-muted); font-size: .85rem; }
.colle-item__theme { color: var(--text); font-size: .85rem; font-style: italic; }

/* Notes table */
.notes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.notes-table th {
  text-align: left;
  padding: .55rem .7rem;
  background: var(--bg-alt);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.notes-table td {
  padding: .65rem .7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.notes-table tr:last-child td { border-bottom: none; }
.notes-table--compact td, .notes-table--compact th { padding: .45rem .55rem; }

/* ── Admin BEM ──────────────────────────────────────────────── */
/* Sidebar */
.admin-sidebar__brand {
  display: block;
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: .5rem;
  letter-spacing: .03em;
}
.admin-sidebar__nav    { padding: 0; }
.admin-sidebar__footer { margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--border); margin-top: 1rem; }

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.25rem;
  color: var(--text);
  font-size: .9rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.admin-nav-link:hover {
  background: rgba(30,59,110,.06);
  border-left-color: var(--primary);
  color: var(--primary);
}
.admin-nav-link.active {
  background: rgba(30,59,110,.09);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.admin-nav-link--danger:hover { color: var(--danger); border-left-color: var(--danger); }
.admin-nav-link__icon { width: 1.1rem; text-align: center; font-size: .95rem; }

/* Content area */
.admin-content       { flex: 1; min-width: 0; }
.admin-page-header   { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.admin-page-header h1{ margin: 0; }
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.admin-table th {
  text-align: left;
  padding: .5rem .65rem;
  background: var(--bg-alt);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.admin-table td {
  padding: .6rem .65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(30,59,110,.03); }

/* ── Drag-and-drop upload ───────────────────────────────────── */
.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.drop-zone--over, .drop-zone:has(.drop-zone__input:focus) {
  border-color: var(--primary);
  background: rgba(30,59,110,.04);
}
.drop-zone--ready { border-color: var(--success); background: rgba(22,163,74,.04); }
.drop-zone__input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; z-index: 1;
}
.drop-zone__label {
  display: flex; flex-direction: column;
  align-items: center; gap: .4rem;
  pointer-events: none; font-size: .93rem; color: var(--text-muted);
}
.drop-zone__icon  { font-size: 2rem; line-height: 1; }
.drop-zone__browse { pointer-events: all; color: var(--primary); cursor: pointer; text-decoration: underline; }

/* ── Responsive supplémentaire ──────────────────────────────── */
@media (max-width: 900px) {
  .admin-two-col    { grid-template-columns: 1fr; }
  .dashboard-grid   { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-row         { grid-template-columns: 1fr; }
  .stats-grid       { grid-template-columns: repeat(2, 1fr); }
  .journal-entry    { flex-direction: column; gap: .75rem; }
  .journal-entry__date-col { display: flex; align-items: baseline; gap: .4rem; }
  .journal-date     { font-size: 1.4rem; }
}

/* ============================================================
   COMPOSANTS COLLES v2
   ============================================================ */

/* ── Dot / score 0-5 ─────────────────────────────────────── */
.dot-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: .15rem .4rem;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.dot-score.dot--high { background: rgba(22,163,74,.14);  color: #15803d; }
.dot-score.dot--good { background: rgba(34,197,94,.12);  color: #16a34a; }
.dot-score.dot--mid  { background: rgba(234,179,8,.14);  color: #a16207; }
.dot-score.dot--low  { background: rgba(220,38,38,.10);  color: #b91c1c; }
.dot-score.dot--zero { background: rgba(100,116,139,.10); color: var(--text-muted); }
.dot-score.dot-lg    { font-size: .95rem; min-width: 3rem; padding: .25rem .6rem; }

/* ── Grille critères (session.php) ───────────────────────── */
.criteria-sheet { display: flex; flex-direction: column; gap: 1.5rem; }

.criteria-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.criteria-section--global { padding: 1.25rem; }

.criteria-section__title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: .75rem 1rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.criteria-table {
  width: 100%;
  border-collapse: collapse;
}
.criteria-label-col { width: auto; min-width: 200px; }
.criteria-score-col {
  width: 52px;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: .5rem .25rem;
}

.criteria-table tbody tr:hover { background: rgba(30,59,110,.02); }
.criteria-table tbody tr { border-bottom: 1px solid var(--border); }
.criteria-table tbody tr:last-child { border-bottom: none; }

.criteria-label {
  padding: .75rem 1rem;
  font-size: .9rem;
}
.criteria-label span { display: block; }
.criteria-desc { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

.criteria-dot-cell { text-align: center; padding: .4rem .15rem; }

/* Radio dot custom */
.dot-label  { display: inline-block; cursor: pointer; line-height: 1; }
.dot-input  { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.dot        {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all .12s;
  user-select: none;
}
.dot-label:hover .dot { border-color: var(--primary); color: var(--primary); background: rgba(30,59,110,.06); }

/* Checked states per color */
.dot-input:checked + .dot--high { background: rgba(22,163,74,.15); border-color: #16a34a; color: #15803d; }
.dot-input:checked + .dot--good { background: rgba(34,197,94,.15); border-color: #22c55e; color: #16a34a; }
.dot-input:checked + .dot--mid  { background: rgba(234,179,8,.18); border-color: #ca8a04; color: #a16207; }
.dot-input:checked + .dot--low  { background: rgba(249,115,22,.12); border-color: #ea580c; color: #c2410c; }
.dot-input:checked + .dot--zero { background: rgba(100,116,139,.12); border-color: #64748b; color: #475569; }

/* Global grade row */
.global-grade-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Save bar */
.save-bar {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
  position: sticky;
  bottom: 1rem;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

/* ── Student tabs ────────────────────────────────────────── */
.student-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.student-tab {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.student-tab:hover { color: var(--primary); border-color: var(--primary); }
.student-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.student-panel { display: none; }
.student-panel.active { display: block; }

/* ── Checklist étudiants / capacités ─────────────────────── */
.student-checklist,
.capacite-checklist {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem;
}
.student-check-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .4rem .5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .9rem;
  transition: background var(--transition);
}
.student-check-item:hover { background: rgba(30,59,110,.04); }
.student-check-item input[type="checkbox"] { margin-top: .1rem; accent-color: var(--primary); flex-shrink: 0; }

/* ── Colleur layout ──────────────────────────────────────── */
.colleur-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.colleur-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0;
  position: sticky;
  top: 76px;
}
.colleur-sidebar__user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .5rem;
}
.colleur-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.colleur-main { flex: 1; min-width: 0; }

/* ── Direction UI ─────────────────────────────────────────── */
.direction-session-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
}
.direction-session-item__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}
.direction-session-item__date { font-weight: 700; font-size: .92rem; }
.direction-session-item__colleur { font-size: .85rem; color: var(--text-muted); margin-bottom: .2rem; }
.direction-session-item__students { font-size: .82rem; color: var(--text); }

.direction-session-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}
.direction-session-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .4rem;
}
.direction-session-card__date { font-weight: 700; }

.direction-etud-list {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-top: .6rem;
}
.direction-etud-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  padding: .3rem .6rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

/* ── Progress bars (direction profil) ───────────────────── */
.mini-progress-bar {
  height: .5rem;
  background: var(--bg-alt);
  border-radius: 100px;
  overflow: hidden;
}
.mini-progress-bar__fill {
  height: 100%;
  border-radius: 100px;
  transition: width .4s ease;
}
.mini-progress-bar__fill--high { background: #16a34a; }
.mini-progress-bar__fill--good { background: #22c55e; }
.mini-progress-bar__fill--mid  { background: #ca8a04; }
.mini-progress-bar__fill--low  { background: #dc2626; }

/* ── Compétences étudiant ─────────────────────────────────── */
.competence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.competence-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
}
.competence-card__label { font-weight: 600; margin-bottom: .2rem; }
.competence-card__desc  { font-size: .8rem; color: var(--text-muted); margin-bottom: .6rem; }
.competence-bar-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .3rem;
}
.competence-bar {
  flex: 1;
  height: .6rem;
  background: var(--bg-alt);
  border-radius: 100px;
  overflow: hidden;
}
.competence-bar__fill {
  height: 100%;
  border-radius: 100px;
  transition: width .5s ease;
}
.competence-bar__fill--high { background: #16a34a; }
.competence-bar__fill--good { background: #22c55e; }
.competence-bar__fill--mid  { background: #ca8a04; }
.competence-bar__fill--low  { background: #dc2626; }
.competence-score { font-weight: 700; font-size: .92rem; min-width: 2.8rem; text-align: right; }

/* ── Historique colles étudiant ─────────────────────────── */
.colle-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}
.colle-history-card__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.colle-history-card__date { font-weight: 700; }
.colle-history-criteria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.criteria-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  padding: .2rem 0;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.colle-history-comment {
  margin-top: .75rem;
  padding: .65rem .9rem;
  background: rgba(201,132,42,.07);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
  color: var(--text);
  font-style: italic;
}

/* ── Container wide ──────────────────────────────────────── */
.container--wide { max-width: 1100px; }

/* ── Responsive colles ───────────────────────────────────── */
@media (max-width: 900px) {
  .colleur-layout  { flex-direction: column; }
  .colleur-sidebar { width: 100%; position: static; }
  .criteria-table  { font-size: .82rem; }
  .dot             { width: 1.7rem; height: 1.7rem; font-size: .75rem; }
  .colle-history-criteria { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .competence-grid { grid-template-columns: 1fr; }
  .student-tabs    { flex-direction: column; }
  .save-bar        { position: static; }
}

/* ============================================================
   AUTO-INSCRIPTION v3
   ============================================================ */

/* ── Étapes de progression ───────────────────────────────── */
.register-success {
  text-align: center;
  padding: .5rem 0 1rem;
}
.register-success__icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: .75rem;
}
.register-success h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 .75rem;
}
.register-success p {
  color: var(--text-muted);
  font-size: .93rem;
  margin: .4rem 0;
}
.register-success__steps {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin: 1.25rem auto 0;
  max-width: 340px;
  text-align: left;
}
.register-step {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .9rem;
  border-radius: var(--radius);
  font-size: .88rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-left: 3px solid var(--border);
}
.register-step::before {
  content: '';
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.register-step--done {
  color: var(--success);
  border-left-color: var(--success);
}
.register-step--done::before { background: var(--success); }
.register-step--current {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
  background: rgba(30,59,110,.06);
}
.register-step--current::before {
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,59,110,.2);
}

/* ── Pending cards (admin/pending.php) ───────────────────── */
.pending-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.pending-card--approval {
  border-left: 3px solid var(--warning);
  background: rgba(234,179,8,.03);
}
.pending-card__name  { font-weight: 600; font-size: .95rem; }
.pending-card__email { font-size: .85rem; color: var(--text-muted); margin: .2rem 0; }
.pending-card__actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Badge sidebar ───────────────────────────────────────── */
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  background: var(--warning);
  color: #7a4f00;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 100px;
  padding: 0 .3rem;
  margin-left: auto;
}

/* ============================================================
   SONDAGES / QCM v4
   ============================================================ */

/* ── Badge live ─────────────────────────────────────────── */
.poll-live-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(239,68,68,.1);
  color: #dc2626;
  padding: .2rem .7rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  animation: poll-pulse 1.8s ease-in-out infinite;
}
@keyframes poll-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .6; }
}

/* ── Couleurs des choix ─────────────────────────────────── */
.poll-choice--a { background: #dbeafe; color: #1d4ed8; }
.poll-choice--b { background: #d1fae5; color: #065f46; }
.poll-choice--c { background: #fef3c7; color: #92400e; }
.poll-choice--d { background: #fee2e2; color: #991b1b; }
.poll-choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  font-weight: 800;
  font-size: .82rem;
  flex-shrink: 0;
}

/* ── Panel sondage actif (admin) ─────────────────────────── */
.poll-active-panel {
  background: var(--bg-card);
  border: 2px solid rgba(239,68,68,.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.poll-active-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.poll-live-votes {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.poll-live-row {
  display: grid;
  grid-template-columns: 2rem 1fr 2.5rem;
  align-items: center;
  gap: .65rem;
}
.poll-bar-wrap {
  background: var(--bg-alt);
  border-radius: 100px;
  height: 1.6rem;
  overflow: hidden;
}
.poll-bar {
  height: 100%;
  border-radius: 100px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
}
.poll-bar--a { background: #3b82f6; }
.poll-bar--b { background: #10b981; }
.poll-bar--c { background: #f59e0b; }
.poll-bar--d { background: #ef4444; }
.poll-bar--correct { background: #22c55e !important; }
.poll-count { font-weight: 700; font-size: .95rem; text-align: right; min-width: 1.5rem; }

/* Définir la bonne réponse */
.answer-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  transition: all .12s;
}
.answer-choice-btn input[type="radio"] { display: none; }
.answer-choice-btn.selected,
.answer-choice-btn:has(input:checked) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.answer-choice-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Grille options sondage ──────────────────────────────── */
.poll-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .75rem;
}

/* ── Historique admin ───────────────────────────────────── */
.poll-history-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.poll-history-item__info { flex: 1; min-width: 0; }
.poll-history-item__actions { display: flex; gap: .4rem; flex-wrap: wrap; flex-shrink: 0; }

/* ── Page étudiant (mobile) ─────────────────────────────── */
.poll-student-wrap {
  max-width: 480px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

/* En attente */
.poll-waiting {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.poll-waiting__icon { font-size: 3rem; margin-bottom: 1rem; }
.poll-waiting h2    { font-size: 1.3rem; color: var(--text); margin-bottom: .5rem; }
.poll-waiting-dots  { display: flex; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.poll-waiting-dots span {
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--primary);
  animation: poll-pulse 1.4s ease-in-out infinite;
}
.poll-waiting-dots span:nth-child(2) { animation-delay: .2s; }
.poll-waiting-dots span:nth-child(3) { animation-delay: .4s; }

/* Carte de vote */
.poll-vote-card, .poll-voted-card, .poll-results-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.poll-vote-card__header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.poll-question {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* Boutons de choix */
.poll-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.poll-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.1rem .75rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  font-family: inherit;
  min-height: 90px;
}
.poll-choice-btn:hover, .poll-choice-btn:focus { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.poll-choice-btn--a:hover { border-color: #3b82f6; background: rgba(59,130,246,.06); }
.poll-choice-btn--b:hover { border-color: #10b981; background: rgba(16,185,129,.06); }
.poll-choice-btn--c:hover { border-color: #f59e0b; background: rgba(245,158,11,.06); }
.poll-choice-btn--d:hover { border-color: #ef4444; background: rgba(239,68,68,.06);  }
.poll-choice-btn__letter {
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.poll-choice-btn--a .poll-choice-btn__letter { background: #dbeafe; color: #1d4ed8; }
.poll-choice-btn--b .poll-choice-btn__letter { background: #d1fae5; color: #065f46; }
.poll-choice-btn--c .poll-choice-btn__letter { background: #fef3c7; color: #92400e; }
.poll-choice-btn--d .poll-choice-btn__letter { background: #fee2e2; color: #991b1b; }
.poll-choice-btn__text { font-size: .88rem; color: var(--text); line-height: 1.3; }

/* Carte confirmée */
.poll-voted-card { text-align: center; }
.poll-voted-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: rgba(22,163,74,.15); color: var(--success);
  font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: .75rem auto 1rem;
}
.poll-voted-card h2 { font-size: 1.3rem; margin-bottom: .5rem; }

/* Bâtonnets résultats */
.poll-bars { display: flex; flex-direction: column; gap: .75rem; }
.poll-bar-row {
  display: grid;
  grid-template-columns: 1.8rem 1fr 4rem;
  align-items: center;
  gap: .6rem;
}
.poll-bar-row--correct .poll-choice-letter { box-shadow: 0 0 0 3px rgba(22,163,74,.3); }
.poll-bar-track {
  height: 2.2rem;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.poll-bar-track .poll-bar {
  height: 100%;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.poll-bar-label {
  position: absolute;
  left: .6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  right: .3rem;
  pointer-events: none;
}
.poll-bar-stats { text-align: right; font-size: .85rem; font-weight: 700; line-height: 1.2; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .poll-choices       { grid-template-columns: 1fr; }
  .poll-options-grid  { grid-template-columns: 1fr; }
  .poll-live-row      { grid-template-columns: 1.8rem 1fr 2rem; }
}

/* ============================================================
   NAVIGATION AMÉLIORÉE v5 — Menus déroulants + home page
   ============================================================ */

/* ── Layout nav ─────────────────────────────────────────── */
.nav-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex: 1;
  flex-wrap: wrap;
}
.nav-link--admin {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ── Menu déroulant ─────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  white-space: nowrap;
}
.nav-dropdown__arrow {
  font-size: .65rem;
  transition: transform .2s;
  opacity: .7;
}
.nav-dropdown.open .nav-dropdown__arrow {
  transform: rotate(180deg);
}
.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  padding: .4rem 0;
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.nav-dropdown.open .nav-dropdown__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.nav-dropdown__header {
  padding: .6rem 1rem .4rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  margin-bottom: .3rem;
}
.nav-dropdown__item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem 1rem;
  font-size: .9rem;
  color: var(--text);
  text-decoration: none;
  transition: background .1s;
}
.nav-dropdown__item:hover { background: var(--bg-alt); }
.nav-dropdown__icon { font-size: .9rem; width: 1.1rem; text-align: center; flex-shrink: 0; }
.nav-dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: .3rem 0;
}
.nav-dropdown__item--muted { color: var(--text-muted); font-size: .85rem; }
.nav-dropdown__item--danger { color: var(--danger); }
.nav-dropdown__item--danger:hover { background: rgba(220,38,38,.06); }

/* ── Chip utilisateur connecté ───────────────────────────── */
.nav-user-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .3rem .75rem .3rem .5rem;
  cursor: pointer;
  transition: all var(--transition);
}
.nav-user-chip:hover { border-color: var(--primary); }
.nav-user-chip--admin { background: rgba(30,59,110,.08); border-color: rgba(30,59,110,.25); }
.nav-user-chip__name  { font-size: .88rem; font-weight: 600; color: var(--text); }
.nav-user-chip__badge {
  font-size: .68rem;
  font-weight: 700;
  background: rgba(30,59,110,.12);
  color: var(--primary);
  padding: .1rem .4rem;
  border-radius: 100px;
}

/* ── Hamburger mobile (3 traits) ─────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  margin-left: auto;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .25s;
}
.site-header.nav-open .menu-toggle span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.site-header.nav-open .menu-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-header.nav-open .menu-toggle span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* ── Home page ───────────────────────────────────────────── */

/* Hero */
.home-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.home-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  margin-bottom: .5rem;
}
.home-hero__sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.home-hero__classes { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }

/* Layout 2 colonnes */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}
.home-main  { min-width: 0; }
.home-sidebar { display: flex; flex-direction: column; gap: 0; }
.home-section { }

/* Widget sidebar */
.home-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.home-widget + .home-widget { margin-top: 1rem; }
.home-widget__title {
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .85rem;
}
.home-widget--login { border-color: rgba(30,59,110,.2); }

/* Liens rapides "Mon espace" */
.home-quick-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .75rem;
  border-radius: var(--radius);
  color: var(--text);
  font-size: .9rem;
  text-decoration: none;
  background: var(--bg-alt);
  transition: all var(--transition);
}
.home-quick-link:hover { background: rgba(30,59,110,.08); color: var(--primary); }
.home-quick-link--accent {
  background: rgba(239,68,68,.08);
  color: #dc2626;
  animation: poll-pulse 1.8s infinite;
}

/* Grille accès rapide */
.quick-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.1rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
}
.quick-link-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.quick-link-card__icon  { font-size: 1.5rem; line-height: 1; }
.quick-link-card__label { font-weight: 700; font-size: .95rem; color: var(--primary); }
.quick-link-card__desc  { font-size: .8rem; color: var(--text-muted); }

/* Bannière sondage actif */
.poll-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(239,68,68,.07);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius-lg);
  padding: .75rem 1.25rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  font-size: .9rem;
}
.poll-banner:hover { background: rgba(239,68,68,.1); }
.poll-banner__dot {
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: poll-pulse 1.4s infinite;
}

/* ── Responsive mobile ──────────────────────────────────── */
@media (max-width: 860px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { order: -1; }
  .quick-links-grid { grid-template-columns: 1fr 1fr; }
}



/* ============================================================
   PROGRAMME DE COLLES — Points & Exercices v5
   ============================================================ */

/* ── Titre matière ────────────────────────────────────────── */
.programme-matiere-title {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--primary);
  padding-bottom: .4rem;
  margin-bottom: 1rem;
  display: inline-block;
}

/* ── Liste de points (accordéon) ─────────────────────────── */
.programme-list { display: flex; flex-direction: column; gap: .4rem; }
.programme-list--compact { gap: .3rem; }

.programme-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color var(--transition);
}
.programme-item--has-exo { border-left: 3px solid var(--primary); }
.programme-item.open { border-color: var(--primary); box-shadow: var(--shadow-md); }

.programme-item__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background var(--transition);
}
.programme-item__toggle:hover { background: rgba(30,59,110,.04); }

.programme-item__title {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
}
.programme-item__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.programme-item__arrow {
  font-size: .75rem;
  color: var(--text-muted);
  transition: transform .2s;
}
.programme-item.open .programme-item__arrow { transform: rotate(180deg); }

.programme-item__body {
  display: none;
  padding: 0 1.1rem 1rem;
  border-top: 1px solid var(--border);
}
.programme-item.open .programme-item__body { display: block; }

.programme-item__desc {
  font-size: .88rem;
  color: var(--text-muted);
  margin: .75rem 0 .85rem;
  line-height: 1.5;
}

/* ── Exercices dans un point ─────────────────────────────── */
.exercices-list { display: flex; flex-direction: column; gap: .75rem; margin-top: .6rem; }
.exercices-list--compact { gap: .5rem; }

.exercice-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  border-left: 3px solid var(--accent);
}
.exercice-card--sm { padding: .6rem .8rem; }

.exercice-card__header {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .5rem;
}
.exercice-card__num {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  flex-shrink: 0;
}
.exercice-card__title {
  font-weight: 600;
  font-size: .92rem;
  color: var(--text);
}

.exercice-card__links {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .5rem;
}
.exercice-btn { font-size: .82rem !important; align-self: flex-start; }
.exercice-btn--enonce     { border-color: var(--primary); color: var(--primary); }
.exercice-btn--correction { border-color: var(--success); color: var(--success); }
.exercice-btn--enonce:hover     { background: rgba(30,59,110,.07); }
.exercice-btn--correction:hover { background: rgba(22,163,74,.07); }

/* Texte caché (toggle) */
.exercice-card__text-content,
.exercice-card__correction-content {
  display: none;
  margin-top: .5rem;
  padding: .75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
}
.exercice-card__text-content.open,
.exercice-card__correction-content.open { display: block; }
.exercice-card__correction-content.open {
  border-left: 3px solid var(--success);
  background: rgba(22,163,74,.04);
}

/* ── Section programme dans les colles ───────────────────── */
.programme-colle-section {
  background: rgba(30,59,110,.04);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: .85rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: .25rem;
}
.programme-colle-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: .6rem;
}

/* ── Checklist points admin ──────────────────────────────── */
.points-checklist { display: flex; flex-direction: column; gap: .25rem; }
.points-checklist__group { margin-bottom: .75rem; }
.points-checklist__matiere {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .3rem .5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-bottom: .3rem;
}

/* ============================================================
   COLLE SESSION v6 — Évaluation individuelle /20
   ============================================================ */

.session-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.session-header h1 { margin: .25rem 0; font-size: 1.3rem; }

/* Chips sélection étudiants */
.student-select-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .9rem;
  border: 2px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  font-size: .9rem;
  transition: all .15s;
  user-select: none;
}
.student-select-chip input { display: none; }
.student-select-chip:hover { border-color: var(--primary); }
.student-select-chip.selected {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* Onglets étudiants */
.student-tab--hidden { display: none !important; }
.student-panel--hidden { display: none !important; }

/* Grid évaluation */
.colle-eval-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.25rem;
  align-items: start;
}

/* Note /20 */
.note-input-wrap {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem;
}
.note-input {
  width: 110px !important; font-size: 1.4rem !important;
  font-weight: 700 !important; text-align: center;
}
.note-max {
  font-size: 1.1rem; font-weight: 600; color: var(--text-muted);
}

/* Boutons notes rapides */
.note-quick-btns {
  display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem;
}
.note-quick-btn {
  padding: .25rem .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
}
.note-quick-btn:hover { border-color: var(--primary); color: var(--primary); }
.note-quick-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700;
}

/* Point check items */
.point-check-item { padding: .3rem .5rem; }
.point-check-item:has(input:checked) {
  background: rgba(30,59,110,.06); border-radius: var(--radius);
}

@media (max-width: 860px) {
  .colle-eval-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PROGRAMME v7 — Navigation + Exercices progressifs
   ============================================================ */

/* ── Navigation hebdomadaire ─────────────────────────────── */
.programme-nav-header {
  margin-bottom: 1.75rem;
}
.programme-nav-arrows {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.programme-week-select {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  font-size: .9rem;
}
.programme-nav-btn {
  white-space: nowrap;
  font-size: .82rem;
}
.programme-week-info h1 {
  font-size: 1.4rem;
  color: var(--primary);
}

/* ── Exercice à découverte progressive ───────────────────── */
.exercices-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }

.exercice-prog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  transition: border-color var(--transition);
}
.exercice-prog-card.open { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.exercice-prog-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.exercice-prog-toggle:hover { background: rgba(30,59,110,.03); }

.exercice-prog-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.exercice-prog-title {
  flex: 1;
  font-weight: 600;
  font-size: .92rem;
  color: var(--text);
}
.exercice-prog-arrow {
  color: var(--text-muted);
  font-size: .75rem;
  flex-shrink: 0;
  transition: transform .2s;
}
.exercice-prog-card.open .exercice-prog-arrow { transform: rotate(180deg); }

/* Corps dépliable de l'exercice */
.exercice-prog-body {
  display: none;
  padding: .1rem .9rem .9rem;
  border-top: 1px solid var(--border);
}
.exercice-prog-card.open .exercice-prog-body { display: block; }

/* Sections internes (énoncé / indice / correction) */
.exercice-prog-section {
  margin-top: .6rem;
}
.exercice-prog-section-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-alt);
  cursor: pointer;
  font-size: .83rem;
  font-family: inherit;
  transition: all .15s;
}
.exercice-prog-section-btn:hover { background: var(--bg-card); border-color: var(--primary); }
.btn--enonce     { border-color: rgba(30,59,110,.3); color: var(--primary); }
.btn--indice     { border-color: rgba(180,91,9,.3);  color: #b45309; }
.btn--correction { border-color: rgba(22,163,74,.3); color: var(--success); }
.btn--enonce[aria-expanded="true"]     { background: rgba(30,59,110,.08); }
.btn--indice[aria-expanded="true"]     { background: rgba(245,158,11,.08); }
.btn--correction[aria-expanded="true"] { background: rgba(22,163,74,.08); }

.exercice-prog-section-content {
  display: none;
  margin-top: .5rem;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  line-height: 1.65;
}
.exercice-prog-section-content.open { display: block; }

.exercice-text {
  color: var(--text);
  white-space: pre-line;
  background: var(--bg-alt);
  padding: .75rem 1rem;
  border-radius: var(--radius);
}
.exercice-text--indice {
  background: rgba(245,158,11,.07);
  border-left: 3px solid #f59e0b;
}
.exercice-text--correction {
  background: rgba(22,163,74,.05);
  border-left: 3px solid var(--success);
}

/* ── Compétences transversales ────────────────────────────── */
.competence-card {
  padding: .85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--primary);
}
.competence-card__title { font-weight: 600; font-size: .92rem; color: var(--primary); }
.competence-card__desc  { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; line-height: 1.4; }

/* ============================================================
   PROGRAMME PAGE — Navigation semaines + Exercices accordéon
   ============================================================ */

.programme-page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.programme-page-header h1 { font-size: 1.5rem; }

/* Navigation semaines */
.semaine-nav {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.semaine-nav__btn {
  padding: .4rem .85rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); color: var(--text); text-decoration: none;
  font-size: .85rem; cursor: pointer; white-space: nowrap; transition: all var(--transition);
}
.semaine-nav__btn:hover { border-color: var(--primary); color: var(--primary); }
.semaine-nav__btn--disabled { color: var(--text-muted); cursor: default; opacity: .5; }
.semaine-nav__select {
  padding: .4rem .6rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); color: var(--text); font-size: .85rem;
  max-width: 250px; cursor: pointer;
}

/* Exercice card */
.exo-card {
  background: var(--bg-alt); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: .5rem;
  border-left: 3px solid var(--accent);
}
.exo-title-btn {
  width: 100%; display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1rem; background: none; border: none; cursor: pointer;
  text-align: left; font-family: inherit;
}
.exo-title-btn:hover { background: rgba(30,59,110,.04); }
.exo-num {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent); flex-shrink: 0;
}
.exo-title-text { font-weight: 600; font-size: .92rem; flex: 1; color: var(--text); }
.exo-arrow { font-size: .7rem; color: var(--text-muted); transition: transform .2s; }

/* Corps exercice — caché par défaut */
.exo-body { display: none; padding: 0 1rem 1rem; }
.exo-card.exo-open .exo-body { display: block; }
.exo-card.exo-open .exo-title-btn { background: rgba(30,59,110,.05); }

/* Sections énoncé/indice/correction */
.exo-section--enonce {
  background: var(--bg-card); border-radius: var(--radius);
  padding: .85rem 1rem; margin-bottom: .6rem;
  border-top: 1px solid var(--border);
}

.exo-text { font-size: .9rem; line-height: 1.7; white-space: pre-line; color: var(--text); }
.exo-text--indice { color: #5b21b6; }
.exo-text--correction { color: #065f46; }

.exo-file-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .9rem; border-radius: var(--radius);
  font-size: .83rem; text-decoration: none; margin-top: .6rem;
  border: 1px solid currentColor; transition: all var(--transition);
}
.exo-file-btn--enonce    { color: var(--primary); }
.exo-file-btn--correction{ color: var(--success); }
.exo-file-btn:hover { opacity: .75; }

/* Toggle indice / correction */
.exo-toggle-section { margin-top: .5rem; }
.exo-sub-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .85rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: .83rem; cursor: pointer; font-family: inherit;
  margin-bottom: .3rem; transition: all var(--transition);
}
.exo-sub-btn--indice    { color: #5b21b6; border-color: #ddd6fe; }
.exo-sub-btn--correction{ color: var(--success); border-color: #bbf7d0; }
.exo-sub-btn:hover { opacity: .8; }

.exo-sub-body {
  display: none; padding: .75rem 1rem;
  border-radius: var(--radius); margin-top: .25rem;
}
.exo-toggle-section.open .exo-sub-body { display: block; }
.exo-sub-btn--indice     ~ .exo-sub-body { background: #f5f3ff; border-left: 3px solid #7c3aed; }
.exo-sub-btn--correction ~ .exo-sub-body { background: #f0fdf4; border-left: 3px solid var(--success); }

@media (max-width: 600px) {
  .programme-page-header { flex-direction: column; }
  .semaine-nav { width: 100%; justify-content: space-between; }
  .semaine-nav__select { max-width: 160px; }
}

/* ============================================================
   SCORE DOTS 0/1/2 — colleur/session.php
   ============================================================ */

.score-legend { font-size:.8rem; color:var(--text-muted); }

.score-dot-preview, .score-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  font-size: .85rem; cursor: pointer; border: 2px solid transparent;
  transition: all .12s; font-family: inherit; line-height: 1;
}
.score-dot-preview { cursor: default; margin: 0 .15rem; }

.score-dot--none, .score-dot-preview.score-dot--none {
  background: var(--bg-alt); color: var(--text-muted);
  border-color: var(--border); font-size: .7rem;
}
.score-dot--0, .score-dot-preview.score-dot--0 {
  background: rgba(239,68,68,.15); color: #dc2626;
}
.score-dot--1, .score-dot-preview.score-dot--1 {
  background: rgba(245,158,11,.18); color: #b45309;
}
.score-dot--2, .score-dot-preview.score-dot--2 {
  background: rgba(34,197,94,.15); color: #16a34a;
}
.score-dot:hover { transform: scale(1.15); opacity: .9; }
.score-dot.active {
  border-color: currentColor;
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(currentColor, .2);
}

/* Row contenant label + score picker */
.score-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .4rem .5rem; border-radius: var(--radius);
  transition: background var(--transition);
}
.score-row:hover { background: var(--bg-alt); }
.score-row__label { font-size: .87rem; flex: 1; color: var(--text); }
.score-picker { display: flex; gap: .3rem; flex-shrink: 0; }

/* ============================================================
   BARRES DE PROGRESSION — student/mes-notes.php
   ============================================================ */

.bilan-section { margin-top: 2rem; }
.bilan-section h2 { margin-bottom: 1rem; }

.bilan-group { margin-bottom: 1.5rem; }
.bilan-group__title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  padding: .3rem .5rem; background: var(--bg-alt);
  border-radius: var(--radius); margin-bottom: .5rem;
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr 180px 3.5rem 4.5rem;
  align-items: center;
  gap: .6rem;
  padding: .5rem .25rem;
  border-bottom: 1px solid var(--border);
  font-size: .87rem;
}
.skill-row:last-child { border-bottom: none; }
.skill-row__name { color: var(--text); line-height: 1.3; }

.skill-bar-wrap {
  background: var(--bg-alt); border-radius: 100px;
  height: .7rem; overflow: hidden;
}
.skill-bar-fill {
  height: 100%; border-radius: 100px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.skill-bar-fill--low  { background: #ef4444; }
.skill-bar-fill--mid  { background: #f59e0b; }
.skill-bar-fill--high { background: #22c55e; }

.skill-row__score {
  font-size: .8rem; font-weight: 600; text-align: right; white-space: nowrap;
}
.skill-row__score--low  { color: #dc2626; }
.skill-row__score--mid  { color: #b45309; }
.skill-row__score--high { color: #16a34a; }

.skill-row__count { font-size: .75rem; color: var(--text-muted); text-align: right; }

@media (max-width:580px) {
  .skill-row { grid-template-columns: 1fr 100px 2.5rem; }
  .skill-row__count { display: none; }
}

/* ============================================================
   SYNTHÈSE DES NOTES — admin/synthese.php
   ============================================================ */

.synth-card { overflow: hidden; }

.synth-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: .5rem;
}
.synth-table {
  border-collapse: collapse;
  min-width: 500px;
  width: 100%;
  font-size: .85rem;
}
.synth-table th, .synth-table td {
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}
.synth-th-name, .synth-td-name {
  text-align: left !important;
  min-width: 120px;
  max-width: 160px;
  white-space: normal;
  font-weight: 500;
}
.synth-th-session { min-width: 55px; font-size: .78rem; }
.synth-th-moy     { font-weight: 700; background: var(--bg-alt); }
.synth-cell       { font-weight: 600; }
.synth-cell--moy  { font-weight: 700; }

/* Couleurs notes */
.synth-high { background: rgba(22,163,74,.12); color: #15803d; }
.synth-mid  { background: rgba(245,158,11,.12); color: #b45309; }
.synth-low  { background: rgba(239,68,68,.12);  color: #b91c1c; }
.synth-empty{ color: var(--text-muted); font-weight: 400; }

/* Légende */
.synth-legend {
  display: inline-block;
  width: .9rem; height: .9rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: .2rem;
}
.synth-legend.synth-high { background: rgba(22,163,74,.35); }
.synth-legend.synth-mid  { background: rgba(245,158,11,.35); }
.synth-legend.synth-low  { background: rgba(239,68,68,.35); }

/* Sticky first column on scroll */
.synth-table .synth-td-name,
.synth-table .synth-th-name {
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 1;
  border-right: 2px solid var(--border);
}

/* ============================================================
   CARROUSEL SEMAINES — programme.php
   ============================================================ */

.week-carousel {
  display: flex; align-items: stretch; gap: .5rem;
  margin-bottom: 1.5rem;
}
.week-carousel__arrow {
  flex-shrink: 0;
  width: 2.5rem; border: 1px solid var(--border);
  background: var(--bg-card); border-radius: var(--radius-lg);
  font-size: 1.5rem; color: var(--primary); cursor: pointer;
  transition: all var(--transition);
}
.week-carousel__arrow:hover { background: var(--primary); color: #fff; }
.week-carousel__track {
  display: flex; gap: .65rem; overflow-x: auto;
  scroll-behavior: smooth; padding: .25rem; flex: 1;
  scrollbar-width: thin;
}
.week-carousel__track::-webkit-scrollbar { height: 6px; }
.week-carousel__track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.week-card {
  flex-shrink: 0; width: 175px;
  display: flex; flex-direction: column; gap: .25rem;
  padding: .85rem 1rem; border: 2px solid var(--border);
  border-radius: var(--radius-lg); background: var(--bg-card);
  text-decoration: none; color: var(--text);
  position: relative; transition: all var(--transition);
}
.week-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.week-card--active { border-color: var(--primary); background: rgba(30,59,110,.05); }
.week-card--past { opacity: .72; }
.week-card--past.week-card--active { opacity: 1; }

.week-card__num {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
}
.week-card__date { font-size: 1rem; font-weight: 700; color: var(--primary); }
.week-card__theme { font-size: .78rem; color: var(--text-muted); line-height: 1.3; }
.week-card__count { font-size: .72rem; color: var(--text-muted); margin-top: .15rem; }
.week-card__badge {
  position: absolute; top: .5rem; right: .5rem;
  background: var(--primary); color: #fff;
  font-size: .6rem; font-weight: 700; padding: .1rem .4rem;
  border-radius: 100px; text-transform: uppercase; letter-spacing: .04em;
}

.programme-current-week { margin-bottom: 1.25rem; }
.programme-current-week h2 { font-size: 1.15rem; color: var(--primary); }

@media (max-width: 600px) {
  .week-card { width: 145px; }
}

/* ============================================================
   PROGRAMME ÉPURÉ — Points + icônes accordéon v10
   ============================================================ */

/* Barre de titre de la colle */
.colle-title-bar {
  display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(30,59,110,.06), rgba(30,59,110,.02));
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.colle-title-bar__num {
  font-size: 1.4rem; font-weight: 800; color: var(--primary); margin: 0;
}
.colle-title-bar__date { font-size: 1rem; color: var(--text); font-weight: 600; }
.colle-title-bar__theme {
  font-size: .9rem; color: var(--text-muted);
  padding-left: .75rem; border-left: 1px solid var(--border);
}

/* Liste de points */
.point-list { display: flex; flex-direction: column; gap: .6rem; }

.point-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.point-row:hover { border-color: rgba(30,59,110,.3); }

.point-row__main {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.25rem; flex-wrap: wrap;
}
.point-row__title {
  font-weight: 600; font-size: 1rem; color: var(--text);
  flex: 1; min-width: 200px; line-height: 1.4;
}

.point-row__desc {
  padding: 0 1.25rem .85rem; font-size: .85rem;
  color: var(--text-muted); line-height: 1.5;
  margin-top: -.5rem;
}

.point-row__no-exo {
  font-size: .8rem; color: var(--text-muted); font-style: italic;
}

/* Les 3 icônes */
.point-row__icons { display: flex; gap: .5rem; flex-shrink: 0; flex-wrap: wrap; }

.point-icon {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .85rem; border-radius: 100px;
  border: 1.5px solid var(--border); background: var(--bg-card);
  cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 600;
  transition: all .15s; color: var(--text);
}
.point-icon__emoji { font-size: .95rem; line-height: 1; }
.point-icon:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.point-icon--enonce:hover,   .point-icon--enonce.active   { background: rgba(30,59,110,.1);  border-color: var(--primary);  color: var(--primary); }
.point-icon--indice:hover,   .point-icon--indice.active   { background: rgba(124,58,237,.1); border-color: #7c3aed;         color: #6d28d9; }
.point-icon--solution:hover, .point-icon--solution.active { background: rgba(22,163,74,.1);  border-color: var(--success);  color: var(--success); }

.point-icon.active { font-weight: 700; }

/* Panneau accordéon */
.point-panel {
  display: none;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.point-panel.open { display: block; padding-top: 1rem; }

/* Bloc exercice dans le panneau */
.exo-block { margin-bottom: 1rem; }
.exo-block:last-child { margin-bottom: 0; }
.exo-block__title {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .92rem; color: var(--text);
  margin-bottom: .5rem;
}
.exo-block__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: .78rem; font-weight: 700; flex-shrink: 0;
}

/* Contenu (énoncé/indice/solution) — caché par défaut */
.exo-block__content {
  display: none;
  padding: .85rem 1rem; border-radius: var(--radius);
  background: var(--bg-card); margin-bottom: .5rem;
  border-left: 3px solid var(--primary);
}
.exo-block__content.open { display: block; }
.exo-block__content--indice   { border-left-color: #7c3aed; background: #faf5ff; }
.exo-block__content--solution { border-left-color: var(--success); background: #f0fdf4; }

@media (max-width: 600px) {
  .point-row__main { flex-direction: column; align-items: stretch; }
  .point-row__icons { width: 100%; }
  .point-icon { flex: 1; justify-content: center; }
  .colle-title-bar { flex-direction: column; gap: .35rem; }
  .colle-title-bar__theme { padding-left: 0; border-left: none; }
}

/* ============================================================
   SESSION COLLEUR MOBILE — sliders + swipe v11
   ============================================================ */

/* Formulaire création : trinômes + étudiants */
.trinome-pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: .5rem;
}
.trinome-pick {
  display: flex; flex-direction: column; gap: .2rem; text-align: left;
  padding: .65rem .85rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); background: var(--bg-card); cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.trinome-pick:hover { border-color: var(--primary); }
.trinome-pick.selected { border-color: var(--primary); background: rgba(30,59,110,.06); }
.trinome-pick__name { font-weight: 700; font-size: .9rem; color: var(--primary); }
.trinome-pick__members { font-size: .76rem; color: var(--text-muted); line-height: 1.3; }

.selected-students {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem;
  min-height: 2.5rem; padding: .5rem; background: var(--bg-alt);
  border-radius: var(--radius);
}
.selected-students__empty { color: var(--text-muted); font-size: .85rem; margin: .3rem; }
.student-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem; background: var(--primary); color: #fff;
  border-radius: 100px; font-size: .88rem; font-weight: 600;
}
.student-chip__x {
  background: rgba(255,255,255,.25); border: none; color: #fff;
  width: 1.2rem; height: 1.2rem; border-radius: 50%; cursor: pointer;
  font-size: 1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}

.student-picker {
  margin-top: .6rem; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.student-picker__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem .85rem; background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.student-picker__list { max-height: 240px; overflow-y: auto; padding: .4rem; }
.student-picker__item {
  display: block; width: 100%; text-align: left; padding: .6rem .85rem;
  border: none; background: none; cursor: pointer; border-radius: var(--radius);
  font-family: inherit; font-size: .9rem; transition: background .1s;
}
.student-picker__item:hover { background: var(--bg-alt); }
.student-picker__item.already { opacity: .4; }

/* ── PAGE SESSION MOBILE ────────────────────────────────── */
.session-mobile { max-width: 600px; margin: 0 auto; padding: 0 .5rem; }

.session-mobile__header {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem .25rem; position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.session-mobile__title { flex: 1; font-size: .95rem; line-height: 1.3; }

/* Swiper étudiants */
.student-swiper {
  display: flex; align-items: center; gap: .4rem;
  padding: .75rem 0; position: sticky; top: 3.5rem; z-index: 19;
  background: var(--bg);
}
.student-swiper__nav {
  flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 1.3rem; color: var(--primary); cursor: pointer;
}
.student-swiper__tabs {
  flex: 1; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
}
.student-swiper__tabs::-webkit-scrollbar { display: none; }
.student-tab-m {
  flex-shrink: 0; padding: .5rem 1rem; border-radius: 100px;
  border: 1.5px solid var(--border); background: var(--bg-card);
  font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  font-family: inherit; color: var(--text);
}
.student-tab-m.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.student-actions {
  display: flex; gap: .5rem; justify-content: space-between;
  padding: .25rem 0 1rem;
}

/* Carte note /20 */
.eval-note-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; text-align: center;
}
.eval-note-big { margin-bottom: .75rem; }
.eval-note-value { font-size: 2.6rem; font-weight: 800; color: var(--primary); }
.eval-note-max { font-size: 1.2rem; color: var(--text-muted); font-weight: 600; }

.note-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px;
  border-radius: 100px; background: linear-gradient(90deg,#ef4444,#f59e0b,#22c55e);
  outline: none; margin: .5rem 0;
}
.note-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary); cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.note-slider::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary); cursor: pointer;
}
.note-slider__scale {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--text-muted);
}

/* Sections */
.eval-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1rem;
}
.eval-section__title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); margin-bottom: .85rem;
}
.eval-matiere {
  font-size: .72rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: .04em;
  padding: .4rem 0 .3rem; margin-top: .5rem;
}
.eval-matiere:first-child { margin-top: 0; }

/* Point évalué + slider 0/1/2 */
.eval-point { padding: .65rem 0; border-bottom: 1px solid var(--border); }
.eval-point:last-child { border-bottom: none; }
.eval-point__label { font-size: .9rem; margin-bottom: .6rem; line-height: 1.35; }

.eval-slider { position: relative; }
.eval-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: 100px; outline: none; margin-bottom: .4rem;
}
.eval-range--0 { background: linear-gradient(90deg,#ef4444 33%,var(--border) 33%); }
.eval-range--1 { background: linear-gradient(90deg,#f59e0b 66%,var(--border) 66%); }
.eval-range--2 { background: #22c55e; }
.eval-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  border: 3px solid var(--primary); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.eval-range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  border: 3px solid var(--primary); cursor: pointer;
}
.eval-slider__ticks {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--text-muted);
}
.eval-slider__ticks span.on { color: var(--text); font-weight: 700; }
.eval-slider__ticks span:nth-child(1).on { color: #dc2626; }
.eval-slider__ticks span:nth-child(2).on { color: #b45309; }
.eval-slider__ticks span:nth-child(3).on { color: #16a34a; }

.eval-slider--off .eval-range { opacity: .3; }
.eval-slider--off .eval-slider__ticks { opacity: .4; }
.eval-slider__skip {
  position: absolute; top: -.1rem; right: 0;
  font-size: .7rem; color: var(--text-muted); background: none;
  border: none; cursor: pointer; text-decoration: underline; padding: 0;
}
.eval-slider__skip.on { color: var(--primary); font-weight: 700; text-decoration: none; }

/* Barre save fixe en bas (mobile) */
.save-bar-mobile {
  position: sticky; bottom: 0; z-index: 20;
  padding: .85rem 0; background: var(--bg);
  border-top: 1px solid var(--border);
}

/* Picker overlay */
.picker-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center;
}
.picker-sheet {
  background: var(--bg-card); width: 100%; max-width: 500px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 70vh; display: flex; flex-direction: column;
}
.picker-sheet__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.picker-sheet__list { overflow-y: auto; padding: .5rem; }
.picker-item {
  display: block; width: 100%; text-align: left; padding: .85rem 1rem;
  border: none; background: none; cursor: pointer; border-radius: var(--radius);
  font-family: inherit; font-size: 1rem;
}
.picker-item:hover { background: var(--bg-alt); }

@media (min-width: 700px) {
  .picker-overlay { align-items: center; }
  .picker-sheet { border-radius: var(--radius-lg); }
}

/* ============================================================
   ÉTUDIANTS — Accordéon statistiques v12
   ============================================================ */

.student-accordion-list { display: flex; flex-direction: column; gap: .5rem; }

.student-acc {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.student-acc.open { border-color: var(--primary); }

.student-acc__head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: .85rem 1.1rem; background: none; border: none;
  cursor: pointer; font-family: inherit; text-align: left;
  transition: background .12s;
}
.student-acc__head:hover { background: var(--bg-alt); }
.student-acc__name {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; color: var(--text);
}
.student-acc__arrow {
  font-size: .8rem; color: var(--text-muted); transition: transform .2s;
}
.student-acc.open .student-acc__arrow { transform: rotate(90deg); }

.student-acc__meta { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.student-acc__moy {
  font-weight: 700; font-size: .9rem; padding: .15rem .55rem; border-radius: var(--radius);
}

.student-acc__body { display: none; padding: 0 1.1rem 1.1rem; border-top: 1px solid var(--border); }
.student-acc.open .student-acc__body { display: block; padding-top: 1rem; }

.student-acc__info {
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem;
  font-size: .83rem; color: var(--text-muted); margin-bottom: 1.1rem;
  padding-bottom: .85rem; border-bottom: 1px solid var(--border);
}

.student-acc__subtitle {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text); margin-bottom: .35rem;
}

/* Indicateur rouge/jaune/vert */
.score-dot-indicator {
  width: .85rem; height: .85rem; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.dot-red    { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green  { background: #22c55e; }

/* Groupe matière */
.point-eval-group { margin-bottom: 1rem; }
.point-eval-matiere {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
  padding: .3rem 0; margin-bottom: .25rem;
}

/* Point évalué */
.point-eval {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: .4rem; overflow: hidden;
}
.point-eval__head {
  width: 100%; display: flex; align-items: center; gap: .6rem;
  padding: .6rem .8rem; background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left; transition: background .12s;
}
.point-eval__head:hover { background: var(--bg-alt); }
.point-eval__title { flex: 1; font-size: .88rem; color: var(--text); line-height: 1.3; }
.point-eval__score { font-size: .82rem; font-weight: 700; color: var(--text-muted); }
.point-eval__chevron { font-size: .7rem; color: var(--text-muted); transition: transform .2s; }
.point-eval__head.open .point-eval__chevron { transform: rotate(180deg); }

.point-eval__remarks { display: none; padding: .5rem .8rem .8rem; background: var(--bg-alt); }
.point-eval__remarks.open { display: block; }

.remark-item {
  padding: .6rem .75rem; background: var(--bg-card);
  border-radius: var(--radius); margin-bottom: .4rem;
  border-left: 3px solid var(--border);
}
.remark-item:last-child { margin-bottom: 0; }
.remark-item__head {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--text-muted); margin-bottom: .35rem;
}
.remark-item__note {
  margin-left: auto; font-weight: 700; color: var(--primary);
}
.remark-item__text {
  font-size: .86rem; line-height: 1.5; color: var(--text); font-style: italic;
}
.remark-item__text--empty { color: var(--text-muted); font-style: normal; }

/* ============================================================
   POINTS PAR THÈME — accordéon + indicateur note v13
   ============================================================ */

.theme-selector { display: flex; gap: .5rem; align-items: stretch; }
.theme-selector select { flex: 1; }

.theme-accordion-list { display: flex; flex-direction: column; gap: .5rem; }

.theme-acc {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-card);
}
.theme-acc.open { border-color: var(--primary); }

.theme-acc__head {
  width: 100%; display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1rem; background: var(--bg-alt); border: none;
  cursor: pointer; font-family: inherit; text-align: left;
}
.theme-acc__head:hover { background: rgba(30,59,110,.06); }
.theme-acc__arrow { font-size: .8rem; color: var(--text-muted); transition: transform .2s; }
.theme-acc.open .theme-acc__arrow { transform: rotate(90deg); }
.theme-acc__name { flex: 1; font-weight: 700; font-size: .95rem; color: var(--primary); }
.theme-acc__count { font-size: .78rem; color: var(--text-muted); }

.theme-acc__body { display: none; padding: .5rem; }
.theme-acc.open .theme-acc__body { display: block; }

/* Point dans un thème */
.point-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .7rem .65rem; border-bottom: 1px solid var(--border);
}
.point-item:last-child { border-bottom: none; }
.point-item--inactive { opacity: .45; }

.point-item__info { flex: 1; min-width: 0; }
.point-item__title { font-size: .9rem; font-weight: 500; line-height: 1.35; }
.point-item__desc { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }
.point-item__badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.point-item__actions { display: flex; gap: .2rem; flex-shrink: 0; align-items: flex-start; }

/* Indicateur note gradient rouge→vert */
.note-gradient-dot {
  flex-shrink: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .82rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.note-gradient-dot--empty {
  background: var(--bg-alt) !important; color: var(--text-muted);
  border: 1.5px dashed var(--border); box-shadow: none; font-weight: 400;
}

/* Édition inline */
.point-edit-details { position: relative; }
.point-edit-details summary { list-style: none; cursor: pointer; }
.point-edit-details summary::-webkit-details-marker { display: none; }
.point-edit-form {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 1000; width: min(90vw, 360px); padding: 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
/* Voile sombre derrière la modale d'édition */
.point-edit-details[open] summary::before {
  content: ''; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.4);
}

/* Bouton "Ajouter un thème" — lisible sur fond clair */
.btn-add-theme {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: 0 .9rem; height: auto;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.btn-add-theme:hover { background: var(--primary-dark); }

/* ============================================================
   CARROUSEL ADMIN (liste / formulaire) — swipe mobile v14
   ============================================================ */

.carousel-tabs {
  display: flex; gap: .5rem; margin-bottom: 1rem;
  background: var(--bg-alt); padding: .35rem; border-radius: 100px;
  max-width: 420px;
}
.carousel-tab {
  flex: 1; padding: .55rem 1rem; border: none; background: none;
  border-radius: 100px; font-family: inherit; font-size: .88rem;
  font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.carousel-tab.active {
  background: var(--bg-card); color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.carousel-wrap { overflow: hidden; }
.carousel-track {
  display: flex;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.carousel-slide {
  flex: 0 0 100%; min-width: 100%;
  padding: 0 .15rem;
}

/* La carte interne garde sa largeur pleine */
.carousel-slide .admin-card { width: 100%; }

/* ============================================================
   COLLE — accordéon thèmes + compétences verrouillées v15
   ============================================================ */

.colle-theme-accordion { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }

.ct-acc {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.ct-acc__head {
  width: 100%; display: flex; align-items: center; gap: .5rem;
  padding: .6rem .8rem; background: var(--bg-alt); border: none;
  cursor: pointer; font-family: inherit; text-align: left;
}
.ct-acc__arrow { font-size: .75rem; color: var(--text-muted); transition: transform .2s; }
.ct-acc.open .ct-acc__arrow { transform: rotate(90deg); }
.ct-acc__name { flex: 1; font-weight: 600; font-size: .88rem; color: var(--primary); }
.ct-acc__count {
  font-size: .72rem; background: var(--primary); color: #fff;
  padding: .05rem .45rem; border-radius: 100px;
}
.ct-acc__body { display: none; padding: .5rem .8rem; }
.ct-acc.open .ct-acc__body { display: block; }

/* Compétences transversales verrouillées */
.comp-trans-locked {
  margin-top: .85rem; padding: .85rem 1rem;
  background: rgba(124,58,237,.05); border: 1px dashed rgba(124,58,237,.3);
  border-radius: var(--radius);
}
.comp-trans-locked__title {
  font-size: .8rem; font-weight: 700; color: #6d28d9; margin-bottom: .5rem;
}
.comp-trans-locked__list { display: flex; flex-wrap: wrap; gap: .4rem; }
.comp-trans-chip {
  font-size: .78rem; background: rgba(124,58,237,.12); color: #6d28d9;
  padding: .25rem .65rem; border-radius: 100px; font-weight: 500;
}

/* Bannière d'aide programme (description étudiants) */
.prog-help-banner {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .85rem 1.1rem; margin-bottom: 1.5rem;
  background: rgba(30,59,110,.05); border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9rem; line-height: 1.5; color: var(--text);
}
.prog-help-banner__icon { font-size: 1.1rem; flex-shrink: 0; }

/* ============================================================
   EXERCICES ADMIN — accordéon + LaTeX + images v16
   ============================================================ */

.exo-admin-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: .5rem; overflow: hidden;
}
.exo-admin-card--hidden { opacity: .5; }

.exo-admin-card__head {
  display: flex; align-items: center; gap: .3rem;
  padding: .5rem .65rem; background: var(--bg-card);
}
.exo-admin-card__title {
  flex: 1; display: flex; align-items: center; gap: .5rem;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: inherit; font-weight: 600; font-size: .9rem; color: var(--text);
}
.exo-admin-card__chevron { font-size: .75rem; color: var(--text-muted); }
.exo-pencil {
  background: none; border: none; cursor: pointer; font-size: 1rem;
  padding: .3rem .4rem; border-radius: var(--radius); color: var(--primary);
  text-decoration: none; transition: background .12s;
}
.exo-pencil:hover { background: var(--bg-alt); }

.exo-admin-card__body { display: none; padding: .75rem; background: var(--bg-alt); }
.exo-admin-card.open .exo-admin-card__body { display: block; }

.exo-admin-card__points { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .65rem; }

.exo-view-btns { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.exo-view-btn {
  padding: .35rem .8rem; border-radius: 100px; border: 1.5px solid var(--border);
  background: var(--bg-card); cursor: pointer; font-family: inherit;
  font-size: .8rem; font-weight: 600; transition: all .12s; color: var(--text);
}
.exo-view-btn--enonce.active   { background: rgba(30,59,110,.1); border-color: var(--primary); color: var(--primary); }
.exo-view-btn--indice.active   { background: rgba(124,58,237,.1); border-color: #7c3aed; color: #6d28d9; }
.exo-view-btn--solution.active { background: rgba(22,163,74,.1); border-color: var(--success); color: var(--success); }

.exo-part { display: none; padding: .85rem 1rem; border-radius: var(--radius);
  background: var(--bg-card); margin-top: .4rem; border-left: 3px solid var(--primary); }
.exo-part.open { display: block; }
.exo-part--indice   { border-left-color: #7c3aed; background: #faf5ff; }
.exo-part--solution { border-left-color: var(--success); background: #f0fdf4; }

.exo-latex { font-size: .9rem; line-height: 1.7; color: var(--text); }
.exo-img { max-width: 100%; height: auto; border-radius: var(--radius); margin: .6rem 0; border: 1px solid var(--border); }
.exo-img-preview { max-width: 140px; height: auto; border-radius: var(--radius); margin-top: .5rem; border: 1px solid var(--border); display: block; }

/* Formulaire exercice */
.exo-fieldset {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem; margin-bottom: 1rem;
}
.exo-fieldset legend {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); padding: 0 .5rem;
}
.exo-fieldset--indice     { border-color: rgba(124,58,237,.3); background: rgba(124,58,237,.02); }
.exo-fieldset--indice legend { color: #6d28d9; }
.exo-fieldset--correction { border-color: rgba(22,163,74,.3); background: rgba(22,163,74,.02); }
.exo-fieldset--correction legend { color: var(--success); }

.latex-hint {
  font-size: .82rem; color: var(--text-muted);
  background: var(--bg-alt); padding: .6rem .85rem; border-radius: var(--radius);
  margin-bottom: 1rem;
}
.latex-hint code { background: rgba(0,0,0,.06); padding: .1rem .3rem; border-radius: 3px; font-size: .85em; }

/* ============================================================
   IMAGES EXERCICES — responsive + zoom (lightbox) v17
   ============================================================ */

/* Image responsive : ne dépasse jamais l'écran */
.exo-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  margin: .7rem 0;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: opacity .15s;
}
.exo-img:hover { opacity: .9; }

/* Lightbox plein écran avec zoom */
.img-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  touch-action: none;
}
.img-lightbox.open { display: flex; }
.img-lightbox__img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .1s ease-out;
  touch-action: none; user-select: none;
}
.img-lightbox__close {
  position: absolute; top: 1rem; right: 1.25rem;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; border: none;
  font-size: 1.5rem; cursor: pointer; z-index: 2001;
  display: flex; align-items: center; justify-content: center;
}
.img-lightbox__hint {
  position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .82rem; text-align: center;
  background: rgba(0,0,0,.4); padding: .4rem .9rem; border-radius: 100px;
}

/* Type toggle exercice/cours */
.type-toggle { display: flex; gap: .5rem; }
.type-toggle__opt {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  cursor: pointer; font-size: .9rem; font-weight: 600; transition: all .15s;
}
.type-toggle__opt input { display: none; }
.type-toggle__opt:has(input:checked) {
  border-color: var(--primary); background: rgba(30,59,110,.07); color: var(--primary);
}

/* ============================================================
   ENTRAÎNEMENT — page de pratique v18
   ============================================================ */

.container--narrow { max-width: 720px; }

.btn-train {
  background: linear-gradient(135deg, #16a34a, #15803d); color: #fff;
  padding: .5rem 1.1rem; border-radius: var(--radius); text-decoration: none;
  font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem;
  transition: transform .15s, box-shadow .15s; border: none; cursor: pointer;
}
.btn-train:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(22,163,74,.3); }

.entrain-header { margin-bottom: 1.25rem; }
.entrain-header h1 { font-size: 1.4rem; margin: .5rem 0 .25rem; }

/* Minuteur global sticky */
.entrain-timer {
  position: sticky; top: .5rem; z-index: 30;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  background: var(--primary); color: #fff;
  padding: .7rem 1.1rem; border-radius: var(--radius-lg);
  margin-bottom: 1.5rem; box-shadow: var(--shadow-md);
}
.entrain-timer__icon { font-size: 1.2rem; }
.entrain-timer__label { font-size: .85rem; opacity: .85; }
.entrain-timer__value { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.entrain-timer__hint { font-size: .8rem; margin-left: auto; opacity: .85; }

/* Carte exercice/cours */
.entrain-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.25rem;
}
.entrain-card--cours { border-left: 4px solid #7c3aed; }
.entrain-card__tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); margin-bottom: .4rem;
}
.entrain-card--cours .entrain-card__tag { color: #7c3aed; }
.entrain-card__title { font-size: 1.1rem; margin-bottom: .85rem; }

.entrain-enonce { font-size: .95rem; line-height: 1.6; margin-bottom: 1rem; }

.entrain-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.btn-indice {
  background: #faf5ff; color: #6d28d9; border: 1.5px solid #ddd6fe;
}
.btn-indice:hover:not(:disabled) { background: #f3e8ff; }
.btn-indice:disabled { opacity: .65; cursor: default; }
.btn-solution-locked {
  background: var(--bg-alt); color: var(--text-muted); border: 1.5px solid var(--border);
  cursor: not-allowed;
}
.btn-solution-locked:not(:disabled) {
  background: #f0fdf4; color: var(--success); border-color: #bbf7d0; cursor: pointer;
}

.entrain-reveal {
  display: none; padding: 1rem; border-radius: var(--radius);
  margin-top: .6rem; font-size: .92rem; line-height: 1.6;
}
.entrain-reveal.open { display: block; }
.entrain-reveal--indice   { background: #faf5ff; border-left: 3px solid #7c3aed; }
.entrain-reveal--solution { background: #f0fdf4; border-left: 3px solid var(--success); }

/* Auto-évaluation */
.entrain-eval {
  margin-top: 1rem; padding: 1rem; background: var(--bg-alt);
  border-radius: var(--radius-lg);
}
.entrain-eval__title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); margin-bottom: .75rem;
}
.entrain-eval__row {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; flex-wrap: wrap;
}
.entrain-eval__row label { font-size: .88rem; font-weight: 600; min-width: 80px; }

.diff-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.diff-btn {
  padding: .35rem .75rem; border: 1.5px solid var(--border); border-radius: 100px;
  background: var(--bg-card); cursor: pointer; font-size: .82rem; font-family: inherit;
  font-weight: 600; transition: all .12s;
}
.diff-btn--easy.active   { border-color: #22c55e; background: rgba(34,197,94,.1);  color: #16a34a; }
.diff-btn--medium.active { border-color: #f59e0b; background: rgba(245,158,11,.1); color: #b45309; }
.diff-btn--hard.active   { border-color: #ef4444; background: rgba(239,68,68,.1);  color: #dc2626; }

@media (max-width: 600px) {
  .entrain-timer__hint { width: 100%; margin-left: 0; }
}

/* Photo énoncé sondage */
.poll-photo {
  max-width: 100%; height: auto; border-radius: var(--radius);
  margin: .5rem 0 1rem; border: 1px solid var(--border); cursor: zoom-in;
}

/* ============================================================
   SONDAGE — accordéon détail résultats (admin) v19
   ============================================================ */

.poll-hist-acc .ph-arrow { font-size: .75rem; color: var(--text-muted); transition: transform .2s; display: inline-block; }
.poll-hist-acc.open .ph-arrow { transform: rotate(90deg); }

.poll-hist-detail { display: none; padding: 1rem; margin-top: .75rem;
  background: var(--bg-alt); border-radius: var(--radius-lg); }
.poll-hist-acc.open .poll-hist-detail { display: block; }

.ph-detail-label {
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); margin-bottom: .5rem;
}

.ph-detail-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.ph-stat { text-align: center; }
.ph-stat__value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.ph-stat__label { font-size: .75rem; color: var(--text-muted); }

.ph-bar-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.ph-bar-letter {
  width: 2.5rem; font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.ph-bar-letter--correct { color: var(--success); }
.ph-bar-track { flex: 1; height: 1.4rem; background: var(--bg-card);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.ph-bar-fill { height: 100%; background: var(--primary); opacity: .35; transition: width .5s; }
.ph-bar-fill--correct { background: var(--success); opacity: 1; }
.ph-bar-num { font-size: .8rem; color: var(--text-muted); min-width: 70px; text-align: right; }

.ph-voters { display: flex; flex-wrap: wrap; gap: .4rem; }
.ph-voter {
  font-size: .8rem; padding: .25rem .6rem; border-radius: 100px;
  background: var(--bg-card); border: 1px solid var(--border);
}
.ph-voter--ok { background: rgba(34,197,94,.1); border-color: #bbf7d0; color: #15803d; }
.ph-voter--ko { background: rgba(239,68,68,.08); border-color: #fecaca; color: #b91c1c; }

/* Stats entraînement sur carte exercice admin */
.exo-train-stats {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  font-size: .8rem; color: var(--text-muted);
  padding: .5rem .7rem; margin-bottom: .65rem;
  background: rgba(22,163,74,.05); border-radius: var(--radius);
  border-left: 3px solid #16a34a;
}
.exo-train-diff strong { font-weight: 700; }

/* Recap entraînement dans profil étudiant */
.entrain-recap {
  margin-bottom: .85rem; padding: .65rem .8rem;
  background: var(--bg-card); border-radius: var(--radius);
  border-left: 3px solid var(--primary);
}
.entrain-recap__date { font-weight: 600; font-size: .85rem; margin-bottom: .4rem; }

/* Colonnes nominatives par réponse (détail sondage admin) */
.ph-answer-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem;
}
.ph-answer-col {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .6rem; min-width: 0;
}
.ph-answer-col--correct { border-color: #bbf7d0; background: #f0fdf4; }
.ph-answer-col__head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem;
}
.ph-answer-col__letter { font-weight: 700; font-size: .9rem; }
.ph-answer-col--correct .ph-answer-col__letter { color: var(--success); }
.ph-answer-col__count {
  font-size: .72rem; background: var(--bg-alt); color: var(--text-muted);
  padding: .1rem .5rem; border-radius: 100px; font-weight: 600;
}
.ph-answer-col__opt { font-size: .74rem; color: var(--text-muted); margin-bottom: .4rem; line-height: 1.3; }
.ph-answer-col__names { display: flex; flex-direction: column; gap: .25rem; }
.ph-answer-name {
  font-size: .8rem; padding: .2rem .45rem; background: var(--bg-alt);
  border-radius: var(--radius); line-height: 1.3;
}
.ph-answer-col--correct .ph-answer-name { background: rgba(34,197,94,.12); }
.ph-answer-col__empty { color: var(--text-muted); font-size: .8rem; }

@media (max-width: 600px) {
  .ph-answer-cols { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   PROFIL ÉTUDIANT — accordéon thèmes + auto-éval v22
   ============================================================ */

/* Accordéon thème dans le profil */
.theme-eval-acc { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .5rem; overflow: hidden; }
.theme-eval-acc__head {
  width: 100%; display: flex; align-items: center; gap: .5rem;
  padding: .65rem .8rem; background: var(--bg-alt); border: none; cursor: pointer;
  font-family: inherit; text-align: left;
}
.theme-eval-acc__arrow { font-size: .72rem; color: var(--text-muted); transition: transform .2s; }
.theme-eval-acc.open .theme-eval-acc__arrow { transform: rotate(90deg); }
.theme-eval-acc__name { flex: 1; font-weight: 600; font-size: .9rem; }
.theme-eval-acc__avgs { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.tea-avg { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 600; }
.tea-avg--student { color: var(--text); }
.tea-avg--class { color: var(--text-muted); font-weight: 500; font-size: .76rem;
  background: var(--bg-card); padding: .1rem .45rem; border-radius: 100px; }
.theme-eval-acc__body { display: none; padding: .5rem; }
.theme-eval-acc.open .theme-eval-acc__body { display: block; }

/* Onglet auto-évaluations */
.autoeval-acc { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.autoeval-acc__head {
  width: 100%; display: flex; align-items: center; gap: .5rem;
  padding: .75rem .9rem; background: rgba(22,163,74,.06); border: none; cursor: pointer;
  font-family: inherit; text-align: left;
}
.autoeval-acc.open .theme-eval-acc__arrow { transform: rotate(90deg); }
.autoeval-acc__summary { display: flex; gap: .35rem; flex-shrink: 0; }
.ae-chip { font-size: .74rem; background: var(--bg-card); color: var(--text-muted);
  padding: .15rem .55rem; border-radius: 100px; font-weight: 600; }
.autoeval-acc__body { display: none; padding: .85rem; }
.autoeval-acc.open .autoeval-acc__body { display: block; }

.autoeval-summary { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ae-stat { text-align: center; }
.ae-stat__val { display: block; font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.ae-stat__val small { font-size: .7rem; color: var(--text-muted); }
.ae-stat__lbl { font-size: .72rem; color: var(--text-muted); }

/* ============================================================
   SYNTHÈSE — onglets responsive + cartes étudiant v23
   ============================================================ */

.synth-tabs { display: flex; gap: .3rem; background: var(--bg-alt); padding: .3rem; border-radius: 100px; }
.synth-tab {
  padding: .45rem .85rem; border: none; background: none; border-radius: 100px;
  font-family: inherit; font-size: .82rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.synth-tab.active { background: var(--bg-card); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.synth-hint { font-size: .8rem; color: var(--text-muted); margin-bottom: .85rem; }

.synth-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .65rem;
}
.synth-student-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: .75rem .9rem; background: var(--bg-card); position: relative;
}
.synth-student-card__head {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem;
}
.synth-student-card__head > .synth-student-card__name { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.synth-student-card__head > span:last-child { flex: 0 0 auto; }
.synth-student-card__name { font-weight: 600; font-size: .9rem; }
.synth-student-card__moy {
  font-weight: 800; font-size: .95rem; padding: .15rem .6rem; border-radius: var(--radius);
}
.synth-student-card__sub { font-size: .82rem; color: var(--text-muted); }

.synth-student-card__notes { display: flex; gap: .35rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.synth-mini-note {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .3rem .4rem; background: var(--bg-alt); border-radius: var(--radius);
  min-width: 0; flex: 1 1 0; white-space: nowrap;
}
.synth-mini-note__date { font-size: .66rem; color: var(--text-muted); }
.synth-mini-note__val { font-weight: 700; font-size: .82rem; padding: 0 .25rem; border-radius: 4px; }

.synth-full-table { margin-top: 1rem; }
.synth-full-table summary {
  cursor: pointer; font-size: .85rem; color: var(--primary); font-weight: 600;
  padding: .5rem 0;
}

/* En-tête de thème avec bouton renommer (exercices) */
.theme-acc__head-row { display: flex; align-items: stretch; }
.theme-acc__head-row .theme-acc__head { flex: 1; }
.theme-rename-btn {
  flex-shrink: 0; background: var(--bg-alt); border: none; cursor: pointer;
  padding: 0 .9rem; font-size: 1rem; color: var(--primary);
  border-left: 1px solid var(--border); transition: background .12s;
}
.theme-rename-btn:hover { background: rgba(30,59,110,.1); }

/* ============================================================
   EXERCICES NON RATTACHÉS + IMPORT LATEX v27
   ============================================================ */

.unattached-item {
  display: flex; flex-direction: column; gap: .5rem;
  padding: .75rem; border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: .6rem; background: var(--bg-alt);
}
.unattached-item__title { font-weight: 600; font-size: .9rem; }
.unattached-attach { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.unattached-attach .form-control--sm { flex: 1; min-width: 130px; }
.ua-status { font-size: .82rem; font-weight: 600; min-width: 70px; }

.form-control--sm { padding: .4rem .6rem; font-size: .88rem; }

/* Import LaTeX */
.latex-pre {
  background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: var(--radius);
  font-size: .8rem; line-height: 1.5; overflow-x: auto; margin-top: .5rem;
  font-family: 'Courier New', monospace; white-space: pre;
}
.latex-syntax-recap code { background: rgba(0,0,0,.06); padding: .1rem .3rem; border-radius: 3px; }

/* Sur mobile : empiler les sélecteurs en pleine largeur */
@media (max-width: 600px) {
  .unattached-attach .form-control--sm { flex: 1 1 100%; min-width: 0; }
}

/* ============================================================
   TRAVAUX PRATIQUES (TP) — notebooks Pyodide v29
   ============================================================ */

/* Bandeau d'état Pyodide */
.pyodide-status {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .9rem; border-radius: var(--radius);
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted); margin-bottom: 1.25rem;
}
.pyodide-status__dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0;
}
.pyodide-status--loading { background: #fef9e7; border-color: #fde68a; color: #92400e; }
.pyodide-status--loading .pyodide-status__dot { background: #f59e0b; animation: pulse 1.2s infinite; }
.pyodide-status--ready { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.pyodide-status--ready .pyodide-status__dot { background: #10b981; }
.pyodide-status--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.pyodide-status--error .pyodide-status__dot { background: #ef4444; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Sélecteur de thèmes à icônes */
.tp-theme-selector {
  display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.tp-theme-btn {
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  padding: .85rem 1.1rem; min-width: 92px;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; font-family: inherit;
  transition: all .15s; position: relative;
}
.tp-theme-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.tp-theme-btn.active { border-color: var(--primary); background: rgba(30,59,110,.06); }
.tp-theme-btn__icon { font-size: 1.8rem; line-height: 1; }
.tp-theme-btn__name { font-size: .82rem; font-weight: 600; color: var(--text); }
.tp-theme-btn__count {
  position: absolute; top: -7px; right: -7px;
  background: var(--primary); color: #fff; font-size: .68rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 100px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.tp-hidden { display: none !important; }

/* Onglets carrousel des TP */
.tp-carousel-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border); padding-bottom: .6rem;
}
.tp-tab {
  padding: .45rem .9rem; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 100px; font-family: inherit; font-size: .85rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; white-space: nowrap; transition: all .15s;
}
.tp-tab:hover { color: var(--text); }
.tp-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Notebook */
.tp-notebook__header { margin-bottom: 1.5rem; }
.tp-notebook__header h2 { margin: 0 0 .35rem; color: var(--primary); }
.tp-notebook__desc { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* Cellules */
.tp-cell { margin-bottom: 1.1rem; }
.tp-cell--md {
  line-height: 1.7; color: var(--text);
}
.tp-cell--md h1, .tp-cell--md h2, .tp-cell--md h3 { color: var(--primary); margin: 1rem 0 .5rem; }
.tp-cell--md h1 { font-size: 1.4rem; }
.tp-cell--md h2 { font-size: 1.2rem; }
.tp-cell--md h3 { font-size: 1.05rem; }
.tp-cell--md p { margin: .5rem 0; }
.tp-cell--md ul, .tp-cell--md ol { margin: .5rem 0; padding-left: 1.5rem; }
.tp-cell--md code {
  background: var(--bg-alt); padding: .1rem .4rem; border-radius: 4px;
  font-size: .9em; font-family: 'Courier New', monospace;
}
.tp-cell--md pre { background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: var(--radius); overflow-x: auto; }
.tp-cell--md pre code { background: none; color: inherit; padding: 0; }
.tp-cell--md blockquote {
  border-left: 3px solid var(--primary); padding-left: 1rem; margin: .75rem 0;
  color: var(--text-muted);
}
.tp-cell--md table { border-collapse: collapse; margin: .75rem 0; }
.tp-cell--md th, .tp-cell--md td { border: 1px solid var(--border); padding: .4rem .7rem; }

/* Cellule de code */
.tp-cell--code {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: #0f172a;
}
.tp-cell__toolbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .75rem; background: #1e293b; border-bottom: 1px solid #334155;
}
.tp-run-btn {
  background: var(--success); color: #fff; border: none; cursor: pointer;
  padding: .35rem .9rem; border-radius: var(--radius); font-family: inherit;
  font-size: .82rem; font-weight: 600; transition: background .15s;
}
.tp-run-btn:hover { background: #059669; }
.tp-run-btn:disabled { opacity: .5; cursor: wait; }
.tp-cell__hint { font-size: .74rem; color: #94a3b8; }

.tp-code-input {
  width: 100%; box-sizing: border-box; border: none; outline: none; resize: none;
  background: #0f172a; color: #e2e8f0; padding: .85rem;
  font-family: 'Courier New', Consolas, monospace; font-size: .88rem; line-height: 1.5;
  tab-size: 4;
}

.tp-output {
  border-top: 1px solid #334155; padding: .75rem .85rem; background: #0b1120;
}
.tp-output--running { color: #fbbf24; font-size: .85rem; }
.tp-output--error { background: #2d0f0f; }
.tp-output__text {
  margin: 0; color: #e2e8f0; font-family: 'Courier New', monospace;
  font-size: .85rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.tp-output--error .tp-output__text, .tp-output--error { color: #fca5a5; }
.tp-output__plot {
  max-width: 100%; height: auto; display: block; margin: .6rem 0 .2rem;
  background: #fff; border-radius: var(--radius); padding: .3rem;
}
.tp-output__ok { color: #6ee7b7; font-size: .82rem; }

/* ── Admin : chips de thèmes ── */
.tp-theme-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.tp-theme-chip {
  display: flex; align-items: center; gap: .4rem;
  padding: .35rem .35rem .35rem .7rem; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 100px; font-size: .85rem;
}
.tp-chip-x {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  width: 20px; height: 20px; border-radius: 50%; font-size: .7rem; line-height: 1;
}
.tp-chip-x:hover { background: var(--error); color: #fff; }

/* ── Admin : liste des TP ── */
.tp-admin-list { display: flex; flex-direction: column; gap: .5rem; }
.tp-admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .7rem .85rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card);
}
.tp-admin-row--hidden { opacity: .55; }
.tp-admin-row__info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.tp-admin-row__title { font-weight: 600; font-size: .9rem; }
.tp-admin-row__meta { font-size: .76rem; color: var(--text-muted); }
.tp-admin-row__actions { display: flex; gap: .25rem; flex-shrink: 0; }

/* ── Admin : éditeur de cellules ── */
.cells-editor { display: flex; flex-direction: column; gap: .6rem; margin-top: .5rem; }
.cell-edit {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.cell-edit--code { border-color: #c7d2fe; }
.cell-edit__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .6rem; background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.cell-edit--code .cell-edit__head { background: #eef2ff; }
.cell-edit__label { font-size: .8rem; font-weight: 600; color: var(--text); }
.cell-edit__btns { display: flex; gap: .15rem; }
.cell-edit__btns button {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: .15rem .35rem; font-size: .78rem; border-radius: 4px;
}
.cell-edit__btns button:hover { background: var(--bg-card); }
.cell-edit__area {
  width: 100%; box-sizing: border-box; border: none; outline: none; resize: vertical;
  padding: .6rem; font-family: 'Courier New', monospace; font-size: .85rem; line-height: 1.5;
  min-height: 70px;
}
.cell-edit--code .cell-edit__area { background: #0f172a; color: #e2e8f0; }
.cells-add-bar { display: flex; gap: .5rem; margin-top: .6rem; }

@media (max-width: 600px) {
  .tp-theme-btn { min-width: 78px; padding: .7rem .8rem; }
  .tp-theme-btn__icon { font-size: 1.5rem; }
  .cells-add-bar { flex-direction: column; }
  .cells-add-bar .btn { width: 100%; }
}

/* ============================================================
   TP — zone graphique matplotlib INTERACTIVE (canvas + toolbar) v32
   ============================================================ */
.tp-output__plotarea {
  margin-top: .75rem;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem;
}
/* Le canvas matplotlib */
.tp-output__plotarea canvas {
  max-width: 100%;
  display: block;
  cursor: crosshair;
}
/* Barre d'outils matplotlib (boutons zoom/déplacement/accueil/enregistrer) */
.tp-output__plotarea .matplotlib-toolbar,
.tp-output__plotarea div[style*="toolbar"] {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-bottom: .4rem;
  align-items: center;
}
.tp-output__plotarea button {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .25rem .5rem;
  cursor: pointer;
  font-size: .85rem;
}
.tp-output__plotarea button:hover { background: var(--primary); color: #fff; }

/* ============================================================
   TP — graphique INTERACTIF (réticule + coordonnées + zoom) v36
   ============================================================ */
.tp-plot {
  margin-top: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.tp-plot__stage {
  position: relative;
  overflow: hidden;
  line-height: 0;
}
.tp-plot__img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
/* Réticule */
.tp-plot__cross {
  position: absolute;
  background: rgba(220, 38, 38, .7);
  pointer-events: none;
  z-index: 3;
}
.tp-plot__cross--v { top: 0; bottom: 0; width: 1px; }
.tp-plot__cross--h { left: 0; right: 0; height: 1px; }
/* Étiquette de coordonnées */
.tp-plot__coord {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  background: rgba(17, 24, 39, .9);
  color: #fff;
  font-size: .74rem;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  padding: .15rem .4rem;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.3;
}
.tp-plot__hint {
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
  padding: .35rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  line-height: 1.3;
}

/* ============================================================
   TP — barre d'outils notebook + soumission + correction v37
   ============================================================ */
.tp-badge-eval { font-size: .68rem; background: rgba(22,163,74,.15); color: #15803d;
  padding: .15rem .5rem; border-radius: 100px; vertical-align: middle; margin-left: .4rem; font-weight: 600; }
.tp-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.tp-tool-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; padding: .4rem .75rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card); color: var(--text);
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.tp-tool-btn:hover { background: var(--bg-alt); }
.tp-tool-btn--submit { background: var(--primary); color: #fff; border-color: var(--primary); }
.tp-tool-btn--submit:hover { background: var(--primary-dark); }
.tp-tool-btn--done { background: var(--success) !important; color: #fff !important; border-color: var(--success) !important; }
.tp-files-loaded { margin-top: .5rem; }
.tp-file-chip { font-size: .8rem; background: var(--bg-alt); padding: .3rem .6rem; border-radius: var(--radius);
  display: inline-block; }
.tp-file-chip code { background: rgba(0,0,0,.06); padding: .05rem .3rem; border-radius: 3px; }
.tp-file-chip--err { background: rgba(220,38,38,.1); color: var(--error); }
.tp-sub-status { margin-top: .75rem; padding: .6rem .8rem; background: rgba(22,163,74,.08);
  border: 1px solid #bbf7d0; border-radius: var(--radius); font-size: .85rem; }
.tp-sub-comment { margin-top: .35rem; font-style: italic; color: var(--text); }

/* Page de correction */
.eval-tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.eval-tp-card { display: block; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); text-decoration: none; color: var(--text); }
.eval-tp-card:hover { border-color: var(--primary); }
.eval-tp-card__title { font-weight: 600; margin-bottom: .5rem; }
.eval-tp-card__stats { display: flex; gap: .4rem; }
.eval-chip { font-size: .74rem; background: var(--bg-alt); color: var(--text-muted);
  padding: .15rem .55rem; border-radius: 100px; font-weight: 600; }
.eval-chip--done { background: rgba(22,163,74,.12); color: #15803d; }

.eval-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  margin-bottom: 1rem; position: sticky; top: .5rem; z-index: 5; background: var(--bg); padding: .35rem 0; }
.eval-nav__pos { font-weight: 600; font-size: .9rem; }
.eval-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; background: var(--bg-card); }
.eval-hidden { display: none; }
.eval-card__head { display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--border); padding-bottom: .6rem; margin-bottom: .8rem; flex-wrap: wrap; gap: .3rem; }
.eval-card__student { font-weight: 700; font-size: 1.05rem; }
.eval-card__meta { font-size: .78rem; color: var(--text-muted); }
.eval-codecell { margin-bottom: .9rem; }
.eval-codecell__bar { display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--text-muted); margin-bottom: .3rem; }
.eval-code { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem;
  border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; resize: vertical;
  background: #1e1e2e; color: #e4e4ef; caret-color: #e4e4ef; }
.eval-code::selection { background: #44475a; }
.eval-grade { margin-top: 1rem; padding-top: .8rem; border-top: 2px solid var(--border);
  display: flex; flex-direction: column; gap: .6rem; }
.eval-grade__row { display: flex; align-items: center; gap: .5rem; }
.eval-save-status { font-size: .82rem; font-weight: 600; }

/* ============================================================
   TP — cellule évaluée (badge élève + checkbox éditeur) v38
   ============================================================ */
.tp-cell--eval { border-left: 3px solid var(--accent); }
.tp-cell__evalbadge {
  font-size: .72rem; background: rgba(180,120,30,.14); color: #b4781e;
  padding: .15rem .5rem; border-radius: 100px; font-weight: 600; white-space: nowrap;
}
.cell-edit__eval {
  font-size: .76rem; color: #b4781e; display: inline-flex; align-items: center;
  gap: .25rem; cursor: pointer; margin-right: .5rem; white-space: nowrap;
}
.cell-edit__eval input { cursor: pointer; }

/* ============================================================
   Synthèse — mini-table des notes de TP par étudiant v39
   ============================================================ */
.synth-mini-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.synth-mini-table td { padding: .25rem .3rem; border-bottom: 1px solid var(--border); }
.synth-mini-table tr:last-child td { border-bottom: none; }

/* ============================================================
   TP — cellule RÉPONSE (texte libre de l'élève) v40
   ============================================================ */
.tp-cell--reponse { border-left: 3px solid var(--primary); padding-left: .75rem; margin: .5rem 0; }
.tp-cell__prompt { margin-bottom: .5rem; }
.tp-cell__answerbar { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.tp-cell__answerlabel { font-size: .8rem; font-weight: 600; color: var(--primary); }
.tp-answer-input {
  width: 100%; min-height: 4.5rem; font-family: inherit; font-size: .92rem; line-height: 1.5;
  border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem;
  resize: vertical; background: #fffdf7;
}
.tp-answer-input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
/* Éditeur : aide cellule réponse */
.cell-edit__help { font-size: .76rem; color: var(--text-muted); margin: .3rem 0 0; }
/* Correction : réponse rédigée de l'élève */
.eval-answercell { margin-bottom: .9rem; border: 1px solid var(--border); border-radius: var(--radius);
  padding: .6rem .75rem; background: var(--bg-alt); }
.eval-answercell__prompt { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem;
  padding-bottom: .5rem; border-bottom: 1px dashed var(--border); }
.eval-answercell__text { font-size: .95rem; line-height: 1.55; white-space: normal; }

/* ============================================================
   DEVOIRS À RENDRE — élève + admin + correction v41
   ============================================================ */
/* --- Élève --- */
.devoirs-page { max-width: 900px; }
.devoir-card { border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.25rem; margin-bottom:1.25rem; background:var(--bg-card); }
.devoir-card__head { display:flex; justify-content:space-between; align-items:baseline; gap:.5rem; flex-wrap:wrap; }
.devoir-card__head h2 { margin:0; font-size:1.15rem; }
.devoir-deadline { font-size:.82rem; color:var(--text-muted); background:var(--bg-alt); padding:.2rem .6rem; border-radius:100px; }
.devoir-deadline--past { color:var(--error); background:rgba(220,38,38,.08); }
.devoir-card__desc { color:var(--text); font-size:.92rem; margin:.5rem 0; }
.devoir-status { padding:.6rem .8rem; border-radius:var(--radius); font-size:.88rem; margin:.6rem 0; }
.devoir-status--done { background:rgba(22,163,74,.08); border:1px solid #bbf7d0; }
.devoir-status--closed { background:var(--bg-alt); color:var(--text-muted); }
.devoir-comment { background:rgba(30,59,110,.05); border-left:3px solid var(--primary); padding:.5rem .75rem; margin:.5rem 0; font-size:.9rem; border-radius:0 var(--radius) var(--radius) 0; }
.devoir-detail { margin:.6rem 0; }
.devoir-detail summary { cursor:pointer; font-weight:600; font-size:.88rem; color:var(--primary); }
.devoir-q { margin:.6rem 0; }
.devoir-q__title { font-weight:700; font-size:.9rem; margin-bottom:.3rem; }
.devoir-item { display:flex; gap:.6rem; align-items:flex-start; padding:.25rem .4rem; border-radius:4px; font-size:.86rem; }
.devoir-item__pts { font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; min-width:48px; }
.devoir-item--ok { background:rgba(22,163,74,.06); } .devoir-item--ok .devoir-item__pts { color:#15803d; }
.devoir-item--zero { background:rgba(220,38,38,.05); } .devoir-item--zero .devoir-item__pts { color:var(--error); }
.devoir-item--skip { opacity:.55; } .devoir-item--skip .devoir-item__pts { color:var(--text-muted); }
.devoir-resubmit { font-size:.85rem; color:var(--text-muted); margin:.75rem 0 .25rem; }
.devoir-upload { border:2px dashed var(--border); border-radius:var(--radius); padding:1rem; text-align:center; margin-top:.5rem; }
.devoir-filebtn { display:inline-block; padding:.6rem 1rem; background:var(--primary); color:#fff; border-radius:var(--radius); cursor:pointer; font-size:.9rem; }
.devoir-filebtn:hover { background:var(--primary-dark); }
.devoir-preview { margin:1rem auto; max-width:420px; }
.devoir-preview__canvas { max-width:100%; border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.devoir-preview__info { font-size:.85rem; margin-top:.5rem; }
.devoir-quality { padding:.5rem .7rem; border-radius:var(--radius); margin-top:.5rem; font-size:.85rem; }
.devoir-quality--ok { background:rgba(22,163,74,.08); color:#15803d; }
.devoir-quality--warn { background:rgba(217,119,6,.1); color:#b45309; }
.devoir-quality__num { font-size:.75rem; opacity:.8; }
.devoir-send { margin-top:.75rem; }
.devoir-msg { margin-top:.5rem; font-size:.88rem; font-weight:600; }
.devoir-msg--err { color:var(--error); } .devoir-msg--ok { color:var(--success); }

/* --- Admin liste/édition --- */
.dv-create summary { cursor:pointer; font-weight:600; }
.dv-form__row { display:flex; gap:1rem; flex-wrap:wrap; }
.dv-list { margin-top:1.5rem; display:flex; flex-direction:column; gap:.5rem; }
.dv-row { display:flex; justify-content:space-between; align-items:center; gap:.75rem; padding:.75rem 1rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-card); flex-wrap:wrap; }
.dv-row__title { font-weight:600; color:var(--primary); text-decoration:none; font-size:1.02rem; }
.dv-row__meta { font-size:.8rem; color:var(--text-muted); }
.dv-row__actions { display:flex; gap:.4rem; }
.dv-title { margin-bottom:.25rem; }
.dv-tabs { display:flex; gap:.25rem; border-bottom:2px solid var(--border); margin-bottom:1.25rem; flex-wrap:wrap; }
.dv-tab { padding:.5rem .9rem; text-decoration:none; color:var(--text-muted); font-size:.9rem; border-bottom:2px solid transparent; margin-bottom:-2px; }
.dv-tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.dv-tab--go { margin-left:auto; color:var(--success); }

/* Barème éditeur */
.bareme-help { font-size:.86rem; color:var(--text-muted); background:var(--bg-alt); padding:.6rem .8rem; border-radius:var(--radius); margin-bottom:1rem; }
.bareme-question { border:1px solid var(--border); border-radius:var(--radius); margin-bottom:.85rem; padding:.6rem .75rem; background:var(--bg-card); }
.bareme-question__head { display:flex; gap:.5rem; align-items:center; margin-bottom:.5rem; }
.bareme-question__title { flex:1; font-weight:600; padding:.35rem .5rem; border:1px solid var(--border); border-radius:4px; }
.bareme-question__btns button { background:var(--bg-alt); border:1px solid var(--border); border-radius:4px; cursor:pointer; padding:.2rem .45rem; }
.bareme-item { border:1px solid var(--border); border-radius:4px; padding:.4rem; margin-bottom:.4rem; background:var(--bg-alt); }
.bareme-item__row1 { display:flex; gap:.4rem; align-items:center; }
.bareme-item__pts { width:62px; text-align:center; padding:.3rem; border:1px solid var(--border); border-radius:4px; }
.bareme-item__desc { flex:1; padding:.3rem .5rem; border:1px solid var(--border); border-radius:4px; }
.bareme-item__row2 { display:flex; gap:.4rem; margin-top:.35rem; }
.bareme-item__prog, .bareme-item__cap { flex:1; padding:.3rem; border:1px solid var(--border); border-radius:4px; font-size:.82rem; background:#fff; }
.bareme-x { background:none; border:none; color:var(--error); cursor:pointer; font-size:1rem; }
.bareme-additem { margin-top:.25rem; }
.bareme-footer { display:flex; justify-content:space-between; align-items:center; margin-top:1rem; padding-top:1rem; border-top:1px solid var(--border); flex-wrap:wrap; gap:.75rem; }
.bareme-total { font-size:.95rem; }

/* Copies */
.dv-upload summary { cursor:pointer; font-weight:600; }
.dv-section { margin-top:1.5rem; }
.dv-section__title { font-size:1rem; margin-bottom:.6rem; }
.dv-copie { display:flex; align-items:center; gap:.6rem; padding:.5rem .7rem; border:1px solid var(--border); border-radius:var(--radius); margin-bottom:.4rem; background:var(--bg-card); flex-wrap:wrap; }
.dv-copie--warn { border-color:#fcd34d; background:rgba(217,119,6,.05); }
.dv-copie__student { font-weight:600; min-width:140px; }
.dv-copie__file { font-size:.85rem; }
.dv-copie__statut { font-size:.78rem; padding:.1rem .5rem; border-radius:100px; background:var(--bg-alt); }
.dv-statut--corrige { background:rgba(22,163,74,.12); color:#15803d; }
.dv-attrib-form { margin:0; }
.form-control--sm { padding:.25rem .4rem; font-size:.82rem; }
.dv-x { background:none; border:none; cursor:pointer; font-size:1rem; }

/* --- Correction (PDF + barème) --- */
.corr-wrap { position:fixed; inset:0; display:flex; flex-direction:column; background:var(--bg); z-index:50; }
.corr-bar { display:flex; align-items:center; gap:.5rem; padding:.5rem .75rem; border-bottom:1px solid var(--border); background:var(--bg-card); flex-wrap:wrap; }
.corr-bar__title { font-weight:600; color:var(--text-muted); font-size:.85rem; margin-left:auto; margin-right:.4rem; }
.corr-bar__student { font-size:1.05rem; font-weight:800; color:var(--primary); white-space:nowrap; }
.corr-bar__pos { font-variant-numeric:tabular-nums; color:var(--text-muted); white-space:nowrap; }
.corr-bar__back { flex-shrink:0; }
.btn-help { background:var(--bg-alt); }
.corr-help { display:none; padding:.5rem .75rem; background:var(--bg-alt); border-bottom:1px solid var(--border); font-size:.8rem; gap:.85rem; flex-wrap:wrap; align-items:center; }
.corr-help.open { display:flex; }
.corr-help kbd { background:#fff; border:1px solid var(--border); border-bottom-width:2px; border-radius:4px; padding:0 .35rem; font-family:ui-monospace,monospace; font-size:.78rem; }
.corr-main { flex:1; display:flex; min-height:0; }
.corr-pdf { flex:1; overflow-y:auto; padding:12px; background:#525659; outline:none; position:relative; }
.corr-pdf__page { display:block; margin:0 auto 12px; box-shadow:0 2px 8px rgba(0,0,0,.4); background:#fff; max-width:100%; }
.corr-pdf__loading { color:#fff; text-align:center; padding:2rem; }
.corr-panel { width:380px; max-width:42vw; border-left:1px solid var(--border); display:flex; flex-direction:column; background:var(--bg-card); }
.corr-score { display:flex; justify-content:space-between; align-items:center; padding:.6rem .8rem; border-bottom:1px solid var(--border); background:var(--bg-alt); }
.corr-score__pts { font-weight:700; }
.corr-score__note { font-weight:700; color:var(--primary); }
.corr-bareme { flex:1; overflow-y:auto; padding:.5rem .6rem; }
.cb-question { margin-bottom:.6rem; }
.cb-question__title { font-weight:700; font-size:.86rem; color:var(--primary); padding:.25rem 0; border-bottom:1px solid var(--border); margin-bottom:.3rem; }
.cb-item { display:grid; grid-template-columns:auto auto 1fr; align-items:center; gap:.4rem; padding:.35rem .4rem; border-radius:4px; }
.cb-item--current { background:rgba(30,59,110,.1); outline:2px solid var(--primary); }
.cb-item__pts { width:52px; text-align:center; padding:.25rem; border:1px solid var(--border); border-radius:4px; font-variant-numeric:tabular-nums; }
.cb-item__max { font-size:.78rem; color:var(--text-muted); }
.cb-item__desc { font-size:.84rem; line-height:1.35; }
.cb-item__cap { grid-column:3; font-size:.72rem; color:#b45309; background:rgba(217,119,6,.1); padding:.05rem .4rem; border-radius:100px; justify-self:start; }
.corr-comment { padding:.5rem .6rem; border-top:1px solid var(--border); }
.corr-save { margin:.5rem .6rem .75rem; }
@media (max-width:760px){
  .corr-main { flex-direction:column; }
  .corr-panel { width:100%; max-width:none; max-height:50vh; border-left:none; border-top:1px solid var(--border); }
}

/* ============================================================
   Devoirs — badges de note sur la copie + surlignage barème v42
   ============================================================ */
/* Badge de note posé sur le PDF (milieu gauche), encre rouge translucide */
.corr-note-badge {
  position: absolute;
  left: 14px;
  transform: translateY(-50%);
  background: rgba(206, 32, 32, 0.55);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  padding: .3rem .55rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  pointer-events: none;
  z-index: 4;
  font-variant-numeric: tabular-nums;
}
/* Surlignage « consultation » du barème (différent de la sélection) */
.cb-item--peek {
  background: rgba(206, 32, 32, 0.10);
  box-shadow: inset 3px 0 0 rgba(206, 32, 32, 0.6);
}
/* Barème en lecture seule (côté élève) */
.cb-item--ro { cursor: default; }
.cb-ro { display:inline-flex; align-items:baseline; gap:1px; font-weight:700; border-radius:6px; padding:.1rem .3rem; }
.cb-ro--ok   { background: rgba(22,163,74,.14); color:#15803d; }
.cb-ro--zero { background: rgba(220,38,38,.12); color: var(--error); }
.cb-ro--skip { background: var(--bg-alt); color: var(--text-muted); }
.cb-item--ro .cb-item__max { color: inherit; opacity:.7; font-weight:600; }

/* ============================================================
   Synthèse/points — indicateur DS + réglages rapides devoirs v43
   ============================================================ */
.skill-row__ds {
  font-size: .72rem; font-weight: 700; padding: .1rem .4rem; border-radius: 6px;
  background: var(--bg-alt); white-space: nowrap;
}
.skill-row__score--low  { color: var(--error); }
.skill-row__score--mid  { color: #b4781e; }
.skill-row__score--high { color: #15803d; }

/* Statut dépôt dans la liste des devoirs */
.dv-open   { color: #15803d; font-weight: 600; }
.dv-closed { color: var(--error); font-weight: 600; }

/* Popover crayon (réglage rapide) */
.dv-quick { position: relative; display: inline-block; }
.dv-quick > summary { list-style: none; cursor: pointer; }
.dv-quick > summary::-webkit-details-marker { display: none; }
/* Fond cliquable (ferme au clic extérieur, sans JS) */
.dv-quick[open] > summary::after {
  content: ''; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.35);
}
.dv-quick__form {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 1000; width: min(92vw, 300px); padding: 1.1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.form-control--sm { padding: .35rem .5rem; font-size: .85rem; }

/* ============================================================
   Icône info + popover explicatif (synthèse / points) v44
   ============================================================ */
.info-pop { display: inline-block; position: relative; vertical-align: middle; margin-left: .4rem; }
.info-pop > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700;
  font-style: italic; font-family: Georgia, 'Times New Roman', serif; line-height: 1;
}
.info-pop > summary::-webkit-details-marker { display: none; }
.info-pop > summary::marker { content: ''; }
.info-pop[open] > summary { background: var(--primary-dark); }
.info-pop__box {
  position: absolute; left: 0; top: 135%; z-index: 40;
  width: min(360px, 80vw);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0,0,0,.16);
  padding: .85rem 1rem; text-align: left;
  font-size: .82rem; line-height: 1.5; font-weight: 400; color: var(--text);
}
.info-pop__box p { margin: 0 0 .55rem; }
.info-pop__box p:last-child { margin-bottom: 0; }
.ip-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: middle; margin: 0 .1rem; }
.ip-dot--low  { background: var(--error); }
.ip-dot--mid  { background: #e0a020; }
.ip-dot--high { background: #16a34a; }
@media (max-width: 600px) { .info-pop__box { left: auto; right: 0; } }

/* ============================================================
   Tableau de bord élève — moyenne générale + blocs par type v46
   ============================================================ */
/* Moyenne générale pondérée */
.genmoy-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.genmoy-card__main { display: flex; align-items: center; gap: 1rem; }
.genmoy-card__value { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.genmoy-card__value small { font-size: 1rem; font-weight: 600; opacity: .85; }
.genmoy-card__label { font-size: .95rem; font-weight: 600; line-height: 1.3; }
.genmoy-card__rank { text-align: center; background: rgba(255,255,255,.15); border-radius: var(--radius); padding: .5rem .9rem; }
.genmoy-card__rankpos { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.genmoy-card__ranklbl { font-size: .72rem; opacity: .85; margin-top: .2rem; }

/* Grille de blocs par type */
.evalblocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.evalblock { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); padding: 1rem 1.1rem; }
.evalblock--empty { opacity: .65; }
.evalblock__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.evalblock__icon { font-size: 1.2rem; }
.evalblock__title { font-weight: 700; flex: 1; }
.evalblock__coef { font-size: .72rem; font-weight: 700; background: var(--bg-alt); color: var(--text-muted); padding: .1rem .45rem; border-radius: 100px; }
.evalblock__avg { font-size: 1.15rem; font-weight: 800; padding: .1rem .5rem; border-radius: 8px; font-variant-numeric: tabular-nums; }
.evalblock__none { color: var(--text-muted); font-size: .88rem; margin: 0; }
.evalblock__myrank { font-size: .82rem; color: var(--text-muted); margin-bottom: .6rem; }
.evalblock__subtitle { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: .35rem; font-weight: 600; }
.recent-note { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.recent-note:last-child { border-bottom: none; }
.recent-note__label { flex: 1; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-note__date { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.recent-note__val { font-size: .82rem; font-weight: 700; padding: .05rem .4rem; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.dash-note--high { background: rgba(22,163,74,.14); color: #15803d; }
.dash-note--mid  { background: rgba(180,120,30,.14); color: #b4781e; }
.dash-note--low  { background: rgba(220,38,38,.12); color: var(--error); }

.evalblock__details { margin-top: .7rem; }
.evalblock__details > summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--primary); padding: .25rem 0; }
.podium { list-style: none; margin: .5rem 0 0; padding: 0; }
.podium__row { display: flex; align-items: center; gap: .5rem; padding: .3rem .4rem; border-radius: 6px; }
.podium__row--me { background: rgba(30,59,110,.08); }
.podium__rank { width: 1.8rem; text-align: center; font-weight: 700; font-size: .85rem; }
.podium__name { flex: 1; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__avg { font-size: .82rem; font-weight: 700; padding: .05rem .4rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.evalblock__table { width: 100%; border-collapse: collapse; margin-top: .4rem; font-size: .83rem; }
.evalblock__table td { padding: .3rem .3rem; border-bottom: 1px solid var(--border); }
.evalblock__table tr:last-child td { border-bottom: none; }
.evalblock__table-date { color: var(--text-muted); white-space: nowrap; text-align: right; }
.evalblock__table-val { text-align: right; font-weight: 700; white-space: nowrap; }

@media (max-width: 560px) {
  .evalblocks { grid-template-columns: 1fr; }
  .genmoy-card__value { font-size: 2.1rem; }
}

/* ============================================================
   Devoirs — badge type DS/DM dans la liste v46
   ============================================================ */
.dv-typebadge { display:inline-block; font-size:.68rem; font-weight:700; padding:.1rem .45rem;
  border-radius:100px; margin-left:.5rem; vertical-align:middle; }
.dv-typebadge--ds { background:rgba(30,59,110,.12); color:var(--primary); }
.dv-typebadge--dm { background:rgba(180,120,30,.14); color:#b4781e; }

/* Podium anonymisé : libellé neutre pour les autres élèves v47 */
.podium__anon { color: var(--text-muted); }

/* Podium : médailles top 4 (or/argent/bronze/chocolat) v48 */
.podium__rank--medal { font-size: 1.1rem; }

/* ============================================================
   Bilan par type sur la copie élève (jauges) v49
   ============================================================ */
.type-bilan { margin: .75rem 0 1rem; }
.type-bilan__title { font-size: .95rem; margin: 0 0 .5rem; }
.type-bilan__legend { display:flex; flex-wrap:wrap; gap:.6rem; font-size:.72rem; color:var(--text-muted); margin-bottom:.6rem; }
.type-bilan__legend span { display:inline-flex; align-items:center; gap:.25rem; }
.tb-key { width:.7rem; height:.7rem; border-radius:2px; display:inline-block; }
.tb-key--ok { background:#16a34a; }
.tb-key--no { background:var(--error); }
.tb-key--skip { background:#cbd1da; }
.tb-key--avg { width:.2rem; height:.8rem; background:#1f2937; border-radius:1px; }
.tb-row { margin-bottom:.7rem; }
.tb-comp { margin-bottom:1rem; }
.tb-comp__head { display:flex; justify-content:space-between; align-items:baseline; gap:.5rem; margin-bottom:.25rem; }
.tb-comp__name { font-weight:700; font-size:.95rem; }
.tb-comp__pct { font-weight:700; font-size:.9rem; font-variant-numeric:tabular-nums; }
.tb-comp__bar { height:9px; border-radius:5px; background:#eef0f3; overflow:hidden; margin-bottom:.45rem; }
.tb-comp__fill { height:100%; border-radius:5px; transition:width .3s; }
.tb-row--sub { margin-bottom:.5rem; padding-left:.85rem; border-left:2px solid var(--border); }
.tb-row__head { display:flex; justify-content:space-between; align-items:baseline; gap:.5rem; margin-bottom:.2rem; }
.tb-row__name { font-size:.82rem; font-weight:600; }
.tb-row__pct { font-size:.8rem; font-weight:700; font-variant-numeric:tabular-nums; }
.tb-row__cls { font-weight:400; color:var(--text-muted); font-size:.74rem; }
.tb-gauge { position:relative; height:14px; border-radius:7px; overflow:hidden; background:#eef0f3; display:flex; }
.tb-gauge__seg { height:100%; }
.tb-gauge__seg--ok { background:#16a34a; }
.tb-gauge__seg--no { background:var(--error); }
.tb-gauge__seg--skip { background:#cbd1da; }
.tb-gauge__avg { position:absolute; top:-2px; bottom:-2px; width:2px; background:#1f2937; box-shadow:0 0 0 1px #fff; }
.tb-comment { margin-top:.4rem; padding:.5rem .65rem; background:rgba(180,120,30,.08);
  border-left:3px solid #b4781e; border-radius:6px; font-size:.83rem; line-height:1.5; }
.tb-comment__title { font-weight:700; color:#92600f; margin-bottom:.2rem; }

/* Page admin types & commentaires */
.cap-edit > summary { cursor:pointer; list-style:none; }
.cap-edit > summary::-webkit-details-marker { display:none; }
.cap-edit__form { margin-top:.5rem; padding:.6rem; background:var(--bg-alt); border-radius:var(--radius); max-width:380px; }
.autocom-block { margin-bottom:1rem; padding-bottom:.75rem; border-bottom:1px solid var(--border); }
.autocom-block__title { font-weight:700; margin-bottom:.4rem; }
.autocom { margin-bottom:.35rem; }
.autocom > summary { cursor:pointer; display:flex; gap:.5rem; align-items:center; padding:.35rem .5rem;
  background:var(--bg-alt); border-radius:var(--radius); font-size:.85rem; list-style:none; }
.autocom > summary::-webkit-details-marker { display:none; }
.autocom__range { font-weight:700; color:var(--primary); white-space:nowrap; }
.autocom__titre { color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.autocom__form { margin-top:.5rem; padding:.6rem; border:1px solid var(--border); border-radius:var(--radius); }
.autocom__range-row { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:.5rem; }

/* ============================================================
   Annotations PDF en correction (✓ ✗ commentaires) v50
   ============================================================ */
/* Panneau commentaires à gauche (à l'opposé du barème) */
.corr-comments { width:280px; max-width:32vw; border-right:1px solid var(--border);
  display:flex; flex-direction:column; background:var(--bg-card); }
.corr-comments__title { padding:.6rem .8rem; font-weight:700; border-bottom:1px solid var(--border); background:var(--bg-alt); }
.corr-comments__list { flex:1; overflow-y:auto; padding:.5rem; }
.corr-comments__hint { padding:.5rem .8rem; font-size:.74rem; color:var(--text-muted); border-top:1px solid var(--border); }
.cc-item { display:flex; gap:.5rem; align-items:flex-start; padding:.45rem .55rem; margin-bottom:.35rem;
  background:var(--bg-alt); border-radius:8px; cursor:pointer; font-size:.84rem; line-height:1.4; }
.cc-item:hover { background:rgba(30,59,110,.08); }
.cc-item__num { flex-shrink:0; width:1.3rem; height:1.3rem; border-radius:50%; background:#b4781e; color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; }
.cc-item__txt { flex:1; word-break:break-word; }
.cc-empty { font-size:.8rem; color:var(--text-muted); padding:.5rem; }

/* Marques posées sur le PDF */
.corr-annot { position:absolute; transform:translate(-50%,-50%); z-index:6; cursor:pointer;
  font-size:1.5rem; line-height:1; user-select:none; text-shadow:0 1px 2px rgba(0,0,0,.35); }
.corr-annot--check { color:#16a34a; font-weight:700; }
.corr-annot--cross { color:#dc2626; font-weight:700; }
.corr-annot--comment { font-size:1.25rem; opacity:.72; background:rgba(255,255,255,.65);
  border-radius:50%; width:1.7rem; height:1.7rem; display:flex; align-items:center; justify-content:center; }
.corr-annot--comment:hover { opacity:1; }
.corr-annot--flash { animation:annflash .6s ease 2; }
@keyframes annflash { 0%,100%{ transform:translate(-50%,-50%) scale(1);} 50%{ transform:translate(-50%,-50%) scale(1.5);} }

/* Menu contextuel clic droit */
.corr-ctxmenu { position:absolute; z-index:50; background:var(--bg-card); border:1px solid var(--border);
  border-radius:10px; box-shadow:0 8px 28px rgba(0,0,0,.22); padding:.3rem; display:flex; flex-direction:column; min-width:150px; }
.corr-ctxmenu button { text-align:left; padding:.5rem .7rem; border:none; background:none; cursor:pointer;
  border-radius:6px; font-size:.9rem; }
.corr-ctxmenu button:hover { background:var(--bg-alt); }

/* Barre d'actions (mot du DS + transmission) */
.corr-bar--actions { border-top:1px dashed var(--border); }
.corr-pub-badge { font-size:.78rem; font-weight:700; padding:.15rem .55rem; border-radius:100px;
  background:rgba(220,38,38,.12); color:#dc2626; }
.corr-pub-badge--on { background:rgba(22,163,74,.14); color:#15803d; }
.corr-global { display:none; padding:.75rem 1rem; border-bottom:1px solid var(--border); background:var(--bg-alt); }
.corr-global.open { display:block; }

/* Fenêtre de saisie de commentaire (favoris) */
.cmodal-ov { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9999;
  display:flex; align-items:center; justify-content:center; padding:1rem; }
.cmodal { background:var(--bg-card); border-radius:14px; box-shadow:0 16px 50px rgba(0,0,0,.3);
  width:480px; max-width:96vw; max-height:88vh; overflow-y:auto; padding:1.1rem 1.2rem; }
.cmodal__title { font-weight:700; font-size:1.05rem; margin-bottom:.6rem; }
.cmodal__row { margin:.5rem 0; }
.cmodal__favs-title { font-size:.78rem; color:var(--text-muted); margin:.6rem 0 .3rem; text-transform:uppercase; letter-spacing:.03em; }
.cmodal__favs { display:flex; flex-direction:column; gap:.3rem; max-height:200px; overflow-y:auto; }
.cmodal-fav { display:flex; gap:.5rem; align-items:flex-start; padding:.45rem .55rem; background:var(--bg-alt);
  border-radius:8px; font-size:.84rem; line-height:1.4; }
.cmodal-fav__txt { flex:1; cursor:pointer; word-break:break-word; }
.cmodal-fav__txt:hover { color:var(--primary); }
.cmodal-fav__del { border:none; background:none; cursor:pointer; color:var(--text-muted); font-size:.85rem; }
.cmodal-fav__del:hover { color:var(--error); }
.cmodal__actions { display:flex; justify-content:flex-end; gap:.5rem; margin-top:.9rem; }

@media (max-width:880px){
  .corr-comments { width:100%; max-width:none; max-height:30vh; border-right:none; border-bottom:1px solid var(--border); }
}

/* ============================================================
   Copie élève : mot du DS, barème mobile, popover commentaire v50
   ============================================================ */
.devoir-global-comment { background:rgba(30,59,110,.07); border:1px solid rgba(30,59,110,.2);
  border-radius:10px; padding:.7rem .85rem; margin-bottom:.75rem; }
.devoir-global-comment__title { font-weight:700; color:var(--primary); margin-bottom:.3rem; font-size:.9rem; }
.devoir-global-comment__body { font-size:.88rem; line-height:1.5; word-break:break-word; }

.mbareme { display:none; }
.mbareme__pts--ok   { background:rgba(22,163,74,.15); color:#15803d; }
.mbareme__pts--zero { background:rgba(220,38,38,.13); color:#dc2626; }
.mbareme__pts--skip { background:var(--bg-alt); color:var(--text-muted); }

.annot-pop { position:fixed; z-index:9999; left:50%; bottom:96px; transform:translateX(-50%);
  width:min(440px,92vw); background:var(--bg-card); border:1px solid var(--border); border-radius:12px;
  box-shadow:0 10px 36px rgba(0,0,0,.25); padding:.85rem 1rem; }
.annot-pop__close { position:absolute; top:.35rem; right:.5rem; border:none; background:none; cursor:pointer; font-size:1rem; color:var(--text-muted); }
.annot-pop__body { font-size:.9rem; line-height:1.5; padding-right:1rem; word-break:break-word; }

@media (max-width:880px){
  .corr-bareme { display:none; }   /* la liste complète est remplacée par la barre du bas */
  .corr-panel { padding-bottom:42vh; }
  .mbareme { display:flex; gap:.6rem; align-items:flex-start;
    position:fixed; left:0; right:0; bottom:0; z-index:200;
    background:var(--bg-card); border-top:2px solid var(--primary);
    padding:.6rem .8rem; box-shadow:0 -4px 16px rgba(0,0,0,.12); max-height:38vh; overflow-y:auto; }
  .mbareme__pts { flex-shrink:0; font-weight:800; font-size:.95rem; padding:.2rem .5rem; border-radius:8px; white-space:nowrap; }
  .mbareme__desc { font-size:.86rem; line-height:1.45; }
}

/* ============================================================
   Devoirs : accordéon détail/bilan + stats + favoris + note prépa v52
   ============================================================ */
.dv-card { border:1px solid var(--border); border-radius:var(--radius); margin-bottom:.75rem; overflow:hidden; }
/* Laisser le popover ✏ (date limite / dépôt) s'afficher en entier sans être coupé par le cadre */
.dv-card:has(.dv-quick[open]) { overflow:visible; }
/* Idem : laisser le popover d'info (i) s'afficher hors du cadre de la carte de synthèse */
.synth-card:has(.info-pop[open]) { overflow:visible; }
.dv-card .dv-row { border:none; border-radius:0; margin:0; }
.dv-acc { border-top:1px solid var(--border); background:var(--bg-alt); }
.dv-acc > summary { cursor:pointer; list-style:none; padding:.5rem .9rem; font-size:.85rem; font-weight:600; color:var(--primary); }
.dv-acc > summary::-webkit-details-marker { display:none; }
.dv-acc__arrow { display:inline-block; transition:transform .2s; }
.dv-acc[open] .dv-acc__arrow { transform:rotate(90deg); }
.dv-acc__body { padding:.5rem .9rem 1rem; }
.dv-stats { display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:1rem; }
.dv-stat { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:.5rem .8rem; min-width:90px; text-align:center; }
.dv-stat__v { display:block; font-size:1.2rem; font-weight:800; color:var(--primary); font-variant-numeric:tabular-nums; }
.dv-stat__l { display:block; font-size:.72rem; color:var(--text-muted); }
.dv-stat--prepa { border-color:#b4781e; }
.dv-stat--prepa .dv-stat__v { color:#b4781e; }
.dv-acc__cols { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1rem; }
.dv-acc__block { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:.75rem; }
.dv-acc__ab { display:flex; gap:1rem; margin:.4rem 0; }
.dv-fav { display:flex; gap:.4rem; align-items:flex-start; margin-bottom:.5rem; }
.dv-fav__form { display:flex; gap:.4rem; flex:1; align-items:flex-start; }
.dv-fav__form textarea { flex:1; }
.note-raw { display:inline-block; margin-left:.4rem; color:var(--text-muted); font-size:.78rem; text-decoration:line-through; }
@media (max-width:720px){ .dv-acc__cols { grid-template-columns:1fr; } }

/* Libellés de groupes de statistiques (brutes / prépa) v53 */
.dv-stats-label { font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  color:var(--text-muted); margin:.25rem 0 .35rem; }
.dv-stats-label--prepa { color:#b4781e; margin-top:.75rem; }

/* ============================================================
   Détail auto-évaluation + lien depuis le tableau de bord v54
   ============================================================ */
.ad-link { color:var(--primary); text-decoration:none; font-weight:600; }
.ad-link:hover { text-decoration:underline; }
.ad-head { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; flex-wrap:wrap; }
.ad-globale { text-align:center; border-radius:14px; padding:.6rem 1rem; min-width:120px;
  border:2px solid var(--border); }
.ad-globale--ok  { border-color:#16a34a; background:rgba(22,163,74,.08); }
.ad-globale--low { border-color:var(--error); background:rgba(220,38,38,.06); }
.ad-globale__v { font-size:2rem; font-weight:800; }
.ad-globale--ok .ad-globale__v { color:#15803d; }
.ad-globale--low .ad-globale__v { color:var(--error); }
.ad-globale__m { font-size:1rem; color:var(--text-muted); }
.ad-globale__l { display:block; font-size:.72rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em; }
.ad-exo { border:1px solid var(--border); border-radius:12px; margin-bottom:.7rem; overflow:hidden; }
.ad-exo > summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:.6rem; padding:.7rem .9rem; }
.ad-exo > summary::-webkit-details-marker { display:none; }
.ad-exo__badge { font-size:.68rem; font-weight:700; padding:.12rem .5rem; border-radius:100px; background:var(--bg-alt); color:var(--text-muted); white-space:nowrap; }
.ad-exo__badge--cours { background:rgba(30,59,110,.12); color:var(--primary); }
.ad-exo__title { flex:1; font-weight:600; }
.ad-exo__note { font-weight:800; padding:.1rem .5rem; border-radius:8px; white-space:nowrap; }
.ad-exo__note--ok  { background:rgba(22,163,74,.14); color:#15803d; }
.ad-exo__note--low { background:rgba(220,38,38,.12); color:var(--error); }
.ad-exo__body { padding:0 .9rem 1rem; border-top:1px solid var(--border); }
.ad-exo__meta { font-size:.82rem; color:var(--text-muted); margin-top:.6rem; }
.ad-corr { margin-top:.6rem; background:var(--bg-alt); border-radius:8px; padding:.5rem .7rem; }
.ad-corr > summary { cursor:pointer; font-size:.85rem; font-weight:600; color:var(--primary); }

/* ============================================================
   Panneau « code commun » dans la correction de TP v56
   ============================================================ */
.codecommun { border:1px solid var(--border); border-radius:10px; margin:.5rem 0 1rem; background:var(--bg-alt); overflow:hidden; }
.codecommun > summary { cursor:pointer; list-style:none; padding:.6rem .85rem; font-weight:700; font-size:.9rem; }
.codecommun > summary::-webkit-details-marker { display:none; }
.codecommun__edit { font-weight:400; color:var(--text-muted); font-size:.8rem; }
.codecommun #code-commun-edit { width:100%; border:none; border-top:1px solid var(--border); border-radius:0;
  font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.85rem; padding:.7rem .85rem; background:#1e1e2e; color:#e4e4ef;
  resize:vertical; min-height:2.4rem; box-sizing:border-box; }
.codecommun__hint { font-size:.74rem; color:var(--text-muted); padding:.5rem .85rem; }

/* ============================================================
   Contrôles noyau Python (relancer / tout exécuter) — icônes discrètes v57
   ============================================================ */
.tp-kernel-bar { display:inline-flex; gap:.25rem; align-items:center; }
.tp-kernel-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.3rem;
  background:transparent; border:1px solid var(--border); color:var(--text-muted);
  border-radius:8px; padding:.25rem .5rem; font-size:.82rem; cursor:pointer; line-height:1;
  transition:background .15s, color .15s, border-color .15s;
}
.tp-kernel-btn:hover { background:var(--bg-alt); color:var(--text); border-color:var(--text-muted); }
.tp-kernel-btn:disabled { opacity:.5; cursor:default; }
.tp-kernel-btn__txt { font-size:.78rem; }
@media (max-width:560px){ .tp-kernel-btn__txt { display:none; } }

/* ============================================================
   Contraste renforcé du code dans la correction de TP (v59)
   Fond très sombre + texte BLANC PUR + police légèrement agrandie
   pour une lisibilité maximale (vidéoprojecteur, écrans peu contrastés).
   Couvre le code de l'élève ET le panneau « code commun ».
   ============================================================ */
.eval-codecell textarea.eval-code,
.codecommun textarea#code-commun-edit {
  background: #14141d !important;
  color: #ffffff !important;
  caret-color: #ffffff;
  font-size: .92rem !important;
  line-height: 1.55 !important;
}
.eval-codecell textarea.eval-code::placeholder,
.codecommun textarea#code-commun-edit::placeholder { color: #8b8ba7; }
.eval-codecell textarea.eval-code::selection,
.codecommun textarea#code-commun-edit::selection { background: #3a5a9a; color: #fff; }
/* Sortie d'exécution : texte plus clair, mêmes raisons */
.eval-codecell .tp-output__text { color: #f4f7fb; }


/* ============================================================
   Sous-compétences transversales v58
   ============================================================ */
/* Badge abréviation */
.sc-abr { display:inline-block; background:var(--primary); color:#fff; font-weight:700; font-size:.72rem;
  padding:.1rem .42rem; border-radius:6px; letter-spacing:.02em; }

/* Page de gestion */
.sc-comp { margin-bottom:1.25rem; }
.sc-comp__head { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  margin:0 0 .6rem; padding-bottom:.35rem; border-bottom:2px solid var(--border); }
.sc-comp__title { margin:0; font-size:1.05rem; }
.sc-comp__stats { display:flex; flex-wrap:wrap; gap:.3rem; }
/* Pastilles de notes par source (Colle / DS / DM) */
.sc-stats { display:flex; flex-wrap:wrap; gap:.3rem; }
.sc-stat { display:inline-flex; align-items:baseline; gap:.15rem; font-size:.72rem; font-weight:700;
  padding:.12rem .5rem; border-radius:999px; color:var(--c,var(--text-muted));
  background:var(--bg-alt,#f1f3f5);
  background:color-mix(in srgb, var(--c,#888) 14%, transparent);
  border:1px solid var(--border);
  border-color:color-mix(in srgb, var(--c,#888) 32%, transparent); }
.sc-stat small { font-size:.62rem; font-weight:600; opacity:.75; }
.sc-stat--na { color:var(--text-muted); background:transparent; border:1px dashed var(--border); font-weight:600; }
.sc-table td { vertical-align:middle; }
.sc-edit > summary { cursor:pointer; list-style:none; }
.sc-edit > summary::-webkit-details-marker { display:none; }
.sc-edit > summary:hover { color:var(--primary); }
.sc-edit__form { margin-top:.6rem; padding:.7rem; background:var(--bg-alt); border-radius:8px; max-width:480px; }
.sc-edit__grid { display:grid; grid-template-columns:1fr 1fr; gap:.6rem; }

/* Grille cliquable d'abréviations dans le barème */
.bareme-item__sc { margin-top:.5rem; }
.sc-grid { display:flex; flex-direction:column; gap:.35rem; }
.sc-grid__group { display:flex; align-items:baseline; gap:.4rem; flex-wrap:wrap; }
.sc-grid__label { font-size:.7rem; font-weight:700; color:var(--text-muted); text-transform:uppercase;
  letter-spacing:.02em; min-width:84px; }
.sc-grid__chips { display:inline-flex; flex-wrap:wrap; gap:.3rem; }

/* Pad de sous-compétences (éditeur d'exercices) — groupes empilés par compétence */
.sc-pad { display:flex; flex-direction:column; gap:.7rem; }
.sc-pad__group { display:flex; flex-direction:column; gap:.3rem; }
.sc-pad__title { font-size:.72rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.02em; }
.sc-pad__chips { display:flex; flex-wrap:wrap; gap:.3rem; }
.sc-pad .sc-chip { cursor:pointer; }
.sc-chip { position:relative; display:inline-flex; align-items:center; gap:.32rem;
  background:var(--bg-card); border:1px solid var(--border); color:var(--text-muted);
  border-radius:8px; padding:.2rem .55rem; font-size:.76rem; font-weight:600; cursor:pointer; line-height:1.4;
  transition:background .12s, border-color .12s, color .12s, box-shadow .12s; user-select:none; }
.sc-chip__dot { width:.5rem; height:.5rem; border-radius:50%; border:1.5px solid currentColor;
  background:transparent; flex:none; transition:background .12s, box-shadow .12s; }
.sc-chip:hover { border-color:var(--primary); color:var(--primary); }
.sc-chip--on { background:var(--primary); border-color:var(--primary); color:#fff; box-shadow:0 1px 4px rgba(37,99,235,.35); }
.sc-chip--on .sc-chip__dot { background:#fff; border-color:#fff; box-shadow:inset 0 0 0 1.5px var(--primary); }
.sc-chip--on:hover { color:#fff; filter:brightness(1.05); }
/* Info-bulle (détail) qui n'apparaît qu'après un survol prolongé */
.sc-chip[data-tip]::after { content:attr(data-tip); position:absolute; bottom:calc(100% + 8px); left:50%;
  transform:translateX(-50%) translateY(4px); background:#1f2937; color:#fff; padding:.4rem .6rem; border-radius:7px;
  font-size:.74rem; font-weight:500; line-height:1.35; width:max-content; max-width:220px; text-align:center;
  white-space:normal; pointer-events:none; opacity:0; z-index:60; box-shadow:0 6px 18px rgba(0,0,0,.28);
  transition:opacity .14s ease, transform .14s ease; transition-delay:0s; }
.sc-chip[data-tip]::before { content:''; position:absolute; bottom:calc(100% + 3px); left:50%; transform:translateX(-50%);
  border:5px solid transparent; border-top-color:#1f2937; opacity:0; pointer-events:none; z-index:60;
  transition:opacity .14s ease; transition-delay:0s; }
.sc-chip[data-tip]:hover::after { opacity:1; transform:translateX(-50%) translateY(0); transition-delay:.5s; }
.sc-chip[data-tip]:hover::before { opacity:1; transition-delay:.5s; }
.sc-grid__empty { font-size:.8rem; color:var(--text-muted); margin:.25rem 0; }

/* ── Profil de compétences transversales (DS + colles) ── */
.comp-profile { display:flex; flex-direction:column; gap:.5rem; margin:.5rem 0; }
.comp-card { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--bg-card); }
.comp-card__head { display:flex; align-items:center; gap:.6rem; padding:.55rem .75rem; background:var(--bg-alt); cursor:pointer; }
.comp-card__name { font-weight:700; font-size:.92rem; flex:1; }
.comp-card__pct { font-weight:700; font-size:.92rem; font-variant-numeric:tabular-nums; }
.comp-card__bar { flex:0 0 90px; height:7px; border-radius:4px; background:var(--border); overflow:hidden; }
.comp-card__fill { height:100%; border-radius:4px; }
.comp-card__chev { color:var(--text-muted); font-size:.8rem; transition:transform .15s; }
.comp-card.open .comp-card__chev { transform:rotate(90deg); }
.comp-card__body { display:none; padding:.4rem .75rem .65rem; }
.comp-card.open .comp-card__body { display:block; }
.comp-sub { display:grid; grid-template-columns:1fr auto; gap:.15rem .6rem; align-items:center;
  padding:.3rem 0; border-top:1px solid var(--border); }
.comp-sub:first-child { border-top:none; }
.comp-sub__name { font-size:.85rem; display:flex; align-items:center; gap:.4rem; }
.comp-sub__abr { display:inline-block; min-width:30px; text-align:center; font-size:.66rem; font-weight:700;
  background:var(--bg-alt); color:var(--text-muted); border-radius:5px; padding:.05rem .25rem; }
.comp-sub__src { font-size:.7rem; color:var(--text-muted); grid-column:1; }
.comp-sub__pct { font-size:.85rem; font-weight:600; font-variant-numeric:tabular-nums; text-align:right; }
.comp-sub__na { color:var(--text-muted); font-weight:400; }
.comp-mini-bar { grid-column:1 / -1; height:5px; border-radius:3px; background:var(--border); overflow:hidden; margin-top:.05rem; }
.comp-mini-bar > span { display:block; height:100%; border-radius:3px; }
.comp-empty { font-size:.85rem; color:var(--text-muted); padding:.5rem 0; }

/* Compétences transversales — bandeau de moyennes de classe par type */
.ct-avg-band { display:flex; flex-wrap:wrap; gap:.7rem; margin-bottom:.6rem; }
.ct-avg-card { flex:1 1 120px; min-width:108px; display:flex; flex-direction:column; align-items:center; gap:.18rem;
  padding:.8rem .6rem; background:var(--surface,#fff); border:1px solid var(--border); border-radius:12px; text-align:center; }
.ct-avg-card__icon { font-size:1.25rem; line-height:1; }
.ct-avg-card__label { font-size:.76rem; color:var(--text-muted); font-weight:600; }
.ct-avg-card__val { font-size:1.35rem; font-weight:800; font-variant-numeric:tabular-nums; }
.ct-avg-card__val small { font-size:.7rem; font-weight:600; color:var(--text-muted); }

/* Points du programme — en-tête de compétence regroupant ses sous-compétences */
.pt-comp-group { margin-bottom:.4rem; }
.pt-comp-head { display:flex; align-items:center; gap:.6rem; padding:.5rem .7rem; margin:.3rem 0 .15rem;
  background:var(--bg-subtle,#f5f6f8); border-radius:10px; border-left:3px solid var(--primary,#4f46e5); }
.pt-comp-head__name { font-weight:700; font-size:.92rem; }
.pt-comp-head__spacer { flex:1; }
.pt-comp-head__badge { font-size:.7rem; font-weight:700; padding:.12rem .5rem; border-radius:999px; }
.pt-comp-head__hint { font-size:.7rem; color:var(--text-muted); }
.pt-comp-group .point-item { margin-left:.6rem; }

/* Étiquettes multiples dans l'affichage du barème (correction / copie élève) */
.cb-item__caps { display:inline-flex; flex-wrap:wrap; gap:.2rem; margin-left:.35rem; }
@media (max-width:560px){ .sc-edit__grid { grid-template-columns:1fr; } .sc-grid__label { min-width:0; } }

/* ============================================================
   Statistiques colleur (tableau comparatif)
   ============================================================ */
.stats-table-wrap { overflow-x:auto; }
.stats-table { width:100%; border-collapse:collapse; font-size:.9rem; }
.stats-table th, .stats-table td { padding:.55rem .6rem; text-align:left; border-bottom:1px solid var(--border); white-space:nowrap; }
.stats-table th { font-size:.74rem; text-transform:uppercase; letter-spacing:.02em; color:var(--text-muted); font-weight:700; }
.stats-table td.num, .stats-table th.num { text-align:right; font-variant-numeric:tabular-nums; }
.stats-row--me { background:color-mix(in srgb, var(--primary) 8%, transparent); }
.stats-row--me td { font-weight:600; }
.stats-you { display:inline-block; font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  background:var(--primary); color:#fff; padding:.05rem .4rem; border-radius:999px; margin-left:.4rem; vertical-align:middle; }
.stats-pill { display:inline-block; min-width:2.4rem; text-align:center; font-weight:700; padding:.1rem .5rem; border-radius:999px;
  color:var(--c,var(--text)); background:var(--bg-alt,#f1f3f5);
  background:color-mix(in srgb, var(--c,#888) 16%, transparent); }
.stats-na { color:var(--text-muted); }
.stats-ecart { font-weight:700; }
.stats-ecart--pos { color:hsl(140 60% 38%); }
.stats-ecart--neg { color:hsl(0 65% 50%); }

/* ============================================================
   Chat colleur ↔ étudiant / trinôme
   ============================================================ */
.chat-wrap { display:flex; gap:0; height:72vh; min-height:440px; border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface,#fff); }
.chat-list { width:270px; flex:none; overflow-y:auto; border-right:1px solid var(--border); padding:.6rem; background:var(--bg-alt,#fafbfc); }
.chat-list__group-title { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--text-muted); padding:.2rem .4rem .35rem; }
.chat-list__empty { font-size:.84rem; color:var(--text-muted); padding:.4rem; }
.chat-item { display:flex; align-items:center; gap:.55rem; padding:.5rem .55rem; border-radius:10px; text-decoration:none; color:inherit; margin-bottom:.15rem; transition:background .12s; }
.chat-item:hover { background:color-mix(in srgb, var(--primary) 8%, transparent); }
.chat-item--active { background:color-mix(in srgb, var(--primary) 15%, transparent); }
.chat-item__avatar { width:34px; height:34px; flex:none; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--primary); color:#fff; font-size:.78rem; font-weight:700; }
.chat-item__avatar--group { background:#7c5cff; }
.chat-item__body { display:flex; flex-direction:column; min-width:0; flex:1; }
.chat-item__name { font-size:.86rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-item__sub { font-size:.72rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-item__count { flex:none; font-size:.68rem; font-weight:700; background:var(--primary); color:#fff; border-radius:999px; padding:.05rem .42rem; }
.chat-thread { flex:1; display:flex; flex-direction:column; min-width:0; }
.chat-thread__placeholder { margin:auto; text-align:center; color:var(--text); padding:2rem; display:flex; flex-direction:column; gap:.3rem; align-items:center; }
.chat-thread__head { padding:.7rem 1rem; border-bottom:1px solid var(--border); position:relative; }
.chat-thread__title { font-weight:700; }
.chat-thread__sub { font-size:.78rem; color:var(--text-muted); }
.chat-back { display:none; position:absolute; left:.5rem; top:50%; transform:translateY(-50%);
  width:2rem; height:2rem; align-items:center; justify-content:center; border-radius:50%;
  background:var(--bg-alt,#eef1f5); color:var(--text); text-decoration:none; font-size:1.15rem; font-weight:700; }
.chat-thread__msgs { flex:1; overflow-y:auto; padding:1rem; display:flex; flex-direction:column; gap:.5rem; background:var(--bg-alt,#f7f8fa); }
.chat-empty { margin:auto; color:var(--text-muted); font-size:.88rem; }
.chat-msg { display:flex; max-width:80%; }
.chat-msg--me { align-self:flex-end; }
.chat-msg--them { align-self:flex-start; }
.chat-msg__bubble { display:flex; flex-direction:column; padding:.45rem .7rem; border-radius:14px; font-size:.9rem; line-height:1.35; box-shadow:0 1px 2px rgba(0,0,0,.06); }
.chat-msg--me .chat-msg__bubble { background:var(--primary); color:#fff; border-bottom-right-radius:4px; }
.chat-msg--them .chat-msg__bubble { background:#fff; color:var(--text); border:1px solid var(--border); border-bottom-left-radius:4px; }
.chat-msg__who { font-size:.7rem; font-weight:700; opacity:.85; margin-bottom:.1rem; }
.chat-msg__text { word-break:break-word; white-space:pre-wrap; }
.chat-msg__time { font-size:.64rem; opacity:.7; margin-top:.15rem; align-self:flex-end; }
.chat-compose { display:flex; align-items:flex-end; gap:.5rem; padding:.55rem .6rem; border-top:1px solid var(--border); background:var(--surface,#fff); }
.chat-compose__field { flex:1; position:relative; }
.chat-compose__input { display:block; width:100%; resize:none; min-height:2.5rem; max-height:140px;
  padding:.6rem 3rem .6rem .85rem; border:1px solid var(--border); border-radius:18px;
  font:inherit; font-size:.92rem; line-height:1.35; outline:none; background:var(--bg-card,#fff); }
.chat-compose__input:focus { border-color:var(--primary); }
.chat-compose__count { position:absolute; right:.55rem; bottom:.4rem; font-size:.6rem; color:var(--text-muted);
  font-variant-numeric:tabular-nums; background:var(--bg-card,#fff); padding:0 .2rem; border-radius:4px; pointer-events:none; }
.chat-compose__send { flex:none; width:2.6rem; height:2.6rem; padding:0; border-radius:50%;
  font-size:1.05rem; display:inline-flex; align-items:center; justify-content:center; }
@media (max-width:720px) {
  .chat-wrap { flex-direction:column; height:auto; }
  .chat-wrap .chat-list { width:auto; max-height:none; border-right:none; }
  .chat-wrap .chat-thread { display:none; }
  .chat-wrap--thread .chat-list { display:none; }
  .chat-wrap--thread .chat-thread { display:flex; min-height:78vh; }
  .chat-back { display:inline-flex; }
  .chat-thread__head { padding-left:3rem; }
}

/* ============================================================
   Notifications de chat (badges nav) + couleurs non-lus + vue prof (v65)
   ============================================================ */
/* Badges sur les liens de navigation */
.chat-badge { display:inline-flex; align-items:center; justify-content:center; min-width:1.15rem; height:1.15rem;
  padding:0 .35rem; border-radius:999px; font-size:.68rem; font-weight:700; color:#fff; line-height:1; vertical-align:middle; margin-left:.15rem; }
.chat-badge--red  { background:#e23b3b; }
.chat-badge--blue { background:#2f6bff; }

/* Pastilles non-lus dans la liste de conversations */
.chat-item__count--red  { background:#e23b3b; }
.chat-item__count--blue { background:#2f6bff; }
.chat-item__avatar--colleurs { background:#2f6bff; }
.chat-thread__head--colleurs { box-shadow: inset 0 -2px 0 #2f6bff; }

/* Vue prof : fil chronologique de tous les messages */
.msg-feed { display:flex; flex-direction:column; gap:.4rem; }
.msg-daysep { text-align:center; margin:.7rem 0 .25rem; }
.msg-daysep span { background:var(--bg-alt,#eef1f5); color:var(--text-muted); font-size:.72rem; font-weight:700;
  padding:.15rem .7rem; border-radius:999px; }
.msg-row { display:grid; grid-template-columns:1fr auto; grid-template-areas:"route time" "text text"; gap:.15rem .8rem;
  padding:.55rem .8rem; border-radius:10px; background:var(--bg-card,#fff); border:1px solid var(--border); border-left-width:4px; }
.msg-row--eleves   { border-left-color:#e23b3b; }
.msg-row--colleurs { border-left-color:#2f6bff; }
.msg-route { grid-area:route; font-size:.8rem; display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; }
.msg-from, .msg-to { font-weight:600; }
.msg-from--colleur, .msg-to--colleur, .msg-to--colleurs { color:#2f6bff; }
.msg-from--student, .msg-to--student { color:#b8430f; }
.msg-to--trinome { color:#7a3cff; }
.msg-arrow { color:var(--text-muted); }
.msg-text { grid-area:text; font-size:.92rem; line-height:1.4; word-break:break-word; white-space:pre-wrap; }
.msg-time { grid-area:time; font-size:.72rem; color:var(--text-muted); white-space:nowrap; }
.msg-tag { display:inline-block; font-size:.68rem; font-weight:700; padding:.05rem .45rem; border-radius:999px; color:#fff; }
.msg-tag--eleves   { background:#e23b3b; }
.msg-tag--colleurs { background:#2f6bff; }

/* ============================================================
   Création de session : champs compacts avec icônes (v66)
   ============================================================ */
.session-fields { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1.1rem; }
.field-ico { display:inline-flex; align-items:center; gap:.4rem; padding:.32rem .55rem;
  border:1px solid var(--border); border-radius:10px; background:var(--bg-card,#fff); cursor:text; }
.field-ico:focus-within { border-color:var(--primary); box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 18%,transparent); }
.field-ico__i { font-size:1.05rem; line-height:1; }
.field-ico__sfx { font-size:.85rem; color:var(--text-muted); }
.field-ico input { border:none; outline:none; background:transparent; font:inherit; font-size:.9rem; padding:.18rem 0; min-width:0; color:var(--text); }

/* ============================================================
   Calculatrice Python (s'entrainer) — style console
   ============================================================ */
.calc-card { margin:2rem 0 1rem; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:#0f1117; color:#e6e6e6; }
.calc-card__head { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; padding:.6rem .9rem; background:#171a23; border-bottom:1px solid #262a36; font-weight:600; font-size:.9rem; }
.calc-card__hint { font-weight:400; font-size:.74rem; color:#8b93a7; }
.calc-card__hint code { background:#262a36; padding:0 .25rem; border-radius:4px; }
.calc-output { max-height:240px; overflow-y:auto; padding:.7rem .9rem; font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:.86rem; line-height:1.5; min-height:2.4rem; }
.calc-output:empty::before { content:'Les résultats s’affichent ici.'; color:#5a6072; }
.calc-line { white-space:pre-wrap; word-break:break-word; }
.calc-line__in { color:#7aa2f7; }
.calc-line__out { color:#cdd3e0; }
.calc-line__res { color:#9ece6a; font-weight:600; }
.calc-line__err { color:#f7768e; }
.calc-line__muted { color:#5a6072; }
.calc-input-row { display:flex; align-items:flex-end; gap:.5rem; padding:.6rem .9rem; border-top:1px solid #262a36; background:#12141c; }
.calc-prompt { color:#7aa2f7; font-family:ui-monospace,monospace; font-weight:700; padding-bottom:.55rem; }
.calc-input { flex:1; resize:none; min-height:2.4rem; max-height:120px; background:#0f1117; color:#e6e6e6; border:1px solid #2a2f3d; border-radius:8px; padding:.55rem .7rem; font-family:ui-monospace,monospace; font-size:.9rem; outline:none; }
.calc-input:focus { border-color:#7aa2f7; }
.calc-run { flex:none; }

/* ============================================================
   Forum de classe (remplace le cahier de texte)
   ============================================================ */
.forum { display:flex; flex-direction:column; gap:1rem; margin:1.5rem 0; }
.forum__head h1 { margin:0 0 .25rem; }
.forum__sub { color:var(--text-muted); font-size:.9rem; margin:0; }
.forum-feed { display:flex; flex-direction:column; gap:.8rem; max-height:62vh; overflow-y:auto; padding:.25rem; }
.forum-empty { color:var(--text-muted); text-align:center; padding:2rem; }
.forum-post { border:1px solid var(--border); border-left-width:4px; border-radius:10px; padding:.7rem .9rem; background:var(--bg-card,#fff); }
.forum-post--admin { border-left-color:#2f6bff; }
.forum-post--colleur { border-left-color:#7a3cff; }
.forum-post--student { border-left-color:#16a34a; }
.forum-post__head { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin-bottom:.35rem; }
.forum-post__author { font-weight:700; font-size:.9rem; }
.forum-post__role { font-size:.64rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:.05rem .4rem; border-radius:999px; color:#fff; }
.forum-post__role--admin { background:#2f6bff; }
.forum-post__role--colleur { background:#7a3cff; }
.forum-post__role--student { background:#16a34a; }
.forum-post__time { font-size:.72rem; color:var(--text-muted); }
.forum-post__del { margin-left:auto; }
.forum-post__del button { border:none; background:transparent; color:var(--text-muted); font-size:1.1rem; line-height:1; cursor:pointer; padding:0 .2rem; border-radius:4px; }
.forum-post__del button:hover { color:var(--error,#e23b3b); background:rgba(0,0,0,.05); }
.forum-post__body { font-size:.93rem; line-height:1.5; word-break:break-word; }
.forum-post__media { margin-top:.6rem; }
.forum-embed { position:relative; width:100%; max-width:560px; aspect-ratio:16/9; }
.forum-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:8px; }
.forum-img { max-width:100%; max-height:340px; border-radius:8px; display:block; }
.forum-file, .forum-link { display:inline-block; margin-top:.2rem; padding:.4rem .7rem; border:1px solid var(--border); border-radius:8px; text-decoration:none; color:var(--primary); font-size:.85rem; word-break:break-all; }
.forum-file:hover, .forum-link:hover { background:var(--bg-alt,#f3f4f6); }
.forum-compose { border:1px solid var(--border); border-radius:12px; padding:.7rem; background:var(--bg-card,#fff); display:flex; flex-direction:column; gap:.5rem; }
.forum-compose__body { resize:none; min-height:3rem; max-height:180px; border:1px solid var(--border); border-radius:8px; padding:.55rem .7rem; font:inherit; font-size:.93rem; outline:none; }
.forum-compose__body:focus { border-color:var(--primary); }
.forum-compose__row { display:flex; gap:.5rem; flex-wrap:wrap; }
.forum-compose__media { flex:1; min-width:12rem; border:1px solid var(--border); border-radius:8px; padding:.5rem .7rem; font:inherit; font-size:.88rem; outline:none; }
.forum-compose__media:focus { border-color:var(--primary); }
.forum-compose__hint { font-size:.72rem; color:var(--text-muted); margin:0; }
@media (max-width:600px){ .forum-compose__row { flex-direction:column; } .forum-compose__row .btn { width:100%; } }

/* ============================================================
   Messagerie unifiée — badge orange (forum), avatars, suivi
   ============================================================ */
.chat-badge--orange { background:#f59e0b; }
.chat-item__count--orange { background:#f59e0b; }
.chat-item__avatar--forum { background:#f59e0b; }
.chat-item__avatar--prof  { background:#2f6bff; }
.chat-item__avatar--suivi { background:#475569; }
.chat-thread__head--forum { box-shadow: inset 0 -2px 0 #f59e0b; }

/* Panneau Suivi (prof) : fil chronologique de tous les messages */
.suivi-row { display:grid; grid-template-columns:1fr auto; grid-template-areas:"route time" "text text"; gap:.1rem .8rem;
  padding:.5rem .75rem; border-radius:10px; background:var(--bg-card,#fff); border:1px solid var(--border); border-left-width:4px; }
.suivi-row--eleves   { border-left-color:#e23b3b; }
.suivi-row--colleurs { border-left-color:#2f6bff; }
.suivi-row--forum    { border-left-color:#f59e0b; }
.suivi-route { grid-area:route; font-size:.8rem; font-weight:600; }
.suivi-to-forum { color:#f59e0b; }
.suivi-text { grid-area:text; font-size:.9rem; line-height:1.4; word-break:break-word; white-space:pre-wrap; }
.suivi-time { grid-area:time; font-size:.72rem; color:var(--text-muted); white-space:nowrap; }

/* ============================================================
   Exercices Python à compléter (éditeur Pyodide côté élève)
   ============================================================ */
.pyexo { margin:1rem 0; border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#0f1117; }
.pyexo__label { padding:.5rem .8rem; font-size:.78rem; color:#8b93a7; background:#171a23; border-bottom:1px solid #262a36; }
.pyexo__code { display:block; width:100%; box-sizing:border-box; min-height:90px; max-height:420px; resize:vertical; border:0; background:#0f1117; color:#e6e6e6; font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:.88rem; line-height:1.5; padding:.7rem .9rem; outline:none; white-space:pre; overflow-x:auto; tab-size:4; }
.pyexo__code:focus { box-shadow: inset 0 0 0 2px rgba(47,107,255,.35); }
.pyexo__bar { display:flex; flex-wrap:wrap; gap:.4rem; padding:.55rem .8rem; background:#12141c; border-top:1px solid #262a36; }
.pyexo__test-btn { background:#16a34a; color:#fff; border-color:#16a34a; }
.pyexo__test-btn:hover { background:#15803d; border-color:#15803d; }
.pyexo__out { padding:.6rem .9rem; font-family:ui-monospace,monospace; font-size:.84rem; background:#0b0d13; border-top:1px solid #262a36; }
.pyexo__out:empty { display:none; }
.pyexo__out--running { color:#8b93a7; }
.pyexo__verdict { font-weight:600; padding:.2rem 0; }
.pyexo__verdict--ok { color:#9ece6a; }
.pyexo__verdict--fail { color:#f7768e; white-space:pre-wrap; word-break:break-word; }
.pyexo__stdout { margin:.4rem 0 0; padding:.5rem .7rem; background:#171a23; border-radius:6px; color:#cdd3e0; white-space:pre-wrap; word-break:break-word; overflow-x:auto; }
.pyexo__sol { border-top:1px solid #262a36; }
.pyexo__sol-label { padding:.5rem .8rem .2rem; font-size:.74rem; color:#8b93a7; }
.pyexo__sol-code { margin:0; padding:.5rem .9rem .8rem; background:#0b0d13; color:#9ece6a; font-family:ui-monospace,monospace; font-size:.84rem; white-space:pre; overflow-x:auto; }

/* Admin : zones de code + fieldset Python */
.code-area { font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:.86rem; line-height:1.45; white-space:pre; tab-size:4; }
.exo-fieldset--python { border-color:#2f6bff; }
.exo-fieldset--python > legend { color:#2f6bff; }

/* ============================================================
   Cours / TD rédigés en ligne (lecon.php, lecon-edit.php, lecons.php)
   ============================================================ */
/* En-tête de lecture */
.lecon-head { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin:1rem 0 .4rem; }
.lecon-head__badge { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:.15rem .55rem; border-radius:999px; background:var(--bg-alt,#eef2f7); color:var(--text-muted); }
.lecon-head__badge--cours { background:#dbe7ff; color:#1d4ed8; }
.lecon-head__badge--td { background:#dcfce7; color:#15803d; }
.lecon-title { margin:.2rem 0; }
.lecon-desc { color:var(--text-muted); font-size:.95rem; margin:.2rem 0 1rem; }
.lecon-points { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; font-size:.82rem; color:var(--text-muted); margin-bottom:1.2rem; }

/* Contenu rendu (markdown enrichi) — sert aussi à l'aperçu de l'éditeur */
.lecon-content { font-size:1rem; line-height:1.7; }
.lecon-content > :first-child { margin-top:0; }
.lecon-content h1, .lecon-content h2, .lecon-content h3, .lecon-content h4 { line-height:1.3; margin:1.5em 0 .4em; }
.lecon-content h2 { border-bottom:1px solid var(--border); padding-bottom:.2em; }
.lecon-content p { margin:.7em 0; }
.lecon-content ul, .lecon-content ol { margin:.6em 0 .6em 1.4em; }
.lecon-content li { margin:.25em 0; }
.lecon-content img { max-width:100%; height:auto; border-radius:8px; }
.lecon-content pre { background:#0f1117; color:#e6e6e6; padding:.8rem 1rem; border-radius:8px; overflow-x:auto; }
.lecon-content code { font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:.9em; }
.lecon-content :not(pre) > code { background:var(--bg-alt,#eef2f7); padding:.1em .35em; border-radius:4px; }
.lecon-content blockquote { border-left:3px solid var(--border); margin:.8em 0; padding:.2em 1em; color:var(--text-muted); }
.lecon-content table { border-collapse:collapse; margin:.8em 0; width:100%; font-size:.92em; }
.lecon-content th, .lecon-content td { border:1px solid var(--border); padding:.4em .6em; text-align:left; }
.lecon-content a { color:var(--primary); }
.lecon-pdf { display:inline-block; margin:.3rem 0; padding:.4rem .7rem; border:1px solid var(--border); border-radius:8px; text-decoration:none; color:var(--primary); }

/* Cellules Python exécutables dans une leçon */
.lcell { margin:1rem 0; border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#0f1117; }
.lcell__bar { display:flex; justify-content:space-between; align-items:center; padding:.45rem .7rem; background:#171a23; border-bottom:1px solid #262a36; }
.lcell__lang { font-size:.76rem; color:#8b93a7; }
.lcell__code { display:block; width:100%; box-sizing:border-box; border:0; background:#0f1117; color:#e6e6e6; font-family:ui-monospace,monospace; font-size:.88rem; line-height:1.5; padding:.6rem .8rem; outline:none; white-space:pre; overflow-x:auto; tab-size:4; resize:vertical; }
.lcell__out { padding:.6rem .8rem; font-family:ui-monospace,monospace; font-size:.84rem; background:#0b0d13; border-top:1px solid #262a36; }
.lcell__out:empty { display:none; }
.lcell__out--running { color:#8b93a7; }
.lcell__stdout { margin:0; color:#cdd3e0; white-space:pre-wrap; word-break:break-word; }
.lcell__err { margin:.3rem 0 0; color:#f7768e; white-space:pre-wrap; word-break:break-word; }
.lcell__fig { display:block; max-width:100%; margin:.5rem 0; background:#fff; border-radius:6px; }
.lcell__ok { color:#9ece6a; }
.lpy-status { margin:.5rem 0; padding:.5rem .8rem; border-radius:8px; background:var(--bg-alt,#eef2f7); font-size:.82rem; color:var(--text-muted); }

/* Révélation indice/correction (exo.php) */
.exo-reveal { margin-top:1rem; border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:8px; padding:.7rem .9rem; background:var(--bg-card,#fff); }
.exo-reveal__label { font-weight:700; font-size:.85rem; margin-bottom:.3rem; }

/* Liens leçon dans le programme + cartes en ligne */
.point-icon--lecon { text-decoration:none; border-color:#c7d2fe; }
.point-icon--lecon:hover { background:#eef2ff; }
.doc-card--online .doc-card__icon { background:#dbe7ff; color:#1d4ed8; font-size:1.4rem; font-weight:400; }

/* Éditeur de cours/TD */
.lecon-form__grid { display:flex; gap:1rem; flex-wrap:wrap; align-items:flex-end; }
.lecon-form__grid .form-group { flex:1; min-width:150px; }
.lecon-toolbar { display:flex; flex-wrap:wrap; gap:.3rem; align-items:center; padding:.5rem; background:var(--bg-alt,#f3f4f6); border:1px solid var(--border); border-bottom:0; border-radius:8px 8px 0 0; margin-top:.5rem; }
.lecon-toolbar button, .lecon-toolbar__img { cursor:pointer; border:1px solid var(--border); background:#fff; border-radius:6px; padding:.28rem .55rem; font-size:.85rem; line-height:1.1; color:var(--text); }
.lecon-toolbar button:hover, .lecon-toolbar__img:hover { background:#fff; border-color:var(--primary); }
.lecon-toolbar__sep { width:1px; align-self:stretch; background:var(--border); margin:0 .25rem; }
.lecon-toolbar__preview { font-weight:600; }
.lecon-editor { display:flex; border:1px solid var(--border); border-radius:0 0 8px 8px; overflow:hidden; background:#fff; }
.lecon-editor__src { flex:1; min-height:360px; box-sizing:border-box; border:0; padding:.8rem; font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:.9rem; line-height:1.6; outline:none; resize:vertical; tab-size:4; }
.lecon-editor--split .lecon-editor__src { width:50%; flex:none; border-right:1px solid var(--border); }
.lecon-editor__preview { flex:1; padding:.8rem 1.1rem; overflow-y:auto; max-height:640px; }
.lecon-points-group { margin:.5rem 0; }
.lecon-points-group > strong { font-size:.85rem; }
.lecon-points-list { display:flex; flex-wrap:wrap; gap:.3rem .9rem; margin-top:.3rem; }
.lecon-point-cb { font-size:.85rem; display:inline-flex; align-items:center; gap:.3rem; }
.lecon-form__footer { display:flex; align-items:center; gap:.6rem; margin-top:1rem; flex-wrap:wrap; }
.lecon-cb { display:inline-flex; align-items:center; gap:.4rem; }

/* Liste des cours/TD (admin) */
.lecons-section { margin:1.5rem 0; }
.lecons-section > h2 { display:flex; align-items:center; gap:.5rem; font-size:1.1rem; }
.lecons-count { font-size:.8rem; background:var(--bg-alt,#eef2f7); color:var(--text-muted); border-radius:999px; padding:.05rem .5rem; }
.lecons-list { display:flex; flex-direction:column; gap:.5rem; }
.lecon-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.6rem .8rem; border:1px solid var(--border); border-radius:8px; background:var(--bg-card,#fff); }
.lecon-row--hidden { opacity:.6; }
.lecon-row__title { font-weight:600; text-decoration:none; color:var(--text); }
.lecon-row__title:hover { color:var(--primary); }
.lecon-row__meta { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.25rem; }
.lecon-row__chip { font-size:.72rem; background:var(--bg-alt,#eef2f7); color:var(--text-muted); border-radius:999px; padding:.05rem .5rem; }
.lecon-row__chip--hidden { background:#fde2e2; color:#b91c1c; }
.lecon-row__actions { display:flex; gap:.25rem; flex-shrink:0; }
.lecon-row__del:hover { color:var(--error,#e23b3b); }
@media (max-width:600px){ .lecon-editor--split .lecon-editor__src { width:100%; flex:1; border-right:0; border-bottom:1px solid var(--border); } .lecon-editor--split { flex-direction:column; } .lecon-row { flex-direction:column; align-items:flex-start; } }

/* ============================================================
   Cours/TD en ligne — exercices intégrés (affichage public)
   ============================================================ */
.lecon-exos { margin-top:2.5rem; padding-top:1.5rem; border-top:2px solid var(--border); }
.lecon-exos__title { font-size:1.4rem; margin:0 0 1.2rem; }
.td-exo { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.2rem; margin-bottom:1.1rem; }
.td-exo__head { display:flex; align-items:center; gap:.6rem; margin-bottom:.75rem; }
.td-exo__num { flex:0 0 auto; width:1.75rem; height:1.75rem; border-radius:50%; background:var(--primary); color:#fff; font-weight:700; font-size:.92rem; display:flex; align-items:center; justify-content:center; }
.td-exo__title { font-weight:600; font-size:1.05rem; }
.td-exo__badge { margin-left:auto; font-size:.72rem; font-weight:600; background:#0f1117; color:#9ece6a; padding:.18rem .55rem; border-radius:999px; }

/* Éditeur admin — sélecteur d'exercices du TD */
.lecon-exo-list { max-height:320px; overflow-y:auto; border:1px solid var(--border); border-radius:var(--radius); padding:.3rem; background:var(--bg-alt); }
.lecon-exo-item { display:flex; align-items:center; gap:.55rem; padding:.45rem .55rem; border-radius:var(--radius); cursor:pointer; }
.lecon-exo-item:hover { background:var(--bg-card); }
.lecon-exo-item input { flex:0 0 auto; margin:0; }
.lecon-exo-item__t { flex:1; font-size:.92rem; }
.lecon-exo-item__p { flex:0 0 auto; font-size:.72rem; color:var(--text-muted); background:var(--bg-card); border:1px solid var(--border); padding:.1rem .45rem; border-radius:999px; }

/* Code Python affiché dans le programme de colle (sans exécution) */
.exo-code-label { font-size:.8rem; font-weight:600; color:var(--text-muted); margin:.6rem 0 .25rem; }
.exo-code { background:#0f1117; color:#e6e6e6; padding:.7rem .9rem; border-radius:8px; overflow-x:auto; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.85rem; line-height:1.5; margin:0 0 .4rem; white-space:pre; }
.exo-code code { font-family:inherit; background:none; padding:0; color:inherit; border:0; }
.exo-code-hint { font-size:.78rem; color:var(--text-muted); margin:.1rem 0 .3rem; }

/* Favoris de commentaires : portée locale (propre à un devoir) */
.cmodal__row { display:flex; gap:.4rem; flex-wrap:wrap; }
.cmodal-fav__badge { flex:0 0 auto; margin-right:.3rem; font-size:.85rem; }
.cmodal-fav--local { background:rgba(99,102,241,.08); border-radius:6px; }

/* Synthèse par étudiant — compétences transversales (faibles / forts) */
.comp-mini { margin-top:.6rem; }
.comp-mini__label { font-size:.78rem; font-weight:700; color:var(--text-muted); margin-bottom:.25rem; }
.comp-mini--weak .comp-mini__label { color:#c0392b; }
.comp-mini--strong .comp-mini__label { color:#1e8449; }
.comp-mini__row { display:flex; justify-content:space-between; align-items:center; gap:.5rem; padding:.22rem 0; border-bottom:1px solid var(--border); font-size:.85rem; }
.comp-mini__row:last-child { border-bottom:0; }
.comp-mini__name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.comp-mini__val { flex:0 0 auto; font-weight:700; font-variant-numeric:tabular-nums; }
.comp-mini__all { margin-top:.55rem; }
.comp-mini__all > summary { cursor:pointer; font-size:.8rem; color:var(--primary); }

/* Rehaussement des notes — graphe interactif */
.dv-transform .dvt-params { display:flex; gap:.6rem; margin:.4rem 0; }
.dvt-param { font-size:.78rem; display:inline-flex; align-items:center; }
.dvt-param input { width:74px; }
.dvt-graph { display:block; width:100%; max-width:300px; height:auto; margin:.5rem 0; background:#fff; border:1px solid var(--border); border-radius:8px; }
.dvt-stats { font-size:.8rem; color:var(--text); margin:.2rem 0 .4rem; }

/* Sélecteurs de liens internes (barre d'outils éditeur) + statut upload image */
.lecon-link-sel { max-width:150px; font-size:.82rem; padding:.3rem .4rem; border:1px solid var(--border); border-radius:6px; background:var(--bg-card,#fff); color:var(--text); cursor:pointer; }
.lecon-link-sel:hover { border-color:var(--primary); }
.lup-status--ok { color:var(--success); font-weight:600; }
.lup-status--err { color:var(--error); font-weight:600; }

/* ============================================================
   Éditeur de cours/TD en cellules
   ============================================================ */
.lcells-bar { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin:1rem 0 .6rem; padding:.5rem .7rem; background:var(--bg-alt); border:1px dashed var(--border); border-radius:var(--radius); }
.lcells-bar--bottom { border-style:solid; background:transparent; justify-content:center; }
.lcell-ed { border:1px solid var(--border); border-radius:10px; margin-bottom:.9rem; background:var(--bg-card); overflow:hidden; }
.lcell-ed__head { display:flex; align-items:center; gap:.5rem; padding:.4rem .6rem; background:var(--bg-alt); border-bottom:1px solid var(--border); }
.lcell-ed__badge { font-size:.78rem; font-weight:700; }
.lcell-ed__actions { display:flex; gap:.25rem; margin-left:auto; }
.lcell-ed__actions button, .lcell-ed__ptsbtn { cursor:pointer; border:1px solid var(--border); background:var(--bg-card); border-radius:6px; padding:.2rem .45rem; font-size:.82rem; line-height:1.1; color:var(--text); }
.lcell-ed__actions button:hover, .lcell-ed__ptsbtn:hover { border-color:var(--primary); }
.lcell-ed__ptsbtn { color:var(--primary); font-weight:600; }
.lcell-ed__pts { padding:.5rem .6rem; background:var(--bg-alt); border-bottom:1px solid var(--border); }
.lcell-ed__pts-list { display:flex; flex-wrap:wrap; gap:.3rem .9rem; margin-top:.4rem; max-height:180px; overflow-y:auto; }
.lcell-ed__body { padding:.6rem; }
.lcell-ed__bar { display:flex; flex-wrap:wrap; gap:.25rem; align-items:center; margin-bottom:.4rem; }
.lcell-ed__bar button { cursor:pointer; border:1px solid var(--border); background:var(--bg-card); border-radius:6px; padding:.25rem .5rem; font-size:.85rem; line-height:1.1; color:var(--text); }
.lcell-ed__bar button:hover { border-color:var(--primary); }
.lcell-ed__ta { width:100%; box-sizing:border-box; min-height:80px; border:1px solid var(--border); border-radius:6px; padding:.6rem; font-size:.95rem; line-height:1.55; resize:vertical; outline:none; font-family:inherit; }
.lcell-ed__ta:focus { border-color:var(--primary); }
.lcell-ed__ta--code { font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:.88rem; white-space:pre; tab-size:4; background:#0f1117; color:#e6e6e6; border-color:#262a36; }
.lcell-ed__prev { margin-top:.6rem; padding:.7rem; border:1px dashed var(--border); border-radius:6px; background:var(--bg-alt); }
.lcell-ed__exo { width:100%; padding:.5rem; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); color:var(--text); }

/* Affichage : pastilles de points par cellule + mise en évidence de la cible */
.lcell-block { scroll-margin-top:80px; }
.lcell-block--target { animation:cellHighlight 2.6s ease-out; border-radius:8px; }
@keyframes cellHighlight { 0%,35% { box-shadow:0 0 0 3px var(--primary); } 100% { box-shadow:0 0 0 0 transparent; } }

/* ════════════════════════════════════════════════════════════
   Page d'un point (point.php) + titre cliquable + groupes éditeur
   ════════════════════════════════════════════════════════════ */
.point-page__capacite{
  background:var(--bg-alt); border:1px solid var(--border);
  border-left:4px solid var(--primary); border-radius:var(--radius);
  padding:1rem 1.25rem; margin:1rem 0 1.5rem;
}
.point-page__capacite-label{
  font-weight:700; color:var(--primary-dark); font-size:.8rem;
  text-transform:uppercase; letter-spacing:.03em; margin-bottom:.4rem;
}
.point-page__lecons{ display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin:0 0 1.5rem; }
.point-page__lecons-label{ font-weight:600; color:var(--text-muted); font-size:.9rem; }
.point-page__exos-title{ font-size:1.15rem; margin:1.75rem 0 1rem; padding-bottom:.4rem; border-bottom:2px solid var(--border); }
.point-page__exos{ display:flex; flex-direction:column; gap:1.25rem; }

.point-row__title--link{ color:inherit; text-decoration:none; cursor:pointer; transition:color var(--transition); }
.point-row__title--link:hover{ color:var(--primary); text-decoration:underline; }

.lcell-ed__pts-group{ margin-bottom:.35rem; }
.lcell-ed__pts-grouptitle{
  font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  color:var(--text-muted); padding:.35rem .2rem .15rem;
}

/* ════════════════════════════════════════════════════════════
   Animations / simulations interactives
   ════════════════════════════════════════════════════════════ */
.anim-theme-title{ font-size:1.05rem; font-weight:700; color:var(--primary-dark);
  margin:0 0 .9rem; padding-bottom:.35rem; border-bottom:2px solid var(--border); }
.anim-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1rem; }
.anim-card{ display:flex; flex-direction:column; gap:.5rem; text-decoration:none; color:var(--text);
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:1rem 1.1rem; box-shadow:var(--shadow-sm); transition:transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.anim-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:var(--primary); }
.anim-card--home{ border-left:4px solid var(--primary); }
.anim-card__top{ display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
.anim-card__badge{ font-size:.74rem; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em; }
.anim-card__tag{ font-size:.7rem; font-weight:700; padding:.15rem .5rem; border-radius:20px;
  background:var(--bg-alt); color:var(--text-muted); border:1px solid var(--border); }
.anim-card__tag--home{ background:var(--primary); color:#fff; border-color:var(--primary); }
.anim-card__title{ font-weight:700; font-size:1.05rem; line-height:1.25; }
.anim-card__desc{ font-size:.85rem; color:var(--text-muted); flex:1; }
.anim-card__cta{ font-size:.82rem; font-weight:600; color:var(--primary); margin-top:.2rem; }

.anim-frame{ border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden;
  box-shadow:var(--shadow-md); background:var(--bg-alt); margin:.5rem 0 .75rem; }
.anim-frame iframe{ width:100%; border:0; display:block; }
.anim-fallback{ font-size:.85rem; color:var(--text-muted); }
.anim-radio{ display:flex; align-items:center; gap:.5rem; padding:.2rem 0; }

/* ════════════════════════════════════════════════════════════
   Filtre par thèmes (devoirs, exercices, cours/TD)
   ════════════════════════════════════════════════════════════ */
.dv-themes-filter{ background:var(--bg-alt); border:1px solid var(--border); border-radius:var(--radius);
  padding:.7rem .9rem; margin:0 0 1rem; }
.dv-themes-filter__label{ font-weight:600; font-size:.9rem; margin-bottom:.5rem; }
.dv-themes-filter__hint{ font-weight:400; color:var(--text-muted); font-size:.82rem; }
.dv-themes-filter__list{ display:flex; flex-wrap:wrap; gap:.4rem .8rem; }
.dv-theme{ display:inline-flex; align-items:center; gap:.35rem; font-size:.86rem;
  background:var(--bg-card); border:1px solid var(--border); border-radius:20px; padding:.25rem .7rem; cursor:pointer;
  transition:border-color var(--transition), background var(--transition); }
.dv-theme:hover{ border-color:var(--primary); }
.dv-theme:has(input:checked){ background:var(--primary); color:#fff; border-color:var(--primary); }

/* Animation incrustée dans un cours / exercice */
.anim-embed{ margin:1.1rem 0; }
.anim-embed__head{ font-weight:700; font-size:.95rem; color:var(--primary-dark); margin-bottom:.45rem; }

/* ════════════════════════════════════════════════════════════
   Programme de colle : panneaux Cours / TD par point
   ════════════════════════════════════════════════════════════ */
.point-panel--cours, .point-panel--td{ padding:.5rem 0 .25rem; }

/* Vignettes des TD */
.ptd-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:.75rem; }
.ptd-card{ display:flex; flex-direction:column; gap:.28rem; text-decoration:none; color:var(--text);
  background:var(--bg-card); border:1px solid var(--border); border-left:4px solid var(--primary);
  border-radius:var(--radius); padding:.7rem .85rem; box-shadow:var(--shadow-sm);
  transition:transform var(--transition), box-shadow var(--transition); }
.ptd-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.ptd-card__icon{ font-size:1.15rem; }
.ptd-card__name{ font-weight:700; line-height:1.25; }
.ptd-card__go{ font-size:.78rem; font-weight:600; color:var(--primary); }

/* Cours : vignette (titre au survol) + contenu des cellules liées au point */
.pcours{ border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden;
  margin-bottom:1rem; background:var(--bg-card); box-shadow:var(--shadow-sm); }
.pcours__head{ display:flex; align-items:center; gap:.55rem; text-decoration:none; color:var(--text);
  background:var(--bg-alt); padding:.6rem .85rem; border-bottom:1px solid var(--border);
  transition:background var(--transition); }
.pcours__head:hover{ background:var(--bg-card); }
.pcours__head:hover .pcours__name{ color:var(--primary-dark); }
.pcours__thumb{ font-size:1.35rem; display:inline-block; transition:transform var(--transition); }
.pcours__head:hover .pcours__thumb{ transform:scale(1.18); }
.pcours__name{ font-weight:700; flex:1; line-height:1.25; }
.pcours__open{ font-size:.78rem; font-weight:600; color:var(--primary); white-space:nowrap; }
.pcours__cells{ padding:.85rem 1rem; }
.pcours__cells .lecon-md{ margin:.3rem 0; }
.prog-codeblock{ background:#0f1b2d; color:#e6edf7; border-radius:var(--radius);
  padding:.7rem .9rem; overflow-x:auto; font-size:.85rem; margin:.45rem 0; }

/* ════════════════════════════════════════════════════════════
   Radar des compétences (copie élève) + copie responsive mobile
   ════════════════════════════════════════════════════════════ */
.radar-box{ margin:.5rem 0 1rem; }
.radar-box__head{ display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-bottom:.35rem; }
.radar-box__title{ font-weight:700; font-size:.95rem; }
.radar-box__all{ font-size:.74rem; padding:.28rem .65rem; border:1px solid var(--border); background:var(--bg-card);
  border-radius:20px; cursor:pointer; color:var(--primary-dark); font-weight:600; white-space:nowrap; }
.radar-box__all:hover{ border-color:var(--primary); }
.radar-legend{ display:flex; flex-wrap:wrap; gap:.7rem; font-size:.72rem; color:var(--text-muted); margin-bottom:.2rem; }
.radar-legend span{ display:inline-flex; align-items:center; gap:.32rem; }
.radar-key{ width:12px; height:12px; border-radius:3px; display:inline-block; }
.radar-key--you{ background:rgba(30,58,138,.28); border:2px solid #1e3a8a; }
.radar-key--band{ background:rgba(100,116,139,.2); border:1px solid rgba(100,116,139,.45); }
.radar-key--cls{ width:9px; height:9px; background:#475569; transform:rotate(45deg); border-radius:1px; }
.radar-svg{ width:100%; max-width:430px; height:auto; display:block; margin:0 auto; touch-action:manipulation; }
.radar-svg text{ user-select:none; -webkit-user-select:none; }
.radar-axis{ transition:opacity .1s; }
.radar-hint{ text-align:center; font-size:.74rem; color:var(--text-muted); margin:.15rem 0 0; }
.type-bilan__summary{ cursor:pointer; font-weight:700; font-size:.9rem; color:var(--primary-dark); padding:.3rem 0; }
.type-bilan__summary:hover{ color:var(--primary); }

/* Copie élève sur mobile/tablette : flux vertical scrollable, tout visible */
@media (max-width:880px){
  .corr-wrap{ position:static; inset:auto; height:auto; z-index:auto; }
  .corr-main{ flex-direction:column; min-height:0; }
  .corr-pdf{ flex:none; height:auto; overflow:visible; }
  .corr-panel{ width:100%; max-width:none; max-height:none; padding-bottom:0;
    border-left:none; border-top:2px solid var(--border); }
  .corr-bareme{ display:block; overflow:visible; }
  .mbareme{ display:none !important; }
}

/* Aperçu de l'exercice choisi dans une cellule (éditeur cours/TD) */
.lcell-ed__exo-preview{ margin:.5rem 0 0; padding:.6rem .8rem; background:var(--bg-alt);
  border:1px solid var(--border); border-left:3px solid var(--primary); border-radius:var(--radius); font-size:.85rem; }
.exo-prev__txt{ color:var(--text); line-height:1.45; margin-bottom:.4rem; white-space:pre-wrap; }
.exo-prev__edit{ font-size:.8rem; font-weight:600; color:var(--primary); text-decoration:none; }
.exo-prev__edit:hover{ text-decoration:underline; }

/* Zone de détail du radar (nom complet au survol/tap) */
.radar-focus{ text-align:center; font-size:.8rem; color:var(--text); background:var(--bg-alt);
  border:1px solid var(--border); border-radius:var(--radius); padding:.4rem .6rem; margin:.35rem 0 0; line-height:1.35; }
.radar-focus strong{ color:var(--primary-dark); }

/* Panneau de la copie : tout le contenu glisse ensemble (plus de partie figée) */
.corr-panel{ overflow-y:auto; }
.corr-bareme{ flex:none; overflow:visible; }

/* ════════════════════════════════════════════════════════════
   Forum en bulles (rôles colorés, média, suppression)
   ════════════════════════════════════════════════════════════ */
/* Indice de rôle : liseré coloré à gauche des bulles reçues */
.chat-msg--them .chat-msg__bubble--admin  { border-left:3px solid #2f6df0; }
.chat-msg--them .chat-msg__bubble--colleur { border-left:3px solid #7c3aed; }
.chat-msg--them .chat-msg__bubble--student { border-left:3px solid var(--border); }
.chat-msg__who { display:inline-flex; align-items:center; gap:.35rem; }
.chat-msg__role { font-size:.6rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  padding:.05rem .3rem; border-radius:8px; background:var(--bg-alt); color:var(--text-muted); }
.chat-msg__role--admin  { background:rgba(47,109,240,.14); color:#1b4fc0; }
.chat-msg__role--colleur { background:rgba(124,58,237,.14); color:#6d28d9; }
.chat-msg__role--student { background:rgba(100,116,139,.14); color:#475569; }
.chat-msg__media { margin-top:.4rem; }
.chat-msg__media img, .chat-msg__media iframe { max-width:100%; border-radius:8px; display:block; }
.chat-msg__media iframe { width:100%; aspect-ratio:16/9; border:0; }
.chat-msg__time { display:inline-flex; align-items:center; gap:.3rem; }
.chat-msg__del { display:inline; margin:0; }
.chat-msg__del button { background:none; border:none; cursor:pointer; font-size:.85rem; line-height:1;
  opacity:.5; padding:0 .1rem; color:inherit; }
.chat-msg__del button:hover { opacity:1; color:var(--danger,#e0245e); }

/* Badge "privé" dans le suivi (DM élèves) */
.suivi-tag-dm{ font-size:.6rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  background:rgba(190,24,93,.12); color:#be185d; padding:.05rem .35rem; border-radius:6px; margin-left:.3rem; }

/* Grille des radars de synthèse (compétences + types côte à côte) */
.notes-radars__grid{ display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; align-items:start; }
.notes-radars__grid > .radar-box{ background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:1rem 1.1rem; box-shadow:var(--shadow-sm); }
@media (max-width:820px){ .notes-radars__grid{ grid-template-columns:1fr; } }

/* Bloc radars de synthèse (vues prof) */
.radars-eleve__head{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.6rem; margin-bottom:1rem; }
.radars-eleve__pick{ display:flex; align-items:center; gap:.4rem; font-size:.9rem; }
.radars-eleve__pick select{ min-width:180px; }

/* Barème : case "vu en cours" */
.bareme-question__vu-lbl{ display:inline-flex; align-items:center; gap:.25rem; font-size:.78rem;
  color:var(--text-muted); white-space:nowrap; cursor:pointer; }
.bareme-question__vu-lbl input{ margin:0; }
.bareme-fbbank{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.6rem;
  background:var(--bg-alt); border:1px dashed var(--border); border-radius:var(--radius); padding:.55rem .8rem;
  font-size:.85rem; margin-bottom:1rem; }

/* Correction : commentaires suggérés */
.corr-fb{ margin:.6rem 0; padding:.6rem .7rem; background:var(--bg-alt); border:1px solid var(--border); border-radius:var(--radius); }
.corr-fb__title{ font-size:.82rem; font-weight:700; margin-bottom:.45rem; }
.corr-fb__hint{ font-weight:400; color:var(--text-muted); }
.corr-fb__group{ display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.4rem; }
.corr-fb__chip{ border:1px solid var(--border); background:var(--bg-card); border-radius:14px; padding:.28rem .6rem;
  font-size:.78rem; cursor:pointer; text-align:left; max-width:100%; transition:background var(--transition), border-color var(--transition); }
.corr-fb__chip:hover{ border-color:var(--primary); background:var(--bg); }
.corr-fb__chip--auto{ border-color:#f59e0b; background:rgba(245,158,11,.10); font-weight:600; }
.corr-fb__chip--auto:hover{ background:rgba(245,158,11,.18); }
.corr-fb__chip--used{ opacity:.5; }
.corr-fb__meta{ font-size:.72rem; color:var(--text-muted); margin-top:.2rem; }
.corr-fb__note{ font-style:italic; }

/* Forum : bulles larges (90% de la largeur) */
.chat-thread__msgs--forum .chat-msg { max-width:90%; width:90%; }
.chat-thread__msgs--forum .chat-msg__bubble { flex:1; }

/* Suivi des rendus (DS/DM/TP) : qui a rendu / qui manque */
.dv-rendus{ background:var(--bg-alt); border:1px solid var(--border); border-radius:var(--radius); padding:.7rem .9rem; margin-bottom:1rem; }
.dv-rendus__stat{ font-size:.95rem; font-weight:600; margin-bottom:.35rem; }
.dv-rendus__ok{ font-size:.88rem; color:#047857; font-weight:600; }
.dv-rendus__missing{ font-size:.88rem; display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.dv-rendus__label{ font-weight:700; color:#b91c1c; }
.dv-missing-chip{ background:rgba(185,28,28,.1); color:#b91c1c; border:1px solid rgba(185,28,28,.25);
  border-radius:12px; padding:.15rem .55rem; font-size:.82rem; white-space:nowrap; }

/* Indicateur "cours appris" /20 */
.notes-coursind{ background:rgba(29,78,216,.08); border:1px solid rgba(29,78,216,.2); border-radius:var(--radius);
  padding:.5rem .8rem; margin-bottom:1rem; font-size:.9rem; }
.corr-score__cours{ margin-left:1rem; color:var(--primary-dark); font-size:.92rem; white-space:nowrap; }

/* ════════ Banque de questions QCM (éditeur + aperçu) ════════ */
.qcm-radio{ display:inline-flex; align-items:center; gap:.35rem; font-size:.9rem; cursor:pointer; }
.qcm-opt{ display:flex; align-items:center; gap:.5rem; margin-bottom:.45rem; }
.qcm-opt__correct{ display:inline-flex; align-items:center; }
.qcm-opt__bullet{ color:var(--primary); width:1.2rem; text-align:center; }
.qcm-opt__t{ flex:1; }
.qcm-opt__del{ background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:1rem; padding:.2rem .4rem; }
.qcm-opt__del:hover{ color:#b91c1c; }
.qcm-points{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:.75rem; }
.qcm-points__mat{ border:1px solid var(--border); border-radius:var(--radius); padding:.5rem .6rem; background:var(--bg-alt); }
.qcm-points__mattitle{ font-weight:700; font-size:.8rem; color:var(--primary-dark); margin-bottom:.3rem; }
.qcm-points .lecon-point-cb{ display:block; font-size:.85rem; padding:.1rem 0; }

.qcm-list{ display:flex; flex-direction:column; gap:.5rem; }
.qcm-item{ display:flex; gap:.6rem; align-items:flex-start; padding:.55rem .7rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg-card); }
.qcm-item__main{ flex:1; min-width:0; }
.qcm-item__type{ font-size:.7rem; font-weight:700; padding:.1rem .4rem; border-radius:8px; background:var(--bg-alt); white-space:nowrap; }
.qcm-item__type--texte{ background:rgba(124,58,237,.12); color:#6d28d9; }
.qcm-item__type--qcm{ background:rgba(29,78,216,.12); color:#1d4ed8; }
.qcm-item__enonce{ margin-left:.5rem; font-weight:600; }
.qcm-item__meta{ font-size:.75rem; color:var(--text-muted); margin-top:.2rem; }
.qcm-item__pt{ white-space:nowrap; }

.qcm-preview{ margin-top:1rem; padding:.9rem 1rem; border:1px dashed var(--primary); border-radius:var(--radius-lg); background:var(--bg-alt); }
.qcm-preview__q{ font-weight:600; margin-bottom:.6rem; }
.qcm-preview__opt{ display:flex; align-items:center; gap:.4rem; padding:.2rem 0; cursor:pointer; }
.qcm-preview__fill{ max-width:280px; margin-bottom:.5rem; }
.qcm-preview__res{ margin-left:.5rem; font-weight:700; }
.qcm-ok{ color:#047857; }
.qcm-no{ color:#b91c1c; }

/* ════════════ Quiz — passation étudiant ════════════ */
.quiz-wrap{ max-width:760px; }
.quiz-desc{ color:var(--text); background:var(--bg-alt); border-radius:var(--radius); padding:.6rem .9rem; margin-bottom:1rem; }
.quiz-cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1rem; }
.quiz-card{ display:flex; flex-direction:column; gap:.4rem; text-decoration:none; color:var(--text);
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1rem;
  box-shadow:var(--shadow-sm); transition:transform var(--transition), box-shadow var(--transition); }
.quiz-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--primary); }
.quiz-card__mode{ font-size:.72rem; font-weight:700; color:var(--primary-dark); }
.quiz-card__title{ font-weight:800; font-size:1.05rem; }
.quiz-card__meta{ font-size:.82rem; color:var(--text-muted); }
.quiz-card__go{ margin-top:.3rem; font-weight:700; color:var(--primary); }

.quiz-form{ display:flex; flex-direction:column; gap:1rem; }
.quiz-q{ border:1px solid var(--border); border-radius:var(--radius-lg); padding:1rem 1.1rem; background:var(--bg-card); }
.quiz-q__head{ display:flex; gap:.6rem; align-items:baseline; margin-bottom:.7rem; flex-wrap:wrap; }
.quiz-q__num{ display:inline-flex; align-items:center; justify-content:center; min-width:1.6rem; height:1.6rem;
  background:var(--primary); color:#fff; border-radius:50%; font-weight:700; font-size:.85rem; flex-shrink:0; }
.quiz-q__enonce{ font-weight:600; flex:1; }
.quiz-q__hint,.quiz-q__badge{ font-size:.72rem; font-weight:700; }
.quiz-q__hint{ color:var(--text-muted); }
.quiz-choice{ display:flex; align-items:center; gap:.55rem; padding:.5rem .7rem; border:1px solid var(--border);
  border-radius:var(--radius); margin-bottom:.5rem; cursor:pointer; transition:background var(--transition), border-color var(--transition); }
.quiz-choice:hover{ background:var(--bg-alt); border-color:var(--primary); }
.quiz-choice input{ width:1.1rem; height:1.1rem; }
.quiz-fill{ max-width:320px; }

/* Résultat */
.quiz-score{ text-align:center; border-radius:var(--radius-lg); padding:1.2rem; margin-bottom:1.5rem; color:#fff; }
.quiz-score--good{ background:#047857; } .quiz-score--mid{ background:#b45309; } .quiz-score--low{ background:#b91c1c; }
.quiz-score__big{ font-size:2.2rem; font-weight:800; line-height:1; }
.quiz-score__pct{ font-size:.9rem; opacity:.9; margin-top:.3rem; }
.quiz-q--ok{ border-left:4px solid #047857; } .quiz-q--no{ border-left:4px solid #b91c1c; }
.quiz-q__badge{ margin-left:auto; }
.quiz-q--ok .quiz-q__badge{ color:#047857; } .quiz-q--no .quiz-q__badge{ color:#b91c1c; }
.quiz-q__opts{ list-style:none; padding:0; margin:.3rem 0; }
.quiz-q__opts li{ padding:.3rem .5rem; border-radius:var(--radius); }
.quiz-opt--correct{ background:rgba(4,120,87,.12); font-weight:600; }
.quiz-opt--wrong{ background:rgba(185,28,28,.1); text-decoration:line-through; }
.quiz-opt__tag{ font-size:.7rem; font-weight:700; color:#047857; margin-left:.3rem; }
.quiz-q__yours,.quiz-q__good{ font-size:.9rem; margin:.2rem 0; }
.quiz-q__good{ color:#047857; }
.quiz-q__explain{ margin-top:.5rem; font-size:.88rem; background:var(--bg-alt); border-radius:var(--radius); padding:.5rem .7rem; }
.quiz-pctbadge{ padding:.1rem .5rem; border-radius:10px; font-weight:700; color:#fff; }
.quiz-pctbadge--good{ background:#047857; } .quiz-pctbadge--mid{ background:#b45309; } .quiz-pctbadge--low{ background:#b91c1c; }

/* ════ Quiz incrusté (cours/TD/exercice) — composant .qcmi + wrapper ════ */
.qcmi{ border:1px solid var(--border); border-radius:var(--radius); padding:.75rem .9rem; background:var(--bg-card); margin:.5rem 0; }
.qcmi__enonce{ font-weight:600; margin-bottom:.5rem; }
.qcmi__hint{ font-size:.72rem; color:var(--text-muted); font-weight:700; margin-bottom:.35rem; }
.qcmi__opt{ display:flex; align-items:center; gap:.5rem; padding:.35rem .55rem; border:1px solid var(--border);
  border-radius:var(--radius); margin-bottom:.35rem; cursor:pointer; transition:background var(--transition); }
.qcmi__opt:hover{ background:var(--bg-alt); }
.qcmi__opt input{ width:1.05rem; height:1.05rem; }
.qcmi__opt--ok{ background:rgba(4,120,87,.12); border-color:#047857; }
.qcmi__opt--bad{ background:rgba(185,28,28,.1); border-color:#b91c1c; text-decoration:line-through; }
.qcmi__fill{ max-width:300px; padding:.45rem .65rem; border:1px solid var(--border); border-radius:var(--radius); font:inherit; }
.qcmi__fill.is-ok{ border-color:#047857; box-shadow:0 0 0 2px rgba(4,120,87,.15); }
.qcmi__fill.is-no{ border-color:#b91c1c; box-shadow:0 0 0 2px rgba(185,28,28,.12); }
.qcmi__foot{ margin-top:.55rem; display:flex; align-items:center; gap:.6rem; }
.qcmi__result{ font-weight:700; }
.qcmi__result--ok{ color:#047857; } .qcmi__result--no{ color:#b91c1c; }
.qcmi__explain{ margin-top:.5rem; font-size:.88rem; background:var(--bg-alt); border-radius:var(--radius); padding:.5rem .7rem; }

.quiz-inline{ border:1px solid var(--primary); border-radius:var(--radius-lg); overflow:hidden; margin:1.1rem 0; box-shadow:var(--shadow-sm); }
.quiz-inline__head{ background:var(--primary); color:#fff; padding:.55rem .9rem; font-weight:700; }
.quiz-inline__count{ font-weight:400; opacity:.85; font-size:.8rem; margin-left:.4rem; }
.quiz-inline__item{ display:flex; gap:.5rem; padding:.4rem .8rem; align-items:flex-start; }
.quiz-inline__num{ display:inline-flex; align-items:center; justify-content:center; min-width:1.5rem; height:1.5rem;
  background:var(--bg-alt); color:var(--primary-dark); border:1px solid var(--border); border-radius:50%;
  font-weight:700; font-size:.8rem; flex-shrink:0; margin-top:.85rem; }
.quiz-inline__item .qcmi{ flex:1; min-width:0; }

/* Import d'une question QCM dans un sondage */
.poll-import{ background:var(--bg-alt); border:1px dashed var(--primary); border-radius:var(--radius); padding:.6rem .8rem; margin-bottom:1rem; }

/* Quiz : filtres et groupes par thème */
.qz-themefilter{ display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin-bottom:.6rem; }
.qz-themefilter__lbl{ font-size:.82rem; font-weight:600; color:var(--text-muted); }
.qz-themechip{ display:inline-flex; align-items:center; gap:.25rem; font-size:.8rem; background:var(--bg-alt);
  border:1px solid var(--border); border-radius:12px; padding:.15rem .55rem; cursor:pointer; }
.qz-pick__group{ margin-bottom:.6rem; }
.qz-pick__grouptitle{ font-size:.78rem; font-weight:700; color:var(--primary-dark); padding:.3rem 0 .2rem; position:sticky; top:0; background:var(--bg-card); }
.qz-listgroup{ margin-bottom:1.2rem; }
.qz-listgroup__title{ font-weight:700; color:var(--primary-dark); border-bottom:2px solid var(--border); padding-bottom:.3rem; margin-bottom:.5rem; }

/* Images dans les questions QCM */
.qcmi__img{ margin:.5rem 0; }
.qcmi__img img{ max-width:100%; max-height:280px; border-radius:8px; border:1px solid var(--border); }
.quiz-q__img{ display:block; margin:.5rem 0; }
.quiz-q__img img{ max-width:100%; max-height:280px; border-radius:8px; border:1px solid var(--border); }
.qcm-img-current{ display:flex; align-items:center; gap:1rem; margin-bottom:.5rem; flex-wrap:wrap; }

/* Onglets de section (Exercices ↔ Questions QCM) */
.section-tabs{ display:flex; gap:.3rem; border-bottom:2px solid var(--border); margin-bottom:1.2rem; flex-wrap:wrap; }
.section-tab{ padding:.5rem 1rem; text-decoration:none; color:var(--text-muted); font-weight:600;
  border-bottom:3px solid transparent; margin-bottom:-2px; border-radius:6px 6px 0 0; }
.section-tab:hover{ color:var(--primary); background:var(--bg-alt); }
.section-tab--active{ color:var(--primary); border-bottom-color:var(--primary); }

/* Contrôle temporel des quiz */
.quiz-control{ border:1px solid var(--border); border-radius:var(--radius); padding:.6rem .9rem; margin-top:1rem; }
.quiz-control legend{ font-weight:700; font-size:.9rem; padding:0 .4rem; }
.quiz-control__row{ display:flex; flex-wrap:wrap; align-items:center; gap:1rem; margin-bottom:.5rem; }
.quiz-control__row input[type=datetime-local]{ font-size:.82rem; padding:.2rem .3rem; }
.quiz-state{ font-weight:600; }
.quiz-pending{ display:flex; align-items:center; gap:1rem; background:var(--bg-alt); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:1.2rem 1.4rem; margin-bottom:1rem; }
.quiz-pending__icon{ font-size:2rem; }
.quiz-inline--locked{ opacity:.9; }
.quiz-inline__lock{ padding:.6rem .9rem; color:var(--text-muted); font-weight:600; }
.quiz-inline__note{ background:rgba(245,158,11,.1); border:1px solid rgba(245,158,11,.3); border-radius:var(--radius);
  padding:.5rem .7rem; font-size:.85rem; margin:.5rem 0; }
.quiz-card__state{ font-size:.72rem; font-weight:700; margin-left:.4rem; }
.quiz-card--closed{ opacity:.75; }

/* Envoi des réponses depuis un quiz incrusté */
.quiz-inline__submit{ margin-top:.8rem; display:flex; align-items:center; gap:.8rem; flex-wrap:wrap;
  border-top:1px solid var(--border); padding-top:.7rem; }
.qzi-result{ font-weight:600; }

/* Badges « quiz incrusté » sur les listes (couleurs = moment de séance) */
.quiz-badge{ display:inline-block; font-size:.7rem; font-weight:700; padding:.12rem .5rem; border-radius:10px; margin-left:.3rem; white-space:nowrap; }
.quiz-badge--prepa{ background:#dbeafe; color:#1e40af; }   /* bleu — préparation (avant séance) */
.quiz-badge--after{ background:#dcfce7; color:#166534; }   /* vert — bilan (après séance) */
.quiz-badge--libre{ background:#f3e8ff; color:#6b21a8; }   /* violet — entraînement libre */
.doc-card__badges{ margin:.25rem 0; display:flex; flex-wrap:wrap; gap:.25rem; }

/* Graphe de progression (clic sur un axe du radar des types) */
.radar-tl{ margin-top:1rem; border-top:1px dashed var(--border); padding-top:.8rem; }
.radar-tl__head{ display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:.5rem; margin-bottom:.2rem; }
.radar-tl__title{ font-weight:700; font-size:.92rem; }
.radar-tl__leg{ font-size:.75rem; color:var(--text-muted); }
.radar-tl__svg{ width:100%; height:auto; display:block; }
.radar-axis--clickable:hover text{ fill-opacity:.65; }

/* Pastille de notification « quiz à faire » sur les onglets */
.chat-badge--quiz{ background:#4f46e5; color:#fff; }

/* QCM : accordéons de thèmes + radios de compétences (liaison aux points) */
.qcm-points-acc{ display:flex; flex-direction:column; gap:.4rem; }
.qpt-acc{ border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.qpt-acc__head{ width:100%; display:flex; align-items:center; gap:.5rem; padding:.55rem .8rem; background:var(--bg-alt);
  border:0; cursor:pointer; font:inherit; text-align:left; }
.qpt-acc__head:hover{ background:var(--bg-card); }
.qpt-acc__arrow{ transition:transform .18s; color:var(--text-muted); font-size:.8rem; }
.qpt-acc.open .qpt-acc__arrow{ transform:rotate(90deg); }
.qpt-acc__name{ flex:1; font-weight:600; }
.qpt-acc__count{ font-size:.76rem; color:var(--text-muted); background:var(--bg-card); border-radius:10px; padding:.1rem .5rem; }
.qpt-acc__body{ display:none; padding:.5rem .8rem; flex-wrap:wrap; gap:.3rem .8rem; }
.qpt-acc.open .qpt-acc__body{ display:flex; }
.qcm-comp{ display:flex; flex-direction:column; gap:.5rem; border:1px dashed var(--border); border-radius:var(--radius); padding:.6rem .8rem; }
.qcm-comp__group{ }
.qcm-comp__grouptitle{ font-size:.78rem; font-weight:700; color:var(--primary-dark); margin-bottom:.2rem; }
.qcm-comp__radio{ display:inline-flex; align-items:center; gap:.35rem; margin-right:1rem; font-size:.88rem; cursor:pointer; }

/* Aperçu du quiz dans une cellule de cours/TD */
.lcell-ed__quiz-preview{ margin:.5rem 0; }
.lcell-quiz-card{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; background:var(--bg-alt);
  border:1px solid var(--primary); border-radius:var(--radius); padding:.5rem .75rem; }
.lcell-quiz-card__t{ font-weight:700; }
.lcell-quiz-card__n{ font-size:.82rem; color:var(--text-muted); flex:1; }

/* Sélecteur de question QCM à importer (recherche + filtre thème) */
.qcm-imp-list{ max-height:230px; overflow-y:auto; border:1px solid var(--border); border-radius:var(--radius); display:flex; flex-direction:column; }
.qcm-imp-item{ display:flex; justify-content:space-between; align-items:center; gap:.6rem; padding:.5rem .7rem;
  border:0; border-bottom:1px solid var(--border); background:transparent; cursor:pointer; text-align:left; font:inherit; width:100%; }
.qcm-imp-item:last-child{ border-bottom:0; }
.qcm-imp-item:hover{ background:var(--bg-alt); }
.qcm-imp-item--sel{ background:rgba(79,70,229,.12); font-weight:600; }
.qcm-imp-item__q{ flex:1; }
.qcm-imp-item__th{ font-size:.72rem; color:var(--text-muted); white-space:nowrap; }

.qcm-imp-foot{ display:flex; justify-content:space-between; align-items:center; margin-top:.4rem; gap:.5rem; }
.qcm-imp-count{ font-size:.78rem; color:var(--text-muted); }

/* Aperçu des questions d'un quiz dans l'éditeur */
.quiz-prev__list{ margin:.55rem 0 0; padding-left:1.25rem; font-size:.85rem; color:var(--text); }
.quiz-prev__list li{ margin:.22rem 0; }

/* Pastilles quiz de TP : préparation (bleu) / fin (vert) */
.chat-badge--prep{ background:#2563eb; color:#fff; }
.chat-badge--final{ background:#16a34a; color:#fff; }

/* Blocs quiz de préparation / fin sur la page TP élève */
.tp-quiz-block{ margin:1rem 0; border-radius:var(--radius); padding:.75rem 1rem; border:1px solid var(--border); }
.tp-quiz-block--prep{ background:rgba(37,99,235,.05); border-color:#bfdbfe; }
.tp-quiz-block--final{ background:rgba(22,163,74,.05); border-color:#bbf7d0; }
.tp-quiz-block__label{ font-weight:700; margin-bottom:.5rem; font-size:.92rem; }

/* Quiz déjà répondu (réponse unique) : récap ou attente */
.quiz-inline--done{ opacity:.97; }
.quiz-done__list{ margin:.5rem 0 0; padding-left:1.3rem; font-size:.87rem; }
.quiz-done__list li{ margin:.18rem 0; }
.quiz-done__ok{ color:var(--success); }
.quiz-done__no{ color:var(--error); }
.tp-quiz-dates{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.4rem; font-size:.78rem; color:var(--text-muted); }
.tp-quiz-dates label{ display:flex; flex-direction:column; gap:.15rem; }
.tp-quiz-dates input{ font-size:.82rem; padding:.25rem .4rem; border:1px solid var(--border); border-radius:6px; }

.radar-tl__foot{ font-size:.72rem; color:var(--text-muted); margin:.3rem 0 0; }

/* ═══ Page Comptes & Groupes ═══ */
.swipe-tabs{ display:flex; gap:.5rem; margin:1rem 0; border-bottom:2px solid var(--border); }
.swipe-tab{ background:none; border:0; border-bottom:3px solid transparent; margin-bottom:-2px; padding:.6rem 1.1rem; font:inherit; font-weight:600; color:var(--text-muted); cursor:pointer; }
.swipe-tab.active{ color:var(--primary); border-bottom-color:var(--primary); }
.swipe-wrap{ overflow:hidden; }
.swipe-track{ display:flex; width:200%; transition:transform .28s ease; }
.swipe-track > .swipe-pane{ width:50%; flex:0 0 50%; }
.swipe-pane{ width:50%; flex:0 0 50%; padding:.2rem; box-sizing:border-box; }
.acc-block{ background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:1rem 1.2rem; margin-bottom:1.2rem; }
.acc-block__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:.7rem; }
.acc-block__head h2{ font-size:1.05rem; margin:0; }
.acc-count{ background:var(--bg-alt); color:var(--text-muted); border-radius:12px; padding:.1rem .55rem; font-size:.8rem; font-weight:700; }
.acc-inline-form{ display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin-bottom:.4rem; }
.acc-inline-form .form-control{ flex:1; min-width:120px; }
.acc-pending{ background:rgba(251,191,36,.08); border:1px solid #fde68a; border-radius:8px; padding:.5rem .7rem; margin:.6rem 0; font-size:.85rem; display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.acc-pending__item{ background:var(--bg-card); border:1px solid var(--border); border-radius:6px; padding:.15rem .5rem; display:inline-flex; align-items:center; gap:.3rem; }
.acc-table-wrap{ overflow-x:auto; margin-top:.6rem; }
.acc-table{ width:100%; border-collapse:collapse; font-size:.87rem; }
.acc-table th{ text-align:left; padding:.4rem .5rem; border-bottom:2px solid var(--border); font-size:.78rem; color:var(--text-muted); text-transform:uppercase; }
.acc-table td{ padding:.45rem .5rem; border-bottom:1px solid var(--border); vertical-align:middle; }
.acc-email{ color:var(--text-muted); font-size:.82rem; }
.acc-actions{ white-space:nowrap; display:flex; gap:.25rem; }
.acc-badge{ font-size:.72rem; font-weight:700; padding:.12rem .5rem; border-radius:10px; white-space:nowrap; }
.acc-badge--ok{ background:#dcfce7; color:#166534; }
.acc-badge--wait{ background:#dbeafe; color:#1e40af; }
.acc-badge--no{ background:#fee2e2; color:#991b1b; }
.login-spark{ vertical-align:middle; }
.grp-auto{ display:flex; flex-wrap:wrap; gap:.5rem; }
.grp-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:.7rem; }
.grp-card{ border:1px solid var(--border); border-radius:var(--radius); padding:.6rem .7rem; background:var(--bg-alt); }
.grp-card__head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:.4rem; }
.grp-card__name{ font-weight:700; font-size:.9rem; }
.grp-card__members{ display:flex; flex-wrap:wrap; gap:.25rem; }
.grp-chip{ background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:.1rem .45rem; font-size:.76rem; }
.grp-pick{ display:flex; flex-wrap:wrap; gap:.3rem .8rem; max-height:200px; overflow-y:auto; border:1px solid var(--border); border-radius:8px; padding:.5rem .7rem; }
.grp-pick__item{ display:inline-flex; align-items:center; gap:.3rem; font-size:.85rem; }
.synth-login-hist{ display:inline-flex; align-items:center; gap:.4rem; margin-left:.5rem; }
.synth-login-hist__meta{ font-size:.72rem; color:var(--text-muted); }

.grp-tp-badge{ font-size:.68rem; font-weight:700; background:#dcfce7; color:#166534; border-radius:8px; padding:.05rem .4rem; }

/* Documents de devoir (énoncé/correction) + rendus fichiers TP */
.devoir-docs{ display:flex; gap:.5rem; flex-wrap:wrap; margin:.5rem 0; }
.dv-docs{ display:flex; flex-direction:column; gap:1rem; }
.dv-doc-block{ border:1px solid var(--border); border-radius:var(--radius); padding:.8rem 1rem; background:var(--bg-alt); }
.dv-doc-upload{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-top:.3rem; }
.tp-file-cell{ border:1px dashed var(--primary); border-radius:var(--radius); padding:.8rem 1rem; background:rgba(37,99,235,.04); }
.tp-file-cell__drop{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-top:.5rem; }
.tp-file-cell__done{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-top:.4rem; font-size:.9rem; }

/* Sélecteur de co-équipiers à la correction d'un TP en binôme/groupe */
.eval-mates{ margin:.5rem 0; padding:.6rem .8rem; background:rgba(37,99,235,.05); border:1px solid var(--border); border-radius:8px; }
.eval-mates__label{ font-weight:600; font-size:.88rem; margin-bottom:.4rem; }
.eval-mates__list{ display:flex; flex-wrap:wrap; gap:.3rem .9rem; }
.eval-mates__item{ display:inline-flex; align-items:center; gap:.3rem; font-size:.85rem; }
.eval-mates__hint{ font-size:.75rem; color:var(--text-muted); margin:.3rem 0 0; }

/* Diffusion & correction : deux blocs distincts (Accès / Révélation), chacun sur une ligne */
.quiz-control__block{ display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1.2rem; padding:.4rem 0; }
.quiz-control__block + .quiz-control__block{ border-top:1px dashed var(--border); margin-top:.35rem; padding-top:.7rem; }
.quiz-control__lbl{ font-weight:700; font-size:.9rem; color:var(--text); min-width:230px; }
.quiz-control__date{ font-size:.85rem; display:inline-flex; align-items:center; gap:.35rem; color:var(--text-muted); }
.quiz-control__date input{ font-size:.82rem; padding:.25rem .4rem; border:1px solid var(--border); border-radius:6px; }
@media (max-width:720px){ .quiz-control__lbl{ min-width:100%; } }


/* ═══ Nav responsive unifiée : burger dès débordement (.nav-collapsed posé par JS) ═══ */
.main-nav{ flex-wrap:nowrap; overflow:hidden; min-width:0; }
.nav-link{ white-space:nowrap; }
.site-header.nav-collapsed .menu-toggle{ display:flex; }
.site-header.nav-collapsed .main-nav,
.site-header.nav-collapsed .header-auth,
.site-header.nav-collapsed .nav-auth{ display:none; }
.site-header.nav-collapsed.nav-open .main-nav{
  display:flex; flex-direction:column; align-items:stretch;
  position:absolute; top:60px; left:0; right:0;
  background:var(--primary-dark); padding:.75rem 1rem; gap:.15rem; z-index:200;
  overflow:visible; box-shadow:var(--shadow-md);
}
.site-header.nav-collapsed.nav-open .main-nav .nav-link{ padding:.6rem .75rem; }
.site-header.nav-collapsed.nav-open .main-nav{ max-height:calc(100vh - 70px); overflow-y:auto; padding-bottom:4.2rem; }
.site-header.nav-collapsed.nav-open .header-auth,
.site-header.nav-collapsed.nav-open .nav-auth{
  display:flex; gap:.5rem; position:fixed; left:0; right:0; bottom:0;
  background:var(--primary-dark); padding:.6rem 1rem; z-index:210;
  border-top:1px solid rgba(255,255,255,.15); justify-content:center;
}

.site-logo{ flex-direction:row; align-items:center; gap:.55rem; }
.site-logo__icon{ flex-shrink:0; color:#fff; opacity:.95; }

/* Synthèse : cellules cliquables + modale de détail */
.synth-cell--click{ cursor:pointer; }
.synth-cell--click:hover{ outline:2px solid var(--primary); outline-offset:-2px; }
.synth-row--click{ cursor:pointer; }
.synth-row--click:hover{ background:var(--bg-alt); }
.synth-modal{ position:fixed; inset:0; background:rgba(15,23,42,.65); z-index:1000; align-items:flex-start; justify-content:center; padding:5vh 1rem 1rem; overflow-y:auto; }
.synth-modal__box{ background:#fff; border-radius:12px; max-width:640px; width:100%; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.synth-modal__head{ display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.2rem; border-bottom:1px solid var(--border); }
.synth-modal__head h3{ margin:0; font-size:1.05rem; }
.synth-modal__close{ background:none; border:0; font-size:1.5rem; cursor:pointer; color:var(--text-muted); line-height:1; padding:0 .3rem; }
.synth-modal__close:hover{ color:var(--text); }
.synth-modal__body{ padding:1rem 1.2rem 1.3rem; }
.synth-modal__row{ display:grid; grid-template-columns:160px 1fr; gap:.4rem 1rem; padding:.45rem 0; border-bottom:1px dashed var(--border); }
.synth-modal__row:last-child{ border-bottom:0; }
.synth-modal__row--wide{ grid-template-columns:1fr; }
.synth-modal__k{ font-weight:700; font-size:.85rem; color:var(--text-muted); }
.synth-modal__v{ font-size:.92rem; line-height:1.45; }

/* Swipe : tracks à 3 et 5 panneaux */
.swipe-track--3{ width:300%; }
.swipe-track--3 > .swipe-pane{ width:33.3333%; flex:0 0 33.3333%; }
.swipe-track--5{ width:500%; }
.swipe-track--5 > .swipe-pane{ width:20%; flex:0 0 20%; }
.acc-count--alert{ background:#fee2e2; color:#991b1b; }
.acc-approval{ display:flex; flex-direction:column; gap:.5rem; padding:.7rem 0; border-bottom:1px solid var(--border); }
.acc-approval:last-child{ border-bottom:0; }
.acc-approval__info{ display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:baseline; }
.acc-approval__form{ display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.acc-approval__form select, .acc-approval__form .form-control{ padding:.3rem .5rem; font-size:.88rem; }
.grp-autoblock{ background:var(--bg-alt); border:1px dashed var(--border); border-radius:8px; padding:.7rem .9rem; }
.swipe-tabs{ overflow-x:auto; flex-wrap:nowrap; }
.swipe-tab{ white-space:nowrap; flex-shrink:0; }

/* ═══ Logo prisme animé ═══ */
.site-prism{ position:relative; display:flex; align-items:center; flex-shrink:0; }
.prism-tri{ display:flex; align-items:center; text-decoration:none; line-height:0; transition:opacity .15s ease; }
.prism-tri svg{ display:block; }
.site-prism:hover .prism-tri{ opacity:.55; }
/* Bandeau de spectre d'hélium : se DÉPLIE dans le header, entre le prisme et le
   menu (les liens se décalent). Pas de fond : les raies vivent sur le header. */
.prism-spec{
  position:relative; width:0; height:30px; overflow:hidden; cursor:pointer;
  opacity:0; margin-left:0; pointer-events:none;
  transition:width .24s ease, opacity .18s ease, margin-left .24s ease;
}
.site-prism:hover .prism-spec, .site-prism.spec-open .prism-spec{ width:260px; opacity:1; margin-left:.55rem; pointer-events:auto; }
.prism-spec__band{ position:absolute; top:0; left:0; width:260px; height:100%; }
.prism-spec__zone{ position:absolute; top:0; bottom:0; left:86.67px; width:86.67px; border:1.5px solid #ffe234; border-radius:5px; transition:left .12s ease, border-color .12s ease; pointer-events:none; }
.prism-spec__txt{ position:absolute; top:0; left:0; width:260px; height:100%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; letter-spacing:.01em; color:#ffe234; white-space:nowrap; pointer-events:none; transition:color .12s ease; text-shadow:0 1px 3px rgba(0,0,0,.55); }

/* Diviser la classe (groupes libres) */
.grp-divide__row{ display:flex; flex-wrap:wrap; gap:.6rem 1rem; align-items:flex-end; }
.grp-divide__row label{ display:flex; flex-direction:column; gap:.25rem; font-size:.88rem; }
.grp-divide__row .form-control{ padding:.35rem .5rem; }

/* Détail des notes sous le graphe radar */
.radar-tl__table{ width:100%; border-collapse:collapse; margin-top:.6rem; font-size:.82rem; }
.radar-tl__table th{ text-align:left; padding:.3rem .4rem; border-bottom:2px solid var(--border); font-size:.72rem; text-transform:uppercase; color:var(--text-muted); }
.radar-tl__table td{ padding:.3rem .4rem; border-bottom:1px solid var(--border); }
.rtl-date{ color:var(--text-muted); white-space:nowrap; }
.rtl-my, .rtl-cls, .rtl-diff{ text-align:right; white-space:nowrap; }
.rtl-pos{ color:#16a34a; font-weight:700; }
.rtl-neg{ color:#dc2626; font-weight:700; }

/* Mini-notes de colles cliquables */
.synth-mini-note--click{ cursor:pointer; border-radius:6px; transition:background .15s; }
.synth-mini-note--click:hover{ background:var(--bg-alt); outline:1px solid var(--primary); }

/* Badge de rôle colleur/enseignant */
.acc-role{ font-size:.72rem; font-weight:700; padding:.12rem .5rem; border-radius:10px; white-space:nowrap; }
.acc-role--colleur{ background:#e0e7ff; color:#3730a3; }
.acc-role--enseignant{ background:#fef3c7; color:#92400e; }

/* ═══ Synthèse : cartes homogènes + expand + tableau figé ═══ */
.synth-view__toolbar{ display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:.8rem; flex-wrap:wrap; }
.synth-view__title{ font-weight:700; font-size:.95rem; }
.synth-expand-btn{ background:none; border:1px solid var(--border); border-radius:6px; cursor:pointer; font-size:.9rem; line-height:1; padding:.2rem .35rem; color:var(--text-muted); }
.synth-expand-btn:hover{ border-color:var(--primary); color:var(--primary); }
.synth-card__more{ margin-top:.4rem; font-size:.78rem; color:var(--text-muted); }
.synth-morelink{ background:none; border:0; color:var(--primary); cursor:pointer; font:inherit; font-size:.78rem; text-decoration:underline; padding:0; }
/* Pastilles de note */
.synth-pill{ display:inline-block; padding:.1rem .45rem; border-radius:8px; font-weight:700; font-size:.82rem; }
.synth-c-tb{ background:#dcfce7; color:#166534; } .synth-c-b{ background:#d1fae5; color:#047857; }
.synth-c-ab{ background:#fef9c3; color:#854d0e; } .synth-c-m{ background:#ffedd5; color:#9a3412; } .synth-c-i{ background:#fee2e2; color:#991b1b; }
/* Modale d'expansion : tableau des notes */
.synth-exp-table{ width:100%; border-collapse:collapse; font-size:.88rem; }
.synth-exp-table th{ text-align:left; padding:.4rem .5rem; border-bottom:2px solid var(--border); font-size:.74rem; text-transform:uppercase; color:var(--text-muted); }
.synth-exp-table td{ padding:.4rem .5rem; border-bottom:1px solid var(--border); }
.synth-exp-row:hover{ background:var(--bg-alt); }
/* Tableau complet à colonne figée */
.synth-ft-wrap{ overflow:auto; max-height:65vh; border:1px solid var(--border); border-radius:8px; }
.synth-ft-table{ border-collapse:separate; border-spacing:0; font-size:.82rem; white-space:nowrap; }
.synth-ft-table th, .synth-ft-table td{ padding:.35rem .55rem; border-bottom:1px solid var(--border); border-right:1px solid var(--border); text-align:center; }
.synth-ft-table thead th{ position:sticky; top:0; background:var(--bg-card); z-index:2; }
.synth-ft-sticky{ position:sticky; left:0; background:var(--bg-card); text-align:left !important; font-weight:600; z-index:1; min-width:150px; box-shadow:2px 0 0 var(--border); }
.synth-ft-table thead th.synth-ft-sticky{ z-index:3; }

/* Encart RGPD à l'inscription */
.rgpd-box{ background:var(--bg-alt); border:1px solid var(--border); border-radius:8px; padding:.8rem 1rem; }
.rgpd-check{ display:flex; gap:.5rem; align-items:flex-start; font-size:.9rem; cursor:pointer; }
.rgpd-check input{ margin-top:.2rem; flex-shrink:0; }
.rgpd-text{ font-size:.76rem; color:var(--text-muted); line-height:1.5; margin:.6rem 0 0; }

/* Devoirs publics : swipe DS/DM + thèmes */
.swipe-track--2{ width:200%; }
.swipe-track--2 .swipe-pane{ width:50%; flex:0 0 50%; }
.devoir-theme{ margin-bottom:1.5rem; }
.devoir-theme__title{ font-size:1rem; font-weight:700; color:var(--primary); border-bottom:2px solid var(--border); padding-bottom:.3rem; margin-bottom:.8rem; display:flex; align-items:center; gap:.5rem; }
.devoir-theme__count{ font-size:.72rem; background:var(--bg-alt); color:var(--text-muted); border-radius:10px; padding:.1rem .5rem; font-weight:700; }

/* Quiz corrigé : détail des réponses données */
.quiz-done__list{ list-style:none; padding:0; margin:.5rem 0 0; display:flex; flex-direction:column; gap:.6rem; }
.quiz-done__q{ font-weight:600; font-size:.9rem; margin-bottom:.3rem; }
.quiz-done__opts{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.2rem; }
.quiz-done__opt{ font-size:.85rem; padding:.2rem .5rem; border-radius:6px; display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; }
.quiz-done__opt.qdo-correct{ background:#dcfce7; color:#166534; }
.quiz-done__opt.qdo-wrong{ background:#fee2e2; color:#991b1b; }
.qdo-tag{ font-size:.68rem; font-weight:700; padding:.05rem .4rem; border-radius:8px; }
.qdo-tag--ok{ background:#16a34a; color:#fff; }
.qdo-tag--ko{ background:#dc2626; color:#fff; }
.quiz-done__none{ font-size:.8rem; color:var(--text-muted); font-style:italic; margin:.2rem 0 0; }
.quiz-done__expl{ font-size:.82rem; color:var(--text-muted); margin:.3rem 0 0; padding-left:.3rem; border-left:2px solid var(--border); }
.quiz-done__list > li{ border:1px solid var(--border); border-radius:8px; padding:.5rem .7rem; }

/* Pastilles de notification quiz sur les onglets TP */
.tp-tab-notif{ font-size:.7rem; margin-left:.15rem; vertical-align:middle; animation:tpNotifPulse 2s ease-in-out infinite; }
@keyframes tpNotifPulse{ 0%,100%{opacity:1;} 50%{opacity:.45;} }

/* ═══ Quiz : onglets par thème + sous-groupes par mode + encarts compacts ═══ */
.quiz-modegroup{ margin-bottom:1.3rem; }
.quiz-modegroup__title{ font-size:.9rem; font-weight:700; color:var(--text); margin:0 0 .6rem; display:flex; align-items:center; gap:.5rem; }
.quiz-modegroup__count{ font-size:.7rem; background:var(--bg-alt); color:var(--text-muted); border-radius:10px; padding:.08rem .5rem; font-weight:700; }
.quiz-cards--compact{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:.6rem; }
.quiz-card--compact{ position:relative; padding:.6rem .7rem; border:1px solid var(--border); border-radius:10px; background:var(--bg-card); text-decoration:none; color:inherit; display:flex; flex-direction:column; gap:.3rem; transition:transform .12s, box-shadow .12s, border-color .12s; }
.quiz-card--compact:hover{ transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.08); border-color:var(--primary); }
.quiz-card--compact .quiz-card__title{ font-size:.88rem; font-weight:600; line-height:1.25; }
.quiz-card--compact .quiz-card__meta{ font-size:.76rem; color:var(--text-muted); display:flex; align-items:center; gap:.25rem; flex-wrap:wrap; }
.quiz-card--compact.quiz-card--closed{ opacity:.6; }
.quiz-card--compact.quiz-card--scheduled{ border-style:dashed; }
.quiz-card__new{ position:absolute; top:-8px; right:-6px; background:#dc2626; color:#fff; font-size:.62rem; font-weight:800; padding:.1rem .4rem; border-radius:8px; box-shadow:0 2px 5px rgba(0,0,0,.2); animation:tpNotifPulse 2s ease-in-out infinite; }
.quiz-new-dot{ font-size:.72rem; margin-left:.15rem; animation:tpNotifPulse 2s ease-in-out infinite; }

/* Aperçu de pondération des composantes du TP */
.coef-example{ margin-top:.9rem; padding:.6rem .8rem; background:var(--bg-alt,rgba(0,0,0,.03)); border-radius:8px; font-size:.9rem; color:var(--text); }
.coef-example em{ color:var(--text-muted); }
.tp-note-coef{ color:var(--text-muted); font-size:.85em; }

/* Modale historique des colles (dashboard) */
.evalblock__row--click{ cursor:pointer; }
.evalblock__row--click:hover{ background:var(--bg-alt,rgba(0,0,0,.03)); }
.ch-modal{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; z-index:1000; padding:1rem; }
.ch-modal[hidden]{ display:none; }
.ch-modal__box{ background:var(--bg-card,#fff); border-radius:12px; max-width:560px; width:100%; max-height:85vh; display:flex; flex-direction:column; box-shadow:0 10px 40px rgba(0,0,0,.25); }
.ch-modal__head{ display:flex; align-items:center; justify-content:space-between; padding:.9rem 1.2rem; border-bottom:1px solid var(--border); }
.ch-modal__head h2{ margin:0; font-size:1.1rem; }
.ch-modal__close{ background:none; border:0; font-size:1.2rem; cursor:pointer; color:var(--text-muted); line-height:1; }
.ch-modal__body{ overflow-y:auto; padding:1rem 1.2rem; }
.ch-sess{ border:1px solid var(--border); border-radius:10px; padding:.7rem .9rem; margin-bottom:.7rem; }
.ch-sess__top{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.ch-sess__date{ font-weight:700; font-size:.9rem; }
.ch-sess__coll{ color:var(--text-muted); font-size:.85rem; }
.ch-sess__note{ margin-left:auto; font-weight:700; padding:.1rem .5rem; border-radius:8px; }
.ch-sess__theme{ font-size:.85rem; color:var(--text-muted); margin-top:.25rem; }
.ch-sess__points{ display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.4rem; }
.ch-point{ background:var(--bg-alt,rgba(0,0,0,.04)); border:1px solid var(--border); border-radius:8px; padding:.1rem .45rem; font-size:.76rem; }
.ch-sess__comment{ margin-top:.4rem; font-style:italic; font-size:.85rem; color:var(--text); }

/* Coefficients par TP + notes de quiz dans la correction */
.tpcoef{ margin:.6rem 0; border:1px solid var(--border); border-radius:10px; padding:.3rem .6rem; background:var(--bg-alt,rgba(0,0,0,.02)); }
.tpcoef > summary{ cursor:pointer; font-weight:600; padding:.35rem; }
.tpcoef__form{ padding:.4rem .3rem .2rem; }
.tpcoef__row{ display:flex; flex-wrap:wrap; gap:.7rem; align-items:center; }
.tpcoef__row label{ display:inline-flex; align-items:center; gap:.35rem; font-size:.9rem; }
.tpcoef__row input{ width:70px; padding:.25rem .4rem; border:1px solid var(--border); border-radius:6px; }
.tpcoef__hint{ font-size:.78rem; color:var(--text-muted); margin:.5rem 0 0; }
.eval-quiznotes{ display:flex; flex-wrap:wrap; gap:.5rem .9rem; align-items:center; padding:.5rem .7rem; margin:.5rem 0; background:rgba(37,99,235,.05); border:1px solid var(--border); border-radius:8px; font-size:.88rem; }
.eval-quiznotes__title{ font-weight:600; }
.eval-quiznotes__coef{ color:var(--text-muted); font-size:.82em; }
.eval-quiznotes__hint{ flex-basis:100%; font-size:.76rem; color:var(--text-muted); }

/* ═══ Volet 5 : Retravailler une capacité ═══ */
.rt-status{ display:flex; flex-wrap:wrap; gap:.8rem 1.2rem; align-items:center; margin:.8rem 0 1rem; }
.rt-gauges{ display:flex; flex-wrap:wrap; gap:.5rem; }
.rt-gauge{ display:inline-flex; align-items:center; gap:.35rem; font-size:.8rem; background:var(--bg-alt,rgba(0,0,0,.03)); border:1px solid var(--border); border-radius:8px; padding:.15rem .5rem; }
.rt-gauge__lbl{ font-weight:600; color:var(--text-muted); }
.rt-gauge__bar{ width:44px; height:6px; border-radius:3px; background:rgba(0,0,0,.1); overflow:hidden; }
.rt-gauge__fill{ display:block; height:100%; border-radius:3px; }
.rt-gauge__val{ font-weight:700; }
.rt-gauge--low  .rt-gauge__fill{ background:#dc2626; } .rt-gauge--low  .rt-gauge__val{ color:#dc2626; }
.rt-gauge--mid  .rt-gauge__fill{ background:#f59e0b; } .rt-gauge--mid  .rt-gauge__val{ color:#b45309; }
.rt-gauge--high .rt-gauge__fill{ background:#16a34a; } .rt-gauge--high .rt-gauge__val{ color:#15803d; }
.rt-gauge--empty{ color:var(--text-muted); }
.rt-progress{ font-size:.9rem; }
.rt-progress--done{ color:#15803d; font-weight:600; }
.rt-dots{ display:inline-flex; gap:.25rem; margin-left:.4rem; vertical-align:middle; }
.rt-dot{ width:10px; height:10px; border-radius:50%; background:rgba(0,0,0,.15); display:inline-block; }
.rt-dot--on{ background:#16a34a; }
.rt-activity{ border:1px solid var(--border); border-radius:12px; padding:1rem 1.1rem; margin-top:.5rem; }
.rt-activity__head{ display:flex; justify-content:space-between; align-items:center; gap:.6rem; margin-bottom:.7rem; flex-wrap:wrap; }
.rt-activity__kind{ font-weight:700; padding:.15rem .55rem; border-radius:8px; }
.rt-k-exo{ background:#eef2ff; color:#3730a3; } .rt-k-quiz{ background:#ecfeff; color:#155e75; }
.rt-activity__pool{ font-size:.78rem; color:var(--text-muted); }
.rt-done{ margin-top:1rem; padding-top:.8rem; border-top:1px dashed var(--border); }
.rt-done__label{ font-size:.88rem; margin-bottom:.5rem; }
.rt-diffbtns{ display:flex; gap:.5rem; flex-wrap:wrap; }
.rt-diff--easy{ background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.rt-diff--mid{ background:#fef9c3; color:#854d0e; border:1px solid #fde68a; }
.rt-diff--hard{ background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.rt-relaunch{ margin-top:.9rem; }

/* Jauges compactes + clignotement dans le programme */
.cap-gauges{ display:flex; flex-wrap:wrap; gap:.35rem; margin:.35rem 0; }
.cap-gauge{ display:inline-flex; align-items:center; gap:.25rem; font-size:.72rem; padding:.05rem .4rem; border-radius:6px; border:1px solid var(--border); background:var(--bg-card,#fff); }
.cap-gauge__b{ width:30px; height:5px; border-radius:3px; background:rgba(0,0,0,.1); overflow:hidden; }
.cap-gauge__f{ display:block; height:100%; }
.cap-gauge--low .cap-gauge__f{ background:#dc2626; } .cap-gauge--low{ color:#dc2626; font-weight:600; }
.cap-gauge--mid .cap-gauge__f{ background:#f59e0b; }
.cap-gauge--high .cap-gauge__f{ background:#16a34a; }
.btn-retravail{ background:#dc2626; color:#fff; border:0; }
.btn-retravail:hover{ background:#b91c1c; color:#fff; }
.cap-todo-tag{ font-size:.72rem; color:#dc2626; font-weight:600; margin-left:.3rem; }
@keyframes capBlink { 0%,100%{ box-shadow:0 0 0 0 rgba(220,38,38,.55);} 50%{ box-shadow:0 0 0 5px rgba(220,38,38,0);} }
.cap-blink{ animation:capBlink 1.4s ease-in-out infinite; border-radius:8px; }
.cap-blink--2{ animation-duration:2s; }
.cap-blink--1{ animation-duration:2.8s; opacity:.9; }
@media (prefers-reduced-motion: reduce){ .cap-blink,.cap-blink--1,.cap-blink--2{ animation:none; outline:2px solid rgba(220,38,38,.6); } }

/* Anneaux circulaires de notes (jauge type chargement, sans cadre) */
.cap-rings{ display:inline-flex; align-items:center; gap:.4rem; margin-right:.3rem; }
.cap-ring{ display:inline-flex; flex-direction:column; align-items:center; gap:0; line-height:1; }
.cap-ring__lbl{ font-size:.58rem; color:var(--text-muted); font-weight:600; letter-spacing:.02em; opacity:.35; transition:opacity .2s ease; }
.cap-ring:hover .cap-ring__lbl{ opacity:1; }
.point-icon--disabled{ opacity:.5; cursor:not-allowed; filter:grayscale(.4); }
.point-icon--disabled:hover{ background:inherit; }

/* Pastille de maîtrise dans la modale historique de colle */
.ch-point{ display:inline-flex; align-items:center; gap:.35rem; }
.ch-dot{ width:9px; height:9px; border-radius:50%; flex:0 0 9px; }
.qzi-counted{ color:#15803d; font-weight:600; }

/* ═══ Points admin : comptages, jauges, modales ═══ */
.pt-counts{ display:flex; flex-wrap:wrap; gap:.35rem; margin:.35rem 0 .3rem; }
.pt-count{ font-size:.74rem; padding:.12rem .5rem; border-radius:12px; border:1px solid var(--border); background:var(--bg-card,#fff); color:var(--text); display:inline-flex; align-items:center; gap:.2rem; }
.pt-count--btn{ cursor:pointer; transition:background .15s, border-color .15s; }
.pt-count--btn:hover{ background:#eef2ff; border-color:#c7d2fe; }
.pt-count strong{ font-weight:700; }
.pt-gauges{ display:flex; flex-wrap:wrap; gap:.45rem; margin-top:.15rem; }
.pt-gauge{ display:inline-flex; flex-direction:column; align-items:center; gap:0; line-height:1; }
.pt-gauge__lbl{ font-size:.55rem; color:var(--text-muted); font-weight:600; opacity:.5; }
.pt-modal{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; z-index:1000; padding:1rem; }
.pt-modal[hidden]{ display:none; }
.pt-modal__box{ background:var(--bg-card,#fff); border-radius:12px; max-width:600px; width:100%; max-height:86vh; display:flex; flex-direction:column; box-shadow:0 12px 44px rgba(0,0,0,.28); }
.pt-modal__head{ display:flex; align-items:center; justify-content:space-between; padding:.9rem 1.2rem; border-bottom:1px solid var(--border); }
.pt-modal__head h2{ margin:0; font-size:1.05rem; }
.pt-modal__close{ background:none; border:0; font-size:1.2rem; cursor:pointer; color:var(--text-muted); }
.pt-modal__body{ overflow-y:auto; padding:1rem 1.2rem; }
.pt-sub{ font-size:.85rem; color:var(--text-muted); margin:0 0 .8rem; }
.pt-empty,.pt-err,.pt-loading{ color:var(--text-muted); padding:1rem 0; text-align:center; }
.pt-err{ color:#dc2626; }
.pt-exo-row{ display:flex; gap:.9rem; align-items:center; padding:.6rem 0; border-bottom:1px solid var(--border); }
.pt-exo-info{ flex:1; min-width:0; }
.pt-exo-title{ font-weight:600; font-size:.92rem; }
.pt-exo-meta{ font-size:.76rem; color:var(--text-muted); margin:.25rem 0 .4rem; }
.pt-nopie{ width:72px; height:72px; border-radius:50%; border:2px dashed var(--border); display:flex; align-items:center; justify-content:center; font-size:.64rem; color:var(--text-muted); text-align:center; flex:0 0 72px; }
.pt-csess{ border:1px solid var(--border); border-radius:8px; margin-bottom:.5rem; }
.pt-csess>summary{ cursor:pointer; padding:.5rem .7rem; display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; font-size:.86rem; }
.pt-csess-coll{ color:var(--text-muted); }
.pt-csess-n{ margin-left:auto; font-size:.74rem; background:var(--bg-alt,rgba(0,0,0,.04)); border-radius:10px; padding:.05rem .5rem; }
.pt-csess-theme{ padding:.3rem .8rem; font-size:.82rem; color:var(--text-muted); }
.pt-cstuds{ padding:.2rem .8rem .5rem; display:flex; flex-direction:column; gap:.25rem; }
.pt-cstud{ display:flex; align-items:center; gap:.4rem; font-size:.85rem; }
.pt-cfull{ padding:.3rem .8rem .6rem; border-top:1px dashed var(--border); font-size:.82rem; display:flex; flex-direction:column; gap:.3rem; }
.pt-ccom{ color:var(--text); }
.pt-selrow{ margin:.3rem 0 .6rem; font-size:.85rem; }
.pt-chart{ width:100%; height:auto; }

/* ═══ TD : matrice capacités × exercices/quiz ═══ */
.mx-wrap{ margin:1rem 0 2rem; }
.mx-title{ font-size:1.1rem; margin:0 0 .3rem; }
.mx-sub{ font-size:.85rem; color:var(--text-muted); margin:0 0 .7rem; max-width:720px; }
.mx-themes{ display:flex; flex-wrap:wrap; gap:.4rem .7rem; margin-bottom:.6rem; }
.mx-theme{ display:inline-flex; align-items:center; gap:.3rem; font-size:.85rem; background:var(--bg-alt,rgba(0,0,0,.03)); border:1px solid var(--border); border-radius:14px; padding:.15rem .6rem; cursor:pointer; }
.mx-legend{ display:flex; flex-wrap:wrap; gap:.4rem .9rem; font-size:.74rem; color:var(--text-muted); margin-bottom:.5rem; }
.mx-container{ overflow-x:auto; background:var(--bg-card,#fff); border:1px solid var(--border); border-radius:10px; padding:.2rem .4rem; }
.mx-empty{ color:var(--text-muted); padding:1rem 0; }
.mx-table{ border-collapse:collapse; }
.mx-table th, .mx-table td{ border:none; padding:0; background:transparent !important; color:var(--text); font-weight:400; }
.mx-table thead th{ background:transparent !important; color:var(--text) !important; padding:0; text-align:center; }
.mx-table thead{ border-bottom:2px solid var(--border); }
.mx-corner{ width:190px; }
.mx-colh{ vertical-align:bottom; padding:.2rem .12rem !important; }
.mx-colh__icons{ display:flex; flex-direction:column; align-items:center; gap:1px; min-height:15px; margin-bottom:.15rem; }
.mx-ic{ font-size:.7rem; line-height:1; }
.mx-vuchk{ cursor:pointer; }
.mx-vuchk input{ margin:0; transform:scale(.85); }
.mx-colh__icon{ display:flex; align-items:center; justify-content:center; width:30px; height:30px; margin:0 auto; border-radius:8px; text-decoration:none; font-size:1rem; transition:background .15s, transform .1s; cursor:pointer; }
.mx-colh__icon--exo{ background:#eef2ff; }
.mx-colh__icon--quiz{ background:#ecfeff; }
.mx-colh__icon:hover{ transform:translateY(-1px); filter:brightness(.96); }
.mx-rowh{ text-align:left; font-size:.82rem; padding:.3rem .5rem !important; color:var(--text); max-width:210px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mx-cell{ text-align:center; padding:.3rem !important; }
.mx-cell--on:hover{ background:rgba(37,99,235,.06) !important; }
.mx-dot{ width:11px; height:11px; border-radius:50%; background:var(--primary,#2563eb); display:inline-block; box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.mx-table tbody tr:hover td{ background:#f9f8f5 !important; }
.mx-table tbody tr:hover .mx-rowh{ color:var(--primary,#2563eb); font-weight:600; }
.mx-table tbody tr{ border-bottom:1px solid var(--border); }
/* Info-bulle du nom d'exercice (survol / tap) */
.mx-tip{ position:absolute; z-index:1200; background:#1f2937; color:#fff; padding:.4rem .6rem; border-radius:8px; font-size:.8rem; box-shadow:0 6px 20px rgba(0,0,0,.25); max-width:260px; display:flex; gap:.5rem; align-items:center; }
.mx-tip[hidden]{ display:none; }
.mx-tip__name{ font-weight:600; }
.mx-tip__open{ color:#93c5fd; text-decoration:none; white-space:nowrap; font-weight:600; }

/* Toggle « vu en cours » sur la page exercice */
.exo-vu-toggle{ display:inline-flex; align-items:center; gap:.35rem; font-size:.85rem; cursor:pointer; padding:.2rem .5rem; border:1px solid var(--border); border-radius:8px; }
.exo-vu-toggle input{ margin:0; }
.exo-vu-msg{ font-size:.8rem; color:var(--success,#16a34a); }
.exo-vu-btn{ background:none; border:none; cursor:pointer; font-size:.95rem; opacity:.6; }
.exo-vu-btn.is-on{ opacity:1; }
.exo-vu-btn:hover{ opacity:1; }

/* Points admin : items + jauges alignés à droite sur une ligne */
.point-item{ align-items:center; }
.point-item__metrics{ display:flex; align-items:center; gap:.5rem .8rem; flex-shrink:0; margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }
.point-item__metrics .pt-counts{ margin:0; flex-wrap:nowrap; }
.point-item__metrics .pt-gauges{ margin:0; flex-wrap:nowrap; }
.point-item__metrics .pt-count{ font-size:.72rem; padding:.1rem .45rem; }
@media (max-width: 780px){ .point-item{ align-items:flex-start; flex-wrap:wrap; } .point-item__metrics{ margin-left:0; justify-content:flex-start; width:100%; margin-top:.3rem; } }
/* Pastille de maîtrise (détail des colles) */
.pt-mastery{ display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:20px; padding:0 .35rem; border-radius:10px; color:#fff; font-weight:700; font-size:.72rem; }
.pt-cnote{ color:var(--text-muted); font-size:.8rem; }

/* Sélecteur de points du TP (filtre par thème + recherche, façon éditeur de cours) */
.tppt-pick{ border:1px solid var(--border); border-radius:8px; padding:.55rem .65rem; background:var(--bg-alt,rgba(0,0,0,.02)); }
.tppt-themes{ display:flex; flex-wrap:wrap; gap:.35rem; margin-bottom:.5rem; }
.tppt-theme{ font-size:.78rem; padding:.15rem .6rem; border-radius:14px; border:1px solid var(--border); background:var(--bg-card,#fff); cursor:pointer; color:var(--text-muted); transition:background .15s,color .15s; }
.tppt-theme.is-on{ background:var(--primary); color:#fff; border-color:var(--primary); }
.tppt-search{ margin-bottom:.5rem; }
.tppt-list{ max-height:230px; overflow-y:auto; }
.tppt-group-items{ display:flex; flex-wrap:wrap; gap:.2rem .9rem; padding:.1rem .2rem .35rem; }

/* Page de choix classe/discipline (phase d'essai) */
.choix-hero{ text-align:center; padding:2rem 1rem 3rem; max-width:560px; margin:0 auto; }
/* Simulation prisme + rayon : épurée, sans cadre ni fond */
.prismsim{ max-width:360px; margin:0 auto 1.2rem; touch-action:none; }
.prismsim__svg{ width:100%; height:auto; display:block; overflow:visible; }
.prismsim__glass{ fill:rgba(37,99,235,.08); stroke:var(--primary); stroke-width:2; stroke-linejoin:round; }
.prismsim__handle{ cursor:grab; }
.prismsim__handle:active{ cursor:grabbing; }
.prismsim__handle circle{ fill:#fff; stroke:var(--primary); stroke-width:2; transition:transform .1s ease; }
.prismsim__handle:hover circle{ stroke-width:2.6; }
.prismsim__handle text{ font-size:11px; text-anchor:middle; dominant-baseline:central; fill:var(--primary); pointer-events:none; }
.prismsim__handle--ray circle{ stroke:#f59e0b; }
.prismsim__handle--ray text{ fill:#f59e0b; }
.choix-title{ font-size:1.6rem; margin:.2rem 0 .6rem; }
.choix-lead{ color:var(--text-muted); font-size:1rem; line-height:1.55; margin:0 auto 1.3rem; max-width:480px; }
.choix-note{ background:#fef9c3; border:1px solid #fde68a; color:#854d0e; border-radius:10px; padding:.8rem 1rem; font-size:.92rem; margin:0 auto 1.2rem; max-width:480px; }
.choix-active{ display:inline-flex; align-items:center; gap:.5rem; font-size:.9rem; color:var(--text); background:var(--bg-alt,rgba(0,0,0,.03)); border:1px solid var(--border); border-radius:20px; padding:.35rem .9rem; margin-bottom:1.4rem; }
.choix-active__dot{ width:9px; height:9px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.2); }

/* Picker de questions (assemblage de quiz) */
.qz-grpn{ font-size:.7rem; background:var(--bg-alt,rgba(0,0,0,.05)); border-radius:10px; padding:.02rem .4rem; margin-left:.3rem; color:var(--text-muted); }
.qz-q{ display:flex; align-items:center; gap:.4rem; padding:.28rem .3rem; border-radius:7px; border-bottom:1px solid var(--border); }
.qz-q:hover{ background:var(--bg-alt,rgba(0,0,0,.02)); }
.qz-q__pick{ display:flex; align-items:center; gap:.45rem; flex:1; min-width:0; cursor:pointer; font-size:.86rem; }
.qz-q__txt{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.qz-q__tools{ display:flex; align-items:center; gap:.3rem; flex-shrink:0; }
.qz-usedin{ font-size:.7rem; color:#0369a1; background:#e0f2fe; border-radius:10px; padding:.05rem .45rem; white-space:nowrap; }
.qz-usedin--no{ color:var(--text-muted); background:transparent; }
.qz-qbtn{ background:none; border:1px solid var(--border); border-radius:6px; cursor:pointer; font-size:.78rem; padding:.1rem .35rem; text-decoration:none; color:var(--text); line-height:1.4; }
.qz-qbtn:hover{ border-color:var(--primary); }
.qz-q__detail{ flex-basis:100%; margin:.2rem 0 .3rem 1.7rem; padding:.4rem .6rem; background:var(--bg-alt,rgba(0,0,0,.03)); border-radius:8px; font-size:.82rem; }
.qz-det-opts{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.15rem; }
.qz-det-opts .qz-opt-ok{ color:#15803d; font-weight:600; }
.qz-det-expl{ margin-top:.35rem; color:var(--text-muted); }
.qz-det-used{ margin-top:.35rem; }
.qz-det-used a{ color:#0369a1; }

/* Cours/TD & Animations : regroupement par thème */
.lecons-theme{ margin-bottom:1.1rem; }
.lecons-theme__title{ font-size:.82rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em; padding:.3rem 0; border-bottom:1px solid var(--border); margin-bottom:.4rem; }

/* Connexion unifiée : choix du profil */
.cx-roles{ display:flex; gap:.4rem; margin:.6rem 0 .3rem; }
.cx-role{ flex:1; padding:.55rem .3rem; border:1.5px solid var(--border); border-radius:9px; background:var(--bg-card,#fff); cursor:pointer; font-weight:600; font-size:.82rem; color:var(--text-muted); transition:all .15s; }
.cx-role.is-on{ border-color:var(--primary); color:var(--primary); background:rgba(37,99,235,.06); }
.cx-hint{ font-size:.82rem; color:var(--text-muted); margin:.2rem 0 1rem; min-height:1.1em; }
/* Bandeau mode observateur */
.externe-banner{ background:#7c3aed; color:#fff; text-align:center; font-size:.85rem; font-weight:600; padding:.35rem 1rem; }
.externe-banner a{ color:#fff; text-decoration:underline; }

/* Swipe à 4 volets + liste "utilisé dans" (quiz) */
.swipe-track--4{ width:400%; }
.swipe-track--4 .swipe-pane{ width:25%; flex:0 0 25%; }
.qz-usedlist{ font-size:.72rem; color:var(--text-muted); margin-top:.2rem; }
.qz-usedlist a{ color:#0369a1; margin-right:.4rem; }

/* TP : état brouillon / verrou */
.tp-locked-tag{ display:inline-block; background:#fee2e2; color:#b91c1c; border-radius:10px; padding:.05rem .5rem; font-size:.72rem; font-weight:700; margin-left:.3rem; }
.tp-restore-btn{ background:none; border:1px solid var(--border); border-radius:8px; padding:.15rem .6rem; font-size:.82rem; cursor:pointer; margin-left:.4rem; color:var(--text); }
.tp-restore-btn:hover{ border-color:var(--primary); color:var(--primary); }

/* tp-eval : état soumis / brouillon */
.eval-state{ display:inline-block; font-size:.68rem; font-weight:700; border-radius:10px; padding:.04rem .45rem; margin-left:.4rem; vertical-align:middle; }
.eval-state--sub{ background:#dcfce7; color:#15803d; }
.eval-state--draft{ background:#fef9c3; color:#854d0e; }

/* Correction de TP publiée (côté élève) */
.tp-correction{ margin:.2rem 0 1rem; border:1px solid #bbf7d0; border-left:4px solid #22c55e; background:#f0fdf4; border-radius:8px; padding:.5rem .8rem; }
.tp-correction__label{ font-size:.72rem; font-weight:800; color:#15803d; text-transform:uppercase; letter-spacing:.03em; margin-bottom:.2rem; }
.tp-correction__body{ font-size:.92rem; }
.tp-correction__body pre{ background:#0f172a; color:#e2e8f0; padding:.6rem .8rem; border-radius:6px; overflow:auto; }
/* Aperçu de l'énoncé dans l'éditeur de correction (admin) */
.tpcorr-orig{ background:#f8fafc; border:1px solid var(--border); border-radius:8px; padding:.5rem .7rem; margin-bottom:.6rem; }
.tpcorr-orig__label{ font-size:.7rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; margin-bottom:.25rem; }
.tpcorr-orig pre{ margin:0; background:#0f172a; color:#e2e8f0; padding:.5rem .7rem; border-radius:6px; overflow:auto; font-size:.85rem; }
.tpcorr-orig__text{ font-size:.9rem; white-space:pre-wrap; }

/* Connexion : 4 profils (retour à la ligne sur mobile) */
.cx-roles--4{ flex-wrap:wrap; }
.cx-roles--4 .cx-role{ flex:1 1 46%; min-width:120px; }

/* Accordéon du tableau des capacités (bas de page) */
.mx-acc{ border:1px solid var(--border); border-radius:12px; padding:.2rem .4rem; margin-top:1.5rem; background:var(--bg-card,#fff); }
.mx-acc__sum{ cursor:pointer; font-weight:700; font-size:1rem; padding:.6rem .5rem; list-style:none; }
.mx-acc__sum::-webkit-details-marker{ display:none; }
.mx-acc__sum::before{ content:'▸ '; color:var(--text-muted); }
.mx-acc[open] .mx-acc__sum::before{ content:'▾ '; }
.mx-acc[open] .mx-acc__sum{ border-bottom:1px solid var(--border); margin-bottom:.5rem; }

/* Tableau des capacités des TP (panneau repliable) */
.tpmx-btn.is-on{ background:var(--primary); color:#fff; }
.tpmx-panel{ border:1px solid var(--border); border-radius:12px; padding:.8rem 1rem; margin:.4rem 0 1.2rem; background:var(--bg-card,#fff); }
.tpmx-panel__head{ font-weight:700; margin-bottom:.6rem; }
.tpmx-panel__hint{ font-weight:400; font-size:.8rem; color:var(--text-muted); }
.tpmx-theme{ font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--text-muted); margin:.8rem 0 .3rem; }
.tpmx-scroll{ overflow-x:auto; }
.tpmx-table{ border-collapse:collapse; font-size:.82rem; }
.tpmx-table th, .tpmx-table td{ border:1px solid var(--border); }
.tpmx-corner{ background:var(--bg-subtle,#f8fafc); }
.tpmx-colh{ vertical-align:bottom; padding:.3rem; background:var(--bg-subtle,#f8fafc); max-width:38px; }
.tpmx-colh span{ display:block; writing-mode:vertical-rl; transform:rotate(180deg); white-space:nowrap; margin:0 auto; max-height:150px; overflow:hidden; text-overflow:ellipsis; }
.tpmx-rowh{ text-align:left; padding:.3rem .5rem; font-weight:500; background:var(--bg-subtle,#f8fafc); position:sticky; left:0; min-width:180px; max-width:320px; }
.tpmx-cell{ text-align:center; width:34px; height:30px; }
.tpmx-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--primary); }

/* Points : réordonnancement par glisser-déposer */
.point-drag{ display:none; cursor:grab; color:var(--text-muted); font-size:1.1rem; padding:0 .3rem; user-select:none; align-self:center; }
body.pt-reordering .point-drag{ display:inline-block; }
body.pt-reordering .point-item{ cursor:grab; }
.point-item.pt-dragging{ opacity:.5; outline:2px dashed var(--primary); }
.pt-reorder-bar{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin:.2rem 0 .6rem; }
.pt-reorder-hint{ font-size:.8rem; color:var(--text-muted); }
#pt-reorder-toggle.is-on{ background:var(--primary); color:#fff; }

/* Annotation des copies PDF de TP */
.tpa-main{ max-width:1300px; }
.tpa-nav{ display:flex; flex-wrap:wrap; gap:.35rem; margin:.4rem 0 .8rem; }
.tpa-nav__item{ font-size:.8rem; padding:.2rem .55rem; border:1px solid var(--border); border-radius:14px; text-decoration:none; color:var(--text); background:var(--bg-card,#fff); }
.tpa-nav__item.is-cur{ border-color:var(--primary); color:var(--primary); font-weight:700; }
.tpa-nav__note{ background:#dcfce7; color:#15803d; border-radius:8px; padding:0 .3rem; font-weight:700; font-size:.72rem; }
.tpa-layout{ display:grid; grid-template-columns:1fr 300px; gap:1rem; align-items:start; }
.tpa-hint{ font-size:.82rem; color:var(--text-muted); margin:0 0 .4rem; }
.tpa-pdf{ position:relative; max-height:78vh; overflow:auto; border:1px solid var(--border); border-radius:8px; background:#525659; padding:8px; }
.tpa-pdf__page{ display:block; margin:0 auto 8px; box-shadow:0 2px 8px rgba(0,0,0,.4); }
.tpa-annot{ position:absolute; transform:translate(-50%,-50%); cursor:pointer; font-weight:800; user-select:none; z-index:5; }
.tpa-annot--check{ color:#16a34a; font-size:1.5rem; text-shadow:0 0 3px #fff,0 0 3px #fff; }
.tpa-annot--cross{ color:#dc2626; font-size:1.5rem; text-shadow:0 0 3px #fff,0 0 3px #fff; }
.tpa-annot--comment{ font-size:1.2rem; }
.tpa-annot--points{ background:#1e3a8a; color:#fff; border-radius:10px; padding:.05rem .4rem; font-size:.8rem; box-shadow:0 1px 4px rgba(0,0,0,.4); }
.tpa-ctx{ position:absolute; z-index:20; background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.25); display:flex; flex-direction:column; overflow:hidden; }
.tpa-ctx button{ border:0; background:none; padding:.45rem .8rem; text-align:left; cursor:pointer; font:inherit; white-space:nowrap; }
.tpa-ctx button:hover{ background:var(--bg-subtle,#f1f5f9); }
.tpa-side{ display:flex; flex-direction:column; gap:.7rem; position:sticky; top:70px; }
.tpa-card{ border:1px solid var(--border); border-radius:10px; padding:.7rem .8rem; background:var(--bg-card,#fff); }
.tpa-card__title{ font-size:.8rem; font-weight:700; margin-bottom:.4rem; }
.tpa-sum{ font-size:.95rem; margin-bottom:.4rem; }
.tpa-sum strong{ color:var(--primary); }
.tpa-cc{ font-size:.82rem; padding:.2rem 0; border-bottom:1px solid var(--border); }
.tpa-cc__n{ display:inline-block; min-width:18px; height:18px; text-align:center; background:var(--primary); color:#fff; border-radius:50%; font-size:.7rem; font-weight:700; }
.tpa-empty{ font-size:.8rem; color:var(--text-muted); }
.tpa-status{ font-size:.82rem; text-align:center; }
@media (max-width: 900px){ .tpa-layout{ grid-template-columns:1fr; } .tpa-side{ position:static; } }

/* Tableau des capacités : en-têtes = icône du thème (lisible sur fond clair) */
.tpmx-table th, .tpmx-table td{ color:var(--text); }
.tpmx-colh{ padding:.25rem; width:34px; max-width:34px; text-align:center; }
.tpmx-ico{ font-size:.85rem; line-height:1; display:block; }
/* Capacités traitées par le TP (tableau sans en-tête, au-dessus du titre) */
.tpcap-table{ border-collapse:collapse; width:100%; margin:0 0 .5rem; font-size:.78rem; }
.tpcap-table td{ border:1px solid var(--border); padding:.18rem .5rem; }
.tpcap-table__mat{ white-space:nowrap; color:var(--text-muted); background:var(--bg-subtle,#f8fafc); width:1%; }
.tpcap-table__cap{ color:var(--text); }
/* Boutons discrets par cellule : enregistrer + versions */
.tp-cellsave{ display:inline-flex; align-items:center; gap:.25rem; margin-left:auto; }
.tp-cellsave__btn{ background:none; border:1px solid var(--border); border-radius:6px; padding:.05rem .35rem; cursor:pointer; font-size:.85rem; line-height:1.3; opacity:.65; }
.tp-cellsave__btn:hover{ opacity:1; border-color:var(--primary); }
.tp-cellsave__vers{ display:inline-flex; align-items:center; gap:.1rem; }
.tp-vers__arrow{ background:none; border:0; cursor:pointer; font-size:1rem; line-height:1; color:var(--text-muted); padding:0 .15rem; }
.tp-vers__arrow:hover{ color:var(--primary); }
.tp-vers__label{ font-size:.7rem; color:var(--text-muted); min-width:26px; text-align:center; }
.tp-vers-hint{ font-size:.8rem; color:var(--text-muted); margin-left:.4rem; }
.tp-cell[data-dirty="1"]{ box-shadow:inset 3px 0 0 #f59e0b; }
/* Barre de cellule code (fond sombre) : boutons lisibles */
.tp-cell__toolbar .tp-cellsave__btn{ border-color:#475569; color:#e2e8f0; }
.tp-cell__toolbar .tp-vers__arrow, .tp-cell__toolbar .tp-vers__label{ color:#cbd5e1; }

/* Connexion : sous-profils de l'observateur */
.cx-subs{ display:flex; gap:.35rem; margin:.1rem 0 .3rem; flex-wrap:wrap; }
.cx-subs[hidden]{ display:none; }
.cx-sub{ flex:1 1 30%; min-width:110px; padding:.4rem .3rem; border:1px dashed var(--border); border-radius:8px; background:var(--bg-card,#fff); cursor:pointer; font-size:.78rem; font-weight:600; color:var(--text-muted); }
.cx-sub.is-on{ border-style:solid; border-color:#7c3aed; color:#7c3aed; background:rgba(124,58,237,.06); }

/* TP : étudiant référent (travail de groupe) */
.tp-referent{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin:.4rem 0 .2rem; padding:.4rem .6rem; background:#f5f3ff; border:1px solid #ddd6fe; border-radius:8px; font-size:.85rem; }
.tp-referent__lbl{ font-weight:700; color:#5b21b6; }
.tp-referent__sel{ max-width:260px; }
.tp-referent__msg{ font-size:.8rem; }
.tp-referent__info{ font-size:.8rem; color:var(--text-muted); flex-basis:100%; }
.tp-refwork{ margin:.2rem 0 .8rem; border:1px dashed #c4b5fd; border-radius:8px; background:#faf5ff; padding:.3rem .6rem; font-size:.85rem; }
.tp-refwork summary{ cursor:pointer; font-weight:600; color:#6d28d9; }
.tp-refwork__pre{ margin:.4rem 0 0; background:#0f172a; color:#e2e8f0; padding:.5rem .7rem; border-radius:6px; overflow:auto; font-size:.82rem; }
.tp-refwork__txt{ margin-top:.4rem; white-space:pre-wrap; }
.tp-refwork--file{ border-style:solid; }
.eval-state--ref{ background:#ede9fe; color:#5b21b6; }
.eval-state--follow{ background:#e0f2fe; color:#0369a1; }

/* Correction TP : tableau de bord des états */
.tpstat{ border:1px solid var(--border); border-radius:12px; padding:.7rem .9rem; margin:.5rem 0 1.1rem; background:var(--bg-card,#fff); }
.tpstat__pills{ display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.5rem; }
.tpstat__pill{ font-size:.8rem; font-weight:600; border-radius:14px; padding:.15rem .6rem; border:1px solid var(--border); }
.tpstat__pill b{ margin-left:.2rem; }
.tpstat__pill--ok{ background:#dcfce7; color:#15803d; border-color:#bbf7d0; }
.tpstat__pill--todo{ background:#e0f2fe; color:#0369a1; border-color:#bae6fd; }
.tpstat__pill--draft{ background:#fef9c3; color:#854d0e; border-color:#fde68a; }
.tpstat__pill--ref{ background:#ede9fe; color:#5b21b6; border-color:#ddd6fe; }
.tpstat__pill--none{ background:#fee2e2; color:#b91c1c; border-color:#fecaca; }
.tpstat__pill--tot{ background:var(--bg-subtle,#f8fafc); color:var(--text-muted); }
.tpstat__row{ display:flex; flex-wrap:wrap; align-items:center; gap:.3rem; padding:.25rem 0; border-top:1px dashed var(--border); }
.tpstat__lab{ font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.02em; color:var(--text-muted); min-width:170px; }
.tpstat__chip{ font-size:.78rem; border-radius:10px; padding:.1rem .5rem; border:1px solid var(--border); }
.tpstat__chip--ok{ background:#f0fdf4; color:#15803d; }
.tpstat__chip--todo{ background:#f0f9ff; color:#0369a1; }
.tpstat__chip--draft{ background:#fefce8; color:#854d0e; }
.tpstat__chip--ref{ background:#faf5ff; color:#6d28d9; }
.tpstat__chip--none{ background:#fef2f2; color:#b91c1c; }
.tpstat__chip--pair{ background:#ede9fe; color:#5b21b6; font-weight:700; border-color:#ddd6fe; }
.tpstat__ok{ font-size:.85rem; color:#15803d; font-weight:600; }
@media (max-width:700px){ .tpstat__lab{ min-width:100%; } }

/* TP élève : déclaration de groupe */
.tp-groupe{ margin:.4rem 0 .6rem; border:1px solid #ddd6fe; border-radius:10px; background:#f5f3ff; padding:.35rem .7rem; }
.tp-groupe summary{ cursor:pointer; font-weight:700; color:#5b21b6; font-size:.88rem; }
.tp-groupe__body{ padding:.5rem 0 .2rem; }
.tp-groupe__lbl{ font-size:.82rem; font-weight:600; margin-bottom:.3rem; }
.tp-groupe__mates{ display:flex; flex-wrap:wrap; gap:.3rem .8rem; margin-bottom:.5rem; }
.tp-groupe__cb{ font-size:.82rem; display:inline-flex; align-items:center; gap:.25rem; }
.tp-groupe__modes{ display:flex; flex-direction:column; gap:.2rem; margin-bottom:.5rem; }
.tp-groupe__radio{ font-size:.82rem; display:flex; align-items:center; gap:.35rem; }
.tp-groupe__msg{ font-size:.8rem; margin-left:.5rem; }
.tp-groupe__state{ margin-top:.4rem; font-size:.8rem; color:#5b21b6; background:#ede9fe; border-radius:6px; padding:.25rem .5rem; }
.tp-refwork--eval{ border-color:#86efac; background:#f0fdf4; }
.tp-refwork--eval summary{ color:#15803d; }

/* Correction TP (admin) : pleine largeur + gestion des groupes */
.admin-main.tpeval-main, .tpa-main{ max-width:none; width:100%; }
.tpgrp{ border:1px solid var(--border); border-radius:12px; padding:.5rem .8rem; margin:0 0 1rem; background:var(--bg-card,#fff); }
.tpgrp summary{ cursor:pointer; font-weight:700; }
.tpgrp__count{ background:var(--bg-subtle,#f1f5f9); border-radius:10px; padding:0 .45rem; font-size:.8rem; }
.tpgrp__warn{ color:#b91c1c; font-size:.82rem; font-weight:700; }
.tpgrp__body{ padding-top:.5rem; }
.tpgrp__conflict{ background:#fef2f2; border:1px solid #fecaca; color:#b91c1c; border-radius:8px; padding:.4rem .6rem; font-size:.82rem; margin-bottom:.5rem; }
.tpgrp__card{ border:1px solid var(--border); border-radius:10px; padding:.5rem .7rem; margin-bottom:.6rem; background:var(--bg-subtle,#f8fafc); }
.tpgrp__card.is-admin{ border-color:#86efac; background:#f0fdf4; }
.tpgrp__card--new{ border-style:dashed; }
.tpgrp__head{ font-size:.78rem; color:var(--text-muted); margin-bottom:.35rem; }
.tpgrp__mates{ display:flex; flex-wrap:wrap; gap:.25rem .8rem; margin-bottom:.45rem; }
.tpgrp__cb{ font-size:.82rem; display:inline-flex; align-items:center; gap:.25rem; }
.tpgrp__cb.is-in{ font-weight:700; }
.tpgrp__decl{ font-size:.7rem; background:#ede9fe; color:#5b21b6; border-radius:8px; padding:0 .35rem; }
.tpgrp__foot{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; font-size:.82rem; }
/* Copie annotée (élève) : marqueurs lisibles */
.tpa-annot--num{ background:#1d4ed8; color:#fff; border-radius:50%; width:20px; height:20px; display:flex; align-items:center; justify-content:center; font-size:.75rem; box-shadow:0 1px 4px rgba(0,0,0,.4); }
.tpa-ptchip{ display:inline-block; background:#1e3a8a; color:#fff; border-radius:10px; padding:.05rem .4rem; font-size:.75rem; font-weight:700; margin:0 .15rem .2rem 0; }
/* Correction TP : occuper toute la largeur de la fenêtre */
.admin-content.tpeval-main{ max-width:none; width:100%; }
.tpeval-main .eval-card{ max-width:none; }

/* Détail d'une évaluation (élève) */
.nd-arrow{ color:var(--text-muted); font-size:.75rem; }
.nd-loading{ color:var(--text-muted); font-size:.9rem; padding:.5rem 0; }
.nd-list{ margin:0; display:grid; grid-template-columns:auto 1fr; gap:.35rem .8rem; align-items:start; }
.nd-list dt{ font-size:.78rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.02em; white-space:nowrap; }
.nd-list dd{ margin:0; font-size:.92rem; }
.nd-links{ margin-top:1rem; padding-top:.7rem; border-top:1px solid var(--border); display:flex; flex-wrap:wrap; gap:.4rem; }

/* Quiz : note retenue (1er passage) */
.quiz-retained{ background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; border-radius:8px; padding:.45rem .7rem; font-size:.85rem; margin:.5rem 0; }
.quiz-retained--free{ background:#fefce8; border-color:#fde68a; color:#854d0e; }

/* Quiz d'entraînement : listés mais hors moyenne */
.evalblock__row--free{ opacity:.85; }
.free-tag{ background:#fefce8; color:#854d0e; border:1px solid #fde68a; border-radius:8px; padding:0 .35rem; font-size:.68rem; font-weight:700; }
.eval-saved-tag{ background:#dcfce7; color:#15803d; border-radius:8px; padding:0 .35rem; font-size:.7rem; font-weight:700; }

/* TP : modes de groupe (visibles seulement si un étudiant est coché) */
.tp-groupe__modes[data-has-mates="0"] .tp-groupe__radio--grp{ display:none; }
.tp-groupe__lock{ background:#fee2e2; color:#b91c1c; border-radius:8px; padding:0 .35rem; font-size:.7rem; font-weight:700; }

/* Correction TP : étudiant corrigé via son référent */
.eval-locked{ background:#ede9fe; border:1px solid #ddd6fe; color:#5b21b6; border-radius:10px; padding:.5rem .8rem; margin:.6rem 0; font-size:.86rem; display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.eval-grade--locked{ opacity:.6; }
.tpstat__chip--stale{ background:#fff7ed; color:#9a3412; border-color:#fed7aa; font-weight:700; }
.tpgrp__decl-count{ font-size:.78rem; color:var(--text-muted); font-weight:400; }

/* Sondages : historique */
.poll-card{ border:1px solid var(--border); border-radius:12px; padding:1rem 1.2rem; margin-bottom:1rem; background:var(--bg-card,#fff); }
.poll-card__head{ display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; flex-wrap:wrap; margin-bottom:.5rem; }
.poll-card__title{ font-size:1.05rem; margin:0; }
.poll-card__sess{ font-size:.75rem; color:var(--text-muted); font-weight:400; }
.poll-card__date{ font-size:.8rem; color:var(--text-muted); }
.poll-card__mine{ font-size:.82rem; border:1px solid var(--border); border-radius:14px; padding:.15rem .6rem; white-space:nowrap; }
.poll-card__mine.is-good{ background:#dcfce7; color:#15803d; border-color:#bbf7d0; }
.poll-card__mine.is-bad{ background:#fee2e2; color:#b91c1c; border-color:#fecaca; }
.poll-card__mine.is-none{ color:var(--text-muted); }
.poll-card__question{ font-size:.95rem; margin:.4rem 0 .6rem; }
.poll-card__img{ max-width:100%; max-height:340px; border-radius:8px; border:1px solid var(--border); display:block; margin:.3rem 0 .8rem; }
.poll-bars{ display:flex; flex-direction:column; gap:.4rem; }
.poll-bar{ display:grid; grid-template-columns:1fr 140px 80px; gap:.6rem; align-items:center; font-size:.86rem; }
.poll-bar--good .poll-bar__fill{ background:#22c55e; }
.poll-bar--mine .poll-bar__lbl{ font-weight:700; }
.poll-bar__lbl{ min-width:0; }
.poll-bar__tag{ font-size:.68rem; border-radius:8px; padding:0 .35rem; background:#dcfce7; color:#15803d; margin-left:.3rem; }
.poll-bar__tag--mine{ background:#e0f2fe; color:#0369a1; }
.poll-bar__track{ background:var(--bg-subtle,#f1f5f9); border-radius:8px; height:12px; overflow:hidden; }
.poll-bar__fill{ background:var(--primary); height:100%; border-radius:8px; }
.poll-bar__val{ font-size:.8rem; color:var(--text-muted); text-align:right; }
@media (max-width:620px){ .poll-bar{ grid-template-columns:1fr; } .poll-bar__val{ text-align:left; } }

/* Quiz intégré : pas de « Vérifier » avant l'envoi (la correction n'apparaît qu'après soumission) */
.quiz-inline:not(.quiz-inline--done) .qcmi__foot{ display:none; }
.quiz-inline--done .qcmi__foot{ display:flex; }
.rt-progress__hint{ font-size:.78rem; color:var(--text-muted); margin-left:.4rem; }

/* Points hors programme officiel */
.hp-tag{ background:#fef3c7; color:#92400e; border:1px solid #fde68a; border-radius:8px; padding:0 .35rem; font-size:.68rem; font-weight:700; margin-left:.3rem; }
.hp-paren{ color:var(--text-muted); font-size:.82rem; font-weight:400; }
.programme-hors{ border-top:2px dashed var(--border); padding-top:1rem; }
.programme-matiere-title--hors{ color:#92400e; }
.programme-hors__hint{ font-size:.82rem; color:var(--text-muted); margin:-.3rem 0 .6rem; }

/* ── Projection d'un sondage (grand écran, sans connexion) ── */
.plive-body{ margin:0; background:#0b1220; color:#f8fafc; }
.plive{ min-height:100vh; display:flex; flex-direction:column; padding:2vh 3vw; box-sizing:border-box; }
.plive__top{ display:flex; align-items:center; gap:1rem; }
.plive__badge{ background:#dc2626; color:#fff; border-radius:999px; padding:.25rem .9rem; font-weight:800; font-size:clamp(.9rem,1.6vw,1.3rem); }
.plive__badge--done{ background:#16a34a; }
.plive__badge--idle{ background:#334155; }
.plive__count{ font-size:clamp(1rem,2vw,1.6rem); font-weight:700; color:#93c5fd; }
.plive__fs{ margin-left:auto; background:none; border:1px solid #334155; color:#cbd5e1; border-radius:8px; font-size:1.2rem; padding:.2rem .6rem; cursor:pointer; }
.plive__main{ flex:1; display:flex; flex-direction:column; justify-content:center; gap:2vh; }
.plive__q{ font-size:clamp(1.6rem,4.2vw,3.6rem); line-height:1.25; margin:0; }
.plive__img{ max-height:34vh; max-width:100%; object-fit:contain; border-radius:12px; background:#fff; }
.plive__opts{ display:flex; flex-direction:column; gap:1.4vh; }
.plive-opt{ display:flex; align-items:center; gap:1.2rem; background:#111c33; border:2px solid #1e3a5f; border-radius:14px; padding:1.4vh 1.4vw; }
.plive-opt__l{ background:#2563eb; color:#fff; font-weight:900; border-radius:10px; min-width:2.6ch; text-align:center; padding:.2rem .6rem; font-size:clamp(1.2rem,2.6vw,2.2rem); }
.plive-opt__t{ font-size:clamp(1.1rem,2.4vw,2rem); }
.plive-res{ display:flex; align-items:center; gap:1rem; background:#111c33; border:2px solid #1e3a5f; border-radius:14px; padding:1.2vh 1.2vw; }
.plive-res.is-good{ border-color:#16a34a; background:#0f2a1c; }
.plive-res__body{ flex:1; min-width:0; }
.plive-res__bar{ display:block; background:#1e293b; border-radius:8px; height:14px; margin-top:.5rem; overflow:hidden; }
.plive-res__fill{ display:block; height:100%; background:#3b82f6; border-radius:8px; transition:width .4s ease; }
.plive-res.is-good .plive-res__fill{ background:#22c55e; }
.plive-res__val{ font-weight:800; font-size:clamp(1rem,2vw,1.6rem); color:#93c5fd; white-space:nowrap; }
.plive__foot{ text-align:center; color:#94a3b8; font-size:clamp(.9rem,1.6vw,1.3rem); }

/* ── Pilotage du sondage (téléphone) ── */
.plctl__head{ display:flex; justify-content:space-between; align-items:center; gap:.6rem; flex-wrap:wrap; margin:1rem 0 .6rem; }
.plctl__head h1{ margin:0; font-size:1.3rem; }
.plctl__links{ display:flex; gap:.4rem; flex-wrap:wrap; }
.plctl__auto{ font-size:.78rem; color:var(--text-muted); text-align:center; margin-top:1rem; }
.plctl-card{ border:1px solid var(--border); border-radius:12px; padding:.8rem 1rem; background:var(--bg-card,#fff); margin-bottom:.7rem; }
.plctl-card__state{ font-size:.8rem; font-weight:800; color:#b91c1c; }
.plctl-card__state.is-done{ color:#15803d; }
.plctl-card__q{ font-size:1rem; font-weight:600; margin:.3rem 0; }
.plctl-card__count{ font-size:.9rem; color:var(--text-muted); }
.plctl-actions{ display:flex; flex-direction:column; gap:.5rem; margin-bottom:.8rem; }
.plctl-btn{ width:100%; padding:.9rem 1rem; font-size:1rem; }
.plctl-msg{ font-size:.85rem; text-align:center; min-height:1.1em; }
.plctl-sec{ border:1px solid var(--border); border-radius:12px; padding:.7rem .9rem; margin-bottom:.7rem; background:var(--bg-card,#fff); }
.plctl-sec__t{ font-size:.82rem; font-weight:800; color:var(--text-muted); margin-bottom:.45rem; }
.plctl-bar{ display:grid; grid-template-columns:auto 1fr auto; gap:.5rem; align-items:center; margin-bottom:.4rem; }
.plctl-bar__l{ background:var(--primary); color:#fff; font-weight:800; border-radius:8px; padding:0 .5rem; }
.plctl-bar.is-good .plctl-bar__l{ background:#16a34a; }
.plctl-bar__txt{ font-size:.85rem; }
.plctl-bar__track{ display:block; background:var(--bg-subtle,#f1f5f9); border-radius:8px; height:10px; margin-top:.2rem; overflow:hidden; }
.plctl-bar__fill{ display:block; height:100%; background:var(--primary); border-radius:8px; transition:width .4s ease; }
.plctl-bar.is-good .plctl-bar__fill{ background:#22c55e; }
.plctl-bar__v{ font-size:.78rem; color:var(--text-muted); white-space:nowrap; }
.plctl-chips{ display:flex; flex-wrap:wrap; gap:.3rem; }
.plctl-chip{ font-size:.8rem; border-radius:12px; padding:.15rem .55rem; border:1px solid var(--border); }
.plctl-chip--ok{ background:#dcfce7; color:#15803d; border-color:#bbf7d0; }
.plctl-chip--no{ background:#fee2e2; color:#b91c1c; border-color:#fecaca; }
.plctl-empty{ font-size:.82rem; color:var(--text-muted); }

/* ── Correction TP : en-tête compact (swipe état / groupes) ── */
.tpx{ border:1px solid var(--border); border-radius:12px; padding:.4rem .7rem .7rem; margin:.4rem 0 1rem; background:var(--bg-card,#fff); }
.tpx__tabs{ margin:.2rem 0 .5rem; }
.tpstat__legend{ font-size:.72rem; color:var(--text-muted); margin-left:auto; }
.tpstat__acc{ border-top:1px dashed var(--border); padding:.25rem 0; }
.tpstat__acc summary{ cursor:pointer; font-size:.82rem; font-weight:700; }
.tpstat__chips{ display:flex; flex-wrap:wrap; gap:.25rem; padding:.35rem 0 .2rem; }
/* Cadre d'un groupe */
.grpbox{ border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:10px; padding:.45rem .7rem; margin-bottom:.5rem; background:var(--bg-subtle,#f8fafc); }
.grpbox--admin{ border-left-color:#16a34a; background:#f0fdf4; }
.grpbox--decl{ border-left-color:#a855f7; background:#faf5ff; }
.grpbox__head{ display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.grpbox__src{ font-size:.72rem; color:var(--text-muted); font-weight:700; }
.grpbox__x{ margin:0; }
.grpbox__xbtn{ background:none; border:0; color:#b91c1c; font-size:1rem; cursor:pointer; line-height:1; padding:0 .2rem; }
.grpbox__xbtn:hover{ transform:scale(1.2); }
.grpbox__mates{ display:flex; flex-wrap:wrap; gap:.3rem; align-items:center; margin-top:.35rem; }
.grpbox__sep{ font-size:.75rem; color:var(--text-muted); font-style:italic; }
/* Chips étudiants */
.grpchip{ display:inline-flex; align-items:center; gap:.25rem; font-size:.8rem; border:1px solid var(--border); border-radius:14px; padding:.12rem .55rem; background:#fff; }
.grpchip--ok{ border-color:#bbf7d0; background:#f0fdf4; color:#15803d; }
.grpchip--todo{ border-color:#bae6fd; background:#f0f9ff; color:#0369a1; }
.grpchip--draft{ border-color:#fde68a; background:#fefce8; color:#854d0e; }
.grpchip--ref{ border-color:#ddd6fe; background:#faf5ff; color:#6d28d9; }
.grpchip--none{ border-color:#fecaca; background:#fef2f2; color:#b91c1c; }
.grpchip.is-ref{ font-weight:800; box-shadow:0 0 0 2px #fbbf24 inset; }
.grpchip__ic{ opacity:.8; }
/* Chips cliquables (création) */
.grpchip--pick{ cursor:pointer; }
.grpchip--pick .grpchip__star{ display:none; }
.grpchip--pick.is-sel{ box-shadow:0 0 0 2px var(--primary) inset; font-weight:700; }
.grpchip--pick.is-ref .grpchip__star{ display:inline; }
.grpnew{ border:1px dashed var(--border); border-radius:10px; padding:.5rem .7rem; margin-top:.6rem; }
.grpnew__t{ font-size:.78rem; font-weight:700; color:var(--text-muted); margin-bottom:.4rem; }
.grpnew__chips{ display:flex; flex-wrap:wrap; gap:.3rem; }
.grpnew__foot{ display:flex; align-items:center; gap:.6rem; margin-top:.6rem; flex-wrap:wrap; }
.grpnew__msg{ font-size:.78rem; color:var(--text-muted); }
.grpreset{ margin-top:.5rem; text-align:right; }
/* Rehaussement des notes : stats avant/après */
.dvt-new{ color:#15803d; }
.dvt-delta{ font-size:.75rem; color:var(--text-muted); }
.dvt-gain{ color:#15803d; font-size:.78rem; }

/* ── Correction TP : en-tête ultra-compact (flux de vignettes) ── */
.tpx{ padding:.5rem .7rem; }
.tpx__bar{ display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; margin-bottom:.5rem; }
.tpx__flow{ display:flex; flex-wrap:wrap; gap:.35rem; align-items:center; }
.tpx__foot{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-top:.55rem; padding-top:.45rem; border-top:1px dashed var(--border); }
.tpx__create{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin:0; }
.tpx__reset{ margin:0 0 0 auto; }
/* Vignette d'un groupe : même gabarit qu'une vignette d'étudiant */
.gvign{ display:inline-flex; align-items:center; gap:.25rem; border:1px solid var(--border); border-radius:14px; padding:.1rem .35rem .1rem .45rem; background:var(--bg-subtle,#f8fafc); }
.gvign--admin{ border-color:#86efac; background:#f0fdf4; }
.gvign--decl{ border-color:#ddd6fe; background:#faf5ff; }
.gvign__src{ font-size:.72rem; opacity:.85; }
.gvign__sep{ font-size:.75rem; color:var(--text-muted); }
.gvign__x{ margin:0; display:inline; }
.gvign__xbtn{ background:none; border:0; color:#b91c1c; font-size:.85rem; cursor:pointer; line-height:1; padding:0 .1rem; opacity:.6; }
.gvign__xbtn:hover{ opacity:1; transform:scale(1.15); }
.gvign .grpchip{ font-size:.76rem; padding:.05rem .45rem; }

/* Correction TP : case unique composantes + coefficients */
.evalbox{ border:1px solid var(--border); border-radius:10px; padding:.4rem .6rem; margin:.4rem 0 .8rem; background:var(--bg-subtle,#f8fafc); }
.evalbox__row{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; font-size:.82rem; }
.evalbox__t{ font-weight:700; color:var(--text-muted); font-size:.76rem; }
.evalbox__it{ background:#fff; border:1px solid var(--border); border-radius:10px; padding:.05rem .45rem; }
.evalbox__it b{ color:var(--primary); }
.evalbox__edit{ margin-left:auto; background:none; border:1px solid var(--border); border-radius:6px; cursor:pointer; padding:.05rem .35rem; }
.evalbox__edit:hover{ border-color:var(--primary); }
.evalbox__form{ display:none; align-items:center; gap:.5rem; flex-wrap:wrap; margin-top:.45rem; padding-top:.45rem; border-top:1px dashed var(--border); }
.evalbox.is-edit .evalbox__form{ display:flex; }
.evalbox__form input{ width:64px; padding:.15rem .3rem; font-size:.82rem; }
.evalbox__form label{ display:inline-flex; align-items:center; gap:.2rem; font-size:.82rem; }
.evalbox__hint{ font-size:.72rem; color:var(--text-muted); }
/* Commentaire seul (corrigé via référent) */
.eval-commentonly{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin-top:.4rem; }
.eval-commentonly__hint{ font-size:.75rem; color:var(--text-muted); }
.eval-comment-status{ font-size:.8rem; }

/* Radar par type : progression + histogramme de classe côte à côte */
.radar-tl__cols{ display:grid; grid-template-columns:1fr 1fr; gap:.8rem; align-items:start; }
.radar-tl__col{ min-width:0; }
.rhist{ border:1px solid var(--border); border-radius:10px; padding:.5rem .6rem; background:var(--bg-card,#fff); }
.rhist__t{ font-size:.8rem; font-weight:700; margin-bottom:.4rem; }
.rhist__hint{ font-weight:400; color:var(--text-muted); font-size:.72rem; }
.rhist__bars{ display:flex; align-items:flex-end; gap:.15rem; height:130px; }
.rhist__col{ flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; cursor:default; border-radius:4px; padding-bottom:.1rem; }
.rhist__col:hover{ background:var(--bg-subtle,#f1f5f9); }
.rhist__col.is-mine .rhist__x{ font-weight:800; color:var(--text); }
.rhist__n{ font-size:.68rem; color:var(--text-muted); height:.9rem; }
.rhist__bar{ width:78%; min-height:2px; border-radius:3px 3px 0 0; transition:height .25s ease; }
.rhist__col.is-mine .rhist__bar{ box-shadow:0 0 0 2px #fbbf24; }
.rhist__x{ font-size:.62rem; color:var(--text-muted); margin-top:.15rem; }
.rhist__foot{ font-size:.7rem; color:var(--text-muted); margin-top:.35rem; display:flex; align-items:center; gap:.3rem; }
.rhist__me{ display:inline-block; width:10px; height:10px; border-radius:2px; box-shadow:0 0 0 2px #fbbf24; }
@media (max-width: 900px){ .radar-tl__cols{ grid-template-columns:1fr; } }

/* ── Agenda (admin) ── */
.ag-sem{ font-size:.85rem; background:#fef3c7; color:#92400e; border:1px solid #fde68a; border-radius:10px; padding:.15rem .6rem; }
.ag-cal{ display:flex; flex-direction:column; gap:.6rem; }
.ag-week{ border:1px solid var(--border); border-radius:10px; padding:.4rem .5rem; background:var(--bg-card,#fff); }
.ag-week.is-current{ border-color:var(--primary); box-shadow:0 0 0 1px var(--primary) inset; }
.ag-week__lbl{ font-size:.76rem; font-weight:800; color:var(--text-muted); margin-bottom:.3rem; }
.ag-week__lbl span{ font-weight:400; }
.ag-week__days{ display:grid; grid-template-columns:repeat(7,1fr); gap:.3rem; }
.ag-day{ border:1px solid var(--border); border-radius:8px; padding:.25rem; min-height:62px; background:var(--bg-subtle,#f8fafc); }
.ag-day.is-today{ border-color:#f59e0b; background:#fffbeb; }
.ag-day__h{ font-size:.68rem; color:var(--text-muted); font-weight:700; margin-bottom:.2rem; }
.ag-ev{ display:flex; align-items:center; gap:.2rem; font-size:.72rem; background:#e0f2fe; color:#0369a1; border-radius:6px; padding:.08rem .3rem; margin-bottom:.15rem; }
.ag-ev--imp{ background:#fef9c3; color:#854d0e; font-weight:700; }
.ag-ev--sem{ background:#ede9fe; color:#5b21b6; font-weight:800; }
.ag-ev__h{ font-weight:700; }
.ag-ev__t{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ag-ev__lk, .ag-ev__ed{ text-decoration:none; opacity:.7; }
.ag-ev__lk:hover, .ag-ev__ed:hover{ opacity:1; }
.ag-form .form-row{ gap:.6rem; }

/* ── Agenda compact (tableau de bord étudiant) ── */
.ags{ border:1px solid var(--border); border-radius:12px; padding:.6rem .8rem; margin:0 0 1rem; background:var(--bg-card,#fff); }
.ags__head{ font-size:.85rem; font-weight:800; margin-bottom:.4rem; }
.ags__sub{ font-weight:400; color:var(--text-muted); font-size:.75rem; }
.ags__days{ display:flex; gap:.5rem; overflow-x:auto; padding-bottom:.2rem; }
.ags__day{ min-width:150px; border:1px solid var(--border); border-radius:8px; padding:.3rem .4rem; background:var(--bg-subtle,#f8fafc); }
.ags__day.is-today{ border-color:#f59e0b; background:#fffbeb; }
.ags__date{ font-size:.72rem; color:var(--text-muted); margin-bottom:.2rem; }
.ags-ev{ display:flex; align-items:center; gap:.25rem; font-size:.74rem; background:#e0f2fe; color:#0369a1; border-radius:6px; padding:.1rem .35rem; margin-bottom:.15rem; cursor:help; }
.ags-ev--imp{ background:#fef9c3; color:#854d0e; font-weight:700; box-shadow:0 0 0 1px #fde68a inset; }
.ags-ev--sem{ background:#ede9fe; color:#5b21b6; font-weight:800; }
.ags-ev__h{ font-weight:700; }
.ags-ev__t{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ags-ev__todo{ background:#dc2626; color:#fff; border-radius:8px; font-size:.62rem; padding:0 .3rem; font-weight:800; }
.ags-ev__lk{ text-decoration:none; }

/* ── Filtre de période (synthèse) ── */
.per-bar{ display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; margin:.4rem 0 .8rem; }
.per-bar__t{ font-size:.82rem; font-weight:700; color:var(--text-muted); }
.per-btn{ font-size:.82rem; border:1px solid var(--border); border-radius:14px; padding:.15rem .7rem; text-decoration:none; color:var(--text); background:var(--bg-card,#fff); }
.per-btn.is-on{ border-color:var(--primary); color:var(--primary); font-weight:700; background:rgba(37,99,235,.06); }
.per-form{ display:flex; align-items:center; gap:.25rem; margin:0; }
.per-form input{ font-size:.8rem; padding:.15rem .3rem; }
.per-bar__hint, .per-bar__cur{ font-size:.78rem; color:var(--text-muted); }
.per-bar__cur{ margin-left:auto; font-weight:700; }

/* Agenda : abonnement calendrier */
.ag-sync{ border:1px solid #bfdbfe; background:#eff6ff; border-radius:12px; padding:.6rem .9rem; margin:.6rem 0 1rem; }
.ag-sync__t{ font-weight:800; font-size:.88rem; color:#1e40af; margin-bottom:.4rem; }
.ag-sync__row{ display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.ag-sync__row input{ flex:1; min-width:240px; font-size:.8rem; }
.ags__head{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.ags__sync{ margin-left:auto; font-size:.75rem; text-decoration:none; background:#e0f2fe; color:#0369a1; border-radius:10px; padding:.1rem .5rem; font-weight:700; }

/* ── Agenda type Google : cases accolées ── */
.gcal{ margin:.6rem 0 1rem; --gline:#b9b3a9; }
.gcal__dow{ display:grid; grid-template-columns:repeat(7,1fr); font-size:.7rem; font-weight:800; color:var(--text-muted); text-align:center; padding:.2rem 0; }
/* overflow VISIBLE : le détail au survol (créneaux ½ h, fiche) ne doit jamais être coupé */
.gcal__grid{ display:flex; flex-direction:column; gap:2px; border:2px solid var(--gline); border-radius:8px; overflow:visible; background:var(--gline); }
.gweek{ position:relative; display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.gcell{ position:relative; background:var(--bg-card,#fff); min-height:74px; padding:.2rem .25rem; cursor:pointer; user-select:none; }
.gcell.is-past{ background:#fafafa; }
.gcell.is-today{ background:#fffbeb; box-shadow:inset 0 0 0 2px #f59e0b; }
.gcell.is-sel{ box-shadow:inset 0 0 0 2px var(--primary); }
.gcell:hover{ background:#f8fafc; }
.gcell__n{ font-size:.68rem; font-weight:800; color:var(--text-muted); }
.gcell__items{ display:flex; gap:.15rem; margin-top:.1rem; }
.gitem{ font-size:.62rem; border-radius:6px; padding:0 .25rem; font-weight:800; }
.gitem--prep{ background:#fee2e2; color:#b91c1c; }
.gitem--sea{ background:#dcfce7; color:#15803d; }
.gev{ font-size:.68rem; background:#3b82f6; color:#fff; border-radius:4px; padding:.05rem .25rem; margin-top:.1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:grab; touch-action:none; }
.gev--imp{ background:#f59e0b; }
.gev--sem{ background:#7c3aed; }

/* Grille horaire pendant le déplacement (8 h → 19 h) */






.gcal__hint{ font-size:.75rem; color:var(--text-muted); margin-top:.35rem; }
/* Cahier de texte */
.ctx{ margin-top:1rem; }
.ctx__block{ border-top:1px dashed var(--border); padding:.4rem 0; }
.ctx__t{ font-size:.82rem; font-weight:800; }
.ctx__item{ display:flex; align-items:center; gap:.5rem; font-size:.85rem; padding:.15rem 0; }
.ctx__txt{ color:var(--text-muted); }
.ctx__form{ display:flex; flex-wrap:wrap; gap:.35rem; align-items:center; margin-top:.6rem; padding-top:.5rem; border-top:1px solid var(--border); }
.ctx__form select, .ctx__form input{ font-size:.82rem; }
@media (max-width:640px){
  /* Agenda sur téléphone.
     Sept colonnes sur 360 px donnent des cases de 45 px : illisibles, et le
     moindre libellé les fait grandir inégalement. On garde la grille — le
     calque des étiquettes multi-jours en dépend — mais on lui donne une
     largeur minimale lisible et on la fait défiler horizontalement. */
  .gcal__grid{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .gweek{ min-width:462px; }                 /* 7 × 66 px */
  .gspans{ min-width:462px; }
  .gcell{ min-height:58px; overflow:hidden; }
  .gcell__n{ font-size:.72rem; }
  .gcell__items{ flex-wrap:wrap; }
  .gspan, .ags-it, .ag-ev{ font-size:.68rem; }
  /* Les libellés longs se coupent au lieu d'élargir leur case. */
  .gspan{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .gcal__defile{ display:block; }
  .ctx__form select, .ctx__form input{ flex:1 1 100%; }
}
/* Cahier de texte (étudiant) */
.ags-it{ display:flex; align-items:center; gap:.25rem; font-size:.72rem; border-radius:6px; padding:.08rem .3rem; margin-bottom:.12rem; cursor:help; }
.ags-it--prep{ background:#fee2e2; color:#b91c1c; font-weight:700; }
.ags-it--sea{ background:#dcfce7; color:#15803d; }
.ags-it a{ color:inherit; text-decoration:underline; }

/* ── Gestion de Pyodide ── */
.pyo-badge{ font-size:.8rem; font-weight:700; border-radius:14px; padding:.2rem .7rem; }
.pyo-badge.is-local{ background:#dcfce7; color:#15803d; }
.pyo-badge.is-cdn{ background:#e0f2fe; color:#0369a1; }
.pyo-update{ background:#fef9c3; border:1px solid #fde68a; color:#854d0e; border-radius:10px; padding:.6rem .9rem; margin:.6rem 0; font-size:.9rem; display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.pyo-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:.7rem; margin:.6rem 0 1rem; }
.pyo-card{ border:1px solid var(--border); border-radius:12px; padding:.7rem .9rem; background:var(--bg-card,#fff); }
.pyo-card__t{ font-size:.75rem; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em; }
.pyo-card__big{ font-size:1.5rem; font-weight:800; margin:.15rem 0 .3rem; }
.pyo-card__s{ font-size:.8rem; color:var(--text-muted); line-height:1.5; }
.pyo-expl{ border:1px solid var(--border); border-radius:12px; padding:.5rem .9rem; background:var(--bg-subtle,#f8fafc); }
.pyo-expl summary{ cursor:pointer; font-weight:800; }
.pyo-expl__body{ font-size:.9rem; line-height:1.6; padding-top:.5rem; }
.pyo-expl__body code{ background:#e2e8f0; border-radius:4px; padding:0 .25rem; font-size:.85em; }
.pyo-upd{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin:.4rem 0; }
.pyo-prog{ font-size:.85rem; }
.pyo-files{ display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.5rem; }
.pyo-file{ font-size:.75rem; border:1px solid var(--border); border-radius:10px; padding:.1rem .5rem; }
.pyo-file.is-ok{ background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }
.pyo-file.is-miss{ background:#fef2f2; color:#b91c1c; border-color:#fecaca; }
.pyo-file em{ color:var(--text-muted); font-style:normal; }
.pyo-src{ font-size:.75rem; border-radius:10px; padding:.05rem .45rem; font-weight:700; }
.pyo-src.is-local{ background:#dcfce7; color:#15803d; }
.pyo-src.is-cdn{ background:#e0f2fe; color:#0369a1; }
.pyo-tag{ font-size:.65rem; background:#ede9fe; color:#5b21b6; border-radius:8px; padding:0 .3rem; font-weight:700; }

/* ── Agenda : navigation, bulles, zoom sur survol (PC) ── */
.gcal{ position:relative; }
.gcal__nav{ display:flex; align-items:center; justify-content:flex-end; gap:.35rem; font-size:.75rem; color:var(--text-muted); margin-bottom:.2rem; }
.gnav{ text-decoration:none; color:var(--text-muted); border:1px solid var(--border); border-radius:6px; width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.gnav:hover{ border-color:var(--primary); color:var(--primary); }
.gnav--now{ font-size:1.1rem; }
.gcell{ overflow:visible; }
.gcell__bar{ display:flex; gap:.15rem; margin-top:.1rem; flex-wrap:wrap; }
.gbub{ background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; border-radius:10px; font-size:.62rem; font-weight:800; padding:0 .3rem; cursor:pointer; }
.gbub:hover{ background:#dbeafe; }
.gev{ cursor:pointer; }
/* Zoom d'une case : superposé, n'affecte pas la grille */
.gzoom{ display:none; position:absolute; z-index:50; left:-6px; right:-6px; top:-6px; background:#fff; border:2px solid var(--primary); border-radius:10px; box-shadow:0 12px 32px rgba(0,0,0,.22); padding:.3rem; }
.gcell.is-zoom{ z-index:60; }
.gcell.is-zoom .gzoom{ display:block; }
.gzoom__h{ font-size:.7rem; font-weight:800; color:var(--primary); margin-bottom:.2rem; }
.gzoom__slots{ position:relative; height:264px; }                 /* 22 créneaux de 12px */
.gz-slot{ height:12px; border-top:1px dotted #e2e8f0; position:relative; cursor:crosshair; }
.gz-slot.is-hour{ border-top:1px dashed #cbd5e1; }
.gz-slot.is-hour span{ position:absolute; left:2px; top:-1px; font-size:.55rem; color:#94a3b8; }
.gz-slot:hover{ background:rgba(59,130,246,.08); }
.gz-sel{ position:absolute; left:26px; right:2px; background:rgba(37,99,235,.25); border:1px solid var(--primary); border-radius:4px; font-size:.6rem; color:#1e3a8a; font-weight:800; display:flex; align-items:center; justify-content:center; pointer-events:none; }
/* Détail des événements automatiques */
.auto-list{ margin:0; padding-left:1.1rem; font-size:.9rem; line-height:1.8; }
/* Étudiant : événements automatiques */
.ags-auto{ display:flex; align-items:center; gap:.25rem; font-size:.72rem; border-radius:6px; padding:.08rem .3rem; margin-bottom:.12rem; text-decoration:none; }
.ags-auto__t{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ags-auto--colle{ background:#ede9fe; color:#5b21b6; }
.ags-auto--tp{ background:#fef9c3; color:#854d0e; font-weight:700; }
.ags-auto--quiz{ background:#dbeafe; color:#1e40af; }
.ags-auto--devoir{ background:#fee2e2; color:#b91c1c; }

/* Projection : compteur pendant le vote + plein écran */
.live-count{ text-align:center; font-size:clamp(1rem,2vw,1.5rem); color:#93c5fd; font-weight:700; margin-top:1rem; }
.live-hint{ color:#64748b; font-weight:400; font-size:.85em; }
.fs-btn{ background:none; border:1px solid #334155; color:#cbd5e1; border-radius:8px; font-size:1.1rem; padding:.1rem .5rem; cursor:pointer; margin-left:auto; }
/* Pilotage : édition en direct */
.plctl-edit{ border:1px solid #fde68a; background:#fffbeb; border-radius:12px; padding:.5rem .8rem; margin-bottom:.7rem; }
.plctl-edit summary{ cursor:pointer; font-weight:800; color:#92400e; }
.plctl-editform{ padding-top:.5rem; }
.plctl-editform .form-label{ margin-top:.5rem; }
.plctl-opts{ display:grid; grid-template-columns:1fr 1fr; gap:.35rem; margin-top:.3rem; }
.plctl-opts label{ display:flex; align-items:center; gap:.3rem; font-weight:700; }

/* Agenda : bulles d'événements (> 2) + détail */
.gbub--big{ width:100%; text-align:left; font-size:.66rem; padding:.1rem .35rem; }
.gev--auto{ background:#0ea5e9; }
.auto-sec{ font-size:.75rem; font-weight:800; color:var(--text-muted); text-transform:uppercase; margin:.5rem 0 .2rem; }
.auto-desc{ font-size:.8rem; color:var(--text-muted); }
.auto-go{ font-size:.72rem; color:var(--primary); }
.ags-bub{ width:100%; text-align:left; background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; border-radius:8px; font-size:.72rem; font-weight:800; padding:.15rem .4rem; cursor:pointer; }
.ags-bub:hover{ background:#dbeafe; }

/* Volets fusionnés (animations, transversales, coefficients) */
.anim-pane .admin-card, .cap-pane .admin-card, .coef-pane .admin-card{ box-shadow:none; border:1px solid var(--border); }
.coef-acc{ border:1px solid var(--border); border-radius:10px; padding:.35rem .7rem; margin:.4rem 0 .6rem; background:var(--bg-card,#fff); }
.coef-acc summary{ cursor:pointer; font-weight:800; font-size:.9rem; }
.coef-acc__hint{ font-weight:400; color:var(--text-muted); font-size:.78rem; }
.coef-pane{ padding-top:.5rem; }
.radar-center:hover{ fill:rgba(37,99,235,.16); }

/* Travail non rendu & absences */
.z-count{ background:#fee2e2; color:#b91c1c; border-radius:10px; padding:0 .45rem; font-weight:800; font-size:.8rem; }
.z-chip{ background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; border-radius:10px; padding:.1rem .5rem; font-size:.76rem; cursor:pointer; margin:0 .15rem .15rem 0; }
.z-chip:hover{ background:#fee2e2; }
.z-chip em{ color:var(--text-muted); font-style:normal; }
.z-all summary{ cursor:pointer; font-size:.78rem; color:var(--primary); }
.z-list{ display:flex; flex-wrap:wrap; gap:.2rem; padding-top:.3rem; max-width:420px; }
.z-rule{ font-size:.72rem; color:var(--text-muted); }
.z-ok{ color:#15803d; font-weight:700; }
.z-todo{ color:#b45309; font-weight:700; }
.acc-table tr.is-done{ opacity:.6; }
/* Colleur : absence + rattrapage */
.cs-abs{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; background:#fef2f2; border:1px solid #fecaca; border-radius:10px; padding:.4rem .6rem; margin-bottom:.5rem; }
.cs-abs select, .cs-abs__com{ font-size:.85rem; padding:.2rem .4rem; border:1px solid var(--border); border-radius:6px; }
.cs-ratt{ background:#eff6ff; border:1px solid #bfdbfe; border-radius:10px; padding:.4rem .6rem; margin-bottom:.5rem; font-size:.85rem; }
.cs-ratt__pick{ display:flex; align-items:center; gap:.4rem; margin-top:.3rem; }
.cs-ratt__pick button{ border:1px solid var(--border); background:#fff; border-radius:6px; cursor:pointer; padding:0 .4rem; }
.cs-ratt__n{ color:var(--text-muted); font-size:.75rem; }
.cs-ratt__hint{ font-size:.72rem; color:var(--text-muted); margin:.2rem 0 0; }
/* Tableau de bord : colle en cours / ma colle */
.colle-now{ background:#fee2e2; color:#b91c1c; border-radius:8px; padding:0 .35rem; font-size:.68rem; font-weight:800; }
.colle-item--mine{ background:#eff6ff; border-left:3px solid var(--primary); padding-left:.5rem; border-radius:6px; }

/* TP : repli des cellules */
.tp-fold{ background:none; border:0; color:#94a3b8; cursor:pointer; font-size:.8rem; line-height:1; padding:0 .25rem; }
.tp-fold:hover{ color:var(--primary); }
.tp-cell__answerbar .tp-fold{ color:var(--text-muted); }
.tp-cell.is-collapsed .tp-code-input,
.tp-cell.is-collapsed .tp-output,
.tp-cell.is-collapsed .tp-answer-input,
.tp-cell.is-collapsed .tp-cell__prompt,
.tp-cell.is-collapsed .tp-refwork,
.tp-cell.is-collapsed .tp-correction,
.tp-cell.is-collapsed [data-md]{ display:none !important; }
.tp-cell.is-collapsed{ opacity:.85; }
.tp-cell.is-collapsed .tp-cell__toolbar{ border-bottom:0; }
/* Panneau des capacités : placé dans le thème, au-dessus des onglets */
.tp-theme-panel .tpmx-panel{ margin:.4rem 0 .8rem; }
.tp-cell--md, .tp-file-cell{ position:relative; }
.tp-fold--md{ position:absolute; top:2px; right:4px; opacity:.45; }
.tp-fold--md:hover{ opacity:1; }
.tp-cell--md.is-collapsed > div[data-md]{ display:none !important; }
.tp-cell--md.is-collapsed::after{ content:'… (cellule repliée)'; font-size:.75rem; color:var(--text-muted); }
.tp-file-cell.is-collapsed .tp-file-cell__drop, .tp-file-cell.is-collapsed .tp-file-cell__done{ display:none !important; }

/* Pagination universelle (10 par page + balayage) */
.pager-nav{ display:flex; align-items:center; justify-content:center; gap:.6rem; padding:.4rem 0 .1rem; }
.pager-btn{ border:1px solid var(--border); background:var(--bg-card,#fff); color:var(--text); border-radius:8px; width:30px; height:30px; font-size:1rem; cursor:pointer; line-height:1; }
.pager-btn:disabled{ opacity:.35; cursor:default; }
.pager-btn:not(:disabled):hover{ border-color:var(--primary); color:var(--primary); }
.pager-lbl{ font-size:.78rem; color:var(--text-muted); min-width:110px; text-align:center; }
.gen-table{ font-size:.82rem; }
.pager-hint{ font-size:.72rem; color:var(--text-muted); font-weight:400; }

/* Zéros : exception au cas par cas */
.z-chip.is-ovr{ background:#ecfdf5; color:#047857; border-color:#a7f3d0; }
.z-ovr-tag{ background:#d1fae5; color:#047857; border-radius:8px; padding:0 .3rem; font-size:.7rem; font-weight:700; }
.z-form{ border-top:1px dashed var(--border); margin-top:.6rem; padding-top:.6rem; }
.z-form__t{ font-size:.8rem; font-weight:800; margin-bottom:.4rem; }
.z-form__row{ display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:.4rem; }
.z-form__row label{ display:flex; align-items:center; gap:.25rem; font-size:.8rem; }
.z-form__row input{ width:80px; padding:.15rem .3rem; border:1px solid var(--border); border-radius:6px; }
.z-form__btns{ display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.5rem; }
.z-list{ max-width:none; }

/* ════════════════════════════════════════════════════════════
   v193 — Agenda (étiquettes longues, colles, survol) · Quiz (vue prof)
   ════════════════════════════════════════════════════════════ */

/* ── Coins arrondis : la grille n'a plus d'overflow:hidden ── */
.gweek:first-child .gcell:first-child{ border-top-left-radius:6px; }
.gweek:first-child .gcell:last-child{ border-top-right-radius:6px; }
.gweek:last-child  .gcell:first-child{ border-bottom-left-radius:6px; }
.gweek:last-child  .gcell:last-child{ border-bottom-right-radius:6px; }

/* ── Dépôt de devoirs : UNE étiquette sur toute la durée (à la Google Agenda) ── */
.gcell__sp{ height:calc(var(--sp,0) * 18px); }              /* place réservée aux étiquettes */
.gspans{ position:absolute; left:0; right:0; top:18px; display:grid; grid-template-columns:repeat(7,1fr);
         grid-auto-rows:16px; gap:2px; pointer-events:none; z-index:3; }
.gspan{ pointer-events:auto; display:flex; align-items:center; gap:.2rem; min-width:0;
        grid-column:calc(var(--c0) + 1) / calc(var(--c1) + 2); grid-row:calc(var(--r) + 1);
        font-size:.66rem; font-weight:700; line-height:1; border-radius:4px; padding:0 .35rem;
        overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; }
.gspan.is-open{ background:#16a34a; color:#fff; }           /* dépôt encore ouvert */
.gspan.is-closed{ background:#cbd5e1; color:#475569; }      /* date limite dépassée */
.gspan:hover{ filter:brightness(.94); }
.gspan-lg{ display:inline-block; border-radius:4px; padding:0 .35rem; font-size:.72rem; font-weight:700; }
.gspan-lg.is-open{ background:#16a34a; color:#fff; }
.gspan-lg.is-closed{ background:#cbd5e1; color:#475569; }

/* ── Colles : toujours visibles, cliquables (détail avec commentaires) ── */
.gev--colle{ background:#7e22ce; }

/* ── Fiche de survol (jamais coupée : position fixed) ── */
.gtip{ position:fixed; z-index:200; background:var(--bg-card,#fff); border:1px solid var(--border);
       border-radius:10px; box-shadow:0 12px 32px rgba(0,0,0,.18); padding:.5rem .7rem;
       font-size:.8rem; max-height:60vh; overflow:auto; pointer-events:none; }
.gtip__t{ font-weight:800; color:var(--primary); margin-bottom:.2rem; }
.gtip .auto-list{ font-size:.78rem; line-height:1.5; }
.gtip .auto-sec{ margin:.35rem 0 .1rem; }

/* Les deux dernières semaines : le zoom des créneaux s'ouvre vers le HAUT */
.gcell.is-low .gzoom{ top:auto; bottom:-6px; }

/* ── Détail d'une colle dans la modale ── */
.colld{ border-top:1px dashed var(--border); padding:.35rem 0; }
.colld__h{ display:flex; align-items:center; gap:.5rem; }
.colld__n{ margin-left:auto; font-weight:800; background:#eef2ff; color:#3730a3; border-radius:10px; padding:0 .45rem; font-size:.82rem; }
.colld__n--none{ background:#f1f5f9; color:var(--text-muted); font-weight:600; }
.colld__abs{ font-size:.82rem; color:#b91c1c; }
.colld__c{ font-size:.85rem; color:var(--text); }
.colld__caps{ font-size:.78rem; color:var(--text-muted); margin-top:.15rem; }

/* ── Icône « Programme de colle » (personnage tenant une feuille) ── */
.ico-colle{ vertical-align:-.15em; }
.admin-nav-link__icon svg{ vertical-align:-.15em; }

/* ── Page Quiz : vue professeur ── */
.quiz-prof-head{ display:flex; align-items:center; justify-content:space-between; gap:.6rem; flex-wrap:wrap; }
.quiz-prof-acts{ display:flex; align-items:center; gap:.3rem; }
.quiz-prof-bar{ font-size:.8rem; color:var(--text-muted); background:var(--bg-subtle,#f8fafc);
                border:1px dashed var(--border); border-radius:8px; padding:.3rem .6rem; margin-bottom:.7rem; }
.quiz-prof-tag{ display:inline-block; font-size:.72rem; font-weight:700; background:#eef2ff; color:#3730a3;
                border-radius:10px; padding:0 .45rem; margin-left:.3rem; }
/* Icônes discrètes */
.qadm-i{ display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px;
         border:1px solid transparent; border-radius:6px; background:none; color:var(--text-muted);
         font-size:.85rem; line-height:1; cursor:pointer; text-decoration:none; opacity:.5; transition:var(--transition); }
.qadm-i:hover{ opacity:1; border-color:var(--border); color:var(--primary); background:var(--bg-card,#fff); }
.qadm-i.is-on{ opacity:1; border-color:var(--primary); color:var(--primary); }
.qadm-i--sm{ width:18px; height:18px; font-size:.75rem; opacity:.8; }
.qadm-i--drag{ cursor:grab; }
/* Vignette + volet de modification rapide */
.qcard-w{ position:relative; }
.qcard-w .qadm{ position:absolute; top:2px; right:2px; display:flex; gap:1px; opacity:0; transition:var(--transition); }
.qcard-w:hover .qadm, .qcard-w.is-focus .qadm{ opacity:1; }
.qcard-w.is-focus{ outline:2px solid var(--primary); outline-offset:2px; border-radius:8px; }
.qcard-w.qz-dragging{ opacity:.45; }
body.qz-reordering .qcard-w{ cursor:grab; outline:1px dashed var(--border); outline-offset:2px; border-radius:8px; }
body.qz-reordering .quiz-card{ pointer-events:none; }
.qz-quick{ display:flex; flex-wrap:wrap; gap:.25rem; align-items:center; margin:.25rem 0 .5rem;
           background:var(--bg-subtle,#f8fafc); border:1px solid var(--border); border-radius:8px; padding:.35rem; }
.qz-quick input[type=text]{ flex:1 1 130px; min-width:0; }
.qz-quick select{ flex:0 1 150px; }

/* ── Étudiant : vignettes d'agenda cliquables (ma colle) + dépôt vert/gris ── */
button.ags-ev{ width:100%; border:0; font:inherit; font-size:.74rem; text-align:left; cursor:pointer; }
button.ags-ev:hover{ filter:brightness(.96); }
.ags-auto--devoir.is-open{ background:#dcfce7; color:#15803d; }     /* dépôt encore ouvert */
.ags-auto--devoir.is-closed{ background:#f1f5f9; color:#64748b; }   /* date limite dépassée */

/* Semaine de colle EN COURS (date_colle = lundi → la semaine court encore 6 jours) */
.week-card--now{ border-color:var(--success); box-shadow:0 0 0 1px var(--success) inset; opacity:1; }
.week-card--now .week-card__num{ color:var(--success); font-weight:800; }

/* ════════ Centre du radar : icône histogramme → panneau « moyenne générale » ════════ */
.radar-plot{ position:relative; }
.radar-genbtn{ transform-box:fill-box; transform-origin:center; transition:transform .16s ease; }
.radar-genbtn:hover, .radar-genbtn:focus{ transform:scale(1.14); outline:none; }
.radar-genbtn:focus circle:first-child{ stroke:var(--primary); stroke-width:2; }

.radar-gen{
  position:absolute; left:0; right:0; top:0; z-index:20;
  max-height:min(470px, 78vh); overflow:auto;
  background:var(--bg-card,#fff); border:1px solid var(--border); border-radius:12px;
  box-shadow:0 16px 38px rgba(0,0,0,.20); padding:.6rem .7rem;
  transform:scale(.35); opacity:0; pointer-events:none;
  transition:transform .18s ease, opacity .18s ease;
}
.radar-gen.is-open{ transform:scale(1); opacity:1; pointer-events:auto; }
.rgen__head{ display:flex; align-items:center; gap:.4rem; margin-bottom:.25rem; }
.rgen__t{ font-weight:800; font-size:.92rem; color:var(--primary); }
.rgen__close{ margin-left:auto; border:0; background:none; cursor:pointer; color:var(--text-muted); font-size:.95rem; line-height:1; padding:.15rem .3rem; border-radius:6px; }
.rgen__close:hover{ background:var(--bg-subtle,#f1f5f9); color:var(--text); }
.rgen__nums{ display:flex; align-items:baseline; gap:.5rem; flex-wrap:wrap; margin-bottom:.5rem; }
.rgen__me{ font-size:1.6rem; font-weight:800; color:#1e40af; line-height:1; }
.rgen__me small{ font-size:.8rem; font-weight:600; color:var(--text-muted); }
.rgen__cls{ font-size:.82rem; color:var(--text-muted); }
.rgen__badge{ font-size:.72rem; font-weight:800; border-radius:10px; padding:.05rem .4rem; }
.rgen__badge--pos{ background:#dcfce7; color:#15803d; }
.rgen__badge--neg{ background:#fee2e2; color:#b91c1c; }
.rgen__rank{ font-size:.72rem; font-weight:700; background:#eef2ff; color:#3730a3; border-radius:10px; padding:.05rem .4rem; }
.rgen__st{ font-size:.78rem; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.02em; margin:.7rem 0 .1rem; }
.rgen__note{ font-size:.72rem; color:var(--text-muted); margin:.35rem 0 0; line-height:1.45; }
.radar-gen .gen-table td, .radar-gen .gen-table th{ padding:.22rem .3rem; font-size:.78rem; }
.radar-gen .gen-table tr.gen-off{ color:var(--text-muted); opacity:.65; }
.radar-gen .rhist__bars{ height:112px; }

/* ── Synthèse : période + réglage de la fin du 1er semestre ── */
.per-btn.is-off{ opacity:.42; cursor:not-allowed; pointer-events:none; }
.per-sem{ display:flex; align-items:center; gap:.3rem; flex-wrap:wrap;
          background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:.2rem .45rem; }
.per-sem__l{ font-size:.78rem; font-weight:700; color:#92400e; }
.per-sem input[type=date]{ font-size:.8rem; }
.per-bar__hint{ font-size:.78rem; color:#92400e; flex:1 1 100%; }
.per-tag{ font-size:.75rem; font-weight:700; background:#eef2ff; color:#3730a3; border-radius:10px; padding:.05rem .5rem; }
.ag-sem__lk{ font-size:.78rem; text-decoration:underline; }
.ag-sem--off{ background:#f1f5f9; color:var(--text-muted); border-color:var(--border); }

/* ── Mini-histogramme d'activité : cliquable ── */
button.synth-login-hist{ border:1px solid transparent; background:none; padding:.05rem .25rem; border-radius:6px;
                         cursor:pointer; font:inherit; line-height:1; }
button.synth-login-hist:hover{ border-color:var(--border); background:var(--bg-subtle,#f8fafc); }
.synth-login-hist--empty{ color:var(--text-muted); font-size:.78rem; opacity:.55; }
.synth-login-hist--empty:hover{ opacity:1; }

/* ── Modale « détail d'activité » ── */
.acth__sum{ font-size:.88rem; color:var(--text-muted); margin-bottom:.6rem; }
.acth__big{ font-size:1.6rem; font-weight:800; color:var(--primary); }
.acth__t{ font-size:.75rem; font-weight:800; text-transform:uppercase; letter-spacing:.02em;
          color:var(--text-muted); margin:.9rem 0 .3rem; }
.acth__bars{ display:flex; align-items:flex-end; gap:1px; height:90px;
             border-bottom:1px solid var(--border); padding-bottom:2px; }
.acth__col{ flex:1; height:100%; display:flex; align-items:flex-end; border-radius:2px; }
.acth__col:hover{ background:var(--bg-subtle,#f1f5f9); }
.acth__bar{ width:100%; background:#4f46e5; border-radius:2px 2px 0 0; min-height:2px; }
.acth__col.is-zero .acth__bar{ background:#e2e8f0; }
.acth__x{ display:flex; justify-content:space-between; font-size:.68rem; color:var(--text-muted); margin-top:.15rem; }
.acth__dow{ display:flex; align-items:flex-end; gap:.35rem; height:64px; }
.acth__dowcol{ flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; }
.acth__dowcol span{ font-size:.66rem; color:var(--text-muted); margin-top:.15rem; }
.acth__tbl{ width:100%; border-collapse:collapse; font-size:.82rem; margin-top:.2rem; }
.acth__tbl th{ text-align:left; font-size:.7rem; text-transform:uppercase; color:var(--text-muted);
               border-bottom:2px solid var(--border); padding:.25rem .3rem; }
.acth__tbl td{ border-bottom:1px solid var(--border); padding:.25rem .3rem; }
.acth__det{ margin-top:.8rem; font-size:.85rem; }
.acth__det summary{ cursor:pointer; color:var(--primary); font-weight:700; }
.acth__list{ margin:.3rem 0 0 1.1rem; font-size:.82rem; color:var(--text-muted); line-height:1.6; }

/* Ceinture et bretelles : les feuilles du pilotage et le volet des quiz restent masqués */
.plive-sheet[hidden], .qz-quick[hidden]{ display:none; }

/* ════════════════════════════════════════════════════════════
   Pilotage du sondage en direct — plein écran, cellules carrées (téléphone)
   ════════════════════════════════════════════════════════════ */
body.page-plive{ height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
body.page-plive .main-content{ flex:1 1 auto; min-height:0; padding:0; display:flex; }
body.page-plive .site-footer{ display:none; }

.plive{ flex:1; min-height:0; display:flex; flex-direction:column; gap:.45rem; padding:.5rem;
        max-width:680px; margin:0 auto; width:100%; }
.plive__top{ display:flex; align-items:center; gap:.4rem; flex:none; }
.plive__state{ font-weight:800; font-size:.85rem; border-radius:10px; padding:.15rem .5rem; }
.plive__state.is-open{ background:#dcfce7; color:#15803d; }
.plive__state.is-done{ background:#e0e7ff; color:#3730a3; }
.plive__state.is-none{ background:#f1f5f9; color:var(--text-muted); }
.plive__count{ font-size:.82rem; color:var(--text-muted); }
.plive__ico{ margin-left:auto; text-decoration:none; font-size:1.1rem; width:32px; height:32px; display:inline-flex;
             align-items:center; justify-content:center; border:1px solid var(--border); border-radius:10px; }
.plive__ico + .plive__ico{ margin-left:0; }

/* Toutes les cellules ont EXACTEMENT la même taille et sont centrées */
.plive__cells{ display:flex; flex-wrap:wrap; justify-content:center; gap:.4rem; flex:none; }
.pcell{ position:relative; width:84px; height:84px; flex:none; display:flex; flex-direction:column;
        align-items:center; justify-content:center; gap:.1rem; text-align:center;
        border:2px solid var(--border); border-radius:14px; background:var(--bg-card,#fff);
        cursor:pointer; overflow:hidden; padding:.25rem; user-select:none; -webkit-user-select:none;
        -webkit-touch-callout:none; touch-action:manipulation; }
.pcell:active{ transform:scale(.96); }
.pcell__ico{ font-size:1.4rem; line-height:1; }
.pcell__lb{ font-size:.64rem; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.02em; }
.pcell__val{ font-size:.66rem; color:var(--text); line-height:1.1; max-height:2.2em; overflow:hidden;
             display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.pcell img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* réponses */
.pcell__l{ font-size:1.3rem; font-weight:800; color:var(--primary); line-height:1; }
.pcell__t{ font-size:.66rem; color:var(--text); line-height:1.15; display:-webkit-box; -webkit-line-clamp:2;
           -webkit-box-orient:vertical; overflow:hidden; padding:0 .1rem; }
.pcell__ok{ position:absolute; top:2px; left:4px; font-size:.8rem; opacity:0; }
.pcell.is-good{ border-color:#16a34a; background:#f0fdf4; }
.pcell.is-good .pcell__ok{ opacity:1; }
.pcell.is-good .pcell__l{ color:#15803d; }
.pcell__x{ position:absolute; top:0; right:0; width:20px; height:20px; display:flex; align-items:center;
           justify-content:center; font-size:.7rem; color:var(--text-muted); opacity:.35; border-radius:0 12px 0 8px; }
.pcell__x:hover{ opacity:1; }
.pcell__x.is-arm{ opacity:1; background:#fee2e2; color:#b91c1c; transform:scale(1.25); transition:transform .7s linear; }
.pcell--add{ border-style:dashed; color:var(--text-muted); }
/* bascules (encadrées quand actives) */
.pcell--tg.is-on{ border-color:#3730a3; background:#eef2ff; box-shadow:0 0 0 3px rgba(55,48,163,.18); }
.pcell--tg.is-on .pcell__lb{ color:#3730a3; }
.pcell--new{ border-color:#fecaca; }
.pcell--redo{ border-color:#bfdbfe; }
/* « compte dans la moyenne » : texte seul, encadré quand ça compte */
.pcell--moy{ padding:.35rem; }
.pcell__moy{ font-size:.72rem; font-weight:700; line-height:1.15; color:var(--text-muted); }
.pcell--moy.is-on{ border-color:#3730a3; background:#eef2ff; box-shadow:0 0 0 3px rgba(55,48,163,.18); }
.pcell--moy.is-on .pcell__moy{ color:#3730a3; }

/* Appui MAINTENU 1 s : anneau de progression DERRIÈRE l'icône */
.phold{ position:absolute; inset:0; margin:auto; width:70%; height:70%; pointer-events:none; z-index:0; opacity:0; }
.phold__fg{ fill:none; stroke:var(--primary); stroke-width:3; stroke-linecap:round;
            stroke-dasharray:107; stroke-dashoffset:107; transform:rotate(-90deg); transform-origin:50% 50%; }
.pcell--hold.is-holding .phold, .plive__ico--hold.is-holding .phold{ opacity:1; }
.pcell--hold.is-holding .phold__fg, .plive__ico--hold.is-holding .phold__fg{ stroke-dashoffset:0; transition:stroke-dashoffset 1s linear; }
.pcell--hold.is-holding{ border-color:var(--primary); }
/* l'icône reste au-dessus de l'anneau */
.pcell--hold .pcell__ico, .pcell--hold .pcell__lb{ position:relative; z-index:1; }
.pcell--lock.is-done{ border-color:#c7d2fe; }

/* Bouton « Charger » en haut (icône + anneau) */
.plive__ico--hold{ position:relative; background:var(--bg-card,#fff); cursor:pointer; overflow:visible; }
.plive__ico--hold .phold{ width:100%; height:100%; }
.plive__ico-t{ position:relative; z-index:1; }
.plive__ico--hold.is-holding{ border-color:var(--primary); }

/* Tiers du bas : répartition, barres qui se retournent comme une pièce */
.plive__dist{ flex:1 1 auto; min-height:0; overflow:auto; border-top:2px solid var(--border);
              padding-top:.4rem; display:flex; flex-direction:column; gap:.3rem; }
.plive-dist__t{ font-size:.7rem; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.02em; }
.plive-dist__t span{ font-weight:400; text-transform:none; letter-spacing:0; }
.pflip{ perspective:900px; cursor:pointer; flex:none; }
.pflip__in{ position:relative; height:34px; transition:transform .55s; transform-style:preserve-3d; }
.pflip.is-flip .pflip__in{ transform:rotateX(180deg); }
.pflip__f, .pflip__b{ position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden;
                      border-radius:10px; display:flex; align-items:center; gap:.4rem; padding:0 .45rem; }
.pflip__b{ transform:rotateX(180deg); background:var(--bg-subtle,#f8fafc); border:1px solid var(--border);
           overflow:auto; flex-wrap:nowrap; }
.plive-bar{ border:1px solid var(--border); background:var(--bg-card,#fff); }
.plive-bar.is-good{ border-color:#16a34a; }
.plive-bar__l{ font-weight:800; color:var(--primary); width:1.1em; flex:none; }
.plive-bar__track{ position:relative; flex:1; min-width:0; height:22px; background:#f1f5f9; border-radius:6px;
                   overflow:hidden; display:flex; align-items:center; }
.plive-bar__fill{ position:absolute; left:0; top:0; bottom:0; background:#c7d2fe; transition:width .3s ease; }
.plive-bar.is-good .plive-bar__fill{ background:#bbf7d0; }
.plive-bar__txt{ position:relative; font-size:.74rem; padding:0 .35rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.plive-bar__v{ font-weight:800; font-size:.82rem; flex:none; }
.plive-bar__v small{ font-weight:400; color:var(--text-muted); }
.plive-miss{ border:1px dashed var(--border); font-size:.78rem; color:var(--text-muted); }
.plive-chip{ background:#eef2ff; color:#3730a3; border-radius:9px; padding:.05rem .4rem; font-size:.74rem;
             font-weight:700; white-space:nowrap; }
.plive-chip--no{ background:#fee2e2; color:#b91c1c; }
.plive-empty{ font-size:.76rem; color:var(--text-muted); }
.plive-none{ margin:auto; text-align:center; display:flex; flex-direction:column; gap:.6rem; align-items:center; }
.plive__msg{ flex:none; font-size:.76rem; font-weight:700; min-height:1.1em; text-align:center; }

/* Feuille d'édition */
.plive-sheet{ position:fixed; inset:0; z-index:300; background:rgba(15,23,42,.45); display:flex;
              align-items:flex-end; justify-content:center; }
.plive-sheet[hidden]{ display:none; }
.plive-sheet__box{ background:var(--bg-card,#fff); width:100%; max-width:560px; border-radius:16px 16px 0 0;
                   padding:.9rem; display:flex; flex-direction:column; gap:.5rem; max-height:80dvh; }
.plive-sheet__t{ font-weight:800; color:var(--primary); }
.plive-sheet__b{ display:flex; gap:.4rem; justify-content:flex-end; }
@media (min-width:760px){ .plive-sheet{ align-items:center; } .plive-sheet__box{ border-radius:16px; } }

/* Étudiant : sondage à choix multiple */
.poll-multi-hint{ background:#eef2ff; color:#3730a3; border-radius:10px; padding:.35rem .6rem;
                  font-size:.85rem; margin-bottom:.6rem; }
.poll-choice-btn--check{ cursor:pointer; }
.poll-choice-btn--check input{ margin-right:.4rem; transform:scale(1.3); }
.poll-choice-btn--check:has(input:checked){ border-color:var(--primary); box-shadow:0 0 0 2px rgba(30,59,110,.15) inset; }

/* Feuille « Charger un sondage » */
.plive-load__list{ overflow:auto; display:flex; flex-direction:column; gap:.35rem; max-height:56vh; }
.plive-load__item{ display:flex; flex-direction:column; gap:.1rem; text-align:left; width:100%;
                   border:1px solid var(--border); border-radius:10px; background:var(--bg-card,#fff);
                   padding:.45rem .55rem; cursor:pointer; }
.plive-load__item:hover{ border-color:var(--primary); background:var(--bg-subtle,#f8fafc); }
.plive-load__ttl{ font-weight:700; font-size:.9rem; }
.plive-load__v{ font-size:.7rem; font-weight:800; background:#eef2ff; color:#3730a3; border-radius:8px; padding:0 .3rem; }
.plive-load__q{ font-size:.78rem; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.plive-load__meta{ font-size:.72rem; color:var(--text-muted); }

/* ── Archivage : icône discrète + onglet Archive ── */
.arch-btn-form{ display:inline; margin:0; }
.arch-btn{ background:none; border:0; cursor:pointer; font-size:.95rem; line-height:1; padding:.15rem .3rem;
           border-radius:6px; opacity:.32; transition:opacity .12s ease, background .12s ease; }
.arch-btn:hover{ opacity:1; background:var(--bg-subtle,#f1f5f9); }
.arch-ico-demo{ opacity:.5; }
.arch-summary{ display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1rem; }
.arch-chip{ display:inline-flex; align-items:center; gap:.35rem; text-decoration:none; border:1px solid var(--border);
            border-radius:999px; padding:.2rem .7rem; font-size:.85rem; color:var(--text); background:var(--bg-card,#fff); }
.arch-chip span{ font-weight:800; background:#eef2ff; color:#3730a3; border-radius:999px; padding:0 .45rem; font-size:.78rem; }
.arch-list{ display:flex; flex-direction:column; gap:.4rem; }
.arch-item{ display:flex; align-items:center; gap:.6rem; border:1px solid var(--border); border-radius:10px;
            padding:.5rem .7rem; background:var(--bg-card,#fff); }
.arch-item__main{ flex:1; min-width:0; }
.arch-item__label{ font-weight:600; font-size:.92rem; overflow:hidden; text-overflow:ellipsis; }
.arch-item__meta{ font-size:.78rem; color:var(--text-muted); margin-top:.1rem; }
.arch-ref{ font-size:.72rem; background:var(--bg-subtle,#f1f5f9); border-radius:5px; padding:0 .3rem; }
.arch-item__actions{ display:flex; align-items:center; gap:.35rem; flex:none; }
.arch-modal{ position:fixed; inset:0; z-index:400; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; padding:1rem; }
.arch-modal[hidden]{ display:none; }
.arch-modal__box{ background:var(--bg-card,#fff); width:100%; max-width:540px; border-radius:14px; display:flex; flex-direction:column; max-height:85vh; }
.arch-modal__head{ display:flex; align-items:center; justify-content:space-between; padding:.9rem 1rem; border-bottom:1px solid var(--border); font-weight:800; }
.arch-modal__x{ background:none; border:0; font-size:1.4rem; cursor:pointer; color:var(--text-muted); line-height:1; }
.arch-modal__body{ padding:1rem; overflow:auto; }
.arch-modal__lead{ margin-bottom:.6rem; }
.arch-modal__foot{ display:flex; gap:.5rem; justify-content:flex-end; padding:.8rem 1rem; border-top:1px solid var(--border); margin:0; }
.arch-links{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.3rem; }
.arch-link label{ display:flex; align-items:center; gap:.5rem; padding:.35rem .5rem; border:1px solid var(--border); border-radius:8px; cursor:pointer; }
.arch-link input{ transform:scale(1.15); }
.arch-link__t{ font-family:monospace; font-size:.82rem; flex:1; }
.arch-link__tag{ font-size:.78rem; color:var(--text-muted); }
.arch-link--confl label{ border-color:#fca5a5; background:#fef2f2; }
.arch-link--confl .arch-link__tag{ color:var(--error); font-weight:700; }

/* ── Archives de suivi de messagerie (Supervision) ── */
.suivi-arch-bar{ padding:.5rem .8rem; border-bottom:1px solid var(--border); background:var(--bg-card,#fff); }
.suivi-arch-create{ display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; margin:0; }
.suivi-arch-hint{ font-size:.76rem; color:var(--text-muted); }
.suivi-arch-list{ margin-top:.5rem; font-size:.85rem; }
.suivi-arch-list summary{ cursor:pointer; color:var(--primary); font-weight:700; }
.suivi-arch-list ul{ list-style:none; margin:.4rem 0 0; padding:0; display:flex; flex-direction:column; gap:.25rem; }
.suivi-arch-list li{ display:flex; align-items:center; gap:.5rem; }
.suivi-arch-list a{ font-weight:600; }
.suivi-arch-meta{ font-size:.75rem; color:var(--text-muted); }
.suivi-arch-del{ background:none; border:0; color:#e0245e; cursor:pointer; opacity:.55; font-size:1rem; margin-left:auto; }
.suivi-arch-del:hover{ opacity:1; }
.suivi-arch-banner{ font-size:.86rem; background:#eef2ff; color:#3730a3; border-radius:8px; padding:.4rem .6rem; }
.per-archive-form{ display:inline; margin:0; }
.per-archive-btn{ color:var(--error); border-color:#fca5a5; }

/* ── Archives d'année + mode lecteur ── */
.year-actions{ display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start; }
.year-create-form{ display:flex; flex-direction:column; gap:.5rem; margin:0; padding:.7rem; border:1px solid var(--border); border-radius:10px; background:var(--bg-card,#fff); }
.year-create-row{ display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }
.year-create-row label{ display:flex; align-items:center; gap:.3rem; font-size:.85rem; }
.year-purge{ display:flex; align-items:center; gap:.4rem; font-size:.82rem; color:var(--text-muted); }
.year-import-form{ margin:0; }
.year-import-label{ display:inline-flex; flex-direction:column; gap:.3rem; font-size:.85rem; padding:.7rem; border:1px dashed var(--border); border-radius:10px; cursor:pointer; }
.year-list{ display:flex; flex-direction:column; gap:.5rem; margin-top:1rem; }
.year-item{ display:flex; align-items:center; gap:.7rem; border:1px solid var(--border); border-radius:10px; padding:.6rem .8rem; background:var(--bg-card,#fff); }
.year-item__main{ flex:1; min-width:0; }
.year-item__title{ font-weight:700; }
.year-item__meta{ font-size:.78rem; color:var(--text-muted); margin-top:.1rem; }
.year-item__actions{ display:flex; align-items:center; gap:.35rem; flex:none; flex-wrap:wrap; }
.year-reader-active{ background:#fef9c3; border:1px solid #fde047; border-radius:8px; padding:.5rem .8rem; margin-bottom:1rem; font-size:.88rem; }

/* Bandeau header du mode lecteur (sur toutes les pages) */
.year-reader-banner{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap;
  background:linear-gradient(90deg,#78350f,#92400e); color:#fff; padding:.5rem 1rem; font-size:.88rem; }
.year-reader-banner__ico{ font-size:1.1rem; }
.year-reader-banner strong{ color:#fde68a; }
.year-reader-banner__btn{ margin-left:auto; background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.4);
  border-radius:8px; padding:.2rem .7rem; cursor:pointer; font-size:.82rem; }
.year-reader-banner__btn:hover{ background:rgba(255,255,255,.28); }

/* ── Versionnage des points (diff rouge/vert) ── */
.pv-btn{ position:relative; }
.pv-badge{ font-size:.68rem; font-weight:800; margin-left:.15rem; background:#eef2ff; color:#3730a3; border-radius:999px; padding:0 .3rem; }
.pv-del{ color:#dc2626; text-decoration:line-through; }
.pv-ins{ color:#16a34a; text-decoration:none; background:#f0fdf4; }
.pv-modal{ position:fixed; inset:0; z-index:600; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; padding:1rem; }
.pv-modal[hidden]{ display:none; }
.pv-modal__box{ background:var(--bg-card,#fff); width:100%; max-width:600px; border-radius:14px; display:flex; flex-direction:column; max-height:85vh; }
.pv-modal__panel{ position:relative; z-index:1; background:var(--bg-card,#fff); width:100%; max-width:640px; border-radius:14px; display:flex; flex-direction:column; max-height:85vh; box-shadow:0 18px 50px rgba(0,0,0,.35); overflow:hidden; }
.pv-modal__close{ border:none; background:none; font-size:1.5rem; line-height:1; cursor:pointer; color:var(--text-muted); padding:.1rem .4rem; }
.pv-modal__close:hover{ color:var(--text); }
.pv-modal__head{ display:flex; align-items:center; justify-content:space-between; padding:.9rem 1rem; border-bottom:1px solid var(--border); font-weight:800; }
.pv-modal__x{ background:none; border:0; font-size:1.4rem; cursor:pointer; color:var(--text-muted); line-height:1; }
.pv-modal__body{ padding:1rem; overflow:auto; }
.pv-current{ border:1px solid #bbf7d0; background:#f0fdf4; border-radius:10px; padding:.6rem .8rem; }
.pv-current__lbl{ font-size:.72rem; font-weight:700; color:#16a34a; text-transform:uppercase; letter-spacing:.03em; }
.pv-current__t{ font-weight:700; margin-top:.2rem; }
.pv-current__d{ font-size:.88rem; color:var(--text); margin-top:.2rem; }
.pv-legend{ font-size:.76rem; color:var(--text-muted); margin:.7rem 0 .4rem; }
.pv-entry{ border:1px solid var(--border); border-radius:10px; padding:.55rem .8rem; margin-top:.5rem; }
.pv-entry__date{ font-size:.75rem; color:var(--text-muted); margin-bottom:.3rem; }
.pv-entry__diff{ font-size:.9rem; line-height:1.5; margin-top:.2rem; }
.pv-entry__k{ font-size:.72rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; margin-right:.3rem; }

/* ── Remonter le temps (notes archivées d'un point) ── */
.th-point{ font-weight:800; font-size:1.02rem; }
.th-lead{ font-size:.85rem; color:var(--text-muted); margin:.4rem 0 .6rem; }
.th-year{ border:1px solid var(--border); border-radius:10px; padding:.55rem .8rem; margin-top:.5rem; }
.th-year__head{ font-weight:700; margin-bottom:.35rem; }
.th-year__stats{ display:flex; flex-direction:column; gap:.25rem; }
.th-stat{ font-size:.88rem; }

/* ── Accordéon des comptes archivés par année ── */
.acc-years{ margin-top:.5rem; }
.acc-year{ border:1px solid var(--border); border-radius:10px; margin-bottom:.4rem; background:var(--bg-card,#fff); }
.acc-year>summary{ cursor:pointer; padding:.55rem .8rem; display:flex; align-items:center; justify-content:space-between; gap:.6rem; list-style:none; }
.acc-year>summary::-webkit-details-marker{ display:none; }
.acc-year__t{ font-weight:700; }
.acc-year__n{ font-size:.8rem; color:var(--text-muted); }
.acc-year__body{ padding:.3rem .8rem .7rem; border-top:1px solid var(--border); }
.acc-year__group{ margin-top:.5rem; }
.acc-year__lbl{ font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--text-muted); margin-bottom:.3rem; }
.acc-year__list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.2rem; }
.acc-year__list li{ display:flex; align-items:center; gap:.5rem; font-size:.88rem; flex-wrap:wrap; }
.acc-year__name{ font-weight:600; }
.acc-year__tag{ font-size:.72rem; background:#eef2ff; color:#3730a3; border-radius:6px; padding:0 .35rem; }
.acc-year__email{ font-size:.78rem; color:var(--text-muted); }

/* ── Mode lecteur : notes figées sur les points ── */
.point-reader-note{ background:#fef3c7; border:1px solid #fcd34d; border-radius:8px; padding:.5rem .8rem; margin:.5rem 0; font-size:.86rem; }
.point-archived{ display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin-top:.35rem; padding:.3rem .5rem; background:#fffbeb; border:1px solid #fde68a; border-radius:8px; }
.point-archived__lbl{ font-size:.72rem; font-weight:800; color:#92400e; }
.point-archived__stat{ font-size:.82rem; color:#78350f; }
.point-archived__stat--empty{ color:#a16207; font-style:italic; }

/* ── Espace RGPD (étudiant / colleur) ── */
.rgpd-head{ margin:1.5rem 0 1rem; }
.rgpd-sub{ color:var(--text-muted); }
.rgpd-card{ border:1px solid var(--border); border-radius:12px; padding:1.2rem; margin-bottom:1rem; background:var(--bg-card,#fff); }
.rgpd-card h2{ font-size:1.1rem; margin-bottom:.5rem; }
.rgpd-card--danger{ border-color:#fca5a5; background:#fef2f2; }
.rgpd-counts{ list-style:none; margin:.6rem 0 1rem; padding:0; display:flex; flex-wrap:wrap; gap:.4rem; }
.rgpd-counts li{ font-size:.82rem; background:var(--bg-subtle,#f1f5f9); border-radius:8px; padding:.2rem .6rem; }
.rgpd-counts__n{ font-weight:800; color:#3730a3; }
.rgpd-delete{ display:flex; flex-direction:column; gap:.6rem; margin-top:.6rem; }
.rgpd-check{ display:flex; align-items:center; gap:.5rem; font-size:.9rem; }
.rgpd-word{ display:flex; flex-direction:column; gap:.3rem; font-size:.9rem; max-width:280px; }

/* ── Mise en lumière des modifs de point (remonter le temps) ── */
.th-modif{ background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:.5rem .7rem; margin:.4rem 0; }
.th-modif__lbl{ font-size:.78rem; font-weight:700; color:#92400e; margin-bottom:.3rem; }
.th-modif__row{ font-size:.88rem; line-height:1.5; margin-top:.2rem; }
.th-modif__k{ font-size:.7rem; font-weight:700; text-transform:uppercase; color:var(--text-muted); margin-right:.3rem; }
.th-nomodif{ font-size:.78rem; color:#16a34a; margin:.3rem 0; }

/* ── Puce année active ── */
.annee-chip{ display:inline-block; font-size:.8rem; color:var(--text-muted); background:var(--bg-subtle,#f1f5f9); border-radius:8px; padding:.25rem .7rem; margin:.4rem 0; }
.annee-chip strong{ color:var(--text); }

/* ── Diff de version de leçon (façon GitLab) ── */
.dv-btn{ position:relative; }
.dv-legend{ font-size:.8rem; color:var(--text-muted); margin-bottom:.6rem; }
.dv-legend .dv-add{ color:#16a34a; font-weight:600; }
.dv-legend .dv-del{ color:#dc2626; font-weight:600; }
.dv-entry{ border:1px solid var(--border); border-radius:8px; margin-bottom:.5rem; }
.dv-entry>summary{ cursor:pointer; padding:.5rem .7rem; font-size:.85rem; font-weight:600; }
.dv-diff{ padding:.4rem; border-top:1px solid var(--border); font-family:ui-monospace,'SF Mono',Menlo,monospace; font-size:.82rem; overflow-x:auto; }
.dv-line{ display:flex; gap:.4rem; padding:.05rem .3rem; white-space:pre-wrap; word-break:break-word; border-radius:3px; }
.dv-line.dv-add{ background:#f0fdf4; color:#166534; }
.dv-line.dv-del{ background:#fef2f2; color:#991b1b; }
.dv-line.dv-same{ color:var(--text); }
.dv-sign{ flex:none; width:1ch; opacity:.6; user-select:none; }

/* ── Revue des notes hors période ── */
.oop-empty{ background:#f0fdf4; border:1px solid #bbf7d0; border-radius:10px; padding:1rem; color:#166534; }
.oop-bar{ display:flex; align-items:center; gap:1rem; flex-wrap:wrap; padding:.6rem .8rem; background:var(--bg-subtle,#f1f5f9); border-radius:10px; margin-bottom:.8rem; }
.oop-all{ display:flex; align-items:center; gap:.4rem; font-size:.88rem; font-weight:600; }
.oop-count{ font-size:.82rem; color:var(--text-muted); }
.oop-batch{ margin-left:auto; display:flex; gap:.4rem; }
.oop-list{ display:flex; flex-direction:column; gap:.4rem; }
.oop-item{ display:flex; align-items:center; gap:.6rem; border:1px solid var(--border); border-radius:10px; padding:.5rem .7rem; background:var(--bg-card,#fff); border-left:3px solid var(--border); }
.oop-item--sansdate{ border-left-color:#f59e0b; }
.oop-item--justeavantlapriode, .oop-item--justeaprslapriode, .oop-item--prochedelapriode{ border-left-color:#3b82f6; }
.oop-pick{ flex:none; }
.oop-main{ flex:1; min-width:0; }
.oop-top{ display:flex; justify-content:space-between; gap:.5rem; }
.oop-student{ font-weight:600; }
.oop-note{ font-weight:800; color:#3730a3; }
.oop-meta{ display:flex; gap:.6rem; flex-wrap:wrap; font-size:.78rem; color:var(--text-muted); margin-top:.15rem; }
.oop-raison{ font-weight:600; }
.oop-raison--sansdate{ color:#b45309; }
.oop-actions{ flex:none; display:flex; gap:.25rem; }
.btn-xs{ padding:.15rem .4rem; font-size:.75rem; border-radius:6px; }

/* ── Indication notes hors période (synthèse) ── */
.per-oop-hint{ display:inline-block; font-size:.78rem; color:#b45309; background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:.2rem .6rem; }

/* ── Formulaire d'archivage d'année (choix année + dates auto) ── */
.yc-year-pick{ display:inline-flex; align-items:center; gap:.35rem; }
.yc-year-sep{ color:var(--text-muted); font-weight:700; }
.yc-year-end{ font-weight:700; color:var(--text); min-width:3ch; }
.yc-dates{ margin:.4rem 0; align-items:center; gap:.6rem; }
.yc-dates-hint{ font-size:.78rem; color:var(--text-muted); }

/* ── Barre d'outils synthèse réorganisée ── */
.synth-toolbar{ margin:.5rem 0 1rem; }
.synth-toolbar__row{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.synth-toolbar__row--top{ justify-content:space-between; margin-bottom:.5rem; }
.synth-toolbar__row--top .coef-acc{ margin:0; flex:1 1 auto; }
.synth-exports{ display:flex; gap:.4rem; flex:none; }
.synth-toolbar__row--sem{ margin-top:.5rem; padding-top:.5rem; border-top:1px dashed var(--border); }
.synth-toolbar .per-bar{ margin:.2rem 0; }

/* ── Sondages archivés ── */
.poll-archive-acc{ border:1px solid var(--border); border-radius:10px; padding:.5rem .8rem; background:var(--bg-card,#fff); }
.poll-archive-acc>summary{ cursor:pointer; font-weight:700; font-size:.95rem; }
.poll-archive-year{ font-size:.8rem; font-weight:700; color:var(--text-muted); margin:.6rem 0 .3rem; }
.poll-archive-list{ display:flex; flex-direction:column; gap:.35rem; }
.poll-archive-item{ display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.4rem .6rem; border:1px solid var(--border); border-radius:8px; }
.poll-archive-item__info{ min-width:0; }
.poll-archive-item__title{ font-weight:600; display:block; }
.poll-archive-item__meta{ font-size:.78rem; color:var(--text-muted); }

/* ── Mode lecteur d'archive : contrôles de modification neutralisés visuellement ── */
/* Le blocage réel est serveur (requireAdmin) ; ceci évite de cliquer pour rien. */
body.reader-mode .btn-primary:not(.year-reader-banner__btn),
body.reader-mode .arch-btn,
body.reader-mode button[type="submit"]:not(.year-reader-banner__btn):not(.reader-allow),
body.reader-mode .pt-count--btn:not(.reader-allow){
  opacity:.5; cursor:not-allowed; pointer-events:none;
}
/* garder la navigation, les accordéons, et le bouton « Quitter » cliquables */
body.reader-mode a,
body.reader-mode summary,
body.reader-mode .year-reader-banner,
body.reader-mode .year-reader-banner *,
body.reader-mode .reader-allow{
  pointer-events:auto !important; opacity:1 !important; cursor:pointer;
}
body.reader-mode .reader-ro-note{
  display:inline-block; font-size:.78rem; color:#92400e; background:#fef3c7;
  border:1px solid #fde68a; border-radius:6px; padding:.15rem .5rem; margin:.2rem 0;
}

/* ── « Remonter le temps » en place : ligne de point en mode archive (fond pastel vintage) ── */
.point-item--archive{
  background: linear-gradient(0deg, rgba(201,173,127,.13), rgba(201,173,127,.13)), #faf6ee;
  box-shadow: inset 3px 0 0 #c9ad7f;
  transition: background .2s;
}
.th-nav{ display:flex; align-items:center; gap:.4rem; margin-bottom:.35rem; }
.th-nav__year{ font-size:.82rem; font-weight:700; color:#8a6d3b; white-space:nowrap; }
.th-arrow{
  border:1px solid #d9c7a3; background:#fff; color:#8a6d3b; border-radius:50%;
  width:26px; height:26px; line-height:1; font-size:1rem; cursor:pointer; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
}
.th-arrow:hover:not(:disabled){ background:#f3e9d6; }
.th-arrow:disabled{ opacity:.35; cursor:not-allowed; }
.th-back{
  border:1px solid var(--border); background:#fff; color:var(--text); border-radius:14px;
  font-size:.76rem; padding:.15rem .6rem; cursor:pointer; margin-left:auto;
}
.th-back:hover{ background:var(--bg-hover,#f1f5f9); }
.th-modif-inline{ font-size:.76rem; color:#b45309; background:#fef3c7; border-radius:6px; padding:.1rem .5rem; display:inline-block; margin-top:.3rem; }
.th-nomodif-inline{ font-size:.76rem; color:#15803d; background:#dcfce7; border-radius:6px; padding:.1rem .5rem; display:inline-block; margin-top:.3rem; }
.th-none{ font-size:.82rem; color:var(--text-muted); }

/* ── Diff de contenu des cours/TD depuis une archive ── */
.arch-changes__doc-head{ display:flex; align-items:center; gap:.6rem; margin-bottom:.3rem; }
.arch-changes__doc-title{ font-weight:700; }
.arch-changes__doc-link{ font-size:.78rem; color:var(--primary); text-decoration:none; }
.arch-changes__doc-link:hover{ text-decoration:underline; }
.arch-changes__content{ max-height:320px; overflow:auto; margin:.3rem 0 .6rem; border:1px solid var(--border); border-radius:8px; padding:.4rem .6rem; background:#fafafa; }

/* ── Bandeau compte archivé (lecture seule étudiant/colleur) ── */
.year-reader-banner--acct{ background:#7c3aed; }

/* ── Diff « depuis l'archive » d'un cours (mode lecteur) ── */
.ldiff-sec{ margin:.6rem 0; }
.ldiff-sec__k{ font-size:.8rem; font-weight:700; color:var(--text-muted); margin-bottom:.2rem; }
.ldiff-btn{ white-space:nowrap; }

/* ── Programme de colle : accordéons par année scolaire ── */
.colle-year-acc{ border:1px solid var(--border); border-radius:10px; margin-bottom:.7rem; overflow:hidden; }
.colle-year-acc>summary{ cursor:pointer; padding:.6rem .9rem; background:var(--bg-hover,#f1f5f9); display:flex; align-items:center; gap:.6rem; font-size:.95rem; list-style:none; }
.colle-year-acc>summary::-webkit-details-marker{ display:none; }
.colle-year-acc>summary::before{ content:'▸'; color:var(--text-muted); transition:transform .15s; }
.colle-year-acc[open]>summary::before{ transform:rotate(90deg); }
.colle-year-acc__count{ font-size:.8rem; color:var(--text-muted); }
.colle-year-acc__tag{ font-size:.72rem; font-weight:700; border-radius:10px; padding:.1rem .5rem; }
.colle-year-acc__tag--active{ background:#dcfce7; color:#15803d; }
.colle-year-acc__tag--arch{ background:#f3e8ff; color:#9333ea; }
.colle-year-acc .table-responsive{ padding:.3rem .6rem .6rem; }

/* ── Diff d'énoncé dans « Remonter le temps » (points) ── */
.th-modif-toggle{ cursor:pointer; user-select:none; }
.th-diff-box{ margin-top:.35rem; padding:.4rem .6rem; border:1px solid #e5d9bf; border-radius:8px; background:#fdfaf3; font-size:.85rem; }
.th-diff-row{ margin:.2rem 0; }
.th-diff-k{ font-weight:700; color:var(--text-muted); font-size:.75rem; margin-right:.3rem; }

/* ── Détail cliquable des badges d'archive (Remonter le temps) ── */
.th-detail{ margin-top:.4rem; padding:.5rem .7rem; border:1px solid #e5d9bf; border-radius:8px; background:#fffdf8; }
.th-detail__hd{ font-weight:700; font-size:.82rem; color:#8a6d3b; margin-bottom:.3rem; }
.th-detail__list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.15rem; }
.th-detail__list li{ display:flex; justify-content:space-between; gap:.6rem; font-size:.85rem; padding:.12rem 0; border-bottom:1px dotted #eadfc6; }
.th-detail__list li:last-child{ border-bottom:0; }
.th-detail__note{ font-weight:600; white-space:nowrap; color:#334155; }
.th-detail__note em{ color:var(--text-muted); font-weight:400; }
.th-detail__empty{ font-size:.83rem; color:var(--text-muted); margin:0; }
.pt-count__sub{ font-size:.72rem; color:var(--text-muted); font-weight:400; }

/* ── Détail de sondage (historique) : pleine largeur, énoncé + options + photo ── */
.ph-head{ display:flex; gap:1rem; align-items:flex-start; position:relative; padding-bottom:.8rem; margin-bottom:.8rem; border-bottom:1px solid var(--border); }
.ph-head__main{ flex:1; min-width:0; }
.ph-head__q{ font-size:1rem; font-weight:600; margin:0 0 .4rem; color:var(--text); }
.ph-head__meta{ display:flex; gap:.4rem; flex-wrap:wrap; margin-bottom:.6rem; }
.ph-chip{ font-size:.72rem; background:var(--bg-hover,#f1f5f9); color:var(--text-muted); border-radius:10px; padding:.12rem .55rem; }
.ph-chip--ok{ background:#dcfce7; color:#15803d; font-weight:600; }
.ph-opts{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.25rem; }
.ph-opts__li{ display:flex; align-items:center; gap:.5rem; font-size:.88rem; padding:.25rem .5rem; border:1px solid var(--border); border-radius:7px; background:#fff; }
.ph-opts__li--ok{ border-color:#86efac; background:#f0fdf4; }
.ph-opts__letter{ display:inline-flex; align-items:center; justify-content:center; width:1.5rem; height:1.5rem; border-radius:50%; background:var(--bg-hover,#eef2f7); font-weight:700; font-size:.78rem; flex-shrink:0; }
.ph-opts__li--ok .ph-opts__letter{ background:#22c55e; color:#fff; }
.ph-opts__txt{ flex:1; min-width:0; }
.ph-opts__ok{ color:#16a34a; font-weight:700; }
.ph-head__img{ flex-shrink:0; }
.ph-head__img img{ max-width:220px; max-height:160px; border-radius:8px; border:1px solid var(--border); }
.ph-edit{ position:absolute; top:0; right:0; width:1.9rem; height:1.9rem; display:inline-flex; align-items:center; justify-content:center; border-radius:7px; color:var(--text-muted); text-decoration:none; opacity:.5; transition:opacity .15s,background .15s; }
.ph-edit:hover{ opacity:1; background:var(--bg-hover,#f1f5f9); }
.ph-bars{ display:flex; flex-direction:column; gap:.35rem; }
.ph-bar-opt{ font-size:.8rem; color:var(--text-muted); min-width:9rem; max-width:14rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex-shrink:0; }
.ph-answer-cols--wide{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.6rem; }
.ph-label-hint,.ph-stat__hint{ font-size:.74rem; font-weight:400; color:var(--text-muted); }
.ph-stat--note{ align-self:center; max-width:22rem; }

/* ── Mode lecteur : badges de point + liens vers devoirs/copies archivés ── */
.pt-reader-tag{ font-size:.75rem; color:#7c3aed; background:#f3e8ff; border:1px solid #e9d5ff; border-radius:6px; padding:.15rem .5rem; margin-bottom:.35rem; display:inline-block; }
.pt-dvlinks{ font-size:.82rem; color:var(--text-muted); margin:.3rem 0 .5rem; }
.pt-dvlink{ color:#2563eb; text-decoration:none; }
.pt-dvlink:hover{ text-decoration:underline; }
.pt-copielinks{ font-size:.8rem; color:var(--text-muted); margin-left:.4rem; }

/* ── Gestion du site : onglets avec swipe ── */
.gestion-tabs{ display:flex; align-items:center; gap:.45rem; flex-wrap:nowrap; overflow-x:auto; padding:.35rem .2rem .55rem; margin-bottom:1rem; border-bottom:1px solid var(--border); -webkit-overflow-scrolling:touch; }
.gestion-tabs__title{ font-weight:700; font-size:.85rem; color:var(--text-muted); white-space:nowrap; margin-right:.3rem; }
.gestion-tabs__tab{ white-space:nowrap; padding:.35rem .8rem; border:1px solid var(--border); border-radius:999px; text-decoration:none; color:var(--text); font-size:.86rem; background:#fff; transition:background .15s,border-color .15s; }
.gestion-tabs__tab:hover{ background:var(--bg-hover,#f1f5f9); }
.gestion-tabs__tab--active{ background:var(--primary); border-color:var(--primary); color:#fff; font-weight:600; }
.gestion-tabs__hint{ margin-left:auto; font-size:.72rem; color:var(--text-muted); white-space:nowrap; }
/* ── TP : quiz rattaché supprimé/archivé (lien cassé) ── */
.tp-quiz-broken{ background:#fef3c7; border:1px solid #fcd34d; border-radius:8px; padding:.5rem .7rem; margin:.35rem 0 .6rem; font-size:.85rem; display:flex; flex-direction:column; gap:.3rem; }
.tp-quiz-broken a{ color:#92400e; font-weight:600; }
/* ── Mise à jour : sauvegardes de patchs ── */
.upd-backup{ display:flex; align-items:flex-start; gap:.8rem; justify-content:space-between; padding:.55rem 0; border-bottom:1px solid var(--border); }
.upd-backup:last-child{ border-bottom:none; }
.upd-backup__main{ flex:1; min-width:0; font-size:.9rem; }
.upd-backup__info{ margin:.3rem 0 0; font-size:.75rem; color:var(--text-muted); background:var(--bg-card,#f8fafc); border-radius:6px; padding:.35rem .5rem; white-space:pre-wrap; }

/* ── TP : accordéon par année, puis par thème ── */
.tp-year-list{ display:flex; flex-direction:column; gap:.6rem; }
.tp-year-acc{ border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#fff; }
.tp-year-acc[open]{ box-shadow:0 1px 3px rgba(0,0,0,.04); }
.tp-year-acc__sum{ display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.6rem .9rem; cursor:pointer; list-style:none; background:var(--bg-card,#f8fafc); font-weight:600; }
.tp-year-acc__sum::-webkit-details-marker{ display:none; }
.tp-year-acc__sum::before{ content:'▸'; color:var(--text-muted); transition:transform .15s; display:inline-block; margin-right:.1rem; }
.tp-year-acc[open] .tp-year-acc__sum::before{ transform:rotate(90deg); }
.tp-year-acc__yr{ flex:1; }
.tp-year-acc__cur{ font-size:.7rem; font-weight:600; color:#15803d; background:#dcfce7; border-radius:10px; padding:.05rem .5rem; margin-left:.4rem; }
.tp-year-acc__n{ font-size:.78rem; color:var(--text-muted); font-weight:500; }
.tp-theme-grp{ padding:.4rem .9rem .7rem; border-top:1px solid var(--border); }
.tp-theme-grp:first-of-type{ border-top:none; }
.tp-theme-grp__h{ font-size:.82rem; font-weight:600; color:var(--primary); margin:.4rem 0 .35rem; }
.tp-theme-grp__n{ display:inline-block; font-size:.72rem; color:var(--text-muted); background:var(--bg-hover,#eef2f7); border-radius:9px; padding:.02rem .45rem; margin-left:.2rem; }

/* Note OPcache dans le rapport de patch */
.upd-opcache-note{ margin-top:.6rem; background:#eff6ff; border:1px solid #bfdbfe; border-radius:8px; padding:.5rem .7rem; font-size:.83rem; color:#1e40af; }

/* ── TP : thèmes prédéfinis suggérés ── */
.tp-preset-box{ background:var(--bg-card,#f8fafc); border:1px dashed var(--border); border-radius:10px; padding:.6rem .8rem; margin-bottom:1rem; }
.tp-preset-box__h{ display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom:.5rem; font-size:.82rem; font-weight:600; color:var(--text-muted); }
.tp-preset-chips{ display:flex; flex-wrap:wrap; gap:.4rem; }
.tp-preset-chip{ display:inline-flex; align-items:center; gap:.35rem; padding:.3rem .7rem; border:1px solid var(--border); border-radius:999px; background:#fff; cursor:pointer; font-size:.85rem; color:var(--text); transition:background .15s,border-color .15s; }
.tp-preset-chip:hover{ background:var(--primary); border-color:var(--primary); color:#fff; }
.tp-preset-chip__plus{ font-weight:700; opacity:.6; }
.tp-preset-chip:hover .tp-preset-chip__plus{ opacity:1; }

/* ── Histogramme point : panneau des étudiants au survol d'un bâtonnet ── */
.pt-bar-detail{ margin-top:.5rem; border:1px solid var(--border); border-radius:8px; padding:.5rem .7rem; background:var(--bg-card,#f8fafc); font-size:.86rem; min-height:2.4rem; }
.pt-bar-detail--empty{ color:var(--text-muted); font-style:italic; }
.pt-bar-detail__h{ font-weight:600; margin-bottom:.35rem; color:var(--primary); }
.pt-bar-detail__row{ display:flex; align-items:center; gap:.5rem; padding:.12rem 0; }
.pt-bar-detail__nom{ flex:1; min-width:0; }
.pt-bar-detail__note{ font-weight:600; }

/* ── Histogrammes par DS (évolution) ── */
.pt-dshist{ margin-top:.8rem; padding-top:.6rem; border-top:1px solid var(--border); }
.pt-dshist:first-of-type{ border-top:none; }
.pt-dshist--global{ margin-top:1rem; padding-top:.8rem; border-top:2px solid var(--primary); }
.pt-dshist__h{ font-size:.9rem; font-weight:600; margin-bottom:.3rem; }
.pt-dshist__meta{ font-weight:400; color:var(--text-muted); font-size:.8rem; }

/* ── Aperçu prof quiz : mode de révélation des réponses ── */
.quiz-reveal-info{ background:#eff6ff; border:1px solid #bfdbfe; border-radius:8px; padding:.55rem .75rem; margin:.6rem 0 1rem; font-size:.86rem; color:#1e3a8a; }
.quiz-reveal-info .qri-ok{ color:#15803d; font-weight:600; }
.quiz-reveal-info .qri-wait{ color:#b45309; font-weight:600; }
.quiz-reveal-info .qri-sched{ margin-top:.3rem; color:#475569; }

/* ── Correction : copie archivée en lecture seule ── */
.corr-readonly-banner{ background:#fef3c7; border:1px solid #fcd34d; border-radius:8px; padding:.5rem .8rem; margin:0 0 .6rem; font-size:.88rem; color:#92400e; text-align:center; }
.corr-wrap--readonly .corr-score-input, .corr-wrap--readonly input[type=number]{ background:#f8fafc; }

/* ── Radar de compétences dans le panneau de correction admin ── */
.corr-radar-wrap{ margin-top:1rem; padding-top:.8rem; border-top:1px solid var(--border); }

/* ── Éditeur de raccourcis clavier (correction) ── */
.corr-help__head{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-bottom:.5rem; }
.corr-help__head strong{ font-size:.9rem; }
.corr-help__hint{ font-size:.78rem; color:var(--text-muted); flex:1; min-width:140px; }
.corr-help__grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:.35rem .8rem; }
.kbd-row{ display:flex; align-items:center; justify-content:space-between; gap:.5rem; font-size:.82rem; }
.kbd-row__lbl{ color:var(--text); }
.kbd-key{ min-width:64px; padding:.2rem .5rem; border:1px solid var(--border); border-radius:6px; background:#fff; font-family:ui-monospace,monospace; font-size:.8rem; cursor:pointer; text-align:center; box-shadow:0 1px 0 rgba(0,0,0,.06); transition:background .12s,border-color .12s; }
.kbd-key:hover{ background:var(--bg-hover,#eef2f7); }
.kbd-key--cap{ background:#fff7ed; border-color:#fb923c; color:#c2410c; animation:kbdPulse 1s ease-in-out infinite; }
@keyframes kbdPulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(251,146,60,.4);} 50%{ box-shadow:0 0 0 4px rgba(251,146,60,0);} }
.corr-help__fixed{ margin-top:.6rem; padding-top:.5rem; border-top:1px solid var(--border); font-size:.78rem; color:var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   PIED DE PAGE : auteur + à propos + formulaire de contact
   ══════════════════════════════════════════════════════════ */
.site-footer__grid{ display:grid; grid-template-columns:1.2fr 1fr; gap:2rem; align-items:start; }
.site-footer__brand{ font-size:1.15rem; font-weight:700; margin-bottom:.5rem; }
.site-footer__desc{ font-size:.86rem; line-height:1.5; opacity:.9; margin:0 0 .7rem; }
.site-footer__author{ font-size:.88rem; margin:0 0 .7rem; line-height:1.4; }
.site-footer__author span{ opacity:.85; font-size:.82rem; }
.site-footer__contact-title{ font-size:1rem; font-weight:700; margin-bottom:.35rem; }
.site-footer__contact-intro{ font-size:.84rem; opacity:.9; margin:0 0 .6rem; }
.contact-form{ display:flex; flex-direction:column; gap:.5rem; }
.contact-form__row{ display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
.contact-form .form-control{ font-size:.88rem; }
.contact-form__foot{ display:flex; align-items:center; justify-content:space-between; gap:.6rem; flex-wrap:wrap; }
.contact-form__note{ font-size:.74rem; opacity:.8; }
.contact-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.site-footer__bottom{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1.4rem; padding-top:1rem; border-top:1px solid rgba(255,255,255,.12); font-size:.82rem; opacity:.9; flex-wrap:wrap; }
.site-footer__admin{ color:inherit; text-decoration:none; border:1px solid rgba(255,255,255,.25); border-radius:6px; padding:.2rem .6rem; font-size:.8rem; transition:background .15s; }
.site-footer__admin:hover{ background:rgba(255,255,255,.14); }
@media (max-width:720px){ .site-footer__grid{ grid-template-columns:1fr; gap:1.4rem; } .contact-form__row{ grid-template-columns:1fr; } }

/* ── Admin : boîte de réception des messages ── */
.ct-tabs{ display:flex; gap:.4rem; border-bottom:1px solid var(--border); margin-bottom:1rem; flex-wrap:wrap; }
.ct-tab{ padding:.45rem .8rem; text-decoration:none; color:var(--text-muted); border-bottom:2px solid transparent; font-size:.9rem; }
.ct-tab.active{ color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.ct-tab__n{ display:inline-block; font-size:.72rem; background:var(--bg-hover,#eef2f7); border-radius:9px; padding:.02rem .45rem; margin-left:.2rem; }
.ct-list{ display:flex; flex-direction:column; gap:.7rem; }
.ct-msg{ border:1px solid var(--border); border-radius:10px; padding:.8rem 1rem; background:#fff; }
.ct-msg--nouveau{ border-left:4px solid var(--primary); background:#f8faff; }
.ct-msg__head{ display:flex; align-items:baseline; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.ct-msg__mail{ margin-left:.5rem; font-size:.84rem; color:var(--primary); text-decoration:none; }
.ct-msg__meta{ font-size:.78rem; color:var(--text-muted); white-space:nowrap; }
.ct-msg__ip{ opacity:.8; }
.ct-msg__subject{ font-weight:600; margin:.3rem 0 .1rem; }
.ct-msg__body{ font-size:.9rem; line-height:1.5; margin:.4rem 0 .6rem; white-space:pre-line; }
.ct-msg__actions{ display:flex; gap:.4rem; flex-wrap:wrap; }

/* ══════════════════════════════════════════════════════════
   ADMIN QUIZ : groupes par thème + grille de cartes pleine largeur
   ══════════════════════════════════════════════════════════ */
.qzl-group{ margin-bottom:1.3rem; }
.qzl-group__head{ display:flex; align-items:baseline; gap:.6rem; margin-bottom:.55rem; padding-bottom:.3rem; border-bottom:2px solid var(--primary); }
.qzl-group__name{ font-size:1rem; font-weight:700; color:var(--primary); }
.qzl-group__count{ font-size:.78rem; color:var(--text-muted); }
.qzl-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(330px, 1fr)); gap:.7rem; }
.qzl-card{ display:flex; flex-direction:column; gap:.35rem; border:1px solid var(--border); border-left:4px solid #16a34a; border-radius:10px; background:var(--bg-card,#fff); padding:.7rem .85rem; }
.qzl-card--closed{ border-left-color:#94a3b8; }
.qzl-card__title{ display:flex; align-items:flex-start; gap:.35rem; }
.qzl-card__name{ font-weight:600; font-size:.95rem; line-height:1.3; flex:1; min-width:0; }
.qzl-card__meta{ display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; font-size:.8rem; color:var(--text-muted); }
.qzl-badge--hidden{ background:#eee; border-radius:6px; padding:.05rem .4rem; font-size:.72rem; }
.qzl-card__used{ font-size:.76rem; color:var(--text-muted); }
.qzl-card__used a{ color:var(--primary); text-decoration:none; }
.qzl-card__actions{ display:flex; flex-wrap:wrap; gap:.3rem; margin-top:auto; padding-top:.45rem; border-top:1px dashed var(--border); }
.tp-year-acc__arch{ font-size:.7rem; font-weight:600; color:#92400e; background:#fef3c7; border-radius:10px; padding:.05rem .5rem; margin-left:.4rem; }

/* ── Import de barème depuis un autre devoir ── */
.bimp{ border:1px dashed var(--primary); border-radius:10px; margin-bottom:1rem; background:#f8faff; }
.bimp__sum{ cursor:pointer; padding:.6rem .9rem; font-weight:600; color:var(--primary); list-style:none; }
.bimp__sum::-webkit-details-marker{ display:none; }
.bimp__hint{ font-weight:400; font-size:.8rem; color:var(--text-muted); }
.bimp__body{ padding:.2rem .9rem .8rem; }
.bimp__row{ max-width:560px; }
.bimp__qs{ margin-top:.6rem; display:flex; flex-direction:column; gap:.25rem; }
.bimp__qs-title{ font-size:.86rem; font-weight:600; margin-bottom:.2rem; display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; }
.bimp__all{ font-weight:400; font-size:.78rem; color:var(--text-muted); }
.bimp__q{ display:flex; align-items:center; gap:.45rem; font-size:.86rem; padding:.2rem .4rem; border-radius:6px; }
.bimp__q:hover{ background:#eef2fb; }
.bimp__q-meta{ color:var(--text-muted); font-size:.78rem; }
.bimp__actions{ display:flex; align-items:center; gap:.5rem; margin-top:.6rem; flex-wrap:wrap; }
.bimp__note{ font-size:.76rem; color:var(--text-muted); }

/* ── Mode observation (👁 voir en tant que) ── */
.obs-banner{ position:sticky; top:0; z-index:400; display:flex; align-items:center; justify-content:center; gap:1rem; flex-wrap:wrap; background:#312e81; color:#fff; padding:.45rem 1rem; font-size:.86rem; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.obs-banner__quit{ color:#fff; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.4); border-radius:6px; padding:.15rem .6rem; text-decoration:none; font-weight:600; white-space:nowrap; }
.obs-banner__quit:hover{ background:rgba(255,255,255,.28); }
.obs-form{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }

/* ── Fenêtre du formulaire de contact (footer allégé) ──
   Renommée en .ctmodal : elle portait le même nom que la fenêtre de
   commentaire de la correction, et sa règle « position:fixed + flex »
   s'appliquait à celle-ci — d'où un formulaire disloqué, chaque élément
   devenu colonne d'une rangée. */
.ctmodal{ position:fixed; inset:0; z-index:600; background:rgba(15,23,42,.55); display:flex; align-items:center; justify-content:center; padding:1rem; }
.ctmodal[hidden]{ display:none; }
.ctmodal__panel{ background:#fff; color:var(--text); border-radius:12px; width:min(560px, 100%); max-height:90vh; overflow:auto; box-shadow:0 18px 50px rgba(0,0,0,.35); }
.ctmodal__head{ display:flex; align-items:center; justify-content:space-between; padding:.8rem 1rem; border-bottom:1px solid var(--border); font-size:1rem; }
.ctmodal__close{ border:none; background:none; font-size:1.4rem; line-height:1; cursor:pointer; color:var(--text-muted); padding:.1rem .4rem; }
.ctmodal__close:hover{ color:var(--text); }
.ctmodal__body{ padding:1rem; }

/* ── Mini-graphe d'évolution d'une capacité ── */
.cap-spark{ flex-shrink:0; display:inline-block; vertical-align:middle; }
.cap-spark circle{ cursor:help; }

/* ── Popover riche des matrices exercices/QCM × capacités ── */
.exm-pop{ position:absolute; z-index:520; background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 12px 32px rgba(0,0,0,.18); padding:.7rem .8rem; max-width:330px; font-size:.85rem; }
.exm-pop__title{ font-weight:600; margin-bottom:.5rem; line-height:1.3; }
.exm-pop__actions{ display:flex; gap:.4rem; flex-wrap:wrap; margin-bottom:.55rem; }
.exm-pop__stats{ display:flex; gap:.7rem; align-items:center; }
.exm-pop__pie{ text-align:center; flex-shrink:0; }
.exm-pop__pielbl{ font-size:.68rem; color:var(--text-muted); line-height:1.15; margin-top:.15rem; }
.exm-pop__nums{ display:flex; flex-direction:column; gap:.3rem; }
.exm-nopie{ display:inline-block; width:56px; text-align:center; color:var(--text-muted); font-size:1.1rem; }
.exm-colbtn--vu{ outline:2px solid #16a34a; outline-offset:2px; border-radius:6px; }

/* ── 🔗 exercice multi-points (côté étudiant) ── */
.exo-chain{ position:relative; display:inline-flex; align-items:center; margin-left:.35rem; cursor:help; font-size:.85em; opacity:.75; }
.exo-chain:hover, .exo-chain:focus{ opacity:1; outline:none; }
.exo-chain__tip{ display:none; position:absolute; left:50%; top:calc(100% + 6px); transform:translateX(-50%); z-index:300; background:#fff; color:var(--text); border:1px solid var(--border); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.16); padding:.5rem .65rem; font-size:.78rem; font-weight:400; white-space:nowrap; max-width:320px; }
.exo-chain:hover .exo-chain__tip, .exo-chain:focus .exo-chain__tip{ display:block; }
.exo-chain__pt{ display:block; white-space:normal; margin-top:.15rem; }

/* ── Carte exercice admin ÉPURÉE (une ligne) ── */
.exo-row{ border:1px solid var(--border); border-radius:9px; padding:.5rem .65rem; margin-bottom:.5rem; background:#fff; }
.exo-row--hidden{ opacity:.55; }
.exo-row__main{ display:flex; align-items:center; gap:.5rem; }
.exo-row__type{ font-size:1rem; flex-shrink:0; }
.exo-row__title{ font-weight:600; font-size:.92rem; line-height:1.25; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.exo-row__stats{ display:inline-flex; align-items:center; gap:.5rem; flex-shrink:0; }
.exo-mini-pie{ display:inline-flex; line-height:0; }
.exo-row__note{ font-weight:700; font-size:.86rem; color:var(--text); white-space:nowrap; }
.exo-row__note small{ font-weight:400; color:var(--text-muted); font-size:.72em; }
.exo-row__nb{ font-size:.82rem; color:var(--text-muted); white-space:nowrap; }
.exo-row__spacer{ flex:1 1 auto; }
.exo-row__icons{ display:inline-flex; align-items:center; gap:.15rem; flex-shrink:0; }
.exo-row__icons form{ display:inline; }
.exo-ic{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border:none; background:none; border-radius:6px; cursor:pointer; font-size:.95rem; text-decoration:none; color:var(--text); line-height:1; padding:0; }
.exo-ic:hover{ background:var(--bg-subtle,#f1f5f9); }
.exo-ic.is-active{ background:rgba(37,99,235,.12); }
.exo-ic--danger{ color:var(--error); }
.exo-ic.exo-vu-btn.is-on{ background:rgba(22,163,74,.14); }
.exo-ic-archive{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border:none; background:none; border-radius:6px; cursor:pointer; font-size:.95rem; }
.exo-ic-archive:hover{ background:var(--bg-subtle,#f1f5f9); }
.exo-row__points{ display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.4rem; padding-left:1.5rem; }
.exo-pt-badge{ font-size:.72rem; color:var(--text-muted); background:var(--bg-subtle,#f1f5f9); border:1px solid var(--border); border-radius:20px; padding:.08rem .5rem; }
/* La règle générique .exo-part{display:none} (ancien système à classe .open)
   masquait ces blocs quoi qu'il arrive : l'attribut hidden posé par
   exoTogglePart() ne pouvait rien y changer, et l'icône « Voir l'énoncé »
   semblait sans effet. Ici, c'est hidden qui décide. */
.exo-row .exo-part{ display:block; margin-top:.5rem; padding:.6rem .7rem; background:var(--bg-subtle,#f8fafc); border-radius:7px; border:1px solid var(--border); }
.exo-row .exo-part[hidden]{ display:none; }
.exo-row .exo-part--indice{ background:rgba(124,58,237,.05); }
.exo-row .exo-part--solution{ background:rgba(22,163,74,.05); }
/* Historique : bloc archives dans la modale ⏳ */
.pv-arch-title{ margin:.9rem 0 .4rem; font-weight:600; font-size:.9rem; }
.pv-arch-row{ display:flex; align-items:center; gap:.8rem; padding:.35rem .2rem; border-top:1px solid var(--border); font-size:.85rem; }
.pv-arch-year{ font-weight:600; min-width:90px; }
.pv-arch-cell{ min-width:70px; }
.pv-arch-chg{ color:var(--accent,#b45309); font-size:.78rem; }

/* ── Vue des options QCM (dépliée sous la ligne) ── */
.qcm-opts-view{ display:flex; flex-direction:column; gap:.25rem; }
.qcm-opt-view{ font-size:.85rem; padding:.15rem .3rem; border-radius:5px; }
.qcm-opt-view--ok{ background:rgba(22,163,74,.1); }
.qcm-opt-view--txt{ background:rgba(37,99,235,.07); }
.qcm-explic{ margin-top:.5rem; font-size:.82rem; color:var(--text-muted); font-style:italic; }

/* ── Colle : programme clignotant pour un étudiant nouvellement ajouté ── */
@keyframes progBlink { 0%,100%{ box-shadow:0 0 0 0 rgba(37,99,235,.0); border-color:var(--border); } 50%{ box-shadow:0 0 0 3px rgba(37,99,235,.35); border-color:#2563eb; } }
.prog-blink{ animation:progBlink 1.1s ease-in-out infinite; }
.prog-blink-hint{ margin-left:.4rem; font-size:.72rem; font-weight:600; color:#2563eb; animation:progBlink 1.1s ease-in-out infinite; padding:.05rem .3rem; border-radius:5px; }
.eval-noprog{ color:var(--text-muted); font-size:.85rem; padding:.6rem; background:var(--bg-subtle,#f8fafc); border-radius:8px; }

/* ── Promotions archivées (comptes) ── */
.prom-arch{ margin-top:1.5rem; border-top:2px dashed var(--border); padding-top:1rem; }
.prom-arch__h{ font-size:1rem; margin-bottom:.2rem; }
.prom-acc{ border:1px solid var(--border); border-radius:9px; margin-bottom:.5rem; background:#fff; }
.prom-acc__sum{ display:flex; align-items:center; gap:.6rem; padding:.6rem .8rem; cursor:pointer; list-style:none; font-weight:600; }
.prom-acc__sum::-webkit-details-marker{ display:none; }
.prom-acc__arrow{ transition:transform .15s; color:var(--text-muted); }
.prom-acc[open] .prom-acc__arrow{ transform:rotate(90deg); }
.prom-acc__name{ flex:1 1 auto; }
.prom-badge{ font-size:.7rem; color:var(--text-muted); background:var(--bg-subtle,#f1f5f9); border:1px solid var(--border); border-radius:20px; padding:.05rem .45rem; }

/* ── Radar : modale de progression agrandie + histogramme par point ── */
.radar-tl__zoom{ border:1px solid var(--border); background:#fff; border-radius:6px; padding:.1rem .5rem; font-size:.78rem; cursor:pointer; color:var(--primary,#2563eb); font-weight:600; }
.radar-tl__zoom:hover{ background:var(--bg-subtle,#f1f5f9); }
.radar-tl__svg--click{ cursor:zoom-in; }
.radar-tl__zoomhint{ text-align:center; font-size:.72rem; color:var(--text-muted); margin-top:.2rem; }
.radar-zoom__panel{ max-width:min(960px,96vw); width:960px; }
.radar-zoom__grid{ display:grid; grid-template-columns:1.5fr 1fr; gap:1rem; align-items:start; }
.radar-zoom__graph svg{ width:100%; height:auto; }
.radar-zoom__side{ border-left:1px solid var(--border); padding-left:1rem; min-height:200px; }
.radar-zoom__hint, .radar-zoom__none{ color:var(--text-muted); font-size:.85rem; }
.radar-zoom__pt{ margin-bottom:.6rem; }
.radar-zoom__ptlbl{ font-weight:700; font-size:.9rem; }
.radar-zoom__ptnums{ font-size:.85rem; margin-top:.15rem; }
.rzh{ margin-top:.4rem; }
.rzh__t{ font-size:.8rem; font-weight:600; margin-bottom:.4rem; }
.rzh__hint{ font-weight:400; color:var(--text-muted); }
.rzh__bars{ display:flex; align-items:flex-end; gap:3px; height:120px; }
.rzh__col{ flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; }
.rzh__col.is-mine .rzh__x{ color:var(--text); font-weight:700; }
.rzh__n{ font-size:.68rem; color:var(--text-muted); height:1em; }
.rzh__bar{ width:100%; border-radius:3px 3px 0 0; min-height:2px; transition:height .2s; }
.rzh__x{ font-size:.66rem; color:var(--text-muted); margin-top:.15rem; }
.rzh__foot{ font-size:.72rem; color:var(--text-muted); margin-top:.4rem; }
.rzh__me{ display:inline-block; width:10px; height:10px; border-radius:2px; vertical-align:middle; }
@media (max-width:640px){ .radar-zoom__grid{ grid-template-columns:1fr; } .radar-zoom__side{ border-left:none; border-top:1px solid var(--border); padding-left:0; padding-top:.8rem; } }

/* ── Quiz étudiant : cartes cours/TD/TP non cliquables + liens d'usage ── */
.quiz-card--nolink{ cursor:default; }
.quiz-card__links{ margin-top:.35rem; display:flex; flex-direction:column; gap:.15rem; }
.quiz-card__uselink{ font-size:.78rem; color:var(--primary,#2563eb); text-decoration:none; }
.quiz-card__uselink:hover{ text-decoration:underline; }
.quiz-card__nouse{ font-size:.75rem; color:var(--text-muted); font-style:italic; }

/* ── LaTeX I/O ── */
.lio-grid{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
@media (max-width:720px){ .lio-grid{ grid-template-columns:1fr; } }
.lio-card{ border:1px solid var(--border); border-radius:10px; padding:.8rem 1rem; background:var(--bg-subtle,#f8fafc); }
.lio-card h3{ font-size:.88rem; margin:0 0 .5rem; font-family:ui-monospace,monospace; }
.lio-ul{ margin:.2rem 0 0 1.1rem; font-size:.85rem; display:flex; flex-direction:column; gap:.25rem; }
.lio-checks{ display:flex; gap:1rem; flex-wrap:wrap; margin-top:.4rem; font-size:.9rem; }
.lio-icons{ display:inline-flex; gap:.15rem; margin-left:.5rem; vertical-align:middle; }
.lio-icon{ font-size:1.05rem; text-decoration:none; padding:.1rem .3rem; border-radius:6px; }
.lio-icon:hover{ background:var(--bg-subtle,#f1f5f9); }

/* ── Agenda étudiant (lecture seule) ── */
.gcal--eleve .gcell{ min-height:86px; }
.ag-it{ padding:.45rem .2rem; border-bottom:1px solid var(--border); font-size:.9rem; }
.ag-it:last-child{ border-bottom:none; }
.ag-it__desc{ color:var(--text-muted); font-size:.82rem; margin-top:.15rem; white-space:pre-line; }
.ag-it__lien{ font-size:.85rem; margin-top:.15rem; }
.ag-it--colle{ background:var(--bg-subtle,#f8fafc); border-radius:6px; }

/* ── Diagnostic e-mail (Gestion du site) ── */
.upd-mailchk{ list-style:none; margin:0 0 .8rem; padding:0; display:flex; flex-direction:column; gap:.3rem; font-size:.9rem; }
.upd-maillog{ margin-top:.8rem; border-radius:8px; padding:.7rem .9rem; font-size:.88rem; }
.upd-maillog.is-ok{ background:#ecfdf5; border:1px solid #6ee7b7; }
.upd-maillog.is-ko{ background:#fef2f2; border:1px solid #fca5a5; }
.upd-maillog pre{ margin:.5rem 0 0; max-height:260px; overflow:auto; font-size:.75rem; background:rgba(15,23,42,.05); padding:.5rem; border-radius:6px; white-space:pre-wrap; }

/* ── Maintenance & données ── */
.mnt-results{ border-left:4px solid var(--primary,#2563eb); }
.mnt-line{ padding:.2rem 0; font-size:.9rem; }
.mnt-line--e{ color:#b91c1c; } .mnt-line--w{ color:#b45309; }
.mnt-snap{ display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; padding:.5rem 0; border-bottom:1px solid var(--border); }
.mnt-snap:last-child{ border-bottom:none; }
.mnt-snap__main{ flex:1; min-width:260px; font-size:.9rem; }
.mnt-snap__restore{ display:flex; gap:.4rem; align-items:center; }
.mnt-confirm{ max-width:130px; text-transform:uppercase; }
.mnt-danger{ border:1px solid #fca5a5; background:#fff7f7; }
.mnt-log{ max-height:260px; overflow:auto; font-size:.78rem; background:var(--bg-subtle,#f8fafc); padding:.6rem; border-radius:8px; white-space:pre-wrap; }

/* ══ v272 — Mobile : sidebar admin off-canvas, connexion, sondage direct, projection ══ */

/* Languette de la barre latérale admin : fine, translucide, collée au bord gauche.
   Invisible sur grand écran ; sur téléphone elle signale le panneau (tap ou glissé pour ouvrir). */
/* Languette d'ouverture du menu admin (mobile).
   Hauteur en pixels — et non en vh — sinon elle « saute » quand la barre d'URL
   du téléphone se rétracte au défilement. Promue sur sa propre couche pour ne
   pas être repeinte à chaque frame de scroll. */
.admin-sb-handle{ display:none; position:fixed; left:0; top:50%;
  transform:translate3d(0,-50%,0); will-change:transform; backface-visibility:hidden;
  width:9px; height:190px; border:none; border-radius:0 8px 8px 0;
  background:rgba(37,99,235,.45);
  z-index:335; cursor:pointer; padding:0; touch-action:manipulation; }
.admin-sb-ov{ display:none; }

@media (max-width: 900px){
  .admin-sb-handle{ display:block; }
  /* Le contenu ne doit jamais faire « glisser » la page horizontalement */
  html, body{ overflow-x:hidden; max-width:100vw; }
  .admin-content, .admin-main{ min-width:0; max-width:100%; overflow-x:hidden; }
  .admin-content table{ display:block; overflow-x:auto; }
  .admin-sb-ov.is-on{ display:block; position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:340; }
  .admin-layout{ display:block; }
  .admin-sidebar{
    position:fixed; top:0; left:0; bottom:0; width:min(78vw, 300px);
    transform:translateX(-105%); transition:transform .22s ease;
    z-index:350; border-radius:0; margin:0; overflow-y:auto;
    box-shadow:8px 0 30px rgba(0,0,0,.18); padding-top:.8rem;
  }
  .admin-sidebar.is-open{ transform:none; }
  body.sb-lock{ overflow:hidden; }
  .admin-main, .admin-content{ padding-left:0; }
}

/* Connexion accessible sur mobile : le menu « Se connecter ▾ » (barre fixée en bas
   quand le burger est ouvert) se déploie VERS LE HAUT, sinon il sortait de l'écran. */
.site-header.nav-collapsed.nav-open .nav-auth .nav-dropdown__menu,
.site-header.nav-collapsed.nav-open .header-auth .nav-dropdown__menu{
  bottom:calc(100% + .45rem); top:auto; max-height:62vh; overflow-y:auto;
}

/* Console « sondage en direct » (téléphone) : cellules en grille fluide, toujours rangées */
.plive__cells{ display:grid; grid-template-columns:repeat(auto-fill, minmax(78px, 1fr)); gap:.4rem; }
.pcell{ width:auto; min-height:84px; height:auto; }

/* Panneau « ⬤ EN COURS » (admin/polls.php) : empilé proprement sur petit écran */
.poll-active-header{ display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
@media (max-width: 640px){
  .poll-active-header{ flex-direction:column; }
  .poll-active-header .btn{ width:100%; }
}

/* Projection : l'adresse de vote, lisible depuis le fond de la salle */
.poll-url{ display:inline-block; background:#f8fafc; color:#0f172a; border-radius:12px;
  padding:.5rem 1.1rem; font-size:clamp(1rem, 2.2vw, 1.7rem); letter-spacing:.01em; }
.poll-url strong{ color:#1d4ed8; }

/* Vote étudiant : boutons de choix sur une colonne en mobile */
@media (max-width: 560px){
  .poll-choices{ grid-template-columns:1fr !important; }
}

/* ══ v274 — Sondages : onglets, console intégrée, historique par objet ══ */
.pol-tabs{ display:flex; gap:.35rem; margin-bottom:1rem; border-bottom:2px solid var(--border); }
.pol-tab{ border:none; background:none; padding:.55rem .9rem; font-weight:700; font-size:.92rem; color:var(--text-muted);
  cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-2px; }
.pol-tab.is-on{ color:var(--primary); border-bottom-color:var(--primary); }
.pol-pane{ display:none; }
.pol-pane.is-on{ display:block; }

/* Deux gros boutons */
.pol-choice2{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:.4rem; }
@media (max-width:680px){ .pol-choice2{ grid-template-columns:1fr; } }
.pol-big{ margin:0; display:block; }
.pol-big__btn{ width:100%; display:flex; flex-direction:column; align-items:center; gap:.35rem; text-align:center;
  padding:1.6rem 1.2rem; border-radius:14px; border:2px solid var(--border); background:var(--bg-card,#fff);
  cursor:pointer; text-decoration:none; color:var(--text); transition:border-color .15s, transform .12s; }
.pol-big__btn:hover{ border-color:var(--primary); transform:translateY(-2px); }
.pol-big__btn--live:hover{ border-color:#dc2626; }
.pol-big__ico{ font-size:2rem; }
.pol-big__t{ font-weight:800; font-size:1.06rem; }
.pol-big__s{ font-size:.83rem; color:var(--text-muted); max-width:34ch; }

/* Console intégrée */
.pcon{ border:1px solid var(--border); border-radius:14px; background:var(--bg-card,#fff); padding:1rem 1.1rem;
  display:flex; flex-direction:column; gap:.6rem; }
.pcon__head{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.pcon__count{ font-weight:700; color:var(--primary); font-size:.92rem; }
.pcon__moy{ border:1.5px solid var(--border); background:var(--bg-subtle,#f8fafc); border-radius:999px;
  padding:.3rem .8rem; font-size:.8rem; font-weight:700; cursor:pointer; color:var(--text-muted); }
.pcon__moy.is-on{ border-color:#16a34a; color:#15803d; background:#f0fdf4; }
.pcon__titre{ border:1px solid var(--border); border-radius:8px; padding:.45rem .6rem; font-weight:700; }
.pcon__q{ border:1px solid var(--border); border-radius:8px; padding:.45rem .6rem; resize:vertical; font:inherit; }
.pcon__qtxt{ font-size:1.05rem; margin:.1rem 0; }
.pcon__img{ max-height:260px; max-width:100%; object-fit:contain; border-radius:10px; align-self:flex-start; }
.pcon__photo img{ max-height:200px; max-width:100%; border-radius:10px; display:block; margin-bottom:.4rem; }
.pcon__photo-btns{ display:flex; gap:.4rem; }
.pcon__opts{ display:flex; flex-direction:column; gap:.35rem; }
.pcon__opt{ position:relative; display:flex; align-items:center; gap:.5rem; border:1px solid var(--border);
  border-radius:9px; padding:.35rem .55rem; overflow:hidden; }
.pcon__opt::before{ content:''; position:absolute; inset:0; width:var(--pcbar,0%); background:var(--primary);
  opacity:.10; transition:width .4s; pointer-events:none; }
.pcon__opt--ro.is-good{ border-color:#16a34a; background:#f0fdf4; }
.pcon__star{ border:none; background:none; font-size:1.05rem; color:#cbd5e1; cursor:pointer; padding:0 .1rem; }
.pcon__star.is-on{ color:#f59e0b; }
.pcon__l{ font-weight:800; color:var(--primary); width:1.3rem; text-align:center; }
.pcon__opt input{ flex:1; border:none; outline:none; background:transparent; font:inherit; min-width:0; }
.pcon__t{ flex:1; }
.pcon__n{ font-variant-numeric:tabular-nums; font-weight:700; color:var(--text-muted); font-size:.85rem; min-width:1.6rem; text-align:right; }
.pcon__del{ border:none; background:none; color:#e0245e; opacity:.55; cursor:pointer; font-size:.9rem; }
.pcon__del:hover{ opacity:1; }
.pcon__msg{ min-height:1.1em; font-size:.82rem; color:var(--text-muted); }
.pcon__foot{ display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; border-top:1px solid var(--border); padding-top:.7rem; }
.pcon__foot form{ margin:0; }
.pcon__browse{ display:flex; flex-direction:column; gap:.35rem; border-top:1px dashed var(--border); padding-top:.6rem; max-height:320px; overflow-y:auto; }
.pcon__bitem{ display:flex; flex-direction:column; gap:.1rem; border:1px solid var(--border); border-radius:9px;
  padding:.45rem .6rem; text-decoration:none; color:var(--text); font-size:.85rem; }
.pcon__bitem:hover{ border-color:var(--primary); background:var(--bg-subtle,#f8fafc); }
.pcon__bitem.is-on{ border-color:var(--primary); background:#eff6ff; }
.pcon__bitem em{ color:var(--text-muted); font-style:normal; font-size:.75rem; }

/* Historique par objet : les infos occupent la LARGEUR, actions compactes à droite */
.pobj{ border:1px solid var(--border); border-radius:11px; background:var(--bg-card,#fff); }
.pobj__row{ display:flex; gap:.8rem; align-items:flex-start; padding:.6rem .8rem; }
.pobj__main{ flex:1; min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .55rem; }
.pobj__q{ flex-basis:100%; font-size:.85rem; color:var(--text); }
.pobj__meta{ flex-basis:100%; font-size:.76rem; color:var(--text-muted); font-style:normal; }
.pobj__acts{ flex:none; display:flex; gap:.35rem; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.pobj__sessions{ display:none; border-top:1px solid var(--border); padding:.4rem .8rem .6rem; flex-direction:column; gap:.3rem; }
.pobj.open .pobj__sessions{ display:flex; }
.pobj.open .ph-arrow{ transform:rotate(90deg); }
.pobj__sess{ display:flex; align-items:center; gap:.7rem; flex-wrap:wrap; font-size:.83rem; padding:.25rem 0; border-bottom:1px dashed var(--border); }
.pobj__sess:last-child{ border-bottom:none; }
.pobj__sess-n{ font-weight:800; color:var(--primary); }
.pobj__sess form{ margin:0; }
.pobj__coef{ display:flex; align-items:center; gap:.25rem; font-size:.76rem; color:var(--text-muted); }
.pobj__coef input{ width:60px; padding:.15rem .3rem; border:1px solid var(--border); border-radius:6px; }
.pobj__pagehead{ display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.pobj__pager{ display:flex; align-items:center; gap:.45rem; }
.pobj__pageno{ font-size:.85rem; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.pobj--draft{ background:var(--bg-subtle,#fafbfc); }

/* ══ v275 — Icône personne (connexion / mon espace) ══ */
.nav-person{ position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(255,255,255,.14); transition:background .15s; text-decoration:none; padding:0; }
.nav-person:hover{ background:rgba(255,255,255,.26); }
.nav-person__dot{ position:absolute; right:2px; bottom:2px; width:9px; height:9px; border-radius:50%;
  background:#22c55e; border:2px solid var(--primary); }
.page-admin .nav-person__dot{ border-color:var(--primary-dark); }

/* Bandeaux typés : devoir (vert), quiz (bleu), TP (violet) — gris quand terminé */
.gspan--quizwin.is-open{ background:#2563eb; }
.gspan--tpwin.is-open{ background:#7c3aed; }

/* ══ v275 — Modale commentaire de correction : lisible partout (fond opaque, contrastes fixes) ══ */
.cmodal-ov{ background:rgba(15,23,42,.55) !important; backdrop-filter:blur(2px); }
.cmodal{ background:#ffffff !important; color:#0f172a !important; width:min(94vw, 560px);
  padding:1.1rem 1.2rem; font-size:.95rem; }
.cmodal__title{ color:#0f172a; }
.cmodal__ta{ background:#fff; color:#0f172a; border:1.5px solid #cbd5e1; font-size:1rem; min-height:84px; }
.cmodal__ta:focus{ border-color:var(--primary); outline:none; }
.cmodal-fav{ display:flex; align-items:center; gap:.45rem; border:1px solid #e2e8f0; border-radius:8px;
  padding:.4rem .55rem; cursor:pointer; background:#f8fafc; }
.cmodal-fav:hover{ background:#eff6ff; border-color:var(--primary); }
.cmodal-fav__txt{ flex:1; min-width:0; color:#0f172a; font-size:.88rem; line-height:1.35; }
.cmodal-fav__use{ border:1px solid var(--primary); background:#fff; color:var(--primary); border-radius:6px;
  width:26px; height:26px; cursor:pointer; font-weight:800; flex:none; }
.cmodal-fav__use:hover{ background:var(--primary); color:#fff; }
.cmodal-fav__del{ border:none; background:none; color:#e0245e; opacity:.6; cursor:pointer; flex:none; }
.cmodal-fav__del:hover{ opacity:1; }
.cmodal__actions{ display:flex; justify-content:flex-end; gap:.5rem; margin-top:.8rem; }

/* Favoris de correction listés sous le bilan du devoir */
.dv-favs summary{ cursor:pointer; font-weight:600; }
.dv-favs__n{ color:var(--text-muted); font-weight:400; font-size:.82rem; }
.dv-favs__list{ display:flex; flex-direction:column; gap:.3rem; margin-top:.5rem; }
.dv-favs__row{ display:flex; align-items:flex-start; gap:.45rem; border:1px solid var(--border); border-radius:8px; padding:.4rem .55rem; font-size:.87rem; background:var(--bg-subtle,#f8fafc); }
.dv-favs__txt{ flex:1; min-width:0; white-space:pre-wrap; }
.dv-favs__row form{ margin:0; }
.dv-favs__del{ border:none; background:none; color:#e0245e; opacity:.6; cursor:pointer; }
.dv-favs__del:hover{ opacity:1; }
.dv-favs__gen{ margin-top:.55rem; }
.dv-favs__gen>summary{ font-size:.84rem; color:var(--text-muted); }

/* ══ v275 — Consultation de copie : bulle visible, commentaires du panneau, plein écran paysage ══ */
.corr-annot--comment{ font-size:1em; opacity:1; background:#fef3c7; border:2px solid #f59e0b;
  border-radius:50%; width:1.75em; height:1.75em; box-shadow:0 2px 8px rgba(245,158,11,.45); }
.corr-annot--comment:hover{ transform:translate(-50%,-50%) scale(1.12); }

.corr-coms{ border:1px solid var(--border); border-radius:10px; padding:.6rem .7rem; margin-bottom:.8rem; background:var(--bg-card,#fff); }
.corr-coms__title{ font-weight:700; font-size:.88rem; margin-bottom:.45rem; }
.corr-com{ display:flex; gap:.45rem; align-items:flex-start; padding:.4rem .5rem; border-radius:8px;
  cursor:pointer; font-size:.85rem; line-height:1.4; border:1px solid transparent; }
.corr-com:hover{ background:var(--bg-subtle,#f8fafc); }
.corr-com--peek{ background:#fef9c3; border-color:#f59e0b; }
.corr-com__ico{ flex:none; }
.corr-com__txt{ min-width:0; white-space:pre-wrap; }

/* Bouton plein écran : proposé sur petits écrans uniquement */
.corr-fs-btn{ display:none; }
@media (max-width:1024px){ .corr-fs-btn{ display:inline-flex; } }

/* Mode plein écran paysage : copie ¾ gauche, panneau ¼ droit défilant */
body.corr-fs .corr-wrap{ background:var(--bg,#fff); height:100vh; display:flex; flex-direction:column; }
body.corr-fs .corr-main{ display:grid !important; grid-template-columns:minmax(0,3fr) minmax(230px,1fr);
  flex:1; min-height:0; }
body.corr-fs .corr-pdf{ height:100%; max-height:none; overflow-y:auto; }
body.corr-fs .corr-panel{ display:flex !important; width:auto; max-width:none; max-height:none; height:100%;
  overflow-y:auto; border-left:1px solid var(--border); border-top:none; padding:.7rem .7rem 1rem; }
body.corr-fs .mbareme{ display:none !important; }
body.corr-fs .corr-bar{ flex:none; }
/* En portrait pendant le plein écran : inviter à tourner (iOS ne verrouille pas) */
body.corr-fs .corr-rotate{ display:none; }
@media (orientation:portrait){
  body.corr-fs .corr-rotate{ display:flex; position:fixed; inset:0; z-index:80; background:rgba(15,23,42,.92);
    color:#fff; align-items:center; justify-content:center; text-align:center; font-size:1.05rem; padding:2rem; }
}

/* ══ v276 — Interface téléphone intégrée au volet Console + grosses touches du mode préparé ══ */
/* Mode intégré (volet Console) : PAS de fond sombre ni de cadre — épuré, pleine largeur */
.plive--embed{ min-height:auto; background:transparent; color:var(--text); border-radius:0;
  padding:0; box-shadow:none; display:block; }
.plive--embed .plive__top{ gap:.6rem; margin-bottom:.7rem; }
.plive--embed .plive__state{ font-size:.9rem; }
/* Les rangées de touches passent en grille fluide qui remplit la largeur */
.plive--embed .plive__cells{ display:grid; grid-template-columns:repeat(3, 1fr); gap:.6rem; margin-bottom:.6rem; }
@media (max-width:420px){ .plive--embed .plive__cells{ grid-template-columns:repeat(2, 1fr); } }
.plive--embed .pcell{ width:auto; height:auto; min-height:92px; border-color:#e2e8f0;
  box-shadow:0 1px 3px rgba(15,23,42,.06); }
.plive--embed .pcell__ico{ font-size:1.7rem; }
.plive--embed .pcell__lb{ font-size:.7rem; }
.plive--embed .plive__dist{ margin-top:.4rem; }

.plive__moy{ margin-left:auto; border:1.5px solid var(--border); background:var(--bg-subtle,#f8fafc); color:var(--text-muted);
  border-radius:999px; padding:.4rem .9rem; font-size:.82rem; font-weight:700; cursor:pointer; line-height:1.2; }
.plive__moy.is-on{ border-color:#16a34a; color:#15803d; background:#f0fdf4; }

.pol-bigfoot{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:.55rem; margin-top:.8rem; }
@media (max-width:560px){ .pol-bigfoot{ grid-template-columns:1fr 1fr; } }
.pol-key{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.15rem;
  min-height:66px; border-radius:12px; border:2px solid var(--border); background:var(--bg-card,#fff);
  color:var(--text); text-decoration:none; font-weight:800; cursor:pointer; width:100%; padding:.4rem; }
.pol-key:hover{ border-color:var(--primary); }
.pol-key.is-off{ opacity:.35; pointer-events:none; }
.pol-key__ico{ font-size:1.25rem; line-height:1; }
.pol-key__lb{ font-size:.78rem; }
.pol-key--go{ background:#dc2626; border-color:#dc2626; color:#fff; }
.pol-key--go:hover{ border-color:#b91c1c; background:#b91c1c; }
.pol-key__form{ margin:0; display:contents; }

/* ══ v277 — Agenda : abonnement calendrier ══ */
.gcal-ics{ font-weight:600; }
.abo{ display:grid; gap:.7rem; margin-bottom:1.4rem; }
.abo__btn{ display:flex; align-items:center; gap:.9rem; border:2px solid var(--border); border-radius:12px;
  padding:.9rem 1.1rem; text-decoration:none; color:var(--text); background:var(--bg-card,#fff); transition:border-color .15s, transform .12s; }
.abo__btn:hover{ border-color:var(--primary); transform:translateY(-1px); }
.abo__ico{ font-size:1.8rem; }
.abo__txt{ display:flex; flex-direction:column; }
.abo__txt small{ color:var(--text-muted); font-size:.8rem; }
.abo__manual{ border:1px solid var(--border); border-radius:12px; padding:1rem 1.1rem; background:var(--bg-subtle,#f8fafc); }
.abo__manual-t{ font-weight:700; margin-bottom:.5rem; }
.abo__copy{ display:flex; gap:.5rem; }
.abo__copy input{ flex:1; min-width:0; border:1px solid var(--border); border-radius:8px; padding:.5rem .6rem; font-size:.82rem; font-family:monospace; background:#fff; }

/* ══ v279 — Histogramme du déplié d'historique + suppression d'objet ══ */
.pobj__sess-score{ font-weight:700; color:var(--primary); font-size:.78rem; }
.pobj__hist{ display:flex; flex-direction:column; gap:.3rem; padding:.1rem 0 .5rem 1.2rem; }
.phb{ display:flex; align-items:center; gap:.5rem; font-size:.8rem; }
.phb__l{ font-weight:800; color:var(--text-muted); min-width:2.6ch; }
.phb--good .phb__l{ color:#15803d; }
.phb__track{ position:relative; flex:1; min-width:0; height:20px; background:#f1f5f9; border-radius:6px; overflow:hidden; display:flex; align-items:center; }
.phb__fill{ position:absolute; left:0; top:0; bottom:0; background:#c7d2fe; transition:width .3s; }
.phb--good .phb__fill{ background:#bbf7d0; }
.phb__txt{ position:relative; padding:0 .45rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.phb__v{ font-weight:700; font-variant-numeric:tabular-nums; color:var(--text-muted); min-width:5ch; text-align:right; }
.pobj__delall{ color:#b91c1c; }
.pobj__delall:hover{ background:#fef2f2; }
.pobj__acts form{ margin:0; }

/* ══ v280 — Consultation de copie élève : refonte (barème seul + synthèse page 0 + plein écran) ══ */
.cv{ display:flex; flex-direction:column; height:calc(100vh - 60px); background:var(--bg,#fff); }
body.cv-fs .cv{ height:100vh; }

/* Barre discrète */
.cv-bar{ display:flex; align-items:center; gap:.5rem; padding:.35rem .6rem; border-bottom:1px solid var(--border);
  background:var(--bg-card,#fff); flex:none; }
.cv-bar__btn{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; flex:none;
  border:1px solid var(--border); border-radius:8px; background:var(--bg-subtle,#f8fafc); color:var(--text);
  text-decoration:none; font-size:1rem; cursor:pointer; }
.cv-bar__btn:hover{ border-color:var(--primary); }
.cv-bar__title{ flex:1; min-width:0; font-weight:600; font-size:.9rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cv-bar__note{ font-weight:800; color:var(--primary); font-size:.95rem; font-variant-numeric:tabular-nums; }

.cv-main{ flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) 320px; }
@media (max-width:1024px){ .cv-main{ grid-template-columns:minmax(0,1fr) 260px; } }

.cv-pdf{ overflow-y:auto; padding:12px; background:#f1f5f9; display:flex; flex-direction:column; align-items:center; gap:12px; scroll-behavior:smooth; }
.cv-pdf__loading{ margin:2rem; color:var(--text-muted); }
.cv-page{ position:relative; box-shadow:0 2px 10px rgba(15,23,42,.14); background:#fff; }
.cv-page canvas{ display:block; }

/* Annotations ancrées sur la page (jamais hors cadre) */
.cv-annot{ position:absolute; transform:translate(-50%,-50%); z-index:4; line-height:1; user-select:none;
  text-shadow:0 1px 2px rgba(0,0,0,.35); cursor:default; }
.cv-annot--check{ color:#16a34a; font-weight:800; }
.cv-annot--cross{ color:#dc2626; font-weight:800; }
.cv-annot--comment{ cursor:pointer; background:#fef3c7; border:2px solid #f59e0b; border-radius:50%;
  width:1.75em; height:1.75em; display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 8px rgba(245,158,11,.45); text-shadow:none; }
.cv-annot--comment:hover{ transform:translate(-50%,-50%) scale(1.12); }

/* Panneau : barème seul */
.cv-panel{ border-left:1px solid var(--border); background:var(--bg-card,#fff); overflow-y:auto; padding:.6rem .7rem 1.4rem; }
.cv-panel__t{ font-weight:800; font-size:.82rem; text-transform:uppercase; letter-spacing:.03em; color:var(--text-muted);
  padding:.2rem 0 .5rem; position:sticky; top:0; background:var(--bg-card,#fff); }
.cb-item.is-peek{ background:#fef9c3; box-shadow:0 0 0 2px #f59e0b; border-radius:8px; }

/* Page de synthèse (page 0) */
.cv-recap{ width:100%; max-width:820px; display:flex; justify-content:center; }
.cv-recap__sheet{ background:#fff; box-shadow:0 2px 10px rgba(15,23,42,.14); border-radius:4px; padding:1.6rem 1.5rem 2rem;
  width:100%; }
.cv-recap__h1{ font-size:1.4rem; margin:0 0 1rem; }
.cv-recap__note{ display:flex; align-items:baseline; gap:1.2rem; flex-wrap:wrap; margin-bottom:1.2rem;
  padding-bottom:1rem; border-bottom:2px solid var(--border); }
.cv-recap__big{ font-size:2.4rem; font-weight:800; color:var(--primary); }
.cv-recap__big small{ font-size:1.1rem; color:var(--text-muted); font-weight:600; }
.cv-recap__cours{ font-size:.9rem; color:var(--text-muted); }
.cv-recap__block{ margin-bottom:1.1rem; }
.cv-recap__bt{ font-weight:700; font-size:.9rem; margin-bottom:.35rem; }
.cv-recap__bb{ font-size:.9rem; line-height:1.5; background:var(--bg-subtle,#f8fafc); border-radius:8px; padding:.6rem .8rem; }
.cv-recap__block--prof .cv-recap__bb{ background:#eff6ff; }
.cv-recap__coms{ margin:0; padding-left:1.1rem; display:flex; flex-direction:column; gap:.3rem; }
.cv-recap__coms li{ font-size:.88rem; line-height:1.45; }
.cv-recap__hint{ text-align:center; color:var(--text-muted); font-size:.82rem; margin-top:1.4rem; padding-top:1rem; border-top:1px dashed var(--border); }

/* Bulle de commentaire (info-bulle) */
.cv-tip{ position:absolute; z-index:40; max-width:300px; background:#111827; color:#f9fafb; border-radius:10px;
  padding:.7rem .8rem .8rem; box-shadow:0 10px 30px rgba(0,0,0,.35); font-size:.86rem; line-height:1.45; }
.cv-tip__x{ position:absolute; top:.25rem; right:.35rem; border:none; background:none; color:#9ca3af; cursor:pointer; font-size:.9rem; }
.cv-tip__body{ padding-right:.8rem; white-space:pre-wrap; }

/* Voile mobile (rotation / plein écran) */
.cv-rotate{ display:none; position:fixed; inset:0; z-index:60; background:rgba(15,23,42,.93); color:#fff;
  align-items:center; justify-content:center; text-align:center; font-size:1.05rem; padding:2rem; cursor:pointer; }
body.cv-locked .cv-main{ filter:blur(3px); }

/* Bouton plein écran : seulement utile sur petits écrans */
@media (min-width:821px){ #cv-fs-btn{ display:none; } }

/* Page de consultation : header et pied du site masqués (barre discrète interne) */
body.cv-page-body .site-header{ display:none; }
body.cv-page-body .site-footer, body.cv-page-body footer{ display:none; }
body.cv-page-body{ overflow:hidden; }
body.cv-page-body .cv{ height:100vh; }

/* ══ v281 — Import de cours/TD ══ */
.imp-done{ border-left:4px solid #16a34a; }
.imp-warn{ margin:.4rem 0; padding-left:1.2rem; font-size:.85rem; color:#b45309; }
.imp-help summary{ cursor:pointer; }
.imp-code{ background:#0f172a; color:#e2e8f0; border-radius:8px; padding:.8rem 1rem; overflow-x:auto; font-size:.78rem; line-height:1.5; }

/* v282 — Import : complément des images manquantes */
.imp-miss__t{ font-weight:600; margin:.2rem 0 .4rem; }
.imp-miss{ display:flex; flex-wrap:wrap; gap:.35rem; list-style:none; padding:0; margin:0 0 .7rem; }
.imp-miss li code{ background:var(--bg-subtle,#f8fafc); border:1px solid var(--border); border-radius:6px;
  padding:.2rem .45rem; font-size:.8rem; }

/* ══════════ v283 — Cours enrichis : environnements, documents, notes ══════════ */

/* Largeur de lecture : ~2/3 de l'écran (au lieu de 720 px fixes) */
.lecon-wide{ max-width:clamp(720px, 68vw, 1320px); }

/* ── Encadrés d'environnement : liseré + symbole + fond pâle ── */
.lenv{ --envc:#2563eb; position:relative; margin:1.1rem 0; border-left:4px solid var(--envc);
  border-radius:0 10px 10px 0; background:color-mix(in srgb, var(--envc) 9%, transparent); }
.lenv__head{ display:flex; align-items:center; gap:.45rem; font-weight:700; font-size:.95rem;
  color:var(--envc); padding:.55rem .9rem .1rem; }
.lenv__ico{ font-size:1.05rem; line-height:1; }
.lenv__body{ padding:.35rem .9rem .8rem; }
.lenv__body > :first-child{ margin-top:0; }
.lenv__body > :last-child{ margin-bottom:0; }
/* Repli si color-mix n'est pas supporté (navigateurs anciens) */
@supports not (background: color-mix(in srgb, red 9%, transparent)){
  .lenv{ background:rgba(37,99,235,.07); }
}
/* Variante « formule » : encadré centré */
.lenv--formule{ border:2px solid var(--envc); border-radius:10px; text-align:center;
  background:color-mix(in srgb, var(--envc) 7%, transparent); padding:.2rem .6rem; }
.lenv--formule .lenv__head{ justify-content:center; padding-bottom:0; font-size:.85rem; }
.lenv--formule .lenv__body{ padding:.5rem .4rem .7rem; }

/* Numéro automatique des titres */
.lnum{ color:var(--primary); font-weight:700; margin-right:.15em; }

/* ── Notes de bas de page : appel + info-bulle ── */
.lfn{ display:inline-flex; align-items:center; justify-content:center; min-width:1.15em; height:1.15em;
  padding:0 .25em; margin-left:.12em; border-radius:999px; background:var(--primary); color:#fff;
  font-size:.62em; font-weight:800; cursor:pointer; vertical-align:super; line-height:1; }
.lfn:hover{ filter:brightness(1.15); }
.lfn-pop{ position:absolute; z-index:70; background:#111827; color:#f9fafb; border-radius:10px;
  padding:.6rem .75rem; box-shadow:0 10px 30px rgba(0,0,0,.35); font-size:.85rem; line-height:1.45; }

/* ── Cellule « document » : vignette cliquable, moitié de la largeur ── */
.ldoc{ display:flex; align-items:center; gap:1rem; width:50%; min-width:260px; margin:1rem 0;
  padding:.8rem .9rem; border:1px solid var(--border); border-radius:10px; background:var(--bg-card,#fff);
  text-decoration:none; color:var(--text); transition:border-color .15s, transform .12s; }
.ldoc:hover{ border-color:var(--primary); transform:translateY(-1px); }
.ldoc__ico{ flex:none; width:3cm; max-width:38%; display:flex; align-items:center; justify-content:center;
  font-size:3rem; line-height:1; color:#dc2626; }
.ldoc__ico img{ width:100%; height:auto; max-height:3cm; object-fit:contain; border-radius:6px; }
.ldoc__txt{ display:flex; flex-direction:column; gap:.15rem; min-width:0; }
.ldoc__label{ font-weight:700; }
.ldoc__desc{ font-size:.86rem; color:var(--text-muted); line-height:1.4; }
.ldoc__open{ font-size:.78rem; color:var(--primary); font-weight:600; }
@media (max-width:700px){ .ldoc{ width:100%; } .ldoc__ico{ width:2.2cm; font-size:2.2rem; } }

/* ── Éditeur : « + » discret entre les cellules ── */
.lcell-gap{ position:relative; height:14px; display:flex; align-items:center; justify-content:center; }
.lcell-gap::before{ content:''; position:absolute; left:0; right:0; height:1px; background:var(--border);
  opacity:0; transition:opacity .15s; }
.lcell-gap:hover::before{ opacity:1; }
.lcell-gap__btn{ position:relative; z-index:2; width:24px; height:24px; border-radius:50%; border:1px solid var(--border);
  background:var(--bg-card,#fff); color:var(--text-muted); font-size:.95rem; line-height:1; cursor:pointer;
  opacity:0; transition:opacity .15s, color .15s, border-color .15s; }
.lcell-gap:hover .lcell-gap__btn, .lcell-gap__btn:focus{ opacity:1; }
.lcell-gap__btn:hover{ color:var(--primary); border-color:var(--primary); }
.lcell-gap__menu{ position:absolute; top:26px; z-index:20; display:flex; flex-direction:column;
  background:var(--bg-card,#fff); border:1px solid var(--border); border-radius:10px; overflow:hidden;
  box-shadow:0 8px 24px rgba(15,23,42,.16); min-width:170px; }
.lcell-gap__menu button{ border:none; background:none; text-align:left; padding:.5rem .8rem; cursor:pointer; font-size:.88rem; }
.lcell-gap__menu button:hover{ background:var(--bg-subtle,#f1f5f9); color:var(--primary); }

/* Éditeur : cellule document */
.lcell-ed__doc{ display:flex; flex-direction:column; gap:.5rem; }
.lcell-ed__doc-state{ min-height:1.4em; }

/* Onglet admin des environnements */
.env-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:.8rem; }
.env-card{ margin:0; }
.env-card--off{ opacity:.45; }
.env-card__tag{ margin:.1rem 0 .5rem; font-size:.8rem; }
.env-card__acts{ display:flex; gap:.35rem; align-items:center; }
.env-form__row{ display:flex; flex-wrap:wrap; gap:.8rem; align-items:flex-end; }
.env-form__row label{ display:flex; flex-direction:column; gap:.2rem; font-size:.85rem; font-weight:600; }
.env-form__cb{ flex-direction:row !important; align-items:center; gap:.35rem !important; }


/* v285 — Gestion du site : retour visuel immédiat au swipe entre onglets */
.gtab-wait{ position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.55); font-size:2rem; backdrop-filter:blur(1px); pointer-events:none; }

/* v285 — Gestionnaire de fichiers téléversés */
.fm-crumbs{ display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; font-size:.9rem; margin:.2rem 0 .8rem; }
.fm-crumbs__sep{ color:var(--text-muted); }
.fm-crumbs__count{ margin-left:auto; color:var(--text-muted); font-size:.82rem; }
.fm-actions{ display:flex; gap:1rem; flex-wrap:wrap; align-items:center; }
.fm-actions__form{ display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; margin:0; }
.fm-list{ display:flex; flex-direction:column; gap:.3rem; margin-top:1rem; }
.fm-item{ display:flex; align-items:center; gap:.6rem; border:1px solid var(--border); border-radius:9px;
  padding:.45rem .6rem; background:var(--bg-card,#fff); }
.fm-item--dir{ background:var(--bg-subtle,#f8fafc); }
.fm-item__main{ flex:1; min-width:0; display:flex; align-items:center; gap:.6rem; text-decoration:none; color:var(--text); }
.fm-item__ico{ flex:none; width:38px; height:38px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; }
.fm-item__ico img{ width:38px; height:38px; object-fit:cover; border-radius:5px; }
.fm-item__name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; }
.fm-item__meta{ flex:none; color:var(--text-muted); font-size:.78rem; }
.fm-item__acts{ flex:none; display:flex; gap:.2rem; align-items:center; }
.fm-item__acts form{ margin:0; }
.fm-del{ color:#b91c1c; }
@media (max-width:640px){ .fm-item__meta{ display:none; } }

/* ══════════ v286 — Images habillées par le texte (façon wrapfig) ══════════ */
/* Sans « wrap » : l'image occupe sa propre ligne, simplement alignée. */
.lfig{ display:block; height:auto; max-width:100%; border-radius:6px; clear:both;
  margin:1rem 0; }
.lfig--left{ margin-right:auto; margin-left:0; }
.lfig--right{ margin-left:auto; margin-right:0; }
.lfig--center{ margin-left:auto; margin-right:auto; }
/* Avec « wrap » : le texte qui suit contourne l'image. */
.lfig--wrap{ clear:none; }
.lfig--wrap.lfig--right{ float:right; margin:.25rem 0 .8rem 1.3rem; }
.lfig--wrap.lfig--left{ float:left;  margin:.25rem 1.3rem .8rem 0; }
.lfig--wrap.lfig--center{ float:none; margin:1rem auto; }
.lclear{ clear:both; height:0; }

/* Un nouveau titre repart toujours sous la figure (fin naturelle du contournement) */
.lecon-content h1, .lecon-content h2, .lecon-content h3{ clear:both; }

/* Les blocs encadrés se placent À CÔTÉ du flottant au lieu de passer dessous :
   display:flow-root crée un contexte de formatage propre (leur cadre ne
   chevauche donc jamais l'image). */
.lenv, .ldoc, .lecon-content table, .lecon-content pre, .lecon-content blockquote{
  display:flow-root;
}
.lenv{ overflow:hidden; }                    /* repli navigateurs sans flow-root */
.ldoc{ display:flex; }                       /* la vignette garde sa disposition */
.lecon-content table{ display:table; }       /* un tableau reste un tableau */

/* Sur téléphone : plus d'habillage, l'image prend toute la largeur */
@media (max-width:700px){
  .lfig--wrap{ float:none !important; width:100% !important; margin:1rem 0; }
}

/* Correctif : le menu « ＋ » entre cellules doit rester masqué tant qu'on n'a pas cliqué
   (une règle de classe l'emportait sur l'attribut hidden). */
.lcell-gap__menu[hidden]{ display:none !important; }

/* Mémo de rédaction dans l'éditeur de cours */
.lecon-aide{ margin:.6rem 0 1rem; border:1px solid var(--border); border-radius:9px; padding:.5rem .8rem; background:var(--bg-subtle,#f8fafc); }
.lecon-aide summary{ cursor:pointer; font-weight:600; font-size:.9rem; }
.lecon-aide ul{ margin:.6rem 0 .2rem 1.1rem; display:flex; flex-direction:column; gap:.35rem; font-size:.86rem; line-height:1.5; }
.lecon-aide code{ background:var(--bg-card,#fff); border:1px solid var(--border); border-radius:4px; padding:.05rem .3rem; font-size:.82em; }

/* ══════════ v288 — Figures avec légende, renvois @ref, aperçu de cellule ══════════ */
figure.lfigbox{ margin:1rem 0; max-width:100%; }
figure.lfigbox > img.lfig{ float:none !important; clear:none; display:block; width:100%; height:auto; margin:0; border-radius:6px; }
figure.lfigbox > figcaption{ width:92%; margin:.4rem auto 0; text-align:center; font-size:.85rem;
  line-height:1.4; color:var(--text-muted); font-style:italic; }
figure.lfigbox.lfig--center{ margin-left:auto; margin-right:auto; }
figure.lfigbox.lfig--right{ margin-left:auto; margin-right:0; }
figure.lfigbox.lfig--left{ margin-left:0; margin-right:auto; }
figure.lfigbox.lfig--wrap.lfig--right{ float:right; margin:.25rem 0 .8rem 1.3rem; }
figure.lfigbox.lfig--wrap.lfig--left{ float:left;  margin:.25rem 1.3rem .8rem 0; }
@media (max-width:700px){
  figure.lfigbox.lfig--wrap{ float:none !important; width:100% !important; margin:1rem 0; }
}

/* Renvois façon \\ref : pastille cliquable */
.lref{ display:inline-flex; align-items:center; gap:.2rem; padding:.05rem .4rem; border-radius:6px;
  background:var(--bg-subtle,#eff6ff); border:1px solid var(--border); text-decoration:none;
  color:var(--primary); font-size:.86em; font-weight:600; white-space:nowrap; }
.lref:hover{ border-color:var(--primary); background:#dbeafe; }
.lref--dead{ color:var(--text-muted); border-style:dashed; cursor:help; }
.lanchor{ display:inline-block; width:0; height:0; scroll-margin-top:80px; }

/* Mise en valeur de la cible d'un renvoi (se dissipe) */
@keyframes lhlfade{
  0%   { background:rgba(250,204,21,.55); box-shadow:0 0 0 6px rgba(250,204,21,.35); }
  70%  { background:rgba(250,204,21,.28); box-shadow:0 0 0 6px rgba(250,204,21,.18); }
  100% { background:transparent; box-shadow:0 0 0 6px rgba(250,204,21,0); }
}
.lhl{ animation:lhlfade 2.5s ease-out; border-radius:8px; scroll-margin-top:90px; }

/* Aperçu d'une cellule : bascule par classe (insensible aux conflits de spécificité) */
.lcell-ed__prev{ display:none; }
.lcell-ed__prev.is-on{ display:block; }
.lcell-ed__eye.is-on{ background:var(--primary); color:#fff; border-radius:5px; }

/* v289 — Environnements : le formulaire d'édition reste visible à l'arrivée */
#env-form{ scroll-margin-top:90px; }
/* Listes à l'intérieur d'un encadré : les puces restent DANS le cadre */
.lenv__body ul, .lenv__body ol{ margin:.5em 0 .5em 0; padding-left:1.5em; }
.lenv{ overflow:visible; }

/* ══════════ v291 — Figures côte à côte ══════════ */
/* align-items:flex-start — et non flex-end : en alignant les figures par le BAS,
   une légende de deux lignes remontait son image d'une ligne par rapport aux
   voisines. Alignées par le haut, les images restent sur la même ligne quelle
   que soit la longueur des légendes, qui débordent simplement vers le bas. */
.lfigrow{ display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start; justify-content:center;
  clear:both; margin:1.1rem 0; }
.lfigrow > figure.lfigbox{ flex:1 1 0; min-width:170px; margin:0; float:none !important;
  display:flex; flex-direction:column; }
/* Une figure à qui l'on a donné une largeur explicite garde sa part */
.lfigrow > figure.lfigbox[style*="width"]{ flex:0 1 auto; }
.lfigrow > figure.lfigbox > img.lfig{ width:100%; flex:none; }
.lfigrow > figure.lfigbox > figcaption{ flex:none; }
.lfigrow > p{ margin:0; }                    /* paragraphes résiduels entre images */
.lfigrow__cap{ text-align:center; font-size:.85rem; font-style:italic; color:var(--text-muted);
  margin:.1rem 0 1rem; }
@media (max-width:560px){
  .lfigrow{ flex-direction:column; align-items:center; }
  .lfigrow > figure.lfigbox{ width:100% !important; flex:none; }
}

/* v292 — Import d'une simulation maison */
.anim-import{ margin-top:.7rem; padding:.7rem .8rem; border:1px dashed var(--border); border-radius:9px; background:var(--bg-subtle,#f8fafc); }
.anim-import__row{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.anim-import__row input[type=file]{ flex:1; min-width:180px; }
/* v294 — ressources .js/.css déposées à côté des simulations */
.anim-assets{ margin-top:.7rem; padding-top:.6rem; border-top:1px dashed var(--border); }
.anim-assets__list{ list-style:none; margin:.4rem 0 0; padding:0; display:flex; flex-direction:column; gap:.3rem; }
.anim-assets__list li{ display:flex; align-items:center; gap:.5rem; }
.anim-assets__list code{ flex:1; min-width:0; overflow-wrap:anywhere; }
.anim-assets__size{ font-size:.78rem; color:var(--text-muted); white-space:nowrap; }


/* ════════════════════════════════════════════════════════════
   v293 — Volets « Gestion du site » : bascule sans rechargement
   ════════════════════════════════════════════════════════════ */
.gtab-stage{ position:relative; overflow:hidden; }
.gtab-rail{ position:relative; will-change:transform; }
.gtab-rail.is-anim{ transition:transform .24s cubic-bezier(.22,.61,.36,1); }
/* le volet affiché reste dans le flux (il donne sa hauteur à la scène) ;
   les voisins sont posés hors écran, à gauche et à droite. */
.gtab-rail > .gtab-pane{ position:absolute; top:0; left:0; width:100%; }
.gtab-rail > .gtab-pane.is-cur{ position:relative; }
.gtab-rail > .gtab-pane[data-o="-1"]{ transform:translate3d(-100%,0,0); }
.gtab-rail > .gtab-pane[data-o="1"] { transform:translate3d(100%,0,0); }
@media (prefers-reduced-motion: reduce){ .gtab-rail.is-anim{ transition-duration:.01ms; } }

/* ════════════════════════════════════════════════════════════
   v293 — Classement par glissé (cours, TD, TP, quiz) — professeur
   ════════════════════════════════════════════════════════════ */
.srt-item{ outline:1px dashed var(--border); outline-offset:3px; border-radius:9px; }
.srt-grab{ touch-action:none; cursor:grab; }
.srt-handle{ touch-action:none; cursor:grab; user-select:none; -webkit-user-select:none;
  display:none; align-items:center; justify-content:center; width:26px; height:26px;
  border:1px solid var(--border); border-radius:7px; background:var(--bg-card,#fff);
  color:var(--text-muted); font-size:.9rem; line-height:1; }
.srt-box .srt-handle{ display:inline-flex; }          /* visibles seulement en mode classement */
.srt-handle:active{ cursor:grabbing; }
.srt-hole{ opacity:.28; }
.srt-ghost{ opacity:.95; box-shadow:0 8px 22px rgba(0,0,0,.22); border-radius:9px;
  transform-origin:center; will-change:transform; }
.srt-toast{ position:fixed; left:50%; bottom:18px; transform:translate(-50%,14px); z-index:9999;
  background:var(--primary); color:#fff; font-size:.85rem; font-weight:600;
  padding:.5rem .9rem; border-radius:999px; box-shadow:0 4px 16px rgba(0,0,0,.2);
  opacity:0; pointer-events:none; transition:opacity .18s, transform .18s; }
.srt-toast.is-on{ opacity:1; transform:translate(-50%,0); }
.srt-toast--err{ background:var(--danger,#b91c1c); }

/* Cartes de cours / TD : enveloppe qui porte la poignée */
.doc-card-w{ position:relative; display:flex; }
.doc-card-w > .doc-card{ flex:1; min-width:0; }
.doc-card-w > .srt-handle{ position:absolute; top:6px; right:6px; z-index:2; }
.srt-box .doc-card-w > .doc-card{ pointer-events:none; }

/* Quiz : la poignée existante ⠿ devient le point de prise */
.qadm-i--drag{ touch-action:none; cursor:grab; }
.srt-box .qcard-w .qadm{ opacity:1; }
.srt-box .qcard-w .quiz-card{ pointer-events:none; }

/* Onglets de TP et vignettes de thème : l'élément entier se saisit */
.srt-item.tp-tab, .srt-item.tp-theme-btn{ outline-offset:2px; }
.srt-grab.tp-theme-btn:hover{ transform:none; }

/* Barre d'aide affichée pendant le classement */
.srt-hint{ font-size:.8rem; color:var(--text-muted); background:var(--bg-subtle,#f8fafc);
  border:1px dashed var(--border); border-radius:8px; padding:.35rem .6rem; margin:.2rem 0 .8rem; }


/* ════════════════════════════════════════════════════════════
   v295 — Titres de chapitre / section, sommaire et jauge
   ════════════════════════════════════════════════════════════ */

/* Apparence pilotée depuis 🎨 Environnements → 🔠 Titres.
   Les valeurs de repli servent si la table n'est pas encore créée. */
/* .md-titres : conteneurs markdown des TP et des devoirs, qui n'utilisent
   pas .lecon-content mais doivent suivre les mêmes réglages. */
.lecon-content h1, .md-titres h1{ font-size:var(--ltitre1-taille,2.10rem); color:var(--ltitre1-couleur,#0f172a);
  font-weight:var(--ltitre1-graisse,800); text-align:var(--ltitre1-align,center); }
.lecon-content h2, .md-titres h2{ font-size:var(--ltitre2-taille,1.45rem); color:var(--ltitre2-couleur,#1e293b);
  font-weight:var(--ltitre2-graisse,700); text-align:var(--ltitre2-align,left); }
.lecon-content h3, .md-titres h3{ font-size:var(--ltitre3-taille,1.15rem); color:var(--ltitre3-couleur,#334155);
  font-weight:var(--ltitre3-graisse,600); text-align:var(--ltitre3-align,left); }
/* Le numéro automatique suit la couleur du titre plutôt que d'imposer la sienne */
.lecon-content h1 .lnum, .lecon-content h2 .lnum, .lecon-content h3 .lnum,
.md-titres h1 .lnum, .md-titres h2 .lnum, .md-titres h3 .lnum,
.tp-cell--md h1 .lnum, .tp-cell--md h2 .lnum, .tp-cell--md h3 .lnum{ color:inherit; opacity:.68; }
/* Un chapitre centré respire davantage qu'une section */
.lecon-content h1, .md-titres h1{ margin-top:2em; }
.md-titres > h1:first-child, .md-titres > h2:first-child, .md-titres > h3:first-child{ margin-top:0; }

/* Titre du document : celui saisi en haut du formulaire d'un cours, d'un TD
   ou d'un TP (niveau 0 dans 🎨 Environnements → 🔠 Titres). */
.lecon-title,
.tp-notebook__header > h2{ font-size:var(--ltitre0-taille,2.40rem); color:var(--ltitre0-couleur,#0f172a);
  font-weight:var(--ltitre0-graisse,800); text-align:var(--ltitre0-align,center); line-height:1.2; }

/* ── Réglage des titres dans l'administration ── */
.ltitres__table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.ltitres__table th, .ltitres__table td{ padding:.45rem .5rem; text-align:left; vertical-align:middle;
  border-bottom:1px solid var(--border); }
.ltitres__table thead th{ font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); }
.ltitres__table tbody th{ font-weight:600; white-space:nowrap; }
.ltitres__table tbody th code{ font-weight:400; font-size:.78rem; color:var(--text-muted); }
.ltitres__table .form-control{ display:inline-block; width:auto; min-width:88px; }
.ltitres__table input[type=color]{ min-width:52px; padding:2px; }
.ltitres__table input[type=number]{ max-width:96px; }
.ltitres__preview{ margin-top:1.1rem; padding:1rem 1.2rem; border:1px dashed var(--border);
  border-radius:10px; background:var(--bg-subtle,#f8fafc); }
.ltitres__preview > :first-child{ margin-top:0; }
@media (max-width:640px){
  .ltitres__table thead{ display:none; }
  .ltitres__table tr{ display:block; padding:.5rem 0; border-bottom:1px solid var(--border); }
  .ltitres__table th, .ltitres__table td{ display:block; border:0; padding:.25rem 0; }
}

/* ── Sommaire du cours : colonne collante à gauche ── */
.lecon-toc-slot{ display:none; }
.ltoc{ font-size:.82rem; line-height:1.35; }
.ltoc__title{ margin:0 0 .5rem; font-size:.7rem; font-weight:700; letter-spacing:.09em;
  text-transform:uppercase; color:var(--text-muted); }
.ltoc__list{ list-style:none; margin:0; padding:0; border-left:2px solid var(--border); }
.ltoc__i{ margin:0; }
.ltoc__link{ display:block; padding:.2rem .55rem; margin-left:-2px; color:var(--text);
  text-decoration:none; border-left:2px solid transparent; opacity:.4;
  transition:opacity .2s ease, color .2s ease, border-color .2s ease; }
.ltoc__i--2 .ltoc__link{ padding-left:1.15rem; font-size:.96em; }
.ltoc__i--3 .ltoc__link{ padding-left:1.75rem; font-size:.92em; opacity:.3; }
.ltoc__link:hover{ opacity:.85; }
.ltoc__link.is-parent{ opacity:.68; }
.ltoc__link.is-active,
.ltoc__i--3 .ltoc__link.is-active{ opacity:1; font-weight:600; color:var(--primary); border-left-color:var(--primary); }

/* Affiché seulement quand l'écran offre une vraie marge à gauche */
@media (min-width:1200px){
  .lecon-wide.has-toc{ max-width:clamp(760px, 82vw, 1560px); }
  .lecon-layout.has-toc{ display:grid; grid-template-columns:212px minmax(0,1fr);
    gap:2.4rem; align-items:start; }
  .lecon-layout.has-toc > .lecon-toc-slot{ display:block; position:sticky; top:76px;
    max-height:calc(100vh - 110px); overflow-y:auto; overscroll-behavior:contain;
    scrollbar-width:thin; padding-bottom:.5rem; }
  .lecon-layout.has-toc > .lecon-toc-slot::-webkit-scrollbar{ width:5px; }
  .lecon-layout.has-toc > .lecon-toc-slot::-webkit-scrollbar-thumb{ background:var(--border); border-radius:99px; }
}

/* ── Jauge de lecture : téléphone et tablette uniquement ── */
.lread{ display:none; position:fixed; left:0; right:0; bottom:0; height:3px;
  z-index:60; pointer-events:none; background:transparent; }
.lread__bar{ display:block; height:100%; width:0; background:var(--primary); opacity:.5;
  border-radius:0 2px 2px 0; }
@media (max-width:1199px){ .lread{ display:block; } }

@media (prefers-reduced-motion: reduce){
  .ltoc__link{ transition:none; }
}


/* ════════════════════════════════════════════════════════════
   v297 — Animations : hauteur ajustée au contenu
   ════════════════════════════════════════════════════════════ */
/* Avant la mesure (et définitivement pour une animation externe,
   que le navigateur interdit de mesurer) : format 16/9. */
.anim-frame--auto iframe{ aspect-ratio:16 / 9; min-height:320px; }
.anim-frame--auto iframe.is-sized{ aspect-ratio:auto; min-height:0; }

/* Réglage de la hauteur dans le formulaire d'animation */
.anim-h{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; font-size:.9rem; }
.anim-h__auto{ display:inline-flex; align-items:center; gap:.35rem; white-space:nowrap; margin:0; }
.anim-h #anim-hpx{ width:auto; max-width:110px; }
.anim-h #anim-hpx:disabled{ opacity:.45; }


/* ════════════════════════════════════════════════════════════
   v299 — Animations centrées dans un cours
   ════════════════════════════════════════════════════════════ */
/* Ne concerne que les animations incrustées dans un cours ou un
   exercice (.anim-embed). La page dédiée à une animation et le
   programme de colles gardent leur pleine largeur. */
.anim-embed{ text-align:center; }
.anim-embed__head{ text-align:center; }
.anim-embed .anim-fallback{ text-align:center; }
/* Sans limite de largeur, le cadre occupe toute la colonne et le
   centrage ne se voit pas : sur grand écran (colonne élargie par
   le sommaire) l'animation s'étirait démesurément. */
.anim-embed > .anim-frame{ max-width:min(100%, 960px); margin-left:auto; margin-right:auto; }


/* ════════════════════════════════════════════════════════════
   v301 — Le contournement d'une figure s'arrête à sa cellule
   ════════════════════════════════════════════════════════════ */
/* Une image en mode « contourné » (.lfig--wrap) est un flottant.
   Un flottant plus haut que le texte de sa cellule débordait sur les
   cellules suivantes, dont le texte venait s'enrouler autour d'une
   figure qui ne les concernait pas.
   « clear » sur chaque bloc de cellule le rend impossible : une
   cellule commence toujours sous les figures de la précédente.
   Choisi plutôt qu'un contexte de formatage (display:flow-root),
   qui aurait aussi supprimé la fusion des marges entre cellules et
   donc écarté tous les cours existants. */
.lcell-block,                    /* lecture d'un cours / TD          */
.tp-cell,                        /* carnet de TP                     */
.pcours__cells .lecon-md,        /* extraits dans le programme       */
.devoir-item__desc{              /* énoncé d'un devoir               */
  clear:both;
}
/* Dernière cellule : le flottant ne doit pas non plus déborder
   sous la liste (exercices de fin de TD, pied de page). */
.lecon-cells{ display:flow-root; }


/* ════════════════════════════════════════════════════════════
   v302 — Bulle d'information au survol
   ════════════════════════════════════════════════════════════ */
/* Posée à la racine de la page en position fixe : elle échappe
   ainsi aux conteneurs à overflow:hidden (accordéons de thème,
   volets glissants) qui l'auraient rognée. */
.bulle{ position:fixed; left:-9999px; top:0; z-index:9999; max-width:420px;
  padding:.55rem .75rem; border-radius:9px; background:#111827; color:#f9fafb;
  box-shadow:0 10px 28px rgba(0,0,0,.32); font-size:.8rem; line-height:1.45;
  white-space:pre-line;          /* les retours à la ligne du descriptif sont conservés */
  text-align:left; pointer-events:none; }
.bulle[hidden]{ display:none; }

/* Repère discret : ce texte est tronqué, la suite est en bulle */
[data-bulle]{ cursor:help; }
.point-item__desc[data-bulle]{ text-decoration:underline dotted var(--border);
  text-underline-offset:2px; }
.point-item__desc[data-bulle]:hover, .point-item__desc[data-bulle]:focus{
  color:var(--text); text-decoration-color:var(--primary); outline:none; }


/* ════════════════════════════════════════════════════════════
   v305 — Gestionnaire de fichiers : choix de l'espace
   ════════════════════════════════════════════════════════════ */
.fm-espaces{ display:flex; gap:.4rem; flex-wrap:wrap; margin:.2rem 0 .5rem; }
.fm-espace{ padding:.35rem .8rem; border:1px solid var(--border); border-radius:999px;
  background:var(--bg-card,#fff); color:var(--text-muted); text-decoration:none;
  font-size:.85rem; font-weight:600; white-space:nowrap; transition:border-color .15s, color .15s; }
.fm-espace:hover{ border-color:var(--primary); color:var(--text); }
.fm-espace.is-on{ border-color:var(--primary); color:#fff; background:var(--primary); }
.fm-aide{ margin:0 0 .8rem; }


/* ════════════════════════════════════════════════════════════
   v306 — Champ obligatoire non renseigné
   ════════════════════════════════════════════════════════════ */
.champ-manquant{ border-color:var(--danger,#b91c1c) !important;
  box-shadow:0 0 0 3px color-mix(in srgb, var(--danger,#b91c1c) 18%, transparent); }
@supports not (box-shadow: 0 0 0 3px color-mix(in srgb, red 18%, transparent)){
  .champ-manquant{ box-shadow:0 0 0 3px rgba(185,28,28,.18); }
}


/* ════════════════════════════════════════════════════════════
   v308 — Figures d'un exercice : légende et carrousel
   ════════════════════════════════════════════════════════════ */
.exfig{ margin:.6rem 0; }
.exfig__cap{ margin-top:.35rem; font-size:.82rem; line-height:1.4; color:var(--text-muted);
  text-align:center; font-style:italic; }
.exfig__num{ font-style:normal; font-weight:700; color:var(--primary); margin-right:.25em; }

/* Sans JavaScript, les figures restent empilées et lisibles. */
.exfig-car{ margin:.6rem 0; }
.exfig-car__view{ position:relative; }
.exfig-car__track{ display:block; }
.exfig-car__slide{ margin:0 0 .8rem; }
.exfig-car__nav, .exfig-car__dots{ display:none; }

/* Carrousel actif (classe posée par figures.js) */
.exfig-car.is-live .exfig-car__view{ overflow:hidden; border-radius:8px; }
.exfig-car.is-live .exfig-car__track{ display:flex; will-change:transform; }
.exfig-car.is-live .exfig-car__slide{ flex:0 0 100%; min-width:100%; margin:0; padding:0 .1rem;
  display:flex; flex-direction:column; align-items:center; }
.exfig-car.is-live .exfig-car__slide .exo-img{ max-width:100%; height:auto; }
.exfig-car.is-live .exfig-car__nav{ display:flex; align-items:center; justify-content:center;
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:32px; height:32px; border:none; border-radius:999px; cursor:pointer;
  background:rgba(17,24,39,.55); color:#fff; font-size:1.2rem; line-height:1; padding:0;
  transition:opacity .15s; }
.exfig-car.is-live .exfig-car__nav:hover{ background:rgba(17,24,39,.75); }
.exfig-car.is-live .exfig-car__nav:disabled{ opacity:.25; cursor:default; }
.exfig-car.is-live .exfig-car__nav--prev{ left:6px; }
.exfig-car.is-live .exfig-car__nav--next{ right:6px; }
.exfig-car.is-live .exfig-car__dots{ display:flex; gap:.35rem; justify-content:center; margin-top:.45rem; }
.exfig-car__dot{ width:8px; height:8px; padding:0; border:none; border-radius:999px;
  background:var(--border); cursor:pointer; transition:background .15s, transform .15s; }
.exfig-car__dot.is-on{ background:var(--primary); transform:scale(1.25); }
.exfig-car:focus-visible{ outline:2px solid var(--primary); outline-offset:3px; border-radius:8px; }
@media (hover:none){ .exfig-car.is-live .exfig-car__nav{ display:none; } }

/* ── Administration : gestion des images d'une zone ── */
.exoimg-list{ display:flex; flex-direction:column; gap:.5rem; margin:.5rem 0 .2rem; }
.exoimg{ display:flex; align-items:flex-start; gap:.6rem; padding:.5rem;
  border:1px solid var(--border); border-radius:8px; background:var(--bg-subtle,#f8fafc); }
.exoimg__vign{ flex:none; width:76px; height:56px; object-fit:cover; border-radius:5px; border:1px solid var(--border); }
.exoimg__champs{ flex:1; min-width:0; display:flex; flex-direction:column; gap:.35rem; }
.exoimg__bas{ display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; font-size:.8rem; color:var(--text-muted); }
.exoimg__bas input[type=number]{ width:70px; }
.exoimg--suppr{ opacity:.45; }
.exoimg-new{ display:flex; align-items:center; gap:.5rem; margin-top:.35rem; }
.exoimg-new__nom{ flex:none; max-width:38%; font-size:.78rem; color:var(--text-muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }


/* ════════════════════════════════════════════════════════════
   v311 — Ordre des thèmes du programme
   ════════════════════════════════════════════════════════════ */
.pt-themes{ display:flex; flex-direction:column; gap:.5rem; }
/* Poignée visible seulement en mode « Modifier l'ordre » (classe posée
   sur le conteneur par le module de glissé partagé). */
.pt-theme-drag{ display:none; touch-action:none; cursor:grab; user-select:none;
  -webkit-user-select:none; flex:none; align-items:center; justify-content:center;
  width:26px; align-self:stretch; color:var(--text-muted); font-size:.95rem; line-height:1; }
.srt-box .pt-theme-drag{ display:inline-flex; }
.pt-theme-drag:active{ cursor:grabbing; }
.srt-box .theme-acc{ background:var(--bg-card,#fff); }


/* ════════════════════════════════════════════════════════════
   v312 — Type d'une capacité : liseré de gauche homogène
   ════════════════════════════════════════════════════════════ */
/* Les trois marques sont cumulables ; l'ordre des règles décide de la
   couleur affichée quand plusieurs s'appliquent (hors programme en dernier,
   c'est l'information la plus structurante). */
.point-item{ border-left:4px solid transparent; padding-left:.5rem; }
.point-item--exp { border-left-color:#16a34a; }   /* 🧪 expérimentale — vert   */
.point-item--num { border-left-color:#7c3aed; }   /* 💻 numérique     — violet */
.point-item--hors{ border-left-color:#d97706; }   /* 📎 hors programme — ambre */

/* Pastilles du titre, sur le modèle du 📎 existant */
.hp-tag--exp{ background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.hp-tag--num{ background:#ede9fe; color:#5b21b6; border-color:#ddd6fe; }

/* Légende du volet Programme */
.pt-leg{ font-weight:700; border-bottom:3px solid; padding-bottom:1px; }
.pt-leg--exp { border-color:#16a34a; color:#166534; }
.pt-leg--num { border-color:#7c3aed; color:#5b21b6; }
.pt-leg--hors{ border-color:#d97706; color:#92400e; }


/* ════════════════════════════════════════════════════════════
   v313 — Filtre 🧪💻 du sélecteur de capacités
   ════════════════════════════════════════════════════════════ */
.ptf-toggle{ display:flex; align-items:center; gap:.45rem; margin:.2rem 0 .5rem;
  font-size:.83rem; color:var(--text-muted); cursor:pointer; }
.ptf-toggle input{ flex:none; }
/* Masquées par défaut ; une capacité déjà rattachée ne porte jamais
   la classe (calculée côté serveur), elle reste donc toujours visible. */
.ptf .ptf-extra{ display:none; }
.ptf.ptf-on label.student-check-item.ptf-extra{ display:flex; }
.ptf.ptf-on div.ct-acc.ptf-extra{ display:block; }
.student-check-item .hp-tag{ font-size:.62rem; padding:0 .25rem; }


/* ════════════════════════════════════════════════════════════
   v314 — Panneau d'édition d'un point, et capacité doublement marquée
   ════════════════════════════════════════════════════════════ */
/* Le panneau tient dans l'écran et défile s'il est trop haut : la ligne
   unique de contrôles le faisait déborder, le bouton OK sortait du cadre. */
.point-edit-form{ max-height:88vh; overflow-y:auto; overscroll-behavior:contain;
  width:min(94vw, 420px); box-sizing:border-box; }
.point-edit-form .pef-line{ display:block; width:100%; max-width:100%;
  box-sizing:border-box; margin-bottom:.4rem; }
.point-edit-form .pef-flags{ display:flex; flex-wrap:wrap; gap:.45rem .8rem; margin:.1rem 0 .5rem; }
.point-edit-form .pef-flags label{ display:inline-flex; align-items:center; gap:.35rem;
  font-size:.82rem; white-space:nowrap; cursor:pointer; }
.point-edit-form .pef-actions{ display:flex; justify-content:flex-end; }
.point-edit-form .pef-actions .btn{ min-width:88px; }

/* Expérimentale ET numérique : le liseré se partage, moitié verte, moitié violette.
   Sans cela, la dernière règle l'emportait et une seule couleur s'affichait. */
.point-item--exp.point-item--num{
  border-left-color:transparent;
  background-image:linear-gradient(#16a34a 0 50%, #7c3aed 50% 100%);
  background-repeat:no-repeat;
  background-size:4px 100%;
  background-position:left top;
  background-origin:border-box;
  background-clip:border-box;
}
/* Hors programme reste prioritaire sur le liseré : c'est l'information la plus
   structurante. Les pastilles du titre rappellent les autres marques.
   Sélecteur doublé pour peser autant que « --exp.--num », qui sinon l'emportait. */
.point-item.point-item--hors{ border-left-color:#d97706; background-image:none; }
.pt-leg--both{ border-image:linear-gradient(90deg,#16a34a 50%,#7c3aed 50%) 1;
  border-bottom:3px solid; color:#374151; }


/* ════════════════════════════════════════════════════════════
   v315 — Capacités d'une cellule : repère discret, jamais gênant
   ════════════════════════════════════════════════════════════ */
.lcell-pts__tab{ display:none; }
.lcell-pts__panel{ border-left:2px solid var(--border); padding:.05rem 0 .05rem .6rem; }
.lcell-pts__link{ display:block; font-size:.76rem; line-height:1.35;
  color:var(--text-muted); text-decoration:none; opacity:.45; transition:opacity .2s ease; }
.lcell-pts:hover .lcell-pts__link{ opacity:.75; }
.lcell-pts__link:hover{ opacity:1; text-decoration:underline; }

/* Grand écran : le repère vit dans la MARGE DROITE, hors du fil de lecture.
   La place est réservée une fois pour toutes sur la colonne entière (comme le
   sommaire à gauche) : aucun cadre n'est rétréci individuellement, tous
   gardent exactement la même largeur, avec ou sans capacité rattachée.
   La colonne est élargie d'autant pour que la largeur de lecture ne bouge pas. */
@media (min-width:1200px){
  .lecon-wide{ max-width:clamp(760px, 88vw, 1700px); }
  .lecon-wide.has-toc{ max-width:clamp(800px, 95vw, 1900px); }
  /* Réserve SYMÉTRIQUE : avec une marge à droite seulement, la colonne de
     lecture se retrouvait décalée vers la gauche au lieu de rester centrée.
     Le repère ◈ occupe la marge de droite, celle de gauche reste vide. */
  .lecon-body{ position:relative; padding-left:210px; padding-right:210px; }
  .lcell-block{ position:relative; }
  .lcell-pts{ position:absolute; top:.2rem; left:100%; margin-left:20px; width:190px; float:none; }
}

/* Téléphone : seul un onglet réduit reste visible au bord droit ; il déploie
   un panneau translucide posé par-dessus, sans pousser le texte. */
@media (max-width:1199px){
  /* Pas de flottant ici : il rognait la largeur des encadrés (exercice, propriété…)
     de la cellule concernée. L'onglet occupe sa propre ligne, AU-DESSUS du contenu
     et calé à droite ; le panneau se déploie par-dessus, sans rien décaler. */
  .lcell-pts{ position:relative; float:none; width:auto; margin:0 0 .15rem;
    display:flex; justify-content:flex-end; line-height:0; }
  .lcell-pts__tab{ display:block; width:26px; height:22px; padding:0; cursor:pointer;
    border:1px solid var(--border); border-radius:8px; background:var(--bg-card,#fff);
    color:var(--text-muted); font-size:.75rem; line-height:1;
    opacity:.4; transition:opacity .2s ease; }
  .lcell-pts.is-open .lcell-pts__tab{ opacity:.95; }
  .lcell-pts__panel{ display:none; position:absolute; top:calc(100% + 4px); right:0; z-index:6;
    width:min(74vw, 300px); padding:.55rem .7rem; border:1px solid var(--border);
    border-left:2px solid var(--border); border-radius:10px 0 10px 10px; line-height:1.35;
    background:rgba(255,255,255,.88); backdrop-filter:blur(6px);
    box-shadow:0 6px 20px rgba(0,0,0,.10); }
  .lcell-pts.is-open .lcell-pts__panel{ display:block; }
  .lcell-pts__link{ opacity:.75; }
}
@media (prefers-reduced-motion: reduce){ .lcell-pts__link, .lcell-pts__tab{ transition:none; } }


/* ════════════════════════════════════════════════════════════
   v317 — Quiz évaluant une capacité (page d'un point)
   ════════════════════════════════════════════════════════════ */
.pt-quiz-list{ display:flex; flex-direction:column; gap:.5rem; margin:.6rem 0 1.2rem; }
.pt-quiz{ display:flex; align-items:flex-start; gap:.7rem; padding:.65rem .8rem;
  border:1px solid var(--border); border-left:3px solid var(--primary); border-radius:9px;
  background:var(--bg-card,#fff); text-decoration:none; color:inherit;
  transition:border-color .15s ease, box-shadow .15s ease; }
.pt-quiz:hover{ border-color:var(--primary); box-shadow:var(--shadow-md); }
.pt-quiz__ico{ flex:none; font-size:1rem; line-height:1.3; }
.pt-quiz__body{ min-width:0; display:flex; flex-direction:column; gap:.1rem; }
.pt-quiz__titre{ font-weight:600; font-size:.95rem; line-height:1.3; }
.pt-quiz__meta{ font-size:.78rem; color:var(--text-muted); }
.pt-quiz__off{ font-size:.7rem; font-weight:700; color:#92400e; background:#fef3c7;
  border:1px solid #fde68a; border-radius:8px; padding:0 .35rem; margin-left:.3rem; }


/* ════════════════════════════════════════════════════════════
   v320 — Banque de questions QCM : accordéons et filtres
   ════════════════════════════════════════════════════════════ */
.qcmf{ border:1px solid var(--border); border-radius:10px; padding:.6rem .75rem;
  background:var(--bg-subtle,#f8fafc); margin-bottom:.8rem; }
.qcmf__row{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin-bottom:.4rem; }
.qcmf__row:last-of-type{ margin-bottom:0; }
.qcmf__lbl{ font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted); flex:none; }
.qcmf__themes{ display:flex; flex-wrap:wrap; gap:.3rem .7rem; }
.qcmf__th{ display:inline-flex; align-items:center; gap:.3rem; font-size:.82rem; cursor:pointer; white-space:nowrap; }
.qcmf #qcmf-point{ flex:1 1 240px; min-width:0; max-width:340px; }
.qcmf #qcmf-txt{ flex:1 1 180px; min-width:0; max-width:280px; }
.qcmf__count{ margin:.45rem 0 0; font-size:.8rem; font-weight:600; color:var(--primary); }

/* .qcm-list impose display:flex et l'emportait sur le display:none du pliage :
   on force donc explicitement les deux états du corps de l'accordéon. */
.qcm-grp > .theme-acc__body.qcm-list{ display:none; }
.qcm-grp.open > .theme-acc__body.qcm-list{ display:flex; }
.qcm-grp .exo-row[hidden]{ display:none; }


/* ════════════════════════════════════════════════════════════
   v322 — Rattachement d'une question QCM à un TP ou un cours/TD
   ════════════════════════════════════════════════════════════ */
/* Menu déroulant : on choisit une ressource, elle devient une étiquette
   retirable. Compact, et le menu natif reste agréable sur téléphone. */
.qres2{ display:flex; flex-direction:column; gap:.45rem; }
.qres2 #qres-pick{ max-width:420px; }
.qres2__chips{ display:flex; flex-wrap:wrap; gap:.35rem; }
.qres2__vide{ margin:0; }
.qres-chip{ display:inline-flex; align-items:center; gap:.35rem; max-width:100%;
  padding:.2rem .3rem .2rem .5rem; border:1px solid var(--border); border-radius:999px;
  background:var(--bg-card,#fff); font-size:.82rem; line-height:1.3; }
.qres-chip__ic{ flex:none; }
.qres-chip__x{ flex:none; border:none; background:none; cursor:pointer; padding:0 .25rem;
  color:var(--text-muted); font-size:.85rem; line-height:1; border-radius:999px; }
.qres-chip__x:hover{ color:#b91c1c; background:rgba(185,28,28,.08); }
.qcmf #qcmf-res{ flex:1 1 220px; min-width:0; max-width:320px; }
#qz-res{ max-width:320px; }


/* ════════════════════════════════════════════════════════════
   v323 — Ordre des options d'une question QCM
   ════════════════════════════════════════════════════════════ */
/* Poignée toujours visible ici : le classement est permanent, il n'y a pas
   de mode à activer. Pas de contour en pointillés, qui alourdirait le
   formulaire alors que la poignée suffit à signaler la prise. */
#qcm-opts .srt-handle{ display:inline-flex; flex:none; width:22px; height:24px; font-size:.8rem; }
#qcm-opts .srt-item{ outline:none; }
#qcm-opts .srt-hole{ opacity:.25; }
#qcm-opts .srt-ghost{ background:var(--bg-card,#fff); }


/* ════════════════════════════════════════════════════════════
   v325 — Capacités expérimentales dans le sélecteur d'un TP
   ════════════════════════════════════════════════════════════ */
/* Elles ne sont plus dans un volet à part : elles ouvrent chaque thème
   et se repèrent à leur couleur, comme le liseré vert de la page Points. */
.lecon-point-cb--exp{ color:#166534; font-weight:600; }
.lecon-point-cb--exp .lecon-point-cb__ic{ margin-right:.15rem; }
.tppt-group-items .lecon-point-cb--exp{ padding-left:.3rem; border-left:3px solid #16a34a; }


/* ════════════════════════════════════════════════════════════
   v326 — Éditeur de TP : image et insertion entre cellules
   ════════════════════════════════════════════════════════════ */
.cell-edit__tools{ display:flex; align-items:center; gap:.6rem; margin:.1rem 0 .35rem; }
.cell-edit__imgbtn{ display:inline-flex; align-items:center; gap:.3rem; cursor:pointer;
  font-size:.78rem; font-weight:600; color:var(--text-muted);
  border:1px solid var(--border); border-radius:7px; padding:.2rem .55rem;
  background:var(--bg-card,#fff); transition:color .15s, border-color .15s; }
.cell-edit__imgbtn:hover{ color:var(--primary); border-color:var(--primary); }
.cell-edit__upstatus{ font-size:.76rem; color:var(--text-muted); }
.cell-edit__upstatus--ok { color:#166534; }
.cell-edit__upstatus--err{ color:#b91c1c; }
/* Le « + » réutilise le style de l'éditeur de cours (.lcell-gap), déjà défini. */


/* ════════════════════════════════════════════════════════════
   v327 — Aperçu d'un TP non publié, capacités d'un exercice
   ════════════════════════════════════════════════════════════ */
.tp-badge-apercu{ display:inline-flex; align-items:center; gap:.25rem; margin-left:.5rem;
  padding:.1rem .5rem; border-radius:999px; font-size:.72rem; font-weight:700;
  background:#fef3c7; color:#92400e; border:1px solid #fde68a; vertical-align:middle; }
/* Nombre de capacités traitées, à côté du 🔗 */
.exo-chain__n{ font-size:.62rem; font-weight:700; color:var(--primary);
  vertical-align:super; margin-left:.05rem; }

/* ── Éditeur de TP : aperçu côte à côte (grand écran) ── */
.tpsplit{ position:relative; }
.tpsplit__tab{ display:none; }
.tpsplit__cols{ display:block; }
.tpsplit__left, .tpsplit__right{ min-width:0; }

@media (min-width:1100px){
  /* Onglet latéral, discret, collé au bord droit de l'éditeur */
  .tpsplit__tab{ display:inline-flex; align-items:center; gap:.35rem; position:absolute; top:-34px; right:0; z-index:3;
    padding:.25rem .7rem; border:1px solid var(--border); border-radius:8px 8px 0 0;
    background:var(--bg-card,#fff); color:var(--text-muted); font-size:.78rem; font-weight:600;
    cursor:pointer; transition:color .15s, border-color .15s; }
  .tpsplit__tab:hover{ color:var(--primary); border-color:var(--primary); }
  .tpsplit.is-split .tpsplit__tab{ color:var(--primary); border-color:var(--primary); }
  .tpsplit__tab-ic{ font-size:.95rem; line-height:1; }

  /* 70 % pour le texte brut, 30 % pour le rendu, ajustable par le séparateur. */
  .tpsplit.is-split .tpsplit__cols{ display:grid;
    grid-template-columns:var(--tpsplit-g, 70%) 10px minmax(0, 1fr);
    gap:0; align-items:stretch; }
  .tpsplit.is-split .tpsplit__sep{ display:block; position:relative; cursor:col-resize;
    background:transparent; border:none; padding:0; }
  .tpsplit.is-split .tpsplit__sep::before{ content:''; position:absolute; top:0; bottom:0; left:4px;
    width:2px; background:var(--border); transition:background .15s; }
  .tpsplit.is-split .tpsplit__sep:hover::before,
  .tpsplit.is-split .tpsplit__sep:focus-visible::before{ background:var(--primary); }
  .tpsplit.is-split .tpsplit__left{ padding-right:.7rem; }
  /* Hauteur : on prend ce que la fenêtre offre, moins la barre d'outils —
     l'ancienne limite de 72vh laissait l'éditeur inutilement ramassé. */
  .tpsplit.is-split .tpsplit__left,
  .tpsplit.is-split .tpsplit__right{ height:clamp(360px, calc(100vh - 190px), 1400px);
    overflow-y:auto; overscroll-behavior:contain; }
  .tpsplit.is-split .tpsplit__right{ padding-left:.7rem; }
}

.tpsplit__rhead{ position:sticky; top:0; z-index:2; padding:.3rem 0 .4rem; margin-bottom:.3rem;
  background:var(--bg-card,#fff); border-bottom:1px solid var(--border);
  font-size:.78rem; font-weight:700; color:var(--text-muted); }
.tpsplit__prev{ padding-bottom:1rem; }
.tpsplit__cell{ padding:.5rem .1rem; border-bottom:1px dashed var(--border); }
.tpsplit__cell:last-child{ border-bottom:none; }
.tpsplit__lbl{ font-size:.68rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:.25rem; }
.tpsplit__code{ margin:0; padding:.5rem .6rem; border-radius:7px; background:var(--bg-subtle,#f8fafc);
  border:1px solid var(--border); font-size:.82rem; overflow-x:auto; white-space:pre; }
/* La consigne est désormais du HTML rendu : plus de pre-wrap, qui doublait
   les sauts de ligne produits par le markdown. */
.tpsplit__consigne{ font-size:.88rem; margin-bottom:.3rem; }
.tpsplit__consigne > :first-child{ margin-top:0; }
.tpsplit__consigne > :last-child{ margin-bottom:0; }
.tpsplit__ph{ padding:.4rem .6rem; border:1px dashed var(--border); border-radius:7px;
  font-size:.8rem; color:var(--text-muted); background:var(--bg-subtle,#f8fafc); }

/* Clic dans le rendu : on rejoint la cellule correspondante à gauche */
.tpsplit.is-split .tpsplit__cell{ cursor:pointer; border-radius:7px; transition:background .15s; }
.tpsplit.is-split .tpsplit__cell:hover{ background:var(--bg-subtle,#f8fafc); }
.cell-edit--cible{ animation:tpCible 900ms ease-out; }
@keyframes tpCible{
  0%,55%{ box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 38%, transparent); }
  100%  { box-shadow:0 0 0 3px transparent; }
}
@supports not (box-shadow: 0 0 0 3px color-mix(in srgb, red 38%, transparent)){
  @keyframes tpCible{ 0%,55%{ box-shadow:0 0 0 3px rgba(37,99,235,.38); } 100%{ box-shadow:0 0 0 3px transparent; } }
}
@media (prefers-reduced-motion: reduce){ .cell-edit--cible{ animation:none; outline:2px solid var(--primary); } }


/* ════════════════════════════════════════════════════════════
   v330 — Cellule de vérification d'une mesure
   ════════════════════════════════════════════════════════════ */
.tp-verif__row{ display:flex; align-items:flex-end; gap:.8rem; flex-wrap:wrap; margin:.6rem 0 .2rem; }
.tp-verif__f{ display:flex; align-items:center; gap:.45rem; }
.tp-verif__n{ font-size:.95rem; white-space:nowrap; }
.tp-verif__f .form-control{ width:150px; font-family:ui-monospace,Menlo,Consolas,monospace; }
.tp-verif--faux{ border-color:#b91c1c !important; box-shadow:0 0 0 3px rgba(185,28,28,.14); }
.tp-verif__msg{ margin-top:.45rem; padding:.5rem .7rem; border-radius:8px; font-size:.86rem; line-height:1.45; }
.tp-verif__msg--ok { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.tp-verif__msg--err{ background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.tp-verif__msg--att{ background:var(--bg-subtle,#f8fafc); color:var(--text-muted); border:1px solid var(--border); }

/* Éditeur : réglages de la cellule de vérification */
.cverif{ margin-top:.5rem; padding:.6rem .7rem; border:1px solid var(--border); border-radius:9px;
  background:var(--bg-subtle,#f8fafc); }
.cverif__row{ display:flex; gap:.8rem; flex-wrap:wrap; margin-bottom:.5rem; }
.cverif__row label{ display:flex; align-items:center; gap:.35rem; font-size:.8rem; color:var(--text-muted); }
.cverif__row input[type=text]{ width:150px; font-family:ui-monospace,Menlo,Consolas,monospace; }
.cverif__row input[type=number]{ width:70px; }
.cverif__lbl{ display:block; font-size:.78rem; color:var(--text-muted); margin-bottom:.25rem; }
.cverif__code{ width:100%; box-sizing:border-box; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.82rem; }


/* ════════════════════════════════════════════════════════════
   v332 — Respiration des titres, alignement des listes, @saut
   ════════════════════════════════════════════════════════════ */
/* Les titres d'une cellule TP ou d'un devoir manquaient d'air : la marge
   basse (.5rem) se confondait avec celle du paragraphe suivant. */
.md-titres h1{ margin:1.8em 0 .7em; }
.md-titres h2{ margin:1.5em 0 .6em; }
.md-titres h3{ margin:1.2em 0 .5em; }
.md-titres > h1:first-child, .md-titres > h2:first-child, .md-titres > h3:first-child{ margin-top:0; }

/* Les puces débordaient à GAUCHE du texte courant : on décale la liste
   entière pour que la puce parte du bord du paragraphe, et le texte de
   l'élément un cran plus à droite. */
.md-titres ul, .md-titres ol,
.tp-cell--md ul, .tp-cell--md ol{ margin:.55em 0 .55em 1.3em; padding-left:1.3em; }
.md-titres li, .tp-cell--md li{ margin:.18em 0; }
.md-titres li > ul, .md-titres li > ol{ margin-top:.15em; margin-bottom:.15em; }

/* Espace vertical demandé par « @saut » (1 à 6 crans d'environ 1 ligne) */
.lsaut{ display:block; }
.lsaut--1{ height:1.1em; } .lsaut--2{ height:2.2em; } .lsaut--3{ height:3.3em; }
.lsaut--4{ height:4.4em; } .lsaut--5{ height:5.5em; } .lsaut--6{ height:6.6em; }

/* Barre d'enregistrement de l'éditeur de TP */
.tp-save{ display:flex; align-items:center; gap:.7rem; flex-wrap:wrap; margin-top:1.25rem; }
.tp-save__etat{ font-size:.85rem; color:var(--text-muted); }
.tp-save__etat--ok { color:#166534; font-weight:600; }
.tp-save__etat--err{ color:#b91c1c; font-weight:600; }

/* ── Barre d'insertion dans l'en-tête d'une cellule de TP ── */
.cell-edit__head{ flex-wrap:wrap; }
.cmd{ display:inline-flex; align-items:center; gap:.15rem; flex-wrap:wrap; margin-left:.5rem; }
.cmd__b{ display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:24px;
  padding:0 .35rem; cursor:pointer; border:1px solid transparent; border-radius:6px;
  background:none; color:var(--text-muted); font-size:.8rem; line-height:1;
  transition:background .12s, color .12s, border-color .12s; }
.cmd__b:hover{ background:var(--bg-card,#fff); border-color:var(--border); color:var(--primary); }
.cmd__sep{ width:1px; height:16px; background:var(--border); margin:0 .25rem; }
.cell-edit__upstatus{ display:block; font-size:.76rem; margin:.1rem 0 .25rem; }

/* Encadrés compatibles notebook : <div class="alert alert-block alert-…"> */
.tp-cell--md .alert, .md-titres .alert, .lecon-content .alert{ margin:.8rem 0; }
.alert-block{ display:block; }
.tp-cell--md .alert > :first-child, .md-titres .alert > :first-child{ margin-top:0; }
.tp-cell--md .alert > :last-child,  .md-titres .alert > :last-child { margin-bottom:0; }


/* ════════════════════════════════════════════════════════════
   v336 — Capacités d'un TP : une ligne par thème, repliable
   ════════════════════════════════════════════════════════════ */
.tpcaps{ margin:0 0 1rem; border:1px solid var(--border); border-radius:10px;
  background:var(--bg-subtle,#f8fafc); }
.tpcaps__sum{ cursor:pointer; padding:.5rem .8rem; font-size:.84rem; font-weight:600;
  color:var(--text-muted); list-style:none; display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.tpcaps__sum::-webkit-details-marker{ display:none; }
.tpcaps__sum::before{ content:'▸'; font-size:.75rem; opacity:.6; }
.tpcaps[open] .tpcaps__sum::before{ content:'▾'; }
.tpcaps__themes{ font-weight:400; opacity:.75; }
.tpcaps__body{ padding:.1rem .8rem .7rem; display:flex; flex-wrap:wrap; gap:.3rem 1.6rem; }
.tpcaps__grp{ flex:1 1 260px; min-width:0; }
.tpcaps__mat{ font-size:.68rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted); margin:.35rem 0 .15rem; }
.tpcaps__list{ margin:0; padding-left:1.1rem; }
.tpcaps__cap{ font-size:.82rem; line-height:1.45; color:var(--text-muted); margin:.1rem 0; }
.tpcaps__cap--exp{ color:#166534; }

/* ── Brouillon local : cellule modifiée et non enregistrée ── */
.tp-cell--modif > .tp-cell__head .tp-cell__hint::after,
.tp-cell--modif .tp-cell__hint::after{ content:' · ✎ non enregistré'; color:#b45309; font-weight:600; }
.tp-cell--modif{ box-shadow:inset 3px 0 0 #f59e0b; }
.tp-brouillon{ position:fixed; left:50%; bottom:18px; transform:translateX(-50%); z-index:90;
  max-width:min(92vw,520px); padding:.6rem .9rem; border-radius:10px;
  background:#fef3c7; color:#92400e; border:1px solid #fde68a; box-shadow:0 8px 24px rgba(15,23,42,.16);
  font-size:.86rem; display:flex; align-items:center; gap:.7rem; transition:opacity .4s; }
.tp-brouillon.is-off{ opacity:0; pointer-events:none; }
.tp-brouillon__x{ border:none; background:rgba(146,64,14,.12); color:inherit; cursor:pointer;
  border-radius:7px; padding:.2rem .55rem; font-size:.8rem; }


/* ════════════════════════════════════════════════════════════
   v338 — Numéros de ligne dans les cellules Python
   ════════════════════════════════════════════════════════════ */
.gut{ display:flex; align-items:stretch; width:100%; }
.gut__n{ flex:none; min-width:2.4em; padding-left:.55rem; padding-right:.45rem;
  text-align:right; user-select:none; -webkit-user-select:none; pointer-events:none;
  overflow:hidden; white-space:pre; opacity:.34; }
.gut__ta{ flex:1 1 auto; min-width:0; }
/* Sans retour à la ligne, un numéro correspond toujours à une ligne de code. */
.tp-code-input, .cell-edit--code .cell-edit__area{ white-space:pre; overflow-x:auto; }

/* Cellule élève : fond sombre, numéros clairs et discrets */
.tp-code-input + .gut__n, .gut__n{ color:inherit; }
.tp-cell--code .gut{ background:#0f172a; border-radius:inherit; }
.tp-cell--code .gut__n{ color:#e2e8f0; }
.tp-cell--code .gut__ta{ padding-left:.25rem; }

/* Éditeur du professeur : même principe */
.cell-edit--code .gut{ background:#0f172a; }
.cell-edit--code .gut__n{ color:#e2e8f0; }
.cell-edit--code .gut__ta{ padding-left:.25rem; }

/* Pendant le glissé du séparateur : pas de sélection de texte parasite */
body.tpsplit-drag{ user-select:none; -webkit-user-select:none; cursor:col-resize; }
.tpsplit__sep{ display:none; }

/* ── v347 : hauteur d'une cellule de TP, ajustée ou repliée ── */
.cell-edit__haut{ transition:transform .15s; }
.cell-edit--haut > .cell-edit__head .cell-edit__haut{ transform:rotate(90deg); color:var(--primary); }
.cell-edit--haut .cell-edit__area{ resize:vertical; }
.tpsplit__tab--haut{ right:auto; left:0; }

/* ── v349 : aide et exemple de la cellule de vérification ── */
.cverif__aide, .cverif__ex{ border:1px solid var(--border); background:var(--bg-card,#fff);
  color:var(--text-muted); cursor:pointer; border-radius:6px; padding:.05rem .4rem;
  font-size:.74rem; margin-left:.4rem; }
.cverif__aide{ font-size:.85rem; padding:.05rem .3rem; }
.cverif__aide:hover, .cverif__ex:hover{ color:var(--primary); border-color:var(--primary); }
.cverif__pop{ position:absolute; z-index:95; width:min(92vw, 440px); max-height:70vh; overflow-y:auto;
  padding:.8rem 1rem; border-radius:10px; background:var(--bg-card,#fff);
  border:1px solid var(--border); box-shadow:0 12px 32px rgba(15,23,42,.18);
  font-size:.82rem; line-height:1.5; }
.cverif__pop p{ margin:.5rem 0; }
.cverif__pop ol{ margin:.4rem 0 .4rem 1.1rem; padding-left:.8rem; }
.cverif__pop li{ margin:.15rem 0; }
.cverif__pop code{ font-size:.95em; }
.cverif__pop-x{ float:right; border:none; background:none; cursor:pointer; color:var(--text-muted);
  font-size:.9rem; line-height:1; padding:0 0 .3rem .4rem; }
.cverif__pop-note{ padding:.4rem .6rem; border-radius:7px; background:#fef3c7; color:#92400e;
  border:1px solid #fde68a; }
.cverif__code{ min-height:120px; }

/* ── v350 : correction et rattachements d'une cellule évaluée ── */
.ccorr{ border-top:1px dashed var(--border); padding:.5rem .6rem .6rem; background:rgba(22,163,74,.04); }
.ccorr__lbl{ display:block; font-size:.76rem; font-weight:600; color:#166534; margin-bottom:.25rem; }
.ccorr__txt{ width:100%; box-sizing:border-box; border:1px solid var(--border); border-radius:7px;
  padding:.45rem .55rem; font-size:.85rem; line-height:1.5; resize:vertical; }
.ccorr__txt.eval-code{ font-family:ui-monospace,Menlo,Consolas,monospace; background:#0f172a; color:#e2e8f0; }
.cell-edit__lien{ position:relative; }
.cell-edit__lien.is-on{ color:var(--primary); }
.cell-edit__n{ font-size:.6rem; font-weight:700; vertical-align:super; margin-left:.05rem; }
.tplien{ position:absolute; z-index:95; width:min(92vw,420px); max-height:60vh; overflow-y:auto;
  padding:.6rem .8rem; border-radius:10px; background:var(--bg-card,#fff); border:1px solid var(--border);
  box-shadow:0 12px 32px rgba(15,23,42,.18); font-size:.83rem; }
.tplien__t{ font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:.35rem; }
.tplien__i{ display:flex; align-items:flex-start; gap:.4rem; padding:.18rem 0; cursor:pointer; line-height:1.4; }

/* ════════════════════════════════════════════════════════════
   v353 — Quiz de TP : une question à la fois, en carrousel
   ════════════════════════════════════════════════════════════ */
/* Le style ne s'applique QUE si la classe .qzcar a été posée, c'est-à-dire
   si le carrousel s'est installé sans encombre. Sinon la liste reste. */
.qzcar .qzcar__piste{ display:flex; transition:transform .28s ease; will-change:transform; }
.qzcar .qzcar__piste > .quiz-inline__item{ flex:0 0 100%; min-width:100%; box-sizing:border-box; }
.qzcar{ overflow:hidden; }

.qzcar__barre{ display:flex; align-items:center; justify-content:center; gap:.7rem;
  margin:.6rem 0 .2rem; }
.qzcar__fl{ border:none; background:none; cursor:pointer; color:var(--text-muted);
  font-size:1.3rem; line-height:1; padding:0 .3rem; border-radius:6px; }
.qzcar__fl:hover:not(:disabled){ color:var(--primary); }
.qzcar__fl:disabled{ opacity:.25; cursor:default; }
.qzcar__pts{ display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; justify-content:center; }
.qzcar__pt{ width:9px; height:9px; padding:0; border-radius:50%; cursor:pointer;
  border:1px solid var(--border); background:transparent; transition:background .15s, transform .15s; }
.qzcar__pt.is-ok{ background:#16a34a; border-color:#16a34a; }
.qzcar__pt.is-cur{ transform:scale(1.5); border-color:var(--primary); }
.qzcar__pt.is-cur.is-ok{ border-color:#16a34a; }
.qzcar__repris{ margin:.2rem 0 .5rem; padding:.35rem .6rem; border-radius:7px; font-size:.8rem;
  background:#fef3c7; color:#92400e; border:1px solid #fde68a; }

/* Quiz envoyé avec des questions sans réponse : la pastille passe au rouge */
.qzcar__pt.is-manque{ background:#dc2626; border-color:#dc2626; }
.qzcar__pt.is-cur.is-manque{ border-color:#dc2626; }

/* L'ordre étant tiré au sort, le numéro d'origine de la question n'a plus de
   sens et induirait en erreur : les pastilles du bas situent déjà l'élève. */
.qzcar .quiz-inline__num{ display:none; }

/* ════════════════════════════════════════════════════════════
   v357 — Niveaux d'acquisition dans l'espace de correction
   ════════════════════════════════════════════════════════════ */
.evnv{ margin:.6rem 0; border:1px solid var(--border); border-radius:10px;
  background:var(--bg-subtle,#f8fafc); padding:.2rem .7rem .5rem; }
.evnv__sum{ cursor:pointer; padding:.4rem 0; font-size:.84rem; font-weight:600; color:var(--text-muted); }
.evnv__cell{ margin:.35rem 0 .5rem; }
.evnv__lbl{ font-size:.68rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:.15rem; }
.evnv__crit{ display:flex; align-items:center; gap:.5rem; padding:.15rem 0; flex-wrap:wrap; }
.evnv__ic{ flex:none; }
.evnv__nom{ flex:1 1 220px; min-width:0; font-size:.84rem; line-height:1.35; }
.evnv__cur{ flex:none; width:110px; accent-color:var(--primary); }
.evnv__etat{ flex:none; min-width:84px; font-size:.78rem; font-weight:600; }

/* ════════════════════════════════════════════════════════════
   v358 — Quiz repliés, capacités filtrables et condensées
   ════════════════════════════════════════════════════════════ */
.tp-quiz-block > .tp-quiz-block__label{ cursor:pointer; list-style:none; }
.tp-quiz-block > .tp-quiz-block__label::-webkit-details-marker{ display:none; }
.tp-quiz-block > .tp-quiz-block__label::before{ content:'▸'; margin-right:.4rem; opacity:.6; font-size:.8em; }
.tp-quiz-block[open] > .tp-quiz-block__label::before{ content:'▾'; }
.tp-quiz-block__etat{ font-weight:400; opacity:.7; font-size:.85em; }

/* Capacités : filtres de thème et liste plus dense */
.tpcaps__filtres{ display:flex; flex-wrap:wrap; gap:.3rem; padding:.1rem .8rem .5rem; }
.tpcaps__f{ border:1px solid var(--border); background:var(--bg-card,#fff); color:var(--text-muted);
  cursor:pointer; border-radius:999px; padding:.12rem .55rem; font-size:.74rem; line-height:1.5; }
.tpcaps__f:hover{ color:var(--primary); border-color:var(--primary); }
.tpcaps__f.is-on{ background:var(--primary); border-color:var(--primary); color:#fff; }
.tpcaps__n{ opacity:.6; margin-left:.25rem; font-size:.9em; }
.tpcaps__grp[hidden]{ display:none; }
/* Colonnes : au-delà de quelques thèmes, la liste tiendrait sur des mètres */
.tpcaps__body{ columns:2 260px; column-gap:1.4rem; display:block; }
.tpcaps__grp{ break-inside:avoid; margin-bottom:.5rem; }
.tpcaps__cap{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; text-overflow:ellipsis; }

/* Note explicative du volet Coefficients (v359) */
.coef-note{ max-width:560px; margin:0 0 1rem; padding:.6rem .8rem; border-radius:9px;
  background:var(--bg-subtle,#f8fafc); border:1px solid var(--border);
  font-size:.83rem; line-height:1.55; color:var(--text-muted); }
.coef-note strong{ color:var(--text); }

/* v362 — test du code de contrôle depuis l'éditeur */
.cverif__test{ border:1px solid var(--border); background:var(--bg-card,#fff); color:var(--text-muted);
  cursor:pointer; border-radius:6px; padding:.05rem .45rem; font-size:.74rem; margin-left:.4rem; }
.cverif__test:hover{ color:var(--primary); border-color:var(--primary); }
.cverif__res{ margin:.35rem 0; padding:.45rem .65rem; border-radius:7px; font-size:.82rem; line-height:1.5;
  font-family:ui-monospace,Menlo,Consolas,monospace; }
.cverif__res--att{ background:var(--bg-subtle,#f8fafc); color:var(--text-muted); border:1px solid var(--border); }
.cverif__res--ok { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.cverif__res--err{ background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.cverif__res-att{ opacity:.8; font-size:.95em; }

/* v363 — mise en forme légère dans les bulles de note */
.lfn-pop code{ background:rgba(255,255,255,.14); padding:.05rem .3rem; border-radius:4px;
  font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.92em; }
.lfn-pop strong{ font-weight:700; }
.lfn-pop em{ font-style:italic; }

/* v366 — règle de regroupement des versions */
.pv-regle{ margin:.5rem 0 .2rem; padding:.45rem .65rem; border-radius:7px; font-size:.79rem;
  line-height:1.5; background:var(--bg-subtle,#f8fafc); border:1px solid var(--border);
  color:var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   v367 — Volet « Place des données »
   ════════════════════════════════════════════════════════════ */
.dn-intro{ margin-bottom:1rem; }
.dn-cartes{ display:flex; flex-wrap:wrap; gap:.7rem; margin-bottom:1.4rem; }
.dn-carte{ flex:1 1 150px; min-width:0; padding:.7rem .9rem; border-radius:10px;
  border:1px solid var(--border); background:var(--bg-card,#fff); }
.dn-carte__n{ font-size:1.35rem; font-weight:700; color:var(--primary); line-height:1.2; }
.dn-carte__l{ font-size:.78rem; color:var(--text-muted); margin-top:.15rem; }
.dn-h2{ font-size:1.02rem; margin:1.6rem 0 .5rem; }
.dn-table{ max-width:900px; }
.dn-table code{ font-size:.86em; }
.dn-vide{ opacity:.5; }
.dn-note{ font-size:.82rem; color:var(--text-muted); }
.dn-details summary{ cursor:pointer; font-size:.86rem; color:var(--text-muted); padding:.3rem 0; }
.dn-alerte{ max-width:900px; margin:.6rem 0; padding:.55rem .8rem; border-radius:8px;
  background:#fef3c7; color:#92400e; border:1px solid #fde68a; font-size:.86rem; }
.dn-conseils{ max-width:900px; margin-top:1.6rem; padding:.8rem 1rem; border-radius:10px;
  background:var(--bg-subtle,#f8fafc); border:1px solid var(--border); }
.dn-conseils h3{ font-size:.92rem; margin:0 0 .5rem; }
.dn-conseils ul{ margin:0; padding-left:1.1rem; }
.dn-conseils li{ font-size:.85rem; line-height:1.55; margin:.35rem 0; }

/* v369 — avertissement sur les cellules non jouées */
.cverif__res-avert{ color:#92400e; font-size:.95em; }

/* v371 — publication de la correction d'un exercice */
.exo-pub{ font-size:.74rem; }
.exo-pub.is-on{ color:#166534; border-color:#bbf7d0; background:#dcfce7; }
/* L'icône est dessinée (voir iconeOeil) : elle suit la couleur du texte et
   s'aligne sur la ligne de base comme un caractère. */
.ic-oeil{ vertical-align:-.18em; margin-right:.15rem; }

/* ════════════════════════════════════════════════════════════
   v374 — Visibilité d'un document et de ses corrections
   ════════════════════════════════════════════════════════════ */
.docbtn{ display:inline-flex; align-items:center; gap:.2rem; }
.docbtn__b{ display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:26px; padding:0; cursor:pointer; border-radius:7px;
  border:1px solid var(--border); background:var(--bg-card,#fff); color:var(--text-muted);
  transition:color .15s, border-color .15s, background .15s; }
.docbtn__b:hover{ color:var(--primary); border-color:var(--primary); }
.docbtn__b.is-on{ color:#166534; border-color:#bbf7d0; background:#dcfce7; }
.docbtn__b.is-partiel{ color:#92400e; border-color:#fde68a; background:#fef3c7; }
.docbtn__b:disabled{ opacity:.5; cursor:default; }
/* Sur une vignette de TD, la paire flotte en haut à droite */
.doc-card-w{ position:relative; }
.doc-card-w > .docbtn{ position:absolute; top:6px; right:6px; z-index:2; }

/* ════════════════════════════════════════════════════════════
   v377 — Volet « Sauvegardes »
   ════════════════════════════════════════════════════════════ */
.svg-intro{ max-width:820px; margin-bottom:1rem; }
.svg-card{ max-width:640px; padding:.9rem 1.1rem; }
.svg-h2{ font-size:1rem; margin:0 0 .7rem; }
.svg-ligne{ display:flex; align-items:center; gap:.45rem; margin:.45rem 0; font-size:.9rem; }
.svg-num{ width:80px; display:inline-block; }
.svg-note{ margin:.6rem 0 .8rem; }
.svg-etat{ margin-top:.9rem; padding-top:.7rem; border-top:1px solid var(--border); font-size:.86rem; }
.svg-actions{ display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; margin:1.4rem 0 .6rem; }
.svg-table{ max-width:820px; }
.svg-conseils{ max-width:820px; margin-top:1.8rem; padding:.9rem 1.1rem; border-radius:10px;
  background:var(--bg-subtle,#f8fafc); border:1px solid var(--border); }
.svg-conseils h3{ font-size:.94rem; margin:.2rem 0 .5rem; }
.svg-conseils ol{ margin:.3rem 0 .8rem 1.1rem; padding-left:.8rem; font-size:.86rem; line-height:1.6; }
.svg-avert{ padding:.5rem .75rem; border-radius:8px; background:#fef3c7; color:#92400e;
  border:1px solid #fde68a; font-size:.85rem; line-height:1.5; }

/* v380 — pastille des messages non lus sur l'onglet Contact */
.gestion-tabs__badge{ display:inline-block; min-width:16px; padding:0 .25rem; margin-left:.3rem;
  border-radius:999px; background:var(--error,#dc2626); color:#fff; font-size:.66rem;
  font-weight:700; line-height:16px; text-align:center; vertical-align:1px; }

/* v381 — test d'envoi de courriel */
.mailtest{ max-width:860px; margin:0 0 1.2rem; padding:.3rem .9rem .8rem;
  border:1px solid var(--border); border-radius:10px; background:var(--bg-subtle,#f8fafc); }
.mailtest__sum{ cursor:pointer; padding:.45rem 0; font-size:.9rem; font-weight:600; }
.mailtest__form{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin:.5rem 0; }
.mailtest__res{ margin:.6rem 0; padding:.5rem .75rem; border-radius:8px; font-size:.87rem; line-height:1.5; }
.mailtest__res--ok{ background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.mailtest__res--ko{ background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.mailtest__tab{ max-width:100%; font-size:.85rem; }
.mailtest__note{ color:var(--text-muted); font-size:.95em; }
.mailtest__jrn summary{ cursor:pointer; font-size:.82rem; color:var(--text-muted); padding:.3rem 0; }
.mailtest__jrn pre{ max-height:280px; overflow:auto; font-size:.74rem; line-height:1.45;
  background:#0f172a; color:#e2e8f0; padding:.6rem .8rem; border-radius:8px; white-space:pre-wrap; }

/* v383 — réglages SMTP dans Maintenance */
.smtpcfg{ max-width:640px; margin:0 0 1.2rem; padding:.3rem .9rem .8rem;
  border:1px solid var(--border); border-radius:10px; background:var(--bg-subtle,#f8fafc); }
.smtpcfg__sum{ cursor:pointer; padding:.45rem 0; font-size:.9rem; font-weight:600; }
.smtpcfg__src{ font-weight:400; font-size:.78rem; color:var(--text-muted); margin-left:.4rem; }
.smtpcfg__form label{ display:block; margin:.5rem 0; font-size:.83rem; color:var(--text-muted); }
.smtpcfg__form .form-control{ display:block; width:100%; margin-top:.15rem; }
.smtpcfg__court{ max-width:150px; }
.smtpcfg__pied{ display:flex; gap:.5rem; align-items:center; margin-top:.9rem; }

/* v384 — marque des comptes fantômes */
.btn.is-fantome{ background:#ede9fe; border-color:#ddd6fe; color:#5b21b6; }

/* v385 — actions groupées sur les comptes en attente */
.acc-groupe{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin:.2rem 0 .8rem; }
.acc-groupe .form-hint{ margin:0; }

/* v387 — compteur d'envoi de l'heure écoulée */
.smtpcfg__debit{ margin:.7rem 0; padding:.5rem .75rem; border-radius:8px; font-size:.85rem;
  background:var(--bg-card,#fff); border:1px solid var(--border); }
.smtpcfg__debit.is-chaud{ background:#fef3c7; border-color:#fde68a; color:#92400e; }
.smtpcfg__debit.is-plein{ background:#fee2e2; border-color:#fecaca; color:#991b1b; }
.smtpcfg__debit .form-hint{ display:block; margin:.25rem 0 0; }

/* v391 — volet Maintenance uniformisé */
.mnt-titre{ margin:.6rem 0 1rem; }
.smtpcfg{ max-width:none; }
.smtpcfg__test{ display:flex; align-items:flex-end; gap:.6rem; flex-wrap:wrap;
  margin:.8rem 0 .2rem; padding-top:.8rem; border-top:1px solid var(--border); }
.smtpcfg__test label{ margin:0; }
.smtpcfg__test .form-control{ min-width:240px; }
.smtpcfg__diag{ margin:.7rem 0; max-width:820px; font-size:.85rem; }

/* v392 — aide en ligne dans le volet SMTP */
.smtpcfg__aide{ font-weight:400; font-size:.9em; opacity:.85; }

/* ════════════════════════════════════════════════════════════
   v393 — Ouvrir un compte à la main, sans courriel
   ════════════════════════════════════════════════════════════ */
.cmain{ max-width:640px; margin:.4rem 0 1rem; padding:.3rem .9rem .8rem;
  border:1px solid var(--border); border-radius:10px; background:var(--bg-subtle,#f8fafc); }
.cmain__sum{ cursor:pointer; padding:.45rem 0; font-size:.9rem; font-weight:600; }
.cmain__form label{ display:block; margin:.5rem 0; font-size:.83rem; color:var(--text-muted); }
.cmain__form .form-control{ display:block; width:100%; margin-top:.15rem; }
.cmain-fait{ max-width:640px; margin:.6rem 0 1rem; padding:.8rem 1rem; border-radius:10px;
  background:#dcfce7; border:1px solid #bbf7d0; color:#166534; }
.cmain-fait h3{ margin:0 0 .4rem; font-size:1rem; }
.cmain-fait p{ margin:.35rem 0; font-size:.86rem; }
.cmain-ids{ margin:.6rem 0; border-collapse:collapse; }
.cmain-ids td{ padding:.25rem .8rem .25rem 0; font-size:.88rem; }
.cmain-ids code{ background:rgba(255,255,255,.7); padding:.1rem .4rem; border-radius:5px; }
.cmain-mdp{ font-size:1.05rem; font-weight:700; letter-spacing:.05em; }

/* v396 — réinitialisation des tentatives de quiz */
.qzres-tout{ display:flex; align-items:center; gap:.7rem; flex-wrap:wrap; margin:1rem 0; }
.qzres-tout .form-hint{ margin:0; }

/* ════════════════════════════════════════════════════════════
   v398 — Nombre de clics par proposition d'un QCM
   ════════════════════════════════════════════════════════════ */
.qcm-opt-view{ display:flex; align-items:center; gap:.5rem; }
.qcm-opt-hits{ position:relative; flex:none; margin-left:auto; display:flex; align-items:center;
  width:110px; height:16px; border-radius:8px; background:rgba(15,23,42,.06); overflow:hidden; }
.qcm-opt-hits__bar{ position:absolute; left:0; top:0; bottom:0; border-radius:8px;
  background:rgba(15,23,42,.16); }
.qcm-opt-view--ok .qcm-opt-hits__bar{ background:rgba(22,163,74,.30); }
.qcm-opt-view--no .qcm-opt-hits__bar{ background:rgba(220,38,38,.22); }
.qcm-opt-hits__n{ position:relative; margin-left:auto; padding-right:.4rem;
  font-size:.72rem; font-weight:700; color:var(--text-muted); }
.qcm-opt-legende{ margin:.4rem 0 0; }

/* v399 — classe modifiable dans la liste des comptes */
.cpt-classe{ display:inline-block; width:auto; min-width:112px; padding:.15rem .4rem;
  font-size:.8rem; height:auto; }
.cpt-classe--vide{ border-color:var(--error); color:var(--error); background:#fef2f2; }

/* v403 — verrou de la correction d'un exercice */
.exo-bloc{ font-size:.9rem; padding:.05rem .4rem; }
.exo-bloc.is-on{ color:#92400e; border-color:#fde68a; background:#fef3c7; }

/* v404 — case de verrouillage dans le formulaire d'exercice */
.exo-verrou{ display:inline-flex; align-items:center; gap:.4rem; font-size:.88rem; font-weight:600; }

/* v405 — avertissement de groupe : jaune, pas rouge */
.tpgrp__conflict--avert{ background:#fef3c7; border-color:#fde68a; color:#92400e; }
.tpgrp__conflict-note{ opacity:.8; font-style:italic; }

/* v405 — liens vers les copies d'un groupe */
.eval-lien{ border:none; background:none; padding:0; cursor:pointer; font:inherit; color:inherit;
  text-decoration:underline; text-underline-offset:2px; }
.eval-lien:hover{ color:var(--primary); }

/* ════════════════════════════════════════════════════════════
   v406 — Un commentaire par cellule évaluée
   ════════════════════════════════════════════════════════════ */
.avisc{ margin:.2rem 0 .9rem; padding:.5rem .7rem; border-radius:9px;
  border:1px dashed var(--border); background:rgba(15,23,42,.02); }
.avisc__txt{ width:100%; box-sizing:border-box; border:1px solid var(--border); border-radius:7px;
  padding:.4rem .55rem; font-size:.86rem; line-height:1.5; resize:vertical; }
.avisc__pied{ display:flex; align-items:center; gap:.6rem; margin-top:.35rem; }
.avisc__etat{ font-size:.78rem; color:var(--text-muted); }
.avisc__etat.is-ok{ color:#166534; }
.avisc__etat.is-ko{ color:var(--error); }

/* v407 — barème d'une cellule évaluée */
.cell-edit__bareme{ margin-left:.5rem; font-size:.78rem; color:var(--text-muted); font-weight:400; }
.cell-edit__bar{ width:62px; padding:.05rem .25rem; font-size:.78rem; border:1px solid var(--border);
  border-radius:5px; }

/* v407 — note par cellule et bilan du barème */
.avisc__note{ font-size:.8rem; color:var(--text-muted); display:inline-flex; align-items:center; gap:.25rem; }
.avisc__pts{ width:64px; padding:.1rem .3rem; font-size:.82rem; border:1px solid var(--border); border-radius:5px; }
.avisc-bilan{ margin:.8rem 0; padding:.5rem .8rem; border-radius:9px; font-size:.86rem;
  background:#eef2ff; border:1px solid #c7d2fe; color:#3730a3; display:flex; gap:.6rem;
  align-items:center; flex-wrap:wrap; }
.avisc-bilan .form-hint{ margin:0; }
.avisc-total{ font-size:1rem; }

/* v409 — note de cellule héritée des niveaux */
.avisc__detail{ font-size:.76rem; opacity:.85; }

/* v412 — documents récents cliquables sur le tableau de bord */
.dash-doc{ font-size:.9rem; }
.dash-doc__lien{ display:flex; align-items:center; gap:.75rem; padding:.3rem .4rem;
  margin:0 -.4rem; border-radius:7px; color:inherit; text-decoration:none; }
.dash-doc__lien:hover{ background:var(--bg-alt,#f1f5f9); }
.dash-doc__lien:hover div > div:first-child{ text-decoration:underline; }

/* ════════════════════════════════════════════════════════════
   v413 — Scanner de documents (public/scanner.php)
   ════════════════════════════════════════════════════════════ */
body.scn{ max-width:820px; margin:0 auto; padding:1rem .75rem 3rem; }
.scn-tete h1{ font-size:1.3rem; margin:.2rem 0 .4rem; }
.scn-tete p{ font-size:.88rem; color:var(--text-muted); line-height:1.55; margin:0 0 1rem; }
.scn-source{ display:flex; gap:.6rem; flex-wrap:wrap; margin-bottom:1.2rem; }
.scn-btn-gros{ flex:1 1 200px; text-align:center; padding:.7rem 1rem; font-size:.95rem; cursor:pointer; }

.scn-pages h2{ font-size:1rem; margin:.4rem 0 .6rem; }
.scn-compte{ background:var(--primary); color:#fff; border-radius:999px; padding:0 .45rem;
  font-size:.78rem; vertical-align:2px; }
.scn-liste{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.7rem; }
.scn-item{ border:1px solid var(--border); border-radius:10px; padding:.4rem; background:var(--bg-subtle,#f8fafc); }
.scn-mini{ display:block; max-width:120px; max-height:120px; border-radius:6px; cursor:pointer;
  background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.12); }
.scn-item__bar{ display:flex; align-items:center; gap:.1rem; margin-top:.3rem; }
.scn-item__n{ font-size:.72rem; color:var(--text-muted); margin-right:auto; }

.scn-edit{ margin:1.4rem 0; padding:.7rem; border:1px solid var(--border); border-radius:12px; }
.scn-edit__tete{ display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; }
.scn-zone{ position:relative; display:inline-block; max-width:100%; touch-action:none; }
.scn-zone canvas{ display:block; max-width:100%; border-radius:8px; }
.scn-cadre{ position:absolute; inset:0; width:100%; height:100%; }
.scn-cadre polygon{ fill:rgba(37,99,235,.14); stroke:#2563eb; stroke-width:2.5; }
.scn-poignee{ fill:#fff; stroke:#2563eb; stroke-width:3; cursor:grab; }

.scn-outils{ margin-top:.8rem; }
.scn-groupe{ margin:.5rem 0; }
.scn-groupe label{ display:block; font-size:.82rem; color:var(--text-muted); margin-bottom:.15rem; }
.scn-groupe input[type=range]{ width:100%; }
.scn-boutons{ display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.7rem; }
.scn-aide{ font-size:.8rem; color:var(--text-muted); margin:.7rem 0 0; line-height:1.5; }

.scn-loupe{ position:fixed; inset:0; z-index:9999; background:rgba(15,23,42,.94);
  overflow:auto; padding:1rem; text-align:center; }
.scn-loupe canvas{ max-width:none; background:#fff; border-radius:6px; }
.scn-loupe p{ color:#e2e8f0; font-size:.82rem; margin:.7rem 0 0; position:sticky; bottom:0; }

.scn-export{ margin-top:1.6rem; padding-top:1rem; border-top:1px solid var(--border); }
.scn-export .form-label{ display:block; margin-bottom:.6rem; font-size:.86rem; }
.scn-etat{ margin:.7rem 0 0; font-size:.86rem; }
.scn-etat.is-ok{ color:#166534; }
.scn-etat.is-ko{ color:var(--error); }

/* v415 — scanner : aperçu direct, cadre plus sûr */
.scn-travail{ display:flex; gap:.8rem; align-items:flex-start; flex-wrap:wrap; }
.scn-zone{ flex:1 1 320px; }
.scn-loupe-vive{ flex:0 0 260px; }
.scn-loupe-vive strong{ display:block; font-size:.8rem; margin-bottom:.3rem; }
.scn-loupe-vive canvas{ display:block; width:260px; height:190px; border-radius:8px;
  border:1px solid var(--border); background:#fff; }
.scn-loupe-vive p{ font-size:.76rem; color:var(--text-muted); line-height:1.45; margin:.35rem 0 0; }
.scn-serie{ flex:1 1 100%; font-size:.8rem; color:var(--text-muted); margin:.3rem 0 0; line-height:1.5; }
.scn-loupe__bar{ position:sticky; top:0; display:flex; gap:.7rem; align-items:center;
  padding:.5rem 0 .7rem; background:rgba(15,23,42,.94); color:#e2e8f0; font-size:.8rem; z-index:2; }
.scn-poignee{ r:15; }
@media (max-width:700px){
  .scn-loupe-vive{ flex:1 1 100%; }
  .scn-loupe-vive canvas{ width:100%; height:auto; aspect-ratio:260/190; }
}

/* ════════════════════════════════════════════════════════════
   v416 — Organisation des pages d'une copie
   ════════════════════════════════════════════════════════════ */
.pgband{ margin:0 0 .8rem; padding:.3rem .7rem .6rem; border:1px solid var(--border);
  border-radius:10px; background:var(--bg-subtle,#f8fafc); }
.pgband > summary{ cursor:pointer; font-size:.88rem; font-weight:600; padding:.35rem 0; }
.pgband__liste{ display:flex; gap:.6rem; overflow-x:auto; padding:.5rem 0 .3rem; }
.pgband__item{ flex:none; border:2px solid transparent; border-radius:8px; padding:.2rem;
  background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.14); cursor:grab; }
.pgband__item canvas{ display:block; border-radius:4px; }
.pgband__item.is-drag{ opacity:.45; }
.pgband__item.is-cible{ border-color:var(--primary); }
.pgband__bar{ display:flex; align-items:center; justify-content:space-between;
  gap:.3rem; font-size:.72rem; color:var(--text-muted); padding:.2rem .1rem 0; }
.pgband__bar small{ opacity:.7; }
.pgband__bar button{ border:none; background:none; cursor:pointer; font-size:.95rem;
  padding:0 .2rem; border-radius:4px; }
.pgband__bar button:hover{ background:var(--bg-alt,#f1f5f9); }

/* v418 — numériser depuis un dépôt */
.scanlien{ margin:.35rem 0 .35rem .5rem; }
.scanlien::before{ content:"ou "; font-weight:400; opacity:.7; }
.scanlien-fond{ position:fixed; inset:0; z-index:9998; background:rgba(15,23,42,.6);
  display:flex; align-items:center; justify-content:center; padding:1rem; }
.scanlien-boite{ background:#fff; border-radius:12px; width:min(960px,100%); height:min(90vh,900px);
  display:flex; flex-direction:column; overflow:hidden; box-shadow:0 12px 40px rgba(15,23,42,.35); }
.scanlien-bar{ display:flex; align-items:center; justify-content:space-between;
  padding:.5rem .8rem; border-bottom:1px solid var(--border); }
.scanlien-cadre{ flex:1; width:100%; border:0; }

/* v419 — poignées du scanner : cible plus large, saisie propre */
.scn-poignee{ fill:#fff; stroke:#2563eb; stroke-width:3.5; cursor:grab; touch-action:none; }
.scn-poignee:active{ cursor:grabbing; fill:#dbeafe; }


/* v422 — repère de défilement de l'agenda sur téléphone */
.gcal__defile{ display:none; font-size:.76rem; color:var(--text-muted); margin:.3rem 0 0; }

/* v426 — aucun TP ouvert au chargement */
.tp-invite{ margin:1.2rem 0; padding:.9rem 1.1rem; border-radius:10px; font-size:.92rem;
  color:var(--text-muted); background:var(--bg-subtle,#f8fafc); border:1px dashed var(--border); }

/* ════════════════════════════════════════════════════════════
   v427 — Banque de QCM : liste compacte
   ════════════════════════════════════════════════════════════ */
/* L'énoncé s'affiche en entier, sur plusieurs lignes si besoin, en police
   réduite : on reconnaît la question sans que la liste s'étale. */
.qcm-list .exo-row{ padding:.3rem .55rem; }
.qcm-list .exo-row__main{ align-items:flex-start; }
.exo-row__title--full{ white-space:normal; overflow:visible; text-overflow:clip;
  font-size:.82rem; font-weight:500; line-height:1.35; }
.qcm-list .exo-row__type{ margin-top:.1rem; }
/* La capacité rattachée reste consultable via 👁, pas dans la liste. */
.qcm-list .qcm-caps{ display:none; }
.qcm-list .exo-row__stats{ font-size:.74rem; white-space:nowrap; }

/* v427 — question qu'on vient de modifier */
.exo-row.is-vu{ box-shadow:0 0 0 2px var(--primary); border-radius:8px;
  transition:box-shadow .4s ease; }

/* ════════════════════════════════════════════════════════════
   v428 — Curseurs de niveau sous la cellule, en discret
   ════════════════════════════════════════════════════════════ */
.avnv{ margin:.4rem 0 0; padding-top:.4rem; border-top:1px dashed var(--border); }
.avnv__l{ display:flex; align-items:center; gap:.4rem; padding:.1rem 0; }
.avnv__ic{ flex:none; font-size:.8rem; opacity:.8; }
.avnv__nom{ flex:1 1 auto; min-width:0; font-size:.74rem; color:var(--text-muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.avnv__cur{ flex:0 0 96px; height:16px; margin:0; }
.avnv__etat{ flex:0 0 auto; min-width:46px; font-size:.7rem; font-weight:700;
  color:var(--text-muted); text-align:right; }
.avisc__note{ font-size:.8rem; color:var(--text-muted); }
.avisc__note strong{ font-size:.95rem; color:var(--text); }

/* ════════════════════════════════════════════════════════════
   v431 — Enregistrement groupé et note du TP détaillée
   ════════════════════════════════════════════════════════════ */
.avisc-tout{ display:flex; align-items:center; gap:.7rem; flex-wrap:wrap; margin:1rem 0 .5rem; }
.avisc-tout__etat{ font-size:.8rem; color:var(--text-muted); }
.avisc-tout__etat.is-ok{ color:#166534; }
.avisc-tout__etat.is-ko{ color:var(--error); }
.avisc-tpnote{ margin:.5rem 0 1rem; padding:.6rem .9rem; border-radius:9px; font-size:.9rem;
  background:#f0fdf4; border:1px solid #bbf7d0; color:#166534;
  display:flex; gap:.7rem; align-items:baseline; flex-wrap:wrap; }
.avisc-tpnote strong{ font-size:1rem; }
.avisc-tpnote__calc{ font-size:.82rem; opacity:.9; }
.avisc-tpnote__calc em{ font-style:normal; opacity:.75; }
.avisc-tpnote .form-hint{ margin:0; flex:1 1 100%; }

/* ════════════════════════════════════════════════════════════
   v432 — Comparaison de deux copies côte à côte
   ════════════════════════════════════════════════════════════ */
.eval-ref{ margin:0 0 .8rem; padding:.5rem .8rem; border-radius:9px; font-size:.88rem;
  background:#f0fdf4; border:1px solid #bbf7d0; color:#166534;
  display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.evalcmp{ position:fixed; top:0; right:0; bottom:0; width:min(44vw, 560px); z-index:900;
  background:var(--bg-card,#fff); border-left:2px solid var(--border);
  box-shadow:-6px 0 24px rgba(15,23,42,.14); display:flex; flex-direction:column; }
.evalcmp__bar{ display:flex; align-items:center; justify-content:space-between;
  padding:.55rem .8rem; border-bottom:1px solid var(--border); background:var(--bg-subtle,#f8fafc); }
.evalcmp__corps{ flex:1; overflow:auto; padding:.7rem .8rem 2rem; }
.evalcmp__corps .eval-codecell, .evalcmp__corps .eval-answercell{ margin-bottom:.7rem; }
body.has-evalcmp .eval-card{ margin-right:min(44vw, 560px); }
@media (max-width:900px){
  .evalcmp{ width:100%; }
  body.has-evalcmp .eval-card{ margin-right:0; }
}

/* v434 — note résiduelle d'un élève devenu rattaché */
.eval-locked__vieux{ flex:1 1 100%; margin:.45rem 0 0; padding:.45rem .7rem; border-radius:8px;
  background:#fef3c7; border:1px solid #fde68a; color:#92400e; font-size:.84rem;
  display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }

/* v434 — réglage du barème depuis la correction */
.avbar{ margin:.4rem 0; font-size:.8rem; }
.avbar > summary{ cursor:pointer; color:var(--text-muted); padding:.2rem 0; }
.avbar__corps{ padding:.5rem .7rem; margin-top:.3rem; border:1px dashed var(--border);
  border-radius:8px; background:var(--bg-subtle,#f8fafc); }
.avbar__corps > label{ display:inline-flex; align-items:center; gap:.35rem; font-size:.8rem; }
.avbar__pts{ width:74px; padding:.1rem .3rem; border:1px solid var(--border); border-radius:5px; }
.avbar__bloc{ margin:.6rem 0; }
.avbar__titre{ font-size:.74rem; font-weight:700; color:var(--text-muted); margin-bottom:.25rem; }
/* Trois colonnes sur grand écran, deux au milieu, une sur téléphone : une
   liste à la file obligeait à défiler pour trouver une capacité. */
.avbar__cols{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:.15rem .8rem;
  max-height:190px; overflow:auto; padding-right:.2rem; }
@media (max-width:1100px){ .avbar__cols{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:620px){ .avbar__cols{ grid-template-columns:1fr; } }
.avbar__c{ display:flex; align-items:flex-start; gap:.3rem; font-size:.76rem;
  color:var(--text-muted); line-height:1.3; padding:.1rem 0; min-width:0; }
.avbar__c input{ flex:none; margin-top:.15rem; }
.avbar__c span{ min-width:0; overflow:hidden; text-overflow:ellipsis;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.avbar__pied{ display:flex; align-items:center; gap:.6rem; }
.avbar__etat{ font-size:.76rem; color:var(--text-muted); }
.avbar__etat.is-ok{ color:#166534; }
.avbar__etat.is-ko{ color:var(--error); }
.avbar .form-hint{ margin:.4rem 0 0; }

/* v436 — note des cellules dans la pastille, pastille cliquable */
.grpchip__note{ margin-left:.25rem; padding:0 .28rem; border-radius:6px; font-size:.66rem;
  font-weight:700; background:rgba(15,23,42,.08); color:var(--text-muted); }
.grpchip--go{ cursor:pointer; border:1px solid transparent; font:inherit; }
.grpchip--go:hover{ border-color:var(--primary); }

/* v437 — diagnostic de cohérence des référents */
.diagref{ margin:.2rem 0 1rem; font-size:.82rem; }
.diagref > summary{ cursor:pointer; color:var(--text-muted); padding:.3rem 0; }
.diagref__t{ max-width:820px; font-size:.8rem; margin:.4rem 0; }
.diagref__t th{ font-weight:600; font-size:.74rem; color:var(--text-muted); }
.diagref--ko{ background:#fef2f2; }
.diagref--ko td{ color:#b91c1c; font-weight:600; }

/* v443 — note du TP en tête de copie, repère de copie notée */
/* La couleur dit l'état de la correction : verte quand elle est complète,
   ambre en cours, grise quand seuls les quiz comptent. */
.eval-card__note{ margin-left:.5rem; padding:.05rem .45rem; border-radius:999px;
  font-size:.8rem; font-weight:700; vertical-align:2px; border:1px solid; }
.eval-card__note small{ font-weight:500; font-size:.72rem; opacity:.85; }
.eval-card__note--ok{   background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.eval-card__note--part{ background:#fef3c7; color:#92400e; border-color:#fde68a; }
.eval-card__note--vide{ background:var(--bg-alt,#f1f5f9); color:var(--text-muted); border-color:var(--border); }

/* v445 — barre de navigation en bas de la correction */
.eval-nav--bas{ margin:1.4rem 0 2.5rem; padding-top:1rem; border-top:1px solid var(--border); }
.eval-pos.is-note{ color:#166534; font-weight:800; }

/* ════════════════════════════════════════════════════════════
   v450 — Photo rendue et sa loupe, dans la cellule
   ════════════════════════════════════════════════════════════ */
/* Photo et loupe à 30 % de la fenêtre chacune : de quoi juger un schéma sans
   que la copie occupe tout l'écran. */
.rphoto{ display:flex; gap:.8rem; align-items:flex-start; margin:.6rem 0; flex-wrap:wrap; }
.rphoto__vue{ flex:0 0 30vw; max-width:30vw; min-width:240px; cursor:crosshair; }
.rphoto__vue img{ display:block; width:100%; height:auto; border-radius:8px;
  border:1px solid var(--border); background:#fff; }
.rphoto__loupe{ flex:0 0 30vw; max-width:30vw; min-width:240px; position:relative;
  border:1px solid var(--border); border-radius:8px; background:var(--bg-subtle,#f8fafc);
  aspect-ratio:4/3; overflow:hidden; }
.rphoto__zoom{ position:absolute; inset:0; background-repeat:no-repeat;
  opacity:0; transition:opacity .12s ease; }
.rphoto__aide{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  margin:0; padding:1rem; text-align:center; font-size:.8rem; color:var(--text-muted); }
@media (max-width:820px){
  .rphoto__vue, .rphoto__loupe{ flex:1 1 100%; max-width:100%; }
}


/* v453 — navigation et binôme dans l'en-tête de copie */
.eval-card__nav{ display:inline-flex; gap:.15rem; margin-right:.45rem; vertical-align:2px; }
.eval-card__nav .btn{ padding:.05rem .35rem; font-size:.9rem; line-height:1.2; }
.eval-binome{ border:1px solid var(--border); background:var(--bg-card,#fff); cursor:pointer;
  font:inherit; font-size:.78rem; padding:.05rem .4rem; border-radius:999px; color:var(--text-muted); }
.eval-binome:hover{ border-color:var(--primary); color:var(--primary); }

/* v465 — commandes SSH de la page Pyodide */
.sshcmd td{ vertical-align:top; }
.sshcmd__t{ font-weight:600; font-size:.86rem; margin-bottom:.2rem; }
.sshcmd__c{ display:inline-block; padding:.18rem .45rem; border-radius:5px; font-size:.82rem;
  background:#0f172a; color:#e2e8f0; user-select:all; word-break:break-all; }
.sshcmd__a{ margin:.25rem 0 0; font-size:.78rem; }

/* ════════════════════════════════════════════════════════════
   v467 — Annales : anciens sujets en PDF
   ════════════════════════════════════════════════════════════ */
/* Le centrage vient du .container parent ; un « auto » ici rognait la marge
   intérieure et décalait la section vers la gauche. */
.annales{ margin:2rem 0 3rem; }
.annales__t{ font-size:1.1rem; margin:0; }
.annales__tri{ display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; margin-bottom:.7rem; }
.annales__tri .is-on{ background:var(--primary); color:#fff; border-color:var(--primary); }
.annales__l{ list-style:none; margin:0 0 .8rem; padding:0; display:flex; flex-direction:column; gap:.5rem; }
.annale{ border:1px solid var(--border); border-radius:9px; padding:.55rem .75rem;
  background:var(--bg-card,#fff); }
.annale--cache{ display:none; }
.annale__f{ display:flex; align-items:center; gap:.5rem; text-decoration:none; color:inherit; min-width:0; }
.annale__f:hover .annale__n{ text-decoration:underline; }
.annale__ic{ flex:none; }
.annale__n{ font-weight:600; font-size:.9rem; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.annale__f small{ flex:none; color:var(--text-muted); font-size:.74rem; }
.annale__c{ font-size:.82rem; color:var(--text-muted); margin-top:.2rem; line-height:1.4; }
.annale__tags{ display:flex; flex-wrap:wrap; gap:.25rem; margin-top:.35rem; }
.annale__tag{ font-size:.7rem; padding:.05rem .4rem; border-radius:999px;
  background:var(--bg-alt,#f1f5f9); color:var(--text-muted); border:1px solid var(--border);
  max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.annale__tag--th{ background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }

/* Formulaire de dépôt, côté administration */
.ann-form{ padding:.7rem; border:1px dashed var(--border); border-radius:9px;
  background:var(--bg-subtle,#f8fafc); }
.ann-form__l{ display:flex; gap:.8rem; flex-wrap:wrap; }
.ann-form__l > *{ flex:1 1 280px; min-width:0; }
.ann-cols{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:.1rem .7rem; }
.ann-cols--h{ max-height:170px; overflow:auto; }
.ann-c{ display:flex; align-items:flex-start; gap:.3rem; font-size:.76rem;
  color:var(--text-muted); line-height:1.3; min-width:0; }
.ann-c input{ flex:none; margin-top:.15rem; }
.ann-c span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:700px){ .ann-cols{ grid-template-columns:1fr; } }

/* v468 — volets d'annales et corrigé */
.annales__t{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.annales__add{ font-size:.8rem; }
.ann-volet{ margin:.6rem 0 1rem; border:1px solid var(--primary); border-radius:10px;
  background:var(--bg-card,#fff); overflow:hidden; }
.ann-volet__bar{ display:flex; align-items:center; justify-content:space-between;
  padding:.45rem .7rem; background:#eff6ff; border-bottom:1px solid var(--border); font-size:.88rem; }
.ann-volet__c{ padding:.7rem; }
.ann-filtre{ margin-bottom:.3rem; font-size:.8rem; padding:.25rem .5rem; }
.annale__corr{ display:inline-flex; align-items:center; gap:.3rem; margin-top:.3rem;
  font-size:.8rem; color:#166534; text-decoration:none; }
.annale__corr:hover{ text-decoration:underline; }
.annale__corr small{ color:var(--text-muted); }
.annale__adm{ display:flex; gap:.3rem; flex-wrap:wrap; margin-top:.4rem;
  padding-top:.35rem; border-top:1px dashed var(--border); }

/* ════════════════════════════════════════════════════════════
   v469 — Correction de copie : outils compacts et vrai zoom
   ════════════════════════════════════════════════════════════ */
.corr-tools{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap;
  padding:.25rem 0 .5rem; font-size:.8rem; }
.corr-zoom{ display:inline-flex; align-items:center; gap:.2rem; margin-left:auto;
  color:var(--text-muted); }
.corr-zoom #corr-zoom-v{ min-width:44px; text-align:center; font-variant-numeric:tabular-nums; }

/* Le panneau flotte au-dessus : il ne prend plus de colonne. */
.pgband{ position:absolute; z-index:60; left:0; right:0; top:2.2rem;
  max-height:60vh; overflow:auto; border:1px solid var(--primary); border-radius:10px;
  background:var(--bg-card,#fff); box-shadow:0 10px 30px rgba(15,23,42,.18); }
.pgband__bar{ display:flex; align-items:center; gap:.5rem; padding:.45rem .7rem;
  background:#eff6ff; border-bottom:1px solid var(--border); font-size:.86rem; position:sticky; top:0; }
.pgband__bar .form-hint{ margin:0; flex:1; }
.pgband__liste{ padding:.6rem .7rem 0; }

/* Zoom : la colonne défile dans les deux sens au lieu d'étirer la page. */
.corr-pdf.is-zoom{ overflow:auto; }
.corr-pdf.is-zoom .corr-pdf__page{ max-width:none; }


/* ════════════════════════════════════════════════════════════
   v470 — Fenêtre de commentaire de la correction
   Mise en page explicite : elle dépendait jusqu'ici d'une règle
   écrite pour un autre composant.
   ════════════════════════════════════════════════════════════ */
.cmodal-ov{ position:fixed; inset:0; z-index:600; background:rgba(15,23,42,.55);
  display:flex; align-items:center; justify-content:center; padding:1rem; }
.cmodal{ display:block; background:#fff; color:#0f172a; border-radius:12px;
  width:min(94vw, 560px); max-height:88vh; overflow:auto; padding:1rem 1.1rem;
  box-shadow:0 16px 44px rgba(15,23,42,.3); }
.cmodal__title{ font-weight:700; font-size:1rem; margin-bottom:.5rem; }
.cmodal__ta{ display:block; width:100%; min-height:110px; resize:vertical;
  font-size:.95rem; line-height:1.45; }
.cmodal__row{ display:flex; gap:.4rem; flex-wrap:wrap; margin:.6rem 0; }
.cmodal__row .btn{ flex:0 0 auto; white-space:nowrap; }
.cmodal__favs-title{ font-size:.78rem; font-weight:700; color:var(--text-muted);
  text-transform:uppercase; letter-spacing:.03em; margin:.7rem 0 .3rem; }
.cmodal__favs{ display:flex; flex-direction:column; gap:.2rem; max-height:34vh; overflow:auto; }
.cmodal-fav{ display:flex; align-items:center; gap:.4rem; padding:.25rem .45rem;
  border:1px solid var(--border); border-radius:7px; font-size:.84rem; cursor:pointer;
  background:var(--bg-subtle,#f8fafc); }
.cmodal-fav:hover{ border-color:var(--primary); }
.cmodal-fav__txt{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cmodal-fav__badge{ flex:none; }
.cmodal-fav__del{ flex:none; border:none; background:none; cursor:pointer; color:var(--text-muted); }
.cmodal__actions{ display:flex; justify-content:flex-end; gap:.45rem;
  margin-top:.9rem; padding-top:.7rem; border-top:1px solid var(--border); }

/* v471 — état d'enregistrement d'une correction */
.save-state{ font-size:.8rem; font-weight:600; }
.save-state.is-wait{ color:var(--text-muted); font-weight:500; }
.save-state.is-ok{ color:#bbf7d0; }
.save-state.is-ko{ color:#fecaca; }
.corr-save:disabled{ opacity:.6; cursor:progress; }

/* v472 — bandeau de brouillon retrouvé */
.corr-brouillon{ position:sticky; top:0; z-index:700; display:flex; align-items:center;
  gap:.6rem; flex-wrap:wrap; padding:.5rem .9rem; font-size:.86rem;
  background:#fef3c7; color:#92400e; border-bottom:1px solid #fde68a; }
.corr-brouillon span{ flex:1; min-width:200px; }

/* ════════════════════════════════════════════════════════════
   v473 — Colonne des commentaires repliable
   ════════════════════════════════════════════════════════════ */
.corr-comments{ display:flex; flex-direction:column; transition:margin-left .2s ease, opacity .2s ease; }
.corr-comments__pied{ margin-top:auto; padding-top:.6rem;
  border-top:1px dashed var(--border); position:relative; }
.corr-comments__pied .pgband{ position:absolute; bottom:2.2rem; top:auto; left:0; right:auto;
  width:min(420px, 80vw); max-height:52vh; }

/* Repli : la colonne sort de l'écran, la copie récupère la place. */
.corr-main--replie .corr-comments{ margin-left:calc(-1 * var(--corr-col, 300px));
  opacity:0; pointer-events:none; }

/* Onglet discret et translucide, collé au bord de la colonne. */
.corr-onglet{ position:sticky; top:45vh; align-self:flex-start; z-index:55;
  width:18px; height:54px; padding:0; margin:0 .1rem;
  border:1px solid var(--border); border-left:none; border-radius:0 7px 7px 0;
  background:rgba(255,255,255,.55); color:var(--text-muted); cursor:pointer;
  font-size:.9rem; line-height:1; backdrop-filter:blur(2px);
  transition:background .15s ease, color .15s ease; }
.corr-onglet:hover{ background:rgba(255,255,255,.95); color:var(--primary); }
@media (max-width:900px){
  .corr-main--replie .corr-comments{ display:none; }
  .corr-onglet{ top:auto; bottom:1rem; position:fixed; left:0; }
}

/* v474 — radar périmé après enregistrement */
.radar-perime{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap;
  margin-bottom:.5rem; padding:.4rem .6rem; border-radius:8px; font-size:.8rem;
  background:#fef3c7; color:#92400e; border:1px solid #fde68a; }
.radar-perime span{ flex:1; min-width:150px; }

/* v475 — provenance des tracés du radar de correction */
.corr-radar__src{ font-size:.76rem; color:var(--text-muted); line-height:1.5;
  margin:0 0 .5rem; padding:.35rem .5rem; border-radius:7px;
  background:var(--bg-subtle,#f8fafc); border:1px solid var(--border); }
.corr-radar__src strong{ color:var(--text); }

/* v476 — espace colleur : brouillon local et repère d'enregistrement */
.coll-brouillon{ position:sticky; top:0; z-index:700; display:flex; align-items:center;
  gap:.5rem; flex-wrap:wrap; padding:.5rem .8rem; font-size:.84rem;
  background:#fef3c7; color:#92400e; border-bottom:1px solid #fde68a; }
.coll-brouillon span{ flex:1; min-width:180px; }
.coll-auto{ font-size:.76rem; color:var(--text-muted); text-align:center; margin:.4rem 0 0; }
/* Un curseur ne doit jamais déclencher le balayage entre élèves. */
.eval-range{ touch-action:none; }

/* v477 — état de l'enregistrement silencieux en colle */
.coll-auto.is-ko{ color:#b45309; font-weight:600; }

/* ════════════════════════════════════════════════════════════
   v478 — Annales : capacités groupées par thème
   ════════════════════════════════════════════════════════════ */
.ann-caps{ max-height:260px; overflow:auto; padding-right:.2rem;
  border:1px solid var(--border); border-radius:8px; }
.ann-grp{ padding:.35rem .5rem; border-bottom:1px solid var(--border); }
.ann-grp:last-child{ border-bottom:none; }
.ann-grp__t{ font-size:.74rem; font-weight:700; color:var(--text-muted);
  text-transform:uppercase; letter-spacing:.03em; margin-bottom:.2rem; }
.ann-grp__t small{ font-weight:500; opacity:.7; }
/* Expérimentales et numériques se repèrent d'un coup d'œil. */
.ann-c--exp span{ color:#9a3412; }
.ann-c--num span{ color:#1d4ed8; }

/* La section vit désormais dans un .container : plus de largeur propre. */
.annales{ margin:2rem 0 3rem; }

/* v484 — cellule animation dans un TP */
.tp-cell--anim{ margin:.6rem 0; }
.tp-anim__t{ font-size:.85rem; font-weight:600; color:var(--text-muted); margin-bottom:.3rem; }

/* v487 — ménage des sauvegardes de correctifs */
.upd-purge{ display:flex; align-items:flex-start; justify-content:space-between; gap:1rem;
  flex-wrap:wrap; margin:0 0 .8rem; padding:.6rem .8rem; border-radius:9px;
  background:var(--bg-subtle,#f8fafc); border:1px solid var(--border); font-size:.86rem; }
.upd-purge > span{ flex:1; min-width:240px; line-height:1.5; }
.upd-purge .form-hint{ margin:0; }

/* ════════════════════════════════════════════════════════════
   v493 — Séances de colle lisibles sur téléphone
   ════════════════════════════════════════════════════════════ */
.coll-th{ max-width:160px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.coll-act{ white-space:nowrap; }

@media (max-width:760px){
  /* Les deux tableaux du colleur se replient en fiches : six ou sept colonnes
     sur 360 px ne tiennent pas, et le défilement horizontal fait perdre la
     première colonne — celle qui permet de savoir de quoi parle la ligne. */
  .coll-sessions thead, .coll-fiches thead{ display:none; }
  .coll-sessions, .coll-sessions tbody, .coll-sessions tr, .coll-sessions td,
  .coll-fiches, .coll-fiches tbody, .coll-fiches tr, .coll-fiches td{ display:block; width:100%; }
  .coll-sessions tr, .coll-fiches tr{ margin-bottom:.7rem; padding:.6rem .8rem;
    border:1px solid var(--border); border-radius:10px; background:var(--bg-card,#fff); }
  .coll-sessions td, .coll-fiches td{ border:none; padding:.2rem 0; display:flex; gap:.6rem;
    align-items:baseline; justify-content:space-between; text-align:right; }
  .coll-sessions td::before, .coll-fiches td::before{ content:attr(data-l); flex:none;
    font-size:.74rem; font-weight:700; color:var(--text-muted);
    text-transform:uppercase; letter-spacing:.03em; text-align:left; }
  .coll-sessions td[data-l=""]{ justify-content:flex-end; gap:.4rem; padding-top:.5rem;
    margin-top:.4rem; border-top:1px dashed var(--border); }
  .coll-sessions .coll-th{ max-width:none; white-space:normal; text-align:right; }
  /* La ligne du colleur connecté reste repérable même en fiche. */
  .coll-fiches tr.stats-row--me{ border-color:var(--primary); background:#eff6ff; }
  .stats-table-wrap{ overflow:visible; }
}

/* ════════════════════════════════════════════════════════════
   v494 — Notation des compétences : pastilles au lieu de curseurs
   ════════════════════════════════════════════════════════════ */
/* Légende en tête, une seule fois pour toute la liste. */
.ev-legende{ display:flex; flex-wrap:wrap; gap:.4rem .9rem; align-items:center;
  margin:.2rem 0 .7rem; padding:.4rem .6rem; border-radius:8px; font-size:.78rem;
  color:var(--text-muted); background:var(--bg-subtle,#f8fafc); border:1px solid var(--border); }
.ev-legende span{ display:inline-flex; align-items:center; gap:.3rem; }
.ev-legende .ev-pastille{ pointer-events:none; }

/* Un bloc par thème : fond propre, titre net, bord marqué. */
.ev-bloc{ margin:0 0 .7rem; border:1px solid var(--border); border-radius:10px;
  background:var(--bg-card,#fff); overflow:hidden; }
.ev-bloc__t{ padding:.35rem .7rem; font-size:.76rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em; color:#1d4ed8;
  background:#eff6ff; border-bottom:1px solid #bfdbfe; }

/* Une capacité tient sur une ligne : libellé à gauche, quatre pastilles. */
.ev-ligne{ display:flex; align-items:center; gap:.6rem; padding:.3rem .7rem;
  border-bottom:1px solid var(--border); }
.ev-ligne:last-child{ border-bottom:none; }
.ev-ligne__t{ flex:1; min-width:0; font-size:.84rem; line-height:1.35; }
.ev-ligne--off .ev-ligne__t{ color:var(--text-muted); }
.ev-ligne__b{ flex:none; display:inline-flex; gap:.2rem; }

.ev-pastille{ width:30px; height:30px; border-radius:50%; border:1.5px solid var(--border);
  background:var(--bg-card,#fff); color:var(--text-muted); font-size:.9rem; font-weight:700;
  line-height:1; cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  padding:0; transition:background .12s ease, color .12s ease, border-color .12s ease; }
.ev-pastille:hover{ border-color:var(--text-muted); }
.ev-pastille--0.is-on{ background:#fee2e2; border-color:#fca5a5; color:#b91c1c; }
.ev-pastille--1.is-on{ background:#fef3c7; border-color:#fcd34d; color:#92400e; }
.ev-pastille--2.is-on{ background:#dcfce7; border-color:#86efac; color:#166534; }
.ev-pastille--non.is-on{ background:var(--bg-alt,#f1f5f9); border-color:var(--border); color:var(--text-muted); }

@media (max-width:620px){
  .ev-ligne{ flex-wrap:wrap; gap:.3rem; }
  .ev-ligne__t{ flex:1 1 100%; }
  .ev-ligne__b{ margin-left:auto; }
  .ev-pastille{ width:34px; height:34px; }   /* au doigt */
}

/* v500 — voies de secours de la mise à jour */
.upd-secours{ display:flex; gap:1rem; flex-wrap:wrap; align-items:flex-end;
  margin-top:.8rem; padding-top:.7rem; border-top:1px dashed var(--border); }
.upd-secours__f{ display:flex; gap:.5rem; align-items:flex-end; flex-wrap:wrap; }
.upd-secours .form-label{ font-size:.82rem; }
.upd-secours input[type=text]{ min-width:220px; }
