/* ==========================================================================
   CHAPTER QCM MODAL - EDITION "BOUCHE BÉE" (APP NATIVE STYLE)
   ========================================================================== */

body.chapter-qcm-open { overflow: hidden; }

/* --- 1. LE FOND ET LA FENÊTRE FLOTTANTE --- */
.chapter-qcm-modal {
  position: fixed;
  inset: 0;
  z-index: 16500;
  display: grid;
  place-items: center;
  padding: 2rem;
  perspective: 1000px; /* Donne de la profondeur 3D */
}

.chapter-qcm-modal[hidden] { display: none; }

.chapter-qcm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.6);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.chapter-qcm-dialog {
  position: relative;
  width: min(900px, 100%);
  height: 85vh; /* Hauteur fixe pour un effet App */
  border-radius: 32px; /* Squircles très ronds type iOS */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Fond "Deep Space" ultra premium */
  background: radial-gradient(120% 100% at 50% 0%, #151a30 0%, #060811 100%);
  color: #f8fafc;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 0 40px rgba(255, 255, 255, 0.02);
  animation: modal-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.chapter-qcm-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95) translateY(20px) rotateX(-5deg); }
  to { opacity: 1; transform: scale(1) translateY(0) rotateX(0); }
}

/* --- 2. HEADER ÉPURÉ --- */
.chapter-qcm-header {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 8;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: calc(100% - 2.4rem);
  background: transparent;
}

.chapter-qcm-close {
  pointer-events: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.45));
  border-radius: 14px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 0;
  cursor: pointer;
  color: #cbd5e1;
  transition:
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chapter-qcm-close:hover {
  border-color: rgba(244, 63, 94, 0.85);
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.95), rgba(190, 24, 93, 0.85));
  color: #fff;
  transform: translateY(-1px) rotate(90deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 30px rgba(244, 63, 94, 0.45);
}

.chapter-qcm-close:active {
  transform: translateY(0) rotate(90deg) scale(0.96);
  box-shadow:
    inset 0 2px 0 rgba(0, 0, 0, 0.35),
    0 6px 14px rgba(0, 0, 0, 0.35);
}

.chapter-qcm-close-icon {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
}

.chapter-qcm-close-icon::before,
.chapter-qcm-close-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 16px;
  height: 2px;
  margin: auto;
  background: currentColor;
  transform-origin: center;
  border-radius: 999px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chapter-qcm-close-icon::before {
  transform: rotate(45deg);
}

.chapter-qcm-close-icon::after {
  transform: rotate(-45deg);
}

.chapter-qcm-close:hover .chapter-qcm-close-icon::before,
.chapter-qcm-close:hover .chapter-qcm-close-icon::after {
  background: #fff;
}

.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;
}

/* --- 3. CORPS (Scroll invisible) --- */
.chapter-qcm-body {
  overflow-y: auto;
  padding: 4.5rem 2rem 1.5rem;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.chapter-qcm-body::-webkit-scrollbar { width: 6px; }
.chapter-qcm-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

/* --- 4b. Loading / Transition / Error states --- */
.chapter-qcm-loading,
.chapter-qcm-transition,
.chapter-qcm-error {
  min-height: 100%;
  display: grid;
  place-content: center;
  gap: 1rem;
  text-align: center;
  padding: 1rem;
}

.chapter-qcm-loading p,
.chapter-qcm-transition p,
.chapter-qcm-error p {
  margin: 0;
  max-width: 32ch;
  font-size: 1rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.chapter-qcm-spinner {
  margin: 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #38bdf8;
  border-right-color: rgba(125, 211, 252, 0.5);
  position: relative;
  animation: chapter-qcm-spin 1s linear infinite;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15), inset 0 0 20px rgba(56, 189, 248, 0.15);
}

.chapter-qcm-spinner::before,
.chapter-qcm-spinner::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: chapter-qcm-spin 1.1s linear infinite reverse;
}

.chapter-qcm-spinner::before {
  border-top-color: #7dd3fc;
  border-left-color: rgba(56, 189, 248, 0.4);
}

.chapter-qcm-spinner::after {
  inset: 16px;
  border-top-color: rgba(255, 255, 255, 0.6);
  border-right-color: rgba(125, 211, 252, 0.5);
  animation-duration: 1.3s;
}

