* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f0f4ff;
  min-height: 100vh;
  color: #1e293b;
}

/* ── HEADER ── */
header {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  padding: 24px 32px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
  position: relative;
}

/* Bouton profil dans le header */
.btn-profil {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.45);
  color: white;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  overflow: hidden;
}

.btn-profil:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-50%) scale(1.08);
}

header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

header p {
  margin-top: 6px;
  opacity: 0.85;
  font-size: 1rem;
}

/* ── ÉCRAN ── */
.ecran {
  display: none;
  max-width: 780px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

.ecran.actif {
  display: block;
}

/* ── ACCUEIL ── */
.titre-section {
  text-align: center;
  margin-bottom: 32px;
}

.titre-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.titre-section p {
  color: #64748b;
  margin-top: 6px;
}

/* ── SÉLECTEUR DURÉE CHRONO ── */
.chrono-picker {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: -14px;
  margin-bottom: 20px;
  padding: 12px 20px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
}

.chrono-picker.visible {
  display: flex;
}

.chrono-picker-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1d4ed8;
}

.chrono-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chrono-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  background: white;
  color: #1d4ed8;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chrono-btn:hover {
  background: #3b82f6;
  color: white;
}

.chrono-valeur {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1d4ed8;
  min-width: 48px;
  text-align: center;
}

