:root {
  --primary: #2c3e6b;
  --primary-light: #4a5f9e;
  --accent: #e63980;
  --success: #16a34a;
  --warn: #d97706;
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --text: #1a1f2e;
  --muted: #6b7280;
  --radius: 12px;
  --font-size-base: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-size-base);
  transition: font-size 0.2s;
  /* Le footer public utilise un "full-bleed" en 100vw pour sortir du
     conteneur #app ; overflow-x:hidden évite tout micro-scroll horizontal
     dû à l'écart entre 100vw et la largeur réelle (barre de scroll). */
  overflow-x: hidden;
}

body.high-contrast {
  --bg: #000;
  --card-bg: #111;
  --text: #fff;
  --muted: #ddd;
}

body.dyslexic-font, body.dyslexic-font input, body.dyslexic-font button {
  font-family: Verdana, "Comic Sans MS", sans-serif;
  letter-spacing: 0.02em;
}

.hidden { display: none !important; }
.role-toggle { display: flex; gap: 16px; margin-bottom: 8px; }

/* ---------- Accessibilité ---------- */
.a11y-bar {
  background: #111827;
  color: #fff;
  padding: 6px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.a11y-bar button {
  background: #374151;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.a11y-bar button:hover { background: #4b5563; }
.a11y-bar button.active-btn { background: var(--success); }
.a11y-note { margin-left: auto; opacity: 0.7; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--card-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.2em; color: var(--primary); }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav button {
  background: none;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95em;
  color: var(--text);
}
.main-nav button:hover, .main-nav button.active { background: var(--primary); color: #fff; }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  background: none; border: 1px solid var(--muted); color: var(--text);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--primary); color: #fff; border: none; padding: 10px 18px;
  border-radius: 8px; cursor: pointer; font-size: 1em; font-weight: 600;
}
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary {
  background: #e5e7eb; color: var(--text); border: none; padding: 10px 18px;
  border-radius: 8px; cursor: pointer; font-size: 1em; margin: 4px 4px 4px 0;
}
.btn-secondary:hover { background: #d1d5db; }
.btn-link { background: none; border: none; color: var(--primary); text-decoration: underline; cursor: pointer; }
.error-msg { color: #dc2626; min-height: 1.2em; }

/* ---------- Views ---------- */
#app { max-width: 1200px; margin: 0 auto; padding: 20px; min-height: 70vh; }
.view { display: none; }
.view.active { display: block; }

/* ---------- Login ---------- */
#view-login { display: none; }
#view-login.active { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.login-card {
  background: var(--card-bg); padding: 30px; border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08); max-width: 480px; width: 100%;
}
.login-card h1 { text-align: center; color: var(--primary); }
.subtitle { text-align: center; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.login-form input { padding: 10px; border: 1px solid #d1d5db; border-radius: 8px; }
.demo-accounts { background: #f0f4ff; padding: 12px; border-radius: 8px; font-size: 0.85em; }
.demo-accounts ul { margin: 6px 0 0; padding-left: 18px; }
.login-links { display: flex; justify-content: space-between; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 0.9em; }

/* ---------- Créer un compte (redesign) ---------- */
.register-card {
  max-width: 540px;
  padding: 34px 36px;
}
.register-card h2 { text-align: center; color: var(--primary); margin: 0 0 4px; }
.register-card .subtitle { margin: 0 0 22px; }

.register-field-block { margin-bottom: 18px; }
.register-field-label {
  display: block; font-size: 0.82em; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--muted); margin-bottom: 8px;
}

.register-role-toggle { display: flex; gap: 10px; margin-bottom: 0; }
.role-pill {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 14px; border: 1.5px solid #d1d5db; border-radius: 12px;
  cursor: pointer; font-size: 0.92em; font-weight: 600; color: var(--text);
  background: #fff; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.role-pill input { accent-color: var(--primary); margin: 0; }
.role-pill-icon { font-size: 1.1em; }
.role-pill:hover { border-color: var(--primary-light); }
.role-pill:has(input:checked) {
  border-color: var(--primary); background: #eef1fb; color: var(--primary);
}

.register-form { display: flex; flex-direction: column; gap: 16px; margin: 0 0 20px; }
.register-form .field-group { display: flex; flex-direction: column; gap: 6px; }
.register-form label {
  font-size: 0.82em; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--muted);
}
.register-form input, .register-form select {
  padding: 11px 14px; border: 1.5px solid #d1d5db; border-radius: 10px;
  font-size: 0.98em; color: var(--text); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.register-form input:focus, .register-form select:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74,95,158,0.15);
}

.register-subsection {
  background: #f6f7fb; border-radius: 12px; padding: 16px 18px;
  border-left: 3px solid var(--primary-light);
}
.register-subsection .meta { margin: 8px 0 0; font-size: 0.85em; color: var(--muted); }

.register-actions {
  display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 4px;
}
.register-actions .btn-primary { width: 100%; padding: 12px; font-size: 1em; }

/* ---------- Page d'accueil publique (#102/#103/#104) ---------- */
.public-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; flex-wrap: wrap;
}
.public-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero { text-align: center; padding: 40px 10px; }
.hero h1 { font-size: 2.4em; color: var(--primary); margin-bottom: 8px; }
.hero-pitch { color: var(--muted); max-width: 640px; margin: 0 auto 20px; font-size: 1.1em; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.features-summary { padding: 20px 0 40px; }
.features-summary h2 { text-align: center; color: var(--primary); margin-bottom: 8px; }

/* ============================================================
   Footer public — refonte complète (2026)
   Affiché sur toutes les pages publiques (accueil, Nos services, Nos
   abonnements, catalogue public, connexion/inscription, contact, FAQ,
   mentions légales, politique de confidentialité).
   Structure : (1) zone CTA, (2) barre "retour en haut", (3) grille de
   colonnes (accordéons sur mobile), (4) réseaux sociaux, (5) newsletter,
   (6) bas de page légal/copyright.
   ============================================================ */
.public-footer {
  --pf-bg: #0b0e1a;
  --pf-bg-alt: #10142400;
  --pf-accent: #7c7cff;
  --pf-accent-light: #9d9dff;
  margin-top: 56px;
  background: var(--pf-bg);
  color: #cfd3e6;
  /* Sort du conteneur #app (max-width: 1200px) pour occuper toute la
     largeur de l'écran, quel que soit l'endroit où le footer est monté. */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  border-radius: 0;
  /* #view-login est un conteneur flex avec "align-items: center" : sans
     cette ligne, ce footer (plus large que son conteneur) serait centré
     comme n'importe quel item flex, ce qui casse le calcul de centrage
     100vw ci-dessus et le décale hors de l'écran. flex-start le remet
     en position de départ "normale", comme dans un conteneur bloc. */
  align-self: flex-start;
}
.public-footer a { color: inherit; }
.public-footer .pf-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.public-footer :focus-visible {
  outline: 3px solid var(--pf-accent-light);
  outline-offset: 2px;
}

/* ---- (1) Zone CTA ---- */
.public-footer .pf-cta {
  background: linear-gradient(180deg, #161b30 0%, #0b0e1a 100%);
  padding: 40px 24px;
  text-align: center;
}
.public-footer .pf-cta h3 { color: #fff; font-size: 1.5em; margin: 0 0 10px; }
.public-footer .pf-cta p { color: #c3c7d9; max-width: 560px; margin: 0 auto 20px; font-size: 1em; }
.public-footer .pf-cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---- (2) Barre "Retour en haut" ---- */
.public-footer .pf-backtotop-bar {
  background: #12162a;
  padding: 10px 24px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.public-footer .pf-backtotop-btn {
  background: none; border: none; color: #c3c7d9; cursor: pointer;
  font-size: 0.88em; padding: 6px 12px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px;
}
.public-footer .pf-backtotop-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ---- (3) Grille de colonnes ---- */
.public-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr 1fr;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 8px;
}
.public-footer h4 { color: #fff; font-size: 0.95em; margin: 0 0 12px; }
.public-footer .pf-brand { font-size: 1.35em; font-weight: 700; color: #fff; margin-bottom: 8px; }
.public-footer .pf-copyright { margin: 4px 0 14px; color: #9aa0b4; font-size: 0.85em; }
.public-footer .pf-tagline { color: #c3c7d9; font-size: 0.9em; margin: 0 0 12px; }
.public-footer .pf-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.public-footer .pf-links a {
  color: var(--pf-accent-light);
  text-decoration: none;
  font-size: 0.92em;
  display: inline-block;
}
.public-footer .pf-links a:hover, .public-footer .pf-links a:focus-visible { color: #fff; text-decoration: underline; }
.public-footer .pf-btn {
  display: inline-block;
  border: none;
  border-radius: 24px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.public-footer .pf-btn-primary { background: var(--pf-accent); color: #fff; }
.public-footer .pf-btn-primary:hover { background: var(--pf-accent-light); }
.public-footer .pf-btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.55); }
.public-footer .pf-btn-outline:hover { background: rgba(255,255,255,0.1); }

/* Colonnes / accordéon (mobile) */
.public-footer .pf-col-toggle {
  display: none;
  width: 100%;
  background: none; border: none; color: #fff; cursor: pointer;
  font-size: 0.95em; font-weight: 600;
  padding: 12px 0;
  justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.public-footer .pf-col-chevron { transition: transform 0.2s; }
.public-footer .pf-accordion.pf-col-open .pf-col-chevron { transform: rotate(180deg); }
.public-footer .pf-col-body { display: block; padding-top: 4px; }

/* ---- (4) Réseaux sociaux ---- */
.public-footer .pf-socials-block {
  max-width: 1240px; margin: 0 auto; padding: 20px 24px 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.public-footer .pf-socials { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.public-footer .pf-social-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15em; text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.public-footer .pf-social-icon:hover, .public-footer .pf-social-icon:focus-visible {
  background: var(--pf-accent); transform: translateY(-2px);
}

/* ---- (5) Newsletter ---- */
.public-footer .pf-newsletter {
  max-width: 1240px; margin: 0 auto; padding: 20px 24px;
}
.public-footer .pf-newsletter h4 { margin-bottom: 4px; }
.public-footer .pf-newsletter .meta { color: #9aa0b4; }
.public-footer .pf-newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; max-width: 480px; }
.public-footer .pf-newsletter-input {
  flex: 1; min-width: 220px; padding: 10px 14px; border-radius: 24px;
  border: 1.5px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); color: #fff;
}
.public-footer .pf-newsletter-input::placeholder { color: #8a8fa8; }
.public-footer .pf-newsletter-msg { min-height: 1.3em; font-size: 0.88em; margin: 4px 0; }
.public-footer .pf-newsletter-msg.pf-newsletter-success { color: #4ade80; }
.public-footer .pf-newsletter-msg.pf-newsletter-error { color: #f87171; }
.public-footer .pf-newsletter-consent { font-size: 0.78em; color: #7d829c; max-width: 480px; }
.public-footer .pf-newsletter-consent a { color: var(--pf-accent-light); }

/* ---- (6) Bas de page ---- */
.public-footer .pf-bottom-bar {
  max-width: 1240px; margin: 0 auto; padding: 18px 24px 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.public-footer .pf-bottom-copyright { margin: 0; color: #7d829c; font-size: 0.82em; }
.public-footer .pf-bottom-links { display: flex; gap: 16px; flex-wrap: wrap; }
.public-footer .pf-bottom-links a { color: #9aa0b4; font-size: 0.82em; text-decoration: none; }
.public-footer .pf-bottom-links a:hover { color: #fff; text-decoration: underline; }

/* ---- Responsive : tablette (2-3 colonnes) ---- */
@media (max-width: 980px) {
  .public-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .public-footer .pf-col-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .public-footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Responsive : mobile (colonnes → accordéons) ---- */
@media (max-width: 560px) {
  .public-footer .pf-cta { padding: 32px 18px; }
  .public-footer-grid { grid-template-columns: 1fr; padding: 24px 18px 8px; gap: 4px; }
  .public-footer .pf-col-brand { grid-column: auto; margin-bottom: 12px; }
  .public-footer .pf-accordion .pf-col-toggle { display: flex; }
  .public-footer .pf-accordion .pf-col-body { display: none; padding-bottom: 10px; }
  .public-footer .pf-accordion.pf-col-open .pf-col-body { display: block; }
  .public-footer .pf-socials-block, .public-footer .pf-newsletter { padding-left: 18px; padding-right: 18px; }
  .public-footer .pf-bottom-bar { padding: 16px 18px 24px; flex-direction: column; align-items: flex-start; }
}

/* ---------- Dashboard ---------- */
.dash-header { display: flex; align-items: center; gap: 12px; }
.kid-badge { background: var(--accent); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.85em; }
.dash-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px;
}
.card { background: var(--card-bg); padding: 16px; border-radius: var(--radius); box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.card h3 { margin-top: 0; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.card-list-item {
  background: var(--bg); padding: 8px 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.badges-row { flex-direction: row; flex-wrap: wrap; }
.badge-pill { background: #fef3c7; padding: 6px 10px; border-radius: 20px; font-size: 0.9em; }
.actions-card button { display: block; width: 100%; margin-bottom: 8px; }

/* ============================================================
   Tableau de bord apprenant — refonte esthétique (fonctionnalités
   inchangées : mêmes id/JS, seule l'habillage visuel change).
   ============================================================ */
#view-dashboard .dash-header {
  background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%);
  color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
#view-dashboard .dash-header h1 { margin: 0; font-size: 1.6em; }
#view-dashboard .dash-subtitle { margin: 4px 0 0; opacity: 0.9; font-size: 0.95em; }
#view-dashboard .kid-badge { background: rgba(255,255,255,0.22); }

#view-dashboard .dash-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
#view-dashboard .card.dash-card {
  border-top: 4px solid var(--primary); padding-top: 14px; transition: transform 0.15s, box-shadow 0.15s;
}
#view-dashboard .card.dash-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
#view-dashboard .dash-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05em; }
#view-dashboard .dash-card-icon {
  width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); font-size: 1.1em; flex-shrink: 0;
}

#view-dashboard .dash-card--courses { border-top-color: #2563eb; }
#view-dashboard .dash-card--courses .dash-card-icon { background: #dbeafe; }
#view-dashboard .dash-card--recommended { border-top-color: #7c3aed; }
#view-dashboard .dash-card--recommended .dash-card-icon { background: #ede9fe; }
#view-dashboard .dash-card--sessions { border-top-color: #0891b2; }
#view-dashboard .dash-card--sessions .dash-card-icon { background: #cffafe; }
#view-dashboard .dash-card--progress { border-top-color: #16a34a; }
#view-dashboard .dash-card--progress .dash-card-icon { background: #dcfce7; }
#view-dashboard .dash-card--scores { border-top-color: #d97706; }
#view-dashboard .dash-card--scores .dash-card-icon { background: #fef3c7; }
#view-dashboard .dash-card--badges { border-top-color: #db2777; }
#view-dashboard .dash-card--badges .dash-card-icon { background: #fce7f3; }
#view-dashboard .dash-card--actions {
  border-top: none; background: linear-gradient(160deg, var(--primary) 0%, #6d28d9 100%); color: #fff;
}
#view-dashboard .dash-card--actions h3 { color: #fff; }
#view-dashboard .dash-card--actions .btn-secondary { background: rgba(255,255,255,0.18); color: #fff; }
#view-dashboard .dash-card--actions .btn-secondary:hover { background: rgba(255,255,255,0.3); }
#view-dashboard .dash-card--actions .btn-primary { background: #fff; color: var(--primary); }
#view-dashboard .dash-card--actions .btn-primary:hover { background: #f3f4ff; }

#view-dashboard .card-list-item {
  background: var(--bg); border-radius: 12px; padding: 10px 14px;
  transition: background 0.15s;
}
#view-dashboard .card-list-item:hover { background: #eef1fa; }
#view-dashboard .dash-card--badges .badge-pill {
  background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; font-weight: 600;
}

/* ---------- Catalog ---------- */
.filters { margin: 12px 0; }
.filters input { padding: 10px; width: 100%; max-width: 400px; border-radius: 8px; border: 1px solid #d1d5db; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.course-card { background: var(--card-bg); padding: 16px; border-radius: var(--radius); box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.course-card h4 { margin: 0 0 6px; color: var(--primary); }
.course-card .meta { color: var(--muted); font-size: 0.85em; margin-bottom: 8px; }

/* ---------- Teacher grid ---------- */
.teacher-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.teacher-card {
  background: var(--card-bg); padding: 16px; border-radius: var(--radius); text-align: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06); cursor: pointer; border: 2px solid transparent;
}
.teacher-card:hover { border-color: var(--primary); }
.teacher-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.teacher-avatar-dot { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 10px; }
.teacher-card h4 { margin: 4px 0; }
.teacher-card .tag { display: inline-block; background: var(--bg); padding: 2px 8px; border-radius: 12px; font-size: 0.75em; margin: 2px; }

/* ---------- Cours conversationnels avec l'IA (#3-#6) ---------- */
.conversation-feature-card {
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(219,39,119,0.08));
  border: 1px solid rgba(37,99,235,0.2); border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.conversation-feature-card h3 { margin: 0 0 4px; color: var(--primary); }
.conversation-feature-card .meta { margin: 0; color: var(--muted); font-size: 0.9em; }
.conv-theme-card { cursor: pointer; text-align: center; border: 2px solid transparent; }
.conv-theme-card:hover { border-color: var(--primary); }
.conv-theme-card.selected { border-color: var(--primary); background: rgba(37,99,235,0.08); }
.conv-theme-card h4 { margin: 0; }

/* ---------- Curseurs de personnalité (#11/#12) ---------- */
.slider-hint { display: block; color: var(--muted); font-size: 0.78em; font-weight: 400; margin-top: 2px; }
input[type="range"] { width: 100%; accent-color: var(--primary); }

/* ---------- Course room ---------- */
.room-layout { display: grid; grid-template-columns: minmax(420px, 560px) 1fr; gap: 16px; }
@media (max-width: 1100px) { .room-layout { grid-template-columns: minmax(360px, 460px) 1fr; } }
@media (max-width: 900px) { .room-layout { grid-template-columns: 1fr; } }
.room-left { background: var(--card-bg); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; align-items: center; position: relative; }
/* Grande scène 16:9 pour le professeur (demande explicite), plutôt qu'une
   hauteur fixe arbitraire : la largeur pilote la hauteur automatiquement. */
.avatar-container { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg,#dbeafe,#f4f6fb); }
.avatar-container.small { aspect-ratio: 16 / 9; height: auto; }

/* ---- Barre de contrôle compacte : micro / volume / pause / paramètres ---- */
.room-controls-compact { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 4px; }
.ctrl-btn-lg {
  background: var(--card-bg); border: 1.5px solid #d1d5db; border-radius: 50%;
  width: 52px; height: 52px; font-size: 1.35em; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.ctrl-btn-lg:hover { background: #eef1fb; border-color: var(--primary-light); }
.ctrl-btn-lg:active { transform: scale(0.94); }
.ctrl-btn-lg.active-btn { background: var(--success); border-color: var(--success); color: #fff; }

.volume-control-wrap { position: relative; }
.volume-popover {
  position: absolute; bottom: 62px; left: 50%; transform: translateX(-50%);
  background: var(--card-bg); border: 1px solid #d1d5db; border-radius: 10px;
  padding: 12px 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); width: 200px; z-index: 20;
}
.volume-popover::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--card-bg);
}

/* ---- Panneau secondaire (options déplacées hors de la barre principale) ---- */
.room-secondary-panel {
  position: absolute; top: 12px; left: 12px; right: 12px; bottom: 12px;
  background: var(--card-bg); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  padding: 16px; z-index: 15; overflow-y: auto;
}
.room-secondary-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.room-secondary-panel-header h3 { margin: 0; color: var(--primary); }
.room-secondary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.room-secondary-grid .ctrl-btn { width: 100%; text-align: left; font-size: 0.88em; padding: 10px 12px; }
/* Sous-titre du professeur sous l'avatar : désactivé par défaut (le chat
   est déjà la zone de transcription principale, on ne veut plus dupliquer
   le même contenu deux fois) — activable via le bouton d'accessibilité
   "💬 Transcription prof" (body.show-teacher-captions). */
.avatar-caption { display: none; min-height: 40px; text-align: center; font-style: italic; color: var(--muted); margin: 8px 0; }
body.show-teacher-captions .avatar-caption { display: block; }
.room-controls { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ctrl-btn {
  background: var(--bg); border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px;
  cursor: pointer; font-size: 1.1em;
}
.ctrl-btn:hover { background: #e5e7eb; }
.ctrl-btn.active-btn { background: var(--success); color: #fff; }
.ctrl-btn.leave { background: #fee2e2; }
.cam-self-preview { width: 100%; max-width: 200px; border-radius: 8px; margin-top: 8px; }

/* ---------------- Refonte voix JARVIS : micro continu / barge-in / états vocaux ---------------- */
.voice-status-badge {
  text-align: center; font-size: 0.85em; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px solid #d1d5db; border-radius: 999px;
  padding: 4px 10px; margin: 0 auto 8px; width: fit-content; transition: background 0.2s, color 0.2s;
}
.voice-interim-transcript {
  text-align: center; font-size: 0.85em; font-style: italic; color: var(--muted);
  min-height: 20px; margin-bottom: 6px;
}
.voice-fine-controls {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center;
  font-size: 0.82em; color: var(--muted); margin-top: 6px;
}
.voice-fine-label { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.voice-fine-label-inline { display: flex; align-items: center; gap: 6px; }
.ctrl-btn.voice-muted { background: #fee2e2; }

.room-right { background: var(--card-bg); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 500px; }
.chapter-progress-label { display: flex; justify-content: space-between; font-size: 0.9em; color: var(--muted); }
.progress-bar-outer { background: #e5e7eb; border-radius: 6px; height: 10px; overflow: hidden; }
.progress-bar-inner { background: var(--success); height: 100%; width: 0%; transition: width 0.4s; }
.chapter-nav { display: flex; justify-content: space-between; margin-top: 6px; }

.whiteboard-wrap { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px; }
#whiteboard { border: 1px solid #d1d5db; width: 100%; height: auto; cursor: crosshair; background:#fff; }
.whiteboard-tools { margin-top: 6px; display: flex; gap: 6px; }
.whiteboard-tools button { padding: 6px 10px; border-radius: 6px; border: 1px solid #d1d5db; background: var(--bg); cursor: pointer; }

.chat-log { flex: 1; overflow-y: auto; max-height: 340px; display: flex; flex-direction: column; gap: 8px; padding: 8px; background: var(--bg); border-radius: 8px; }
.chat-msg { padding: 8px 12px; border-radius: 12px; max-width: 80%; }
.chat-msg.teacher { background: #e0e7ff; align-self: flex-start; }
.chat-msg.user { background: var(--primary); color: #fff; align-self: flex-end; }
.chat-msg.system { background: #fef9c3; align-self: center; font-size: 0.85em; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #d1d5db; }
.rag-note { font-size: 0.8em; color: var(--muted); font-style: italic; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100;
}
.overlay-card { background: var(--card-bg); padding: 24px; border-radius: var(--radius); max-width: 560px; width: 90%; max-height: 85vh; overflow-y: auto; }
.quiz-question, .exercise-question { margin-bottom: 16px; }
.quiz-options label { display: block; padding: 8px; border-radius: 8px; background: var(--bg); margin: 4px 0; cursor: pointer; }
.quiz-options label:hover { background: #e5e7eb; }
.quiz-feedback.correct { color: var(--success); font-weight: 600; }
.quiz-feedback.incorrect { color: #dc2626; font-weight: 600; }
.exercise-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.exercise-option.selected { background: var(--primary); color: #fff; }

/* ---------- Évaluation de fin de chapitre (#1) ---------- */
.chaptertest-progress { font-size: 0.85em; color: var(--muted); margin-bottom: 4px; }
.chaptertest-options { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.chaptertest-option { display: block; padding: 8px; border-radius: 8px; background: var(--bg); cursor: pointer; }
.chaptertest-option:hover { background: #e5e7eb; }
.chaptertest-results h3 { margin-top: 0; }
.chaptertest-score { font-size: 1.4em; }
.chaptertest-appreciation, .chaptertest-comment { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.chaptertest-summary-list ul { margin: 4px 0 0 0; padding-left: 20px; }

/* ---------- Nouveau format d'exercices interactifs (interactive-exercises.js) :
   fiche façon manuel scolaire (tableaux/figures/graphiques à trous). ---------- */
.exercise-sheet {
  background: #fdfaf3; border: 1px solid #e8e0cc; border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 10px;
}
.exercise-sheet-tag {
  display: inline-block; background: var(--primary); color: #fff; font-size: 0.72em;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.exercise-sheet-enonce { margin: 0 0 14px; line-height: 1.5; }
.iex-sheet-gate { background: #fff7e6; border: 1px dashed var(--warn); border-radius: 8px; padding: 14px; margin: 10px 0; text-align: center; }
.iex-paper-prompt { margin: 0 0 10px; font-style: italic; }
.iex-blanks-wrap.hidden { display: none; }
.iex-blank {
  padding: 5px 8px; border-radius: 6px; border: none; border-bottom: 2px solid var(--primary);
  background: #fff; font-size: 1em; text-align: center;
}
.iex-blank:focus { outline: none; border-bottom-color: var(--warn); }
.iex-choice-group { display: inline-flex; gap: 6px; margin: 0 4px; vertical-align: middle; }
.iex-choice-btn { padding: 4px 12px; }
.iex-choice-btn.selected { background: var(--primary); color: #fff; }
.iex-sign-table { border-collapse: collapse; margin: 14px 0; background: #fff; }
.iex-sign-table th, .iex-sign-table td {
  border: 1.5px solid var(--primary); padding: 10px 22px; text-align: center; font-size: 1.05em;
}
.iex-sign-table th { background: var(--bg); }
.iex-sign-table .iex-root-col { border-left: 2.5px solid var(--primary); border-right: 2.5px solid var(--primary); }
.iex-propor-table td, .iex-conjug-table td { min-width: 60px; }
.iex-conjug-table th { text-align: left; padding-left: 12px; }
.iex-demo-steps { padding-left: 20px; line-height: 2; }
.iex-figure-svg { display: block; max-width: 260px; margin: 12px auto; background: #fff; border-radius: 8px; }
.iex-click-point { fill: #dbeafe; stroke: var(--primary); stroke-width: 1.5; cursor: pointer; }
.iex-click-point:hover { fill: #bfdbfe; }
.iex-click-point.selected { fill: var(--primary); }
.iex-texte-trous { line-height: 2.1; }
.iex-frise { display: flex; align-items: flex-start; justify-content: space-between; margin: 16px 0; position: relative; padding-top: 10px; }
.iex-frise::before { content: ""; position: absolute; top: 16px; left: 0; right: 0; height: 2px; background: var(--primary); }
.iex-frise-point { display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 1; }
.iex-frise-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.iex-frise-label { font-size: 0.85em; text-align: center; }
.iex-map-schema { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.iex-map-zone { background: #e0e7ff; border: 1.5px dashed var(--primary); border-radius: 8px; padding: 10px 14px; font-size: 0.9em; }
.iex-fields { margin-top: 8px; }
.iex-field-feedback { padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; background: var(--bg); }
.iex-field-feedback.correct { border-left: 4px solid var(--success); }
.iex-field-feedback.incorrect { border-left: 4px solid #dc2626; }
.iex-rappel { background: #eef2ff; border-radius: 8px; padding: 8px 12px; margin-top: 8px; font-size: 0.92em; }

/* ---------- Classroom ---------- */
.lesson-status-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lesson-state-pill { background: var(--card-bg); border: 1px solid #d1d5db; padding: 6px 14px; border-radius: 20px; font-weight: 600; font-size: 0.9em; }
.classroom-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
@media (max-width: 900px) { .classroom-layout { grid-template-columns: 1fr; } }
.classroom-main { background: var(--card-bg); border-radius: var(--radius); padding: 12px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.video-tile { background: #1f2937; color: #fff; border-radius: 8px; padding: 8px; text-align: center; font-size: 0.85em; position: relative; height: 90px; display: flex; flex-direction: column; justify-content: center; }
.video-tile.self { border: 2px solid var(--accent); }
.video-tile .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.video-tile .status-dot.online { background: var(--success); }
.video-tile .status-dot.away { background: var(--warn); }
.classroom-controls { display: flex; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.classroom-side { background: var(--card-bg); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid #e5e7eb; margin-bottom: 8px; }
.tab-btn { background: none; border: none; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active { border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.participant-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: var(--bg); border-radius: 8px; margin-bottom: 6px; }
.hand-raised { color: var(--warn); font-weight: 600; }

/* ---------- Admin ---------- */
.admin-panel { display: none; margin-top: 16px; }
.admin-panel.active { display: block; }

/* ---------- Parent (onglets — modifications fonctionnelles #3) ---------- */
.parent-panel { display: none; margin-top: 16px; }
.parent-panel.active { display: block; }

/* ---------- Parent — refonte visuelle (en-tête, cartes de cours, contrôle parental) ---------- */
.parent-header-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}
.parent-header-card h2, .parent-header-card .meta { color: #fff; }
.parent-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 1.8em; font-weight: 700; flex-shrink: 0;
}
.parent-header-info { flex: 1; min-width: 220px; }
.parent-header-facts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.9em; }
.parent-header-facts span { opacity: 0.95; }
.parent-header-card .btn-secondary { background: rgba(255,255,255,0.18); color: #fff; }
.parent-header-card .btn-secondary:hover { background: rgba(255,255,255,0.3); }

.subject-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.course-track-card {
  background: var(--bg); border-radius: var(--radius); padding: 14px; border-top: 4px solid var(--primary);
  display: flex; flex-direction: column; gap: 6px;
}
.course-track-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.course-track-card h4 { margin: 2px 0; }
.course-track-detail { margin-top: 6px; font-size: 0.88em; }
.teacher-config-card select { padding: 3px 6px; border-radius: 6px; border: 1px solid #d1d5db; }

.control-blocks-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.parental-control-card h3 { display: flex; align-items: center; gap: 10px; }
.control-block {
  background: var(--bg); border-radius: 14px; padding: 16px; display: grid; gap: 8px; align-content: start;
  border-top: 3px solid var(--primary); transition: box-shadow 0.15s, transform 0.15s;
}
.control-block:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); transform: translateY(-1px); }
.control-block h4 {
  margin: 0 0 6px; font-size: 0.85em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 8px;
}
.control-block-icon {
  width: 26px; height: 26px; border-radius: 8px; background: rgba(0,0,0,0.05);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1em; flex-shrink: 0;
}
.control-block--duration { border-top-color: #2563eb; }
.control-block--subjects { border-top-color: #7c3aed; }
.control-block--hours { border-top-color: #0891b2; }
.control-block--prefs { border-top-color: #d97706; }
.control-checkbox-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px;
}
.control-block .checkbox-label {
  padding: 4px 6px; border-radius: 6px; transition: background 0.12s;
}
.control-block .checkbox-label:hover { background: rgba(0,0,0,0.04); }
.control-block input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }
.control-block input[type="time"], .control-block input[type="number"], .control-block select {
  border-radius: 8px;
}
.chapter-detail-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.9em; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.admin-table th, .admin-table td { border: 1px solid #e5e7eb; padding: 8px; text-align: left; font-size: 0.9em; }
.admin-table th { background: var(--bg); }
.admin-form { background: var(--card-bg); padding: 14px; border-radius: var(--radius); margin-top: 10px; display: grid; gap: 8px; max-width: 600px; }
.admin-form input, .admin-form select, .admin-form textarea { padding: 8px; border-radius: 6px; border: 1px solid #d1d5db; width: 100%; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.stat-box { background: var(--card-bg); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.stat-box .stat-value { font-size: 1.8em; font-weight: 700; color: var(--primary); }
.chart-wrap { background: var(--card-bg); border-radius: var(--radius); padding: 16px; margin-top: 12px; }

/* ---------- Classes programmées (admin — CRUD #1) ---------- */
.sc-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.sc-actions button { margin: 0; padding: 6px 10px; font-size: 0.82em; }
.sc-status { font-weight: 600; }
.sc-status-brouillon { background: #e5e7eb; color: #374151; }
.sc-status-a_venir { background: #dbeafe; color: #1e40af; }
.sc-status-ouverte { background: #dcfce7; color: #166534; }
.sc-status-complete { background: #fef3c7; color: #92400e; }
.sc-status-en_cours { background: #fee2e2; color: #991b1b; }
.sc-status-terminee { background: #e5e7eb; color: #374151; }
.sc-status-annulee { background: #fecaca; color: #7f1d1d; text-decoration: line-through; }

/* ============================================================
   Charte graphique commune Admin / Superadmin (refonte sidebar) :
   bleu nuit + violet + blanc + gris clair, cartes à ombres légères,
   coins arrondis, sidebar de navigation, responsive 3 paliers.
   ============================================================ */
.admin-layout { display: flex; gap: 22px; align-items: flex-start; margin-top: 10px; }
.admin-sidebar {
  width: 240px; flex-shrink: 0; background: #111827; border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 70px;
}
.admin-sidebar .tab-btn {
  color: #cbd5e1; text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 0.92em;
  display: flex; align-items: center; gap: 8px; border-bottom: none;
}
.admin-sidebar .tab-btn .si { font-size: 1.1em; }
.admin-sidebar .tab-btn:hover { background: #1f2937; color: #fff; }
.admin-sidebar .tab-btn.active { background: linear-gradient(135deg, var(--primary), #6d28d9); color: #fff; font-weight: 600; }
.admin-main { flex: 1; min-width: 0; }
.sidebar-toggle-btn { display: none; }

.pagination-bar { display: flex; align-items: center; gap: 12px; margin: 10px 0; }

@media (max-width: 1024px) {
  .admin-sidebar { width: 72px; }
  .admin-sidebar .tab-btn span:not(.si) { display: none; }
  .admin-sidebar .tab-btn { justify-content: center; }
}
@media (max-width: 760px) {
  .sidebar-toggle-btn { display: inline-block; }
  .admin-layout { position: relative; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 240px; z-index: 200;
    transform: translateX(-100%); transition: transform 0.2s; border-radius: 0;
  }
  .admin-sidebar.sidebar-open { transform: translateX(0); }
  .admin-sidebar .tab-btn span:not(.si) { display: inline; }
  .admin-sidebar .tab-btn { justify-content: flex-start; }
}

/* ---------- Kid mode ---------- */
body.kid-mode { --primary: #e63980; font-size: 18px; }
body.kid-mode .card, body.kid-mode .course-card, body.kid-mode .teacher-card { border-radius: 20px; }
body.kid-mode .btn-primary { border-radius: 20px; font-size: 1.1em; }
.mascot { font-size: 3em; text-align: center; }
.reward-toast {
  position: fixed; bottom: 20px; right: 20px; background: #fef3c7; border: 2px solid var(--warn);
  padding: 14px 20px; border-radius: 12px; font-weight: 600; z-index: 200; animation: pop-in 0.3s ease;
  max-width: 320px;
}
@keyframes pop-in { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Footer ---------- */
.app-footer { text-align: center; color: var(--muted); font-size: 0.8em; padding: 16px; }

/* ---------- Wizard 5 étapes ---------- */
.wizard-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.wizard-step-pill { background: var(--bg); border: 1px solid #d1d5db; padding: 6px 14px; border-radius: 20px; font-size: 0.85em; color: var(--muted); }
.wizard-step-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.wizard-panel { margin-top: 10px; }
#wizardBack { margin-bottom: 10px; }
.course-card.own-level { border: 1px solid var(--primary); }
.course-card h4 .badge-pill { font-size: 0.7em; vertical-align: middle; margin-left: 6px; }

/* ---------- Sessions programmées ---------- */
.session-card { background: var(--card-bg); padding: 16px; border-radius: var(--radius); box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.session-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.78em; font-weight: 600; }
.session-status.a_venir { background: #e0e7ff; color: #3730a3; }
.session-status.ouverte { background: #dcfce7; color: #166534; }
.session-status.complete { background: #fee2e2; color: #991b1b; }
.session-status.en_cours { background: #fef3c7; color: #92400e; }
.session-status.terminee { background: #e5e7eb; color: #4b5563; }
.session-status.annulee { background: #f3f4f6; color: #9ca3af; text-decoration: line-through; }
.session-countdown { font-weight: 700; color: var(--primary); }

/* ---------- Jeux enfants ---------- */
.kidgame-card { background: linear-gradient(135deg, #fef3c7, #fce7f3); border-radius: 20px; padding: 20px; text-align: center; }
.kidgame-title { font-size: 1.3em; font-weight: 700; color: var(--accent); }
.kidgame-instruction { font-size: 1.1em; margin: 10px 0; }
.dropzone { border: 3px dashed #d1d5db; border-radius: 14px; min-height: 60px; padding: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; background: #fff; }
.dropzone.over { border-color: var(--accent); background: #fef3c7; }
.drag-chip { background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 12px; cursor: grab; font-weight: 600; }
.flip-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.flip-card { background: var(--primary); color: #fff; border-radius: 12px; height: 70px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.85em; text-align: center; padding: 6px; }
.flip-card.revealed { background: #fff; color: var(--text); border: 2px solid var(--accent); }
.flip-card.matched { background: #dcfce7; color: #166534; border: 2px solid var(--success); }
.timer-bar-outer { background: #e5e7eb; border-radius: 8px; height: 14px; overflow: hidden; margin: 10px 0; }
.timer-bar-inner { background: var(--warn); height: 100%; transition: width 1s linear; }
.match-pair-btn { display: inline-block; margin: 4px; padding: 8px 14px; border-radius: 10px; border: 2px solid #d1d5db; background: #fff; cursor: pointer; }
.match-pair-btn.selected { border-color: var(--primary); background: #e0e7ff; }
.match-pair-btn.correct { border-color: var(--success); background: #dcfce7; }

/* ---------- File d'attente classe virtuelle ---------- */
.queue-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--bg); border-radius: 8px; margin-bottom: 6px; }
.queue-row.active { background: #fef3c7; border: 1px solid var(--warn); }

/* ---------- File de mains levées (classe virtuelle) ---------- */
.hand-raise-panel { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e5e7eb; }
.hand-raise-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.active-question-status { margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; background: #eef2ff; font-size: 0.92em; }
.active-question-status.empty { backgro