@keyframes chapter-qcm-spin {
  to { transform: rotate(360deg); }
}

.chapter-qcm-loading p {
  font-size: 1.1rem;
  color: #e2e8f0;
}

.chapter-qcm-transition p {
  font-size: 1.1rem;
  color: #cbd5e1;
}

.chapter-qcm-error p {
  margin-bottom: 1rem;
  color: #fecdd3;
}

.chapter-qcm-error .chapter-qcm-footer-row {
  margin-top: 0.7rem;
  justify-content: center;
}

.chapter-qcm-error button.chapter-qcm-primary,
.chapter-qcm-error button.chapter-qcm-btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.85rem 1.4rem;
  font-weight: 700;
}

.chapter-qcm-error button.chapter-qcm-primary:hover,
.chapter-qcm-error button.chapter-qcm-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

/* --- 4. ACCUEIL (HUB BENTO BOX) --- */
.chapter-qcm-home {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* En-tête session en cours (Glow effect) */
.chapter-qcm-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(14, 165, 233, 0.02));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1);
}

.chapter-qcm-banner strong { font-size: 1.2rem; color: #fff; display: block; margin-bottom: 0.2rem;}
.chapter-qcm-banner p { color: #7dd3fc; margin: 0; font-weight: 500;}

/* --- BLOC GUIDE / TUTORIEL --- */
.chapter-qcm-guide-bento {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 4px solid #38bdf8;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.chapter-qcm-guide-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #38bdf8;
}

.chapter-qcm-guide-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.chapter-qcm-guide-content h4 {
  margin: 0 0 0.8rem 0;
  font-size: 1.1rem;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.chapter-qcm-guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chapter-qcm-guide-steps li {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.4;
  position: relative;
  padding-left: 1.5rem;
}

.chapter-qcm-guide-steps li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #38bdf8;
  font-weight: bold;
}

.chapter-qcm-guide-steps strong {
  color: #e2e8f0;
}

.chapter-qcm-maitise-bento {
  margin-bottom: 2rem;
}

.chapter-qcm-maitise-bento h3 {
  font-size: 1.25rem;
  color: #f8fafc;
  margin: 0 0 1rem 0;
  font-weight: 800;
}

.chapter-qcm-maitise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.chapter-qcm-maitise-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.chapter-qcm-maitise-card--ok {
  --theme-color: #10b981;
  --theme-color-rgb: 16, 185, 129;
}

.chapter-qcm-maitise-card--warn {
  --theme-color: #f59e0b;
  --theme-color-rgb: 245, 158, 11;
}

.chapter-qcm-maitise-card--bad {
  --theme-color: #f43f5e;
  --theme-color-rgb: 244, 63, 94;
}

.chapter-qcm-maitise-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.chapter-qcm-maitise-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-width: 0;
}

.chapter-qcm-maitise-summary:focus-visible {
  outline: 2px solid var(--theme-color);
  outline-offset: -2px;
  border-radius: 20px;
}

.chapter-qcm-maitise-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.chapter-qcm-maitise-number {
  margin: 0;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: var(--theme-color);
  text-shadow: 0 0 20px rgba(var(--theme-color-rgb), 0.4);
  opacity: 0.95;
}

.chapter-qcm-maitise-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chapter-qcm-maitise-summary::marker,
.chapter-qcm-maitise-summary::-webkit-details-marker {
  display: none;
}

.chapter-qcm-maitise-chevron {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  white-space: nowrap;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  min-width: 0;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(13rem, 45%);
}

.chapter-qcm-maitise-summary:hover .chapter-qcm-maitise-chevron {
  color: #e2e8f0;
}

.chapter-qcm-maitise-chevron::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

details[open] .chapter-qcm-maitise-chevron::after {
  transform: translateY(2px) rotate(-135deg);
  color: var(--theme-color);
}

.chapter-qcm-maitise-chevron--disabled {
  pointer-events: none;
  white-space: normal;
  text-transform: none;
}

.chapter-qcm-maitise-chevron--disabled::after {
  display: none;
}

.chapter-qcm-maitise-list {
  list-style: none;
  margin: 0;
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
}

.chapter-qcm-maitise-list .chapter-qcm-skill-line {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 1rem;
  transition: all 0.2s ease;
}

.chapter-qcm-maitise-list .chapter-qcm-skill-line:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.chapter-qcm-maitise-empty {
  padding: 0 1.5rem 1.5rem;
  color: #64748b;
  font-size: 0.95rem;
  font-style: italic;
  margin: 0;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
  .chapter-qcm-maitise-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body[data-page="chapter-qcm"] .chapter-qcm-guide-icon {
    display: none;
  }
}

/* Les 2 grandes colonnes "Cours" et "Niveau" */
.chapter-qcm-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.chapter-qcm-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chapter-qcm-card h3 { font-size: 1.3rem; margin: 0; color: #fff; }
.chapter-qcm-card p { font-size: 0.95rem; color: #94a3b8; margin: 0 0 1rem 0; }

.chapter-qcm-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.chapter-qcm-card-head h3 { margin: 0; }

/* --- BOUTONS SÉRIES : MODE "JAUGE CYLINDRIQUE GAMING" V2 --- */
.chapter-qcm-series-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
}

.chapter-qcm-series-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Le texte sous la jauge */
.chapter-qcm-series-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.3s;
}

/* Le "Tube de verre" (Base) */
.chapter-qcm-cylinder-btn {
  position: relative;
  width: 64px;
  height: 130px;
  border-radius: 32px;
  background: #060913;
  border: 2px solid rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 15px 25px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 8px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  overflow: hidden;
  display: block;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover global */
.chapter-qcm-cylinder-btn:hover:not([disabled]) {
  transform: translateY(-6px);
  box-shadow:
    inset 0 15px 25px rgba(0, 0, 0, 0.9),
    0 12px 25px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(56, 189, 248, 0.15);
}
.chapter-qcm-cylinder-btn:hover:not([disabled]) + .chapter-qcm-series-label {
  color: #e2e8f0;
}

/* État "À faire" - Lueur Bleue/Cyan incitative */
.chapter-qcm-cylinder-btn.is-new {
  border-color: rgba(56, 189, 248, 0.2);
  animation: pulse-tube 3s infinite alternate;
}

.chapter-qcm-cylinder-btn.is-new .chapter-qcm-cylinder-content svg {
  fill: #38bdf8;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

@keyframes pulse-tube {
  0% { box-shadow: inset 0 15px 25px rgba(0,0,0,0.9), 0 0 0 rgba(56,189,248,0); }
  100% { box-shadow: inset 0 15px 25px rgba(0,0,0,0.9), 0 0 20px rgba(56,189,248,0.15); border-color: rgba(56,189,248,0.4); }
}

/* État "Joué" - Le tube reste neutre et sombre, c'est le liquide qui donne la couleur */
.chapter-qcm-cylinder-btn.is-played {
  background: #05070d;
  border-color: rgba(255, 255, 255, 0.08);
}

/* Le Liquide d'Énergie - Effet de surface 3D */
.chapter-qcm-cylinder-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--score-pct, 0%);
  background: linear-gradient(180deg, var(--liquid-color, #10b981) 0%, rgba(0, 0, 0, 0.5) 100%);
  border-top: 2px solid var(--liquid-color, #10b981);
  box-shadow:
    0 -12px 30px var(--liquid-color, #10b981),
    inset 0 10px 15px rgba(255, 255, 255, 0.15),
    inset 0 -15px 25px rgba(0,0,0,0.6);
  transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.chapter-qcm-cylinder-fill::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 12px;
  border-radius: 50%;
  background: var(--liquid-color, #10b981);
  filter: brightness(1.3);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

/* Contenu textuel et icônes */
.chapter-qcm-cylinder-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  text-shadow: 0 4px 15px rgba(0,0,0,0.9), 0 1px 3px rgba(0,0,0,1);
}

/* Centrage optique du triangle de lecture */
.chapter-qcm-cylinder-content svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  transition: all 0.3s;
}

/* L'overlay de survol (Style vitre teintée) */
.chapter-qcm-cylinder-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.chapter-qcm-cylinder-btn:hover:not([disabled]) .chapter-qcm-cylinder-hover {
  opacity: 1;
}

/* Animation de l'icône refaire au survol */
.chapter-qcm-cylinder-hover svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.6));
  transform: scale(0.5) rotate(90deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chapter-qcm-cylinder-btn:hover:not([disabled]) .chapter-qcm-cylinder-hover svg {
  transform: scale(1) rotate(0deg);
}

/* --- 5. L'ÉCRAN DE QUESTION --- */
.chapter-qcm-session { display: flex; flex-direction: column; height: 100%; }

/* --- L'ÉCRAN DE QUESTION : BARRE DE PROGRESSION --- */
.chapter-qcm-progress-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
  row-gap: 0.6rem;
  margin-bottom: 1.8rem;
}

.chapter-qcm-progress-text {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  white-space: nowrap;
}

.chapter-qcm-progress {
  flex: 1 1 auto;
  min-width: 200px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  overflow: hidden;
}

.chapter-qcm-progress > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.6);
  position: relative;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Le petit reflet brillant qui voyage sur la barre remplie */
.chapter-qcm-progress > span::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer-progress 2s infinite linear;
}

@keyframes shimmer-progress {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* La question */
.chapter-qcm-question-card {
  margin-bottom: 1rem;
}

.chapter-qcm-question {
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  text-align: center;
  font-weight: 600;
  margin-bottom: 1.6rem;
  line-height: 1.25;
  color: #fff;
}

/* --- L'ÉCRAN DE QUESTION : BOUTONS DE CHOIX --- */
.chapter-qcm-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.chapter-qcm-option {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.2));
  border-radius: 16px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.02), 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* L'effet WOW au survol */