/* ── PROF VIRTUEL — SÉLECTEUR ── */
.prof-selector-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.prof-selector-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.prof-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.prof-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  border-radius: 14px;
  border: 2.5px solid #e2e8f0;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.prof-btn:hover {
  border-color: var(--pc, #4f46e5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.prof-btn.actif {
  border-color: var(--pc, #4f46e5);
  background: var(--pc, #4f46e5);
  color: white;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--pc, #4f46e5) 35%, transparent);
}

.prof-btn-emoji {
  font-size: 2rem;
  line-height: 1;
}

.prof-btn-nom {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

.prof-btn.actif .prof-btn-nom,
.prof-btn.actif .prof-btn-desc {
  color: white;
}

.prof-btn-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

/* ── BOUTON VOIX PROF ── */
.btn-voix-prof {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: white;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-voix-prof:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.btn-voix-prof.actif {
  border-color: #22c55e;
  color: #16a34a;
  background: #f0fdf4;
}

/* ── PROF VIRTUEL — BULLE ── */
.prof-bulle {
  display: none;
  align-items: center;
  gap: 14px;
  background: #1e293b;
  color: white;
  border-radius: 16px;
  padding: 14px 18px;
  margin-top: 14px;
  border-left: 4px solid var(--pc, #7c3aed);
}

.prof-bulle-anim {
  animation: profSlide 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes profSlide {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.prof-bulle-avatar {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.prof-bulle-corps {
  flex: 1;
}

.prof-bulle-nom {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc, #a78bfa);
  margin-bottom: 3px;
}

.prof-bulle-msg {
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.4;
  color: #f1f5f9;
}

/* ── GRILLE NIVEAUX SCOLAIRES ── */
.grille-niveaux {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.carte-niveau {
  background: white;
  border-radius: 16px;
  border: 2px solid var(--c, #e2e8f0);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.carte-niveau:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  background: var(--c);
  color: white;
}

.niveau-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
}

.niveau-label {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--c);
  transition: color 0.2s;
}

.carte-niveau:hover .niveau-label {
  color: white;
}

.niveau-nb {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 5px;
  transition: color 0.2s;
}

.carte-niveau:hover .niveau-nb {
  color: rgba(255,255,255,0.75);
}

/* ── GRILLE MATIÈRES (dossiers) ── */
.grille-matieres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.carte-matiere {
  background: white;
  border-radius: 12px 12px 12px 12px;
  border: 2px solid var(--c, #e2e8f0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.carte-matiere:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.13);
}

/* Onglet supérieur façon dossier */
.matiere-onglet {
  height: 8px;
  width: 100%;
}

.matiere-corps {
  padding: 24px 20px 20px;
  text-align: center;
}

.matiere-emoji {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 10px;
}

.matiere-nom {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.matiere-nb {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

/* ── FIL D'ARIANE ── */
.breadcrumb-matiere {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.breadcrumb-retour {
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4f46e5;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}

.breadcrumb-retour:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #94a3b8;
  font-size: 1rem;
}

.breadcrumb-courant {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

/* ── GRILLE CHAPITRES (fichiers) ── */
.grille-themes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.carte-theme {
  background: white;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.carte-theme:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Icône 📄 au-dessus de l'emoji chapitre */
.chapitre-icone {
  font-size: 1rem;
  display: block;
  opacity: 0.45;
  margin-bottom: 2px;
}

.carte-theme .emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.carte-theme h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.carte-theme p {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

/* ── QUIZ ── */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.quiz-theme {
  font-size: 1rem;
  font-weight: 700;
  color: #4f46e5;
}

.quiz-compteur {
  font-size: 0.9rem;
  color: #64748b;
}

.barre-progression {
  background: #e2e8f0;
  border-radius: 99px;
  height: 8px;
  margin-bottom: 28px;
  overflow: hidden;
}

.barre-remplie {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transition: width 0.4s ease;
}

.badge-niveau {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.niveau-1 { background: #dcfce7; color: #166534; }
.niveau-2 { background: #fef9c3; color: #854d0e; }
.niveau-3 { background: #fee2e2; color: #991b1b; }

.carte-question {
  background: white;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.texte-question {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 28px;
  color: #1e293b;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-option {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  color: #1e293b;
}

.btn-option:hover:not(:disabled) {
  border-color: #4f46e5;
  background: #eef2ff;
}

.btn-option.correcte {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.btn-option.incorrecte {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.btn-option.reveler {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.btn-option:disabled {
  cursor: default;
}

/* ── BANDEAU FOCUS EXAMEN ── */
.bandeau-focus {
  margin: 10px 0 4px;
  padding: 10px 16px;
  background: #fefce8;
  border: 1.5px solid #fde047;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #713f12;
  text-align: center;
}
.bandeau-focus strong { color: #92400e; }

/* ── SOUS-CHAPITRES ── */
.grille-sous-chapitres {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.carte-sous-chapitre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px 16px;
  border-radius: 16px;
  border: 2.5px solid color-mix(in srgb, var(--sc, #4f46e5) 30%, transparent);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.carte-sous-chapitre:hover {
  border-color: var(--sc, #4f46e5);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--sc, #4f46e5) 20%, transparent);
}

.carte-tout-chapitre {
  border-style: dashed;
  background: #f8fafc;
}

.carte-tout-chapitre:hover {
  background: white;
}

.sous-chap-emoji {
  font-size: 2rem;
  line-height: 1;
}

.sous-chap-titre {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.sous-chap-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0;
  line-height: 1.3;
}

/* ── DICTÉE ── */
.zone-dictee {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.btn-ecouter {
  background: #0f766e;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
}
.btn-ecouter:hover:not(:disabled) { background: #0d6963; transform: translateY(-1px); }
.btn-ecouter:disabled { opacity: 0.65; cursor: default; }
.dictee-input {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
  outline: none;
}
.dictee-input:focus { border-color: #0f766e; }
.btn-valider-dictee {
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}
.btn-valider-dictee:hover { background: #15803d; }
.dictee-resultat {
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  width: 100%;
}
.dictee-mot {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 5px;
  margin: 2px 2px;
  font-weight: 600;
}
.dictee-mot.correct   { background: #dcfce7; color: #15803d; }
.dictee-mot.incorrect { background: #fee2e2; color: #b91c1c; }

/* ── EXPLICATION ── */
.boite-explication {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  display: none;
}

.boite-explication.bonne {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  color: #15803d;
}

.boite-explication.mauvaise {
  background: #fff1f2;
  border-left: 4px solid #ef4444;
  color: #b91c1c;
}

.boite-explication strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.btn-suivant {
  display: none;
  margin-top: 24px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-suivant:hover { opacity: 0.9; }

/* ── RÉSULTATS ── */
.carte-resultat {
  background: white;
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.score-cercle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
}

.score-chiffre {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 0.8rem;
  opacity: 0.85;
}

.message-resultat {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.sous-message {
  color: #64748b;
  margin-bottom: 32px;
  line-height: 1.5;
}

.recap-niveaux {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.recap-item {
  text-align: center;
}

.recap-item .nombre {
  font-size: 1.8rem;
  font-weight: 800;
}

.recap-item .libelle {
  font-size: 0.8rem;
  color: #64748b;
}

.vert { color: #22c55e; }
.rouge { color: #ef4444; }
.bleu { color: #4f46e5; }

.boutons-fin {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primaire {
  padding: 14px 32px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primaire:hover { opacity: 0.9; }

.btn-secondaire {
  padding: 14px 32px;
  background: #f1f5f9;
  color: #1e293b;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondaire:hover { background: #e2e8f0; }

/* ── SYSTÈME XP ── */

/* Barre XP sur cartes de thème */
.xp-carte {
  margin-top: 12px;
  text-align: left;
}

.xp-niveau-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 0.78rem;
}

.xp-niveau-badge {
  font-weight: 700;
  color: #475569;
}

.xp-montant {
  font-weight: 600;
  color: #94a3b8;
  font-size: 0.75rem;
}

.xp-barre-fond {
  background: #e2e8f0;
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.xp-barre {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* Animation +XP flottant */
.xp-flottant {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 1rem;
  font-weight: 800;
  color: #22c55e;
  pointer-events: none;
  animation: xp-monter 1.1s ease forwards;
  z-index: 10;
}

@keyframes xp-monter {
  0%   { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; transform: translateY(-36px); }
  100% { opacity: 0; transform: translateY(-50px); }
}

/* Notification level-up */
.levelup-notif {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border-radius: 24px;
  padding: 36px 48px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 20px 60px rgba(79,70,229,0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.levelup-notif.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.levelup-emoji {
  font-size: 3.5rem;
  margin-bottom: 10px;
}

.levelup-titre {
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 4px;
}

.levelup-label {
  font-size: 1.8rem;
  font-weight: 800;
}

/* XP sur l'écran résultats */
.xp-resultat {
  background: linear-gradient(135deg, #f0f4ff, #faf5ff);
  border: 1px solid #e0e7ff;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 28px;
  text-align: left;
}

.xp-session-gain {
  font-size: 1.2rem;
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 8px;
}

.xp-niveau-resultat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.xp-barre-resultat-fond {
  height: 10px;
  margin-bottom: 6px;
}

.xp-progression-texte {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: right;
}

.bonus-temps-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.bonus-temps-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #92400e;
}

.bonus-temps-xp {
  font-size: 0.95rem;
  font-weight: 800;
  color: #d97706;
  background: #fef3c7;
  padding: 3px 10px;
  border-radius: 99px;
}

/* ── BOUTON PASSER (mode aperçu) ── */
.btn-passer {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: white;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.btn-passer:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  background: #f5f3ff;
}

/* ── BADGE APERÇU ADMIN ── */
.badge-apercu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #fef9c3;
  color: #854d0e;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ── SÉLECTEUR DE MODE ── */
.mode-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.btn-mode {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s;
  text-align: center;
}

.btn-mode:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}

.btn-mode.actif {
  background: #4f46e5;
  border-color: #4f46e5;
  color: white;
}

/* ── QUIZ HEADER (avec bouton terminer) ── */
.quiz-header-droite {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-terminer {
  padding: 6px 14px;
  background: #fee2e2;
  color: #991b1b;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-terminer:hover { background: #fecdd3; }

/* ── CHRONOMÈTRE ── */
.timer-zone {
  margin-bottom: 16px;
}

.timer-infos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.timer-label {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}

.timer-secondes {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e293b;
  min-width: 36px;
  text-align: right;
}

.timer-secondes.urgence { color: #ef4444; }

.timer-barre-fond {
  background: #e2e8f0;
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.timer-barre {
  height: 100%;
  border-radius: 99px;
  background: #22c55e;
  transition: width 1s linear, background 0.5s;
}

.timer-barre.moyen  { background: #f59e0b; }
.timer-barre.urgent { background: #ef4444; }

/* ── NAV RETOUR ── */
.nav-retour {
  margin-bottom: 16px;
}

.btn-retour {
  background: none;
  border: none;
  color: #4f46e5;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.btn-retour:hover { text-decoration: underline; }

/* ── LANDING (choix du rôle) ── */
.grille-roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 520px;
  margin: 0 auto;
}

.carte-role {
  background: white;
  border-radius: 20px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.carte-role:hover {
  transform: translateY(-4px);
  border-color: #4f46e5;
  box-shadow: 0 8px 24px rgba(79,70,229,0.15);
}

.carte-role-admin:hover {
  border-color: #7c3aed;
  box-shadow: 0 8px 24px rgba(124,58,237,0.15);
}

.role-icone {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.carte-role h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.carte-role p {
  font-size: 0.85rem;
  color: #64748b;
}

/* ── PANNEAU PROFIL ── */
.profil-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
}

.profil-panel.ouvert { display: block; }

.profil-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.4);
  backdrop-filter: blur(3px);
}

.profil-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: white;
  box-shadow: -8px 0 40px rgba(0,0,0,0.18);
  padding: 28px 24px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: drawerSlide 0.25s cubic-bezier(0.34,1.2,0.64,1);
}

@keyframes drawerSlide {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

.profil-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profil-drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
}

.profil-fermer {
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: #64748b;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profil-fermer:hover { background: #e2e8f0; }

.profil-avatar-grand {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 0;
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}

.profil-nom-affiche {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}

.profil-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profil-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.profil-input-row {
  display: flex;
  gap: 8px;
}

.profil-input-row .input-mdp {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.95rem;
}

.profil-input-row .btn-primaire {
  padding: 10px 18px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.profil-stats {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  gap: 0;
}

.profil-stat-ligne {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}

.profil-stat-ligne:last-child { border-bottom: none; }
.profil-stat-ligne strong { color: #1e293b; font-weight: 700; }

.profil-reset-btn {
  margin-top: auto;
  padding: 12px;
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  border-radius: 10px;
  color: #991b1b;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.profil-reset-btn:hover { background: #fee2e2; }

.profil-deconnexion-btn {
  padding: 12px;
  background: transparent;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── Oeil mot de passe ── */
.input-mdp-wrapper {
  position: relative;
}
.input-mdp-wrapper .input-mdp {
  padding-right: 42px;
  width: 100%;
  box-sizing: border-box;
}
.btn-oeil {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  line-height: 0;
}
.btn-oeil:hover { color: #4f46e5; }
.btn-oeil svg { width: 18px; height: 18px; }

/* ── Avatar profil ── */
.profil-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profil-avatar-grand-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profil-avatar-galerie-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: #f1f5f9;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  transition: background .15s;
  width: 100%;
  box-sizing: border-box;
}
.profil-avatar-galerie-btn:hover { background: #e2e8f0; }
.profil-avatar-url-row { display: flex; gap: 8px; align-items: center; }
.profil-avatar-url-row .input-mdp { flex: 1; margin: 0; }
.profil-avatar-suppr-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-align: center;
  padding: 2px;
}
.profil-avatar-suppr-btn:hover { color: #ef4444; }

/* ── Accordéon profil (email / mdp) ── */
.profil-accordeon-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.profil-btn-confirmer {
  background: none;
  border: 1.5px solid #6366f1;
  border-radius: 10px;
  color: #6366f1;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px;
  cursor: pointer;
  transition: background .15s, color .15s;
  width: 100%;
}
.profil-btn-confirmer:hover { background: #6366f1; color: #fff; }

/* ── Profil msg succès/erreur ── */
.profil-msg {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
}

/* ── Bouton action profil ── */
.profil-btn-action {
  width: 100%;
  font-size: 0.88rem;
  padding: 10px;
}

/* ── Modal reset progression ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-carte {
  background: white;
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modalPop .2s cubic-bezier(0.34,1.4,0.64,1);
}
@keyframes modalPop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.modal-icone { font-size: 2.8rem; margin-bottom: 12px; }
.modal-titre { font-size: 1.2rem; font-weight: 800; color: #1e293b; margin-bottom: 10px; }
.modal-texte { font-size: 0.9rem; color: #64748b; line-height: 1.5; margin-bottom: 24px; }
.modal-texte strong { color: #1e293b; }
.modal-btns  { display: flex; gap: 10px; }
.modal-btns .btn-secondaire,
.modal-btns .btn-danger { flex: 1; padding: 12px; border-radius: 12px; font-size: .9rem; font-weight: 700; cursor: pointer; border: none; transition: opacity .15s, transform .1s; }
.modal-btns .btn-secondaire { background: #f1f5f9; color: #475569; }
.modal-btns .btn-secondaire:hover { background: #e2e8f0; }
.modal-btns .btn-danger { background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,0.35); }
.modal-btns .btn-danger:hover  { opacity: .9; }
.modal-btns .btn-danger:active { transform: scale(.97); }

/* ── Crop modal ── */
.crop-carte {
  max-width: 320px;
  padding: 24px 20px 20px;
}

.crop-viewport {
  width: 260px;
  height: 260px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 0 0 3px #6366f1, 0 0 0 6px rgba(99,102,241,.15);
}

.crop-canvas {
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.crop-canvas:active { cursor: grabbing; }

.crop-zoom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  font-size: .95rem;
}
.crop-zoom-bar input[type=range] {
  flex: 1;
  accent-color: #6366f1;
  cursor: pointer;
}

.profil-deconnexion-btn:hover {
  border-color: #fca5a5;
  color: #dc2626;
  background: #fff1f2;
}

/* ── ÉCRAN PRÉNOM ── */
.carte-prenom {
  background: white;
  border-radius: 24px;
  padding: 56px 40px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  text-align: center;
}

.prenom-icone {
  font-size: 4rem;
  margin-bottom: 18px;
  display: block;
}

.prenom-titre {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #1e293b;
}

.prenom-sous {
  color: #64748b;
  margin-bottom: 28px;
  font-size: 1rem;
}

.input-prenom {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  font-size: 1.15rem;
  outline: none;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
  transition: border-color 0.2s;
}

.input-prenom:focus {
  border-color: #4f46e5;
}

.input-prenom.erreur {
  border-color: #ef4444;
}

/* ── ADMIN LOGIN ── */
.carte-login {
  background: white;
  border-radius: 20px;
  padding: 48px 36px;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  text-align: center;
}

.login-icone {
  font-size: 3rem;
  margin-bottom: 16px;
}

.login-titre {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-sous {
  color: #64748b;
  margin-bottom: 28px;
}

.input-mdp {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-mdp:focus {
  border-color: #4f46e5;
}

.erreur-mdp {
  color: #ef4444;
  font-size: 0.88rem;
  margin-top: 8px;
  text-align: left;
}

/* ── ADMIN PANEL ── */
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
}
.admin-tab {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.admin-tab.actif {
  background: #6366f1;
  color: #fff;
}
.admin-tab:hover:not(.actif) { background: #e2e8f0; }

/* Comptes */
.admin-comptes { padding: 0 0 40px; }
.admin-comptes-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.admin-comptes-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .95rem;
  background: #f8fafc;
  outline: none;
}
.admin-comptes-search:focus { border-color: #6366f1; background: #fff; }
.admin-comptes-count {
  font-size: .85rem;
  color: #64748b;
  white-space: nowrap;
}
.admin-comptes-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.admin-cpt-carte {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
}
.admin-cpt-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #6366f1;
  display: flex; align-items: center; justify-content: center;
}
.admin-cpt-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.admin-cpt-avatar-lettre { color: #fff; font-weight: 700; font-size: 1.1rem; }
.admin-cpt-info { min-width: 0; }
.admin-cpt-nom {
  font-weight: 700;
  font-size: .95rem;
  color: #1e293b;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.admin-cpt-badge {
  font-size: .72rem;
  background: #ede9fe;
  color: #6366f1;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 600;
}
.admin-cpt-xp { font-size: .82rem; color: #64748b; margin-top: 2px; }
.admin-chargement, .admin-erreur, .admin-vide {
  text-align: center; color: #64748b; padding: 32px 0; font-size: .95rem; line-height: 1.6;
}
.admin-tri { display: flex; gap: 6px; }
.admin-tri-btn {
  padding: 6px 14px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; color: #64748b; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.admin-tri-btn.actif { background: #ede9fe; border-color: #6366f1; color: #6366f1; }

.admin-cpt-carte {
  cursor: pointer;
  transition: box-shadow .15s;
}
.admin-cpt-carte:hover { box-shadow: 0 2px 12px rgba(99,102,241,.12); }
.admin-cpt-resume { display: flex; align-items: center; gap: 12px; }
.admin-cpt-stats { font-size: .78rem; color: #64748b; margin-top: 2px; }
.admin-cpt-chevron {
  margin-left: auto; font-size: 1.2rem; color: #94a3b8;
  transition: transform .2s; flex-shrink: 0;
}
.admin-cpt-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.admin-cpt-section-titre { font-size: .75rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.admin-cpt-xp-ligne {
  display: flex; justify-content: space-between; font-size: .83rem;
  color: #334155; padding: 3px 0; border-bottom: 1px solid #f1f5f9;
}
.admin-cpt-vide { font-size: .83rem; color: #94a3b8; }
.admin-cpt-badge-vide { background: #f1f5f9; color: #94a3b8; }

.admin-titre {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e293b;
}

.btn-deconnexion {
  padding: 8px 20px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: background 0.2s;
}

.btn-deconnexion:hover { background: #e2e8f0; }

/* Breadcrumb admin */
.admin-onglets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Boutons breadcrumb admin */
.admin-bc-label {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.admin-bc-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #4f46e5;
  transition: background 0.15s;
}
.admin-bc-btn:hover { background: #e0e7ff; }

.admin-bc-sep {
  color: #94a3b8;
  font-size: 1rem;
}

.admin-bc-courant {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.btn-apercu-admin {
  padding: 8px 16px;
  border-radius: 99px;
  border: 2px solid #f59e0b;
  background: #fefce8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: #92400e;
  transition: all 0.15s;
  margin-left: auto;
}
.btn-apercu-admin:hover { background: #fde68a; border-color: #d97706; }

/* Carte chapitre admin (réutilise carte-theme) */
.admin-carte-chapitre .theme-nb-questions {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Visibilité chapitres */
.chapitre-visibilite-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.7rem;
  color: #64748b;
}
.chapitre-cache {
  opacity: 0.5;
  background: #f1f5f9 !important;
  border-style: dashed !important;
}
.chapitre-cache .theme-titre {
  text-decoration: line-through;
  color: #94a3b8;
}
.chapitre-visibilite-badge { font-size: 0.7rem; color: #64748b; margin-top: 5px; display: block; }
.chapitre-cache .chapitre-visibilite-badge { color: #dc2626; font-weight: 700; }
.btn-toggle-visibilite {
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: white;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
  width: 100%;
}
.btn-toggle-visibilite:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.chapitre-cache .btn-toggle-visibilite {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}
.chapitre-cache .btn-toggle-visibilite:hover {
  background: #bbf7d0;
}

/* Contenu admin */
.admin-contenu {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bloc-niveau {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bloc-niveau-header {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.bloc-niveau-header.niv-1 { background: #f0fdf4; color: #166534; border-bottom: 1px solid #bbf7d0; }
.bloc-niveau-header.niv-2 { background: #fefce8; color: #854d0e; border-bottom: 1px solid #fde68a; }
.bloc-niveau-header.niv-3 { background: #fff1f2; color: #991b1b; border-bottom: 1px solid #fecdd3; }

.compteur-questions {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.7;
}

.liste-questions {
  padding: 8px 0;
}

.ligne-question {
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}

.ligne-question:last-child { border-bottom: none; }

.q-numero {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  padding-top: 2px;
}

.q-corps {}

.q-texte {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
}

.q-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.q-option {
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.83rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.q-option.bonne-rep {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
  font-weight: 700;
}

.q-explication {
  font-size: 0.83rem;
  color: #64748b;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #94a3b8;
  line-height: 1.5;
}

/* ── GRILLE TYPES (Exercices | Examen noté) ── */
.grille-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.carte-type {
  background: white;
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.carte-type:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
}

.type-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 14px;
}

.type-titre {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
}

.type-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
}

.type-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── ÉCRAN RÉSULTATS EXAMEN NOTÉ ── */
.exam-note-cercle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(220,38,38,0.3);
}

.exam-note-chiffre {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
}

.exam-note-sur {
  font-size: 1rem;
  opacity: 0.85;
  margin-top: 2px;
}

.exam-mention {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.exam-sous-titre {
  color: #64748b;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.exam-section {
  background: #f8fafc;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: left;
}

.exam-section-titre {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

.exam-stat-ligne {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.exam-stat-ligne:last-child { margin-bottom: 0; }

.exam-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  min-width: 115px;
}

.exam-stat-barre-fond {
  flex: 1;
  background: #e2e8f0;
  border-radius: 99px;
  height: 9px;
  overflow: hidden;
}

.exam-stat-barre {
  height: 100%;
  border-radius: 99px;
  transition: width 0.7s ease;
}

.exam-stat-score {
  font-size: 0.88rem;
  font-weight: 800;
  min-width: 34px;
  text-align: right;
}

.exam-bilan {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.exam-bilan-col {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  text-align: left;
}

.exam-bilan-titre {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.exam-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exam-tag {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

.exam-tag.fort   { background: #dcfce7; color: #166534; }
.exam-tag.faible { background: #fee2e2; color: #991b1b; }
.exam-tag.neutre { background: #f1f5f9; color: #64748b; }

/* ── RESPONSIVE ── */
@media (max-width: 500px) {
  header h1 { font-size: 1.4rem; }
  .carte-question { padding: 24px 18px; }
  .texte-question { font-size: 1.1rem; }
  .score-cercle { width: 110px; height: 110px; }
  .score-chiffre { font-size: 2rem; }
  .carte-login { padding: 32px 20px; }
  .ligne-question { grid-template-columns: 22px 1fr; gap: 8px; }
}


/* ── ECRAN AUTH ── */
.carte-auth {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 400px;
  margin: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.auth-logo { font-size: 2.8rem; text-align: center; margin-bottom: 4px; }
.auth-titre { text-align: center; font-size: 1.7rem; font-weight: 800; color: #1e293b; margin-bottom: 28px; letter-spacing: -0.5px; }

/* Onglets Se connecter / Créer un compte */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  padding: 10px 12px;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all .2s;
}
.auth-tab.actif {
  background: #fff;
  color: #4f46e5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}
.auth-tab:not(.actif):hover { color: #1e293b; }

/* Hint identifiant */
.auth-identifiant-hint {
  font-size: .75rem;
  color: #94a3b8;
  margin: 4px 0 0;
  text-align: left;
}

/* Lien mot de passe oublié */
.auth-oubli-lien {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-oubli-lien:hover { color: #4338ca; }

/* Séparateur ou */
.auth-separateur { text-align: center; margin: 16px 0; color: #94a3b8; font-size: .85rem; position: relative; }
.auth-separateur::before, .auth-separateur::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: #e2e8f0; }
.auth-separateur::before { left: 0; }
.auth-separateur::after  { right: 0; }

/* Bouton Se connecter / Créer un compte */
#auth-btn-submit {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
  transition: opacity .2s, box-shadow .2s, transform .1s;
}
#auth-btn-submit:hover  { opacity: .93; box-shadow: 0 6px 18px rgba(99,102,241,0.42); }
#auth-btn-submit:active { transform: scale(.98); }

/* Bouton Continuer avec Google */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  transition: border-color .2s, box-shadow .2s, transform .1s;
}
.btn-google:hover  { border-color: #a5b4fc; box-shadow: 0 3px 10px rgba(0,0,0,0.10); }
.btn-google:active { transform: scale(.98); }