.chapter-qcm-option:hover:not([disabled]) {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(0, 0, 0, 0.3));
  transform: translateY(-5px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(56, 189, 248, 0.15);
}

/* Effet d'enfoncement mécanique au clic */
.chapter-qcm-option:active:not([disabled]) {
  transform: translateY(2px);
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* La lettre (A, B, C, D) */
.chapter-qcm-option-id {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 1.2rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* La lettre s'allume au survol du bloc complet */
.chapter-qcm-option:hover:not([disabled]) .chapter-qcm-option-id {
  background: #38bdf8;
  color: #0f1524;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
  transform: scale(1.1) rotate(-5deg);
}

.chapter-qcm-option-text {
  font-size: 1.05rem;
  color: #f8fafc;
  font-weight: 500;
}

/* Validation (Vert/Rouge explosif) */
.chapter-qcm-option.is-correct, .chapter-qcm-option.correct {
  border-color: #10b981; background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.2), inset 0 0 0 2px #10b981;
  transform: translateY(4px);
}
.chapter-qcm-option.is-correct .chapter-qcm-option-id {
  background: #10b981; color: #fff; box-shadow: 0 0 15px #10b981;
}

.chapter-qcm-option.is-wrong, .chapter-qcm-option.incorrect {
  border-color: #f43f5e; background: rgba(244, 63, 94, 0.1);
  box-shadow: inset 0 0 0 2px #f43f5e;
  transform: translateY(4px);
}
.chapter-qcm-option.is-wrong .chapter-qcm-option-id {
  background: #f43f5e; color: #fff;
}

.chapter-qcm-option.is-dimmed, .chapter-qcm-option.dimmed {
  opacity: 0.3; filter: grayscale(100%); transform: scale(0.98); box-shadow: none;
}

/* Révélation de la réponse */
.chapter-qcm-reveal {
  margin-top: 1.5rem;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  animation: slide-up-reveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@keyframes slide-up-reveal {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chapter-qcm-reveal-text {
  color: #f1f5f9 !important;
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Never style MathJax descendants here: CHTML layout relies on nested spans. */
.chapter-qcm-reveal-text p,
.chapter-qcm-reveal-text li,
.chapter-qcm-reveal-text ul,
.chapter-qcm-reveal-text ol,
.chapter-qcm-reveal-line,
.chapter-qcm-reveal-paragraph {
  color: inherit !important;
  font-size: inherit;
  line-height: inherit;
}

.chapter-qcm-reveal.is-bad {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(244, 63, 94, 0.3);
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.05);
}
.chapter-qcm-reveal.is-bad .chapter-qcm-reveal-badge {
  color: #fb7185;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  display: block;
}

.chapter-qcm-reveal.is-good {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.05);
}
.chapter-qcm-reveal.is-good .chapter-qcm-reveal-badge {
  color: #34d399;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  display: block;
}

.chapter-qcm-reveal-badge { margin-bottom: 0.5rem; font-size: 1.2rem; font-weight: 800;}

.chapter-qcm-reveal-text {
  display: grid;
  gap: 0.72rem;
  text-align: left;
}

.chapter-qcm-reveal-text .pedago-card {
  margin: 0;
}

.chapter-qcm-reveal-text .pedago-card-stack {
  gap: 0.72rem;
}

.chapter-qcm-reveal-lines {
  margin: 0;
  display: grid;
  gap: 0.46rem;
}

.chapter-qcm-reveal-line,
.chapter-qcm-reveal-paragraph {
  margin: 0;
}

/* Bouton d'action principal */
.chapter-qcm-session-footer {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chapter-qcm-primary {
  background: #f8fafc; color: #0f1524;
  padding: 1.2rem 2.5rem; border-radius: 99px;
  font-size: 1.2rem; font-weight: 900; border: none; cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
}
.chapter-qcm-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3); }

.chapter-qcm-next-btn {
  margin-top: 0;
  width: 100%;
  background: #f8fafc;
  color: #0f1524;
  padding: 1.2rem;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
}

.chapter-qcm-next-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.25);
}

.chapter-qcm-next-btn:active {
  transform: translateY(2px);
}

.chapter-qcm-unsure {
  background: rgba(255, 255, 255, 0.03); color: #94a3b8; padding: 0.8rem 1.5rem;
  border-radius: 99px; border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chapter-qcm-unsure:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.chapter-qcm-btn {
  border: none;
  cursor: pointer;
}

.chapter-qcm-btn:focus-visible,
.chapter-qcm-close:focus-visible,
.chapter-qcm-option:focus-visible {
  outline: 3px solid rgba(148, 163, 184, 0.5);
  outline-offset: 3px;
}

.chapter-qcm-body,
.chapter-qcm-close,
.chapter-qcm-maitise-summary,
.chapter-qcm-cylinder-btn,
.chapter-qcm-option,
.chapter-qcm-primary,
.chapter-qcm-next-btn,
.chapter-qcm-unsure,
.chapter-qcm-result .chapter-qcm-see-more,
.chapter-qcm-footer-row .chapter-qcm-primary,
.chapter-qcm-footer-row .chapter-qcm-btn--ghost {
  touch-action: pan-y pinch-zoom;
}

/* --- 6. L'ÉCRAN DE VICTOIRE / RÉSULTATS (BENTO BOX GAMING) --- */
.chapter-qcm-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  animation: fade-in-result 0.5s ease-out forwards;
  padding-bottom: 2rem;
}

@keyframes fade-in-result {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* --- LE TROPHEE (Score Central) --- */
.chapter-qcm-score {
  grid-column: 1 / -1;
  position: relative;
  background: radial-gradient(ellipse at top, rgba(56, 189, 248, 0.15), transparent 70%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.6), rgba(6, 9, 19, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 24px;
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.chapter-qcm-score::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(56, 189, 248, 0.05) 25%, transparent 50%);
  animation: rotate-glow 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes rotate-glow { 100% { transform: rotate(360deg); } }

.chapter-qcm-score strong {
  position: relative;
  font-size: 6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 20%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  filter: drop-shadow(0 10px 25px rgba(56, 189, 248, 0.3));
  z-index: 1;
  letter-spacing: -0.02em;
}

.chapter-qcm-score span {
  position: relative;
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1.2rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1;
  backdrop-filter: blur(4px);
}

/* --- LES CARTES D'ANALYSE (Bento) --- */
.chapter-qcm-result-grid {
  display: contents;
}

.chapter-qcm-result section {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.02), 0 8px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  animation: slide-up-bento 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.chapter-qcm-result-grid:nth-of-type(1) section:nth-child(1) {
  animation-delay: 0.1s;
}

.chapter-qcm-result-grid:nth-of-type(1) section:nth-child(2) {
  animation-delay: 0.2s;
}

.chapter-qcm-result-grid:nth-of-type(2) section:nth-child(1) {
  animation-delay: 0.3s;
}

.chapter-qcm-result-grid:nth-of-type(2) section:nth-child(2) {
  animation-delay: 0.4s;
}

.chapter-qcm-result-grid:nth-of-type(2) section:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes slide-up-bento {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chapter-qcm-result section:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.05),
    0 15px 30px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(56, 189, 248, 0.05);
}

.chapter-qcm-result h3 {
  font-size: 1.15rem;
  color: #f8fafc;
  font-weight: 800;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
}

.chapter-qcm-result section.chapter-qcm-result-section--confirming > p {
  color: #fdba74;
}

.chapter-qcm-result section.chapter-qcm-result-section--not-validated > p {
  color: #fda4af;
}

.chapter-qcm-result ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* --- LES TAGS (Badges de compétences type RPG) --- */
.chapter-qcm-result li {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #e2e8f0;
  font-weight: 600;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chapter-qcm-result li.chapter-qcm-skill-line {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.chapter-qcm-result li.chapter-qcm-skill-line:not(.chapter-qcm-empty)::before {
  display: none;
}

.chapter-qcm-skill-name {
  font-weight: 700;
  color: #f8fafc;
  flex: 1 1 auto;
  min-width: 0;
}

.chapter-qcm-skill-name a,
.chapter-qcm-skill-name {
  text-decoration: none;
}

.chapter-qcm-skill-name.mission-title {
  font-family: var(--font-ui, system-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sidebar-muted, #c7d3f1);
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}

.chapter-qcm-result .mission-title__prefix {
  color: var(--devoirs-accent-cyan, #22d3ee);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.chapter-qcm-result .mission-title__text {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.chapter-qcm-maitise-list .mission-title__prefix {
  color: var(--devoirs-accent-cyan, #22d3ee);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.chapter-qcm-maitise-list .mission-title__text {
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 700;
}

.chapter-qcm-result .chapter-qcm-see-more {
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem 0.95rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.chapter-qcm-result .chapter-qcm-see-more:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #f8fafc;
}

.chapter-qcm-skill-stats {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.chapter-qcm-skill-stats span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.chapter-qcm-skill-stats .stat-score {
  color: #ffffff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
}

.chapter-qcm-skill-stats .stat-unsure {
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.2);
}

.chapter-qcm-result li:not(.chapter-qcm-empty)::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.chapter-qcm-result li:hover:not(.chapter-qcm-empty) {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
  transform: translateY(-2px);
  cursor: default;
}

.chapter-qcm-result li.chapter-qcm-empty {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: #64748b;
  box-shadow: none;
  font-weight: 500;
  width: 100%;
}

.chapter-qcm-result li a {
  color: #e2e8f0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chapter-qcm-result li:hover a {
  color: #fff;
}

/* --- FOOTER : ACTIONS DE FIN --- */
.chapter-qcm-footer-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chapter-qcm-footer-row .chapter-qcm-primary {
  background: #f8fafc;
  color: #0f1524;
  padding: 1.2rem 2.5rem;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 900;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chapter-qcm-footer-row .chapter-qcm-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.25);
}

.chapter-qcm-footer-row .chapter-qcm-primary:active {
  transform: translateY(2px);
}

.chapter-qcm-footer-row .chapter-qcm-btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: #cbd5e1;
  padding: 1.2rem 2rem;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.chapter-qcm-footer-row .chapter-qcm-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* RESPONSIVE MOBILE */
@media (max-width: 800px) {
  .chapter-qcm-modal {
    padding: 0;
    align-items: stretch;
  }
  .chapter-qcm-dialog {
    width: 100%;
    border-radius: 0;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
  }
  .chapter-qcm-cards { grid-template-columns: 1fr; }
  .chapter-qcm-guide-bento {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem;
  }
  .chapter-qcm-maitise-bento {
    padding: 1rem 1.2rem;
  }
  .chapter-qcm-maitise-grid {
    grid-template-columns: 1fr;
  }
  .chapter-qcm-options { grid-template-columns: 1fr; gap: 1rem;}
  .chapter-qcm-result { grid-template-columns: 1fr; }
  .chapter-qcm-score strong { font-size: 4rem; }
  .chapter-qcm-series-list { flex-direction: column; }
  .chapter-qcm-progress-wrap {
    flex-direction: row;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.6rem;
    margin-bottom: 1.2rem;
  }
  .chapter-qcm-progress {
    min-width: 0;
    flex: 1 1 auto;
  }
  .chapter-qcm-progress-text {
    font-size: 0.74rem;
    padding: 0.32rem 0.58rem;
  }
  .chapter-qcm-question {
    text-align: left;
    font-size: clamp(1.1rem, 6.8vw, 1.45rem);
    margin-bottom: 1.2rem;
  }
  .chapter-qcm-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .chapter-qcm-option {
    padding: 0.9rem 1rem;
    gap: 0.9rem;
    min-height: 68px;
  }
  .chapter-qcm-option-id {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 10px;
  }
  .chapter-qcm-option-text {
    font-size: 1rem;
    line-height: 1.45;
  }
  .chapter-qcm-reveal {
    padding: 1.1rem 1.1rem 1.2rem;
  }
  .chapter-qcm-session-footer {
    margin-top: 1.2rem;
    gap: 1.2rem;
  }
  .chapter-qcm-next-btn {
    padding: 1rem;
    border-radius: 14px;
  }
  .chapter-qcm-unsure {
    width: 100%;
  }
  .chapter-qcm-session-footer { flex-direction: column-reverse; gap: 1.5rem; }
  .chapter-qcm-primary { width: 100%; text-align: center; }
  .chapter-qcm-header {
    top: 0.8rem;
    right: 0.8rem;
    width: calc(100% - 1.6rem);
  }
  .chapter-qcm-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  .chapter-qcm-question-card {
    margin-bottom: 0.5rem;
  }
  .chapter-qcm-question {
    margin-bottom: 1rem;
    font-size: clamp(1.05rem, 7.1vw, 1.35rem);
  }
  .chapter-qcm-option {
    padding-inline: 0.85rem;
    gap: 0.75rem;
  }
  .chapter-qcm-option-text {
    font-size: 0.95rem;
  }
  .chapter-qcm-progress-text {
    font-size: 0.7rem;
    padding: 0.28rem 0.5rem;
  }
  .chapter-qcm-next-btn,
  .chapter-qcm-unsure {
    font-size: 1rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .chapter-qcm-close:hover,
  .chapter-qcm-cylinder-btn:hover:not([disabled]),
  .chapter-qcm-option:hover:not([disabled]),
  .chapter-qcm-primary:hover,
  .chapter-qcm-next-btn:hover,
  .chapter-qcm-unsure:hover,
  .chapter-qcm-result section:hover,
  .chapter-qcm-result li:hover:not(.chapter-qcm-empty),
  .chapter-qcm-footer-row .chapter-qcm-primary:hover {
    transform: none;
  }

  .chapter-qcm-option:hover:not([disabled]) .chapter-qcm-option-id,
  .chapter-qcm-cylinder-btn:hover:not([disabled]) .chapter-qcm-cylinder-hover svg {
    transform: none;
  }

  .chapter-qcm-cylinder-btn:hover:not([disabled]) .chapter-qcm-cylinder-hover {
    opacity: 0;
  }
}

/* ==========================================================================
   COULEURS SÉMANTIQUES DES RÉSULTATS (NOUVEAU FLUX FICHES)
   ========================================================================== */

/* 1. Bloc "Ce que tu maîtrises" -> VERT (Succès) */
.chapter-qcm-result-grid section:nth-child(1) li:not(.chapter-qcm-empty)::before {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.chapter-qcm-result-grid section:nth-child(1) li:hover:not(.chapter-qcm-empty) {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}

/* 2. Bloc "Fiches en cours d'acquisition (À consolider)" -> ORANGE (Avertissement) */
.chapter-qcm-result-grid section:nth-child(2) li:not(.chapter-qcm-empty)::before {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.chapter-qcm-result-grid section:nth-child(2) li:hover:not(.chapter-qcm-empty) {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

/* 3. Bloc "Ton plan d'action (À revoir)" -> ROUGE/ROSE (Critique) */
.chapter-qcm-result-grid section:nth-child(3) li:not(.chapter-qcm-empty)::before {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

.chapter-qcm-result-grid section:nth-child(3) li:hover:not(.chapter-qcm-empty) {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.4);
}
