/* =========================================================
   COUCHE CONTENU - lecons, sommaires, moteur de tests, visuels pedagogiques.
   Extraite de l'ancien assets/css/style.css (sections 7-20, 22-47, 50-56).
   Les sections globales (variables, reset, header, hero, footer, auth, tarifs)
   ont ete remplacees par le design system du template -> voir archive/.
   Les variables heritees sont definies dans design-system.css.
   A charger APRES style.css sur les pages lecons / tests.
   ========================================================= */

/* =========================================================
CAPCONCOURS — Feuille de style COMPLÈTE (base + composants leçons)
Palette CapConcours : Violet #5624d0 · Orange #f26522 · Fond clair #f7f9fa
Version corrigée : syntaxe réparée, sections restaurées,
ajouts minimaux pour le moteur de tests.
========================================================= */

/* ---------- 7. BARRE DE PROGRESSION DE LECTURE ---------- */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 100;
  transition: width .1s linear;
}

/* ---------- 8. LEÇON (classes de référence) ---------- */

.lesson-container {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 48px 56px;
  margin: 0;
  max-width: 860px;
  box-shadow: var(--shadow);
}

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

.lesson-header h1 {
  margin-bottom: .5rem;
}

.lesson-header .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-style: italic;
  font-family: var(--serif);
}

.lesson-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}

.lesson-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.lesson-meta span strong {
  color: var(--headings);
}

.objective-box {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 0 0 2.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .97rem;
  color: var(--ink);
}

.objective-box strong {
  color: var(--headings);
}

.lesson-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ---------- 9. SOMMAIRE MOBILE (toc) ---------- */

.toc {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 0 0 2.5rem;
}

.toc-title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--headings);
  margin-bottom: .9rem;
  font-weight: 600;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 20px;
  list-style: none;
  margin: 0;
}

.toc-grid li {
  margin: 0;
}

.toc-grid a {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  color: var(--text-muted);
  font-size: .92rem;
  padding: 4px 0;
}

.toc-grid a:hover {
  color: var(--accent);
  text-decoration: none;
}

.toc-num {
  font-family: var(--serif);
  color: var(--accent);
  font-weight: 600;
  font-size: .85rem;
}

/* ---------- 10. SECTIONS NUMÉROTÉES ---------- */

.lesson-section {
  margin-top: 3rem;
  scroll-margin-top: 20px;
}

.lesson-section > h2 {
  display: flex;
  align-items: baseline;
  gap: .7rem;
}

.section-num {
  font-family: var(--serif);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ---------- 11. ENCADRÉS (callouts) ---------- */

.callout {
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--text-faint);
  background: var(--surface-2);
  padding: 15px 20px;
  margin: 1.3rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem;
  color: var(--ink);
}

.callout .callout-label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .4rem;
  color: var(--text-muted);
}

.callout-definition {
  border-left-color: var(--accent);
}

.callout-definition .callout-label {
  color: var(--accent);
}

.callout-tip {
  border-left-color: var(--accent);
}

.callout-tip .callout-label {
  color: var(--accent-text);
}

.callout-warning {
  border-left-color: var(--danger);
}

.callout-warning .callout-label {
  color: var(--danger);
}

.callout-example {
  border-left-color: var(--success);
}

.callout-example .callout-label {
  color: var(--success);
}

/* ---------- 12. CARTES DE RÈGLES ---------- */

.rule-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 1.5rem 0;
}

.rule-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.rule-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.rule-card-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--headings);
  padding-bottom: .5rem;
  margin-bottom: .7rem;
  border-bottom: 1px solid var(--border-soft);
}

.rule-card p {
  font-size: .9rem;
  color: var(--ink);
  margin-bottom: .6rem;
}

.rule-example {
  font-size: .85rem;
  color: var(--text-muted);
  font-style: italic;
}

.rule-tip {
  font-size: .85rem;
  color: var(--accent-text);
  margin-top: .5rem;
  font-weight: 600;
}

/* ---------- 13. PHRASE EN EXERGUE ---------- */

.pull-quote {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--headings);
  text-align: center;
  margin: 2.2rem auto;
  padding: 0 1rem;
  max-width: 55ch;
  line-height: 1.5;
}

.pull-quote::before {
  content: "\2014 ";
  color: var(--accent);
}

.pull-quote::after {
  content: " \2014";
  color: var(--accent);
}

/* ---------- 14. BLOC « À RETENIR » ---------- */

.takeaway {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin: 2.5rem 0;
}

.takeaway h2 {
  color: #FFFFFF;
  font-size: 1.2rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: .6rem;
}

.takeaway ul {
  margin: 0;
  list-style: none;
  padding: 0;
}

.takeaway li {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: .45rem;
  font-size: .95rem;
  padding: 6px 0;
}

.takeaway li strong {
  color: #FFFFFF;
}

/* ---------- 15. LISTES STYLÉES ---------- */

.styled-list {
  list-style: none;
  margin-left: 0;
}

.styled-list li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: .6rem;
}

.styled-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 16. TABLEAUX ---------- */

.lesson-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: .92rem;
}

.lesson-content th,
.lesson-content td {
  border: 1px solid var(--border-soft);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.lesson-content th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--headings);
}

/* ---------- 17. QUIZ ---------- */

.quiz-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
}

.quiz-title {
  font-family: var(--serif);
  color: var(--headings);
  margin-bottom: 1.5rem;
}

.question-block {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 1.4rem;
  background: var(--surface);
}

.question {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1rem;
}

.options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  font-size: .95rem;
  background: var(--surface);
}

.options label:hover {
  background: #F0F0F0;
  border-color: var(--accent);
}

.options input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-toggle {
  background: var(--navy);
  color: #FFFFFF;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.btn-toggle:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-toggle:disabled {
  opacity: .55;
  cursor: default;
}

.answer {
  display: none;
  margin-top: 1rem;
  padding: 14px 18px;
  background: var(--success-bg);
  color: var(--success-text);
  border-left: 4px solid var(--success);
  border-radius: var(--radius);
  font-size: .95rem;
}

.answer:not([hidden]) {
  display: block;
}

/* ---------- 18. NAVIGATION BAS DE LEÇON + PDF ---------- */

.footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 600;
}

.nav-btn:hover {
  background: rgba(86, 36, 208, .07);
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

.pdf-download {
  margin: 1.5rem 0 0;
}

.pdf-btn {
  display: inline-block;
  padding: 12px 25px;
  background: var(--danger);
  color: #FFFFFF;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 700;
}

.pdf-btn:hover {
  background: #C82333;
  color: #FFFFFF;
  text-decoration: none;
}

/* ---------- 19. BARRE LATÉRALE (sommaire PC) ---------- */

.lesson-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 1.5rem;
}

.lesson-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 0 10px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--headings);
  font-size: 1.02rem;
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.35;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--headings);
  text-decoration: none;
}

.sidebar-link .num {
  font-family: var(--serif);
  color: var(--accent);
  font-weight: 700;
  font-size: .82rem;
  flex-shrink: 0;
  min-width: 18px;
}

.sidebar-link.active {
  background: var(--surface-2);
  color: var(--headings);
  border-left-color: var(--accent);
  font-weight: 600;
}

.lesson-layout .lesson-container {
  max-width: 100%;
}

.toc {
  display: none;
}

/* ---------- 20. MOTEUR DE TEST ---------- */

#barre-container {
  background: var(--border-soft);
  border-radius: 10px;
  height: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}

#barre-progression {
  background: var(--accent);
  height: 100%;
  width: 0%;
  transition: width .3s;
}

.minuteur {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--headings);
  text-align: center;
  margin-bottom: .5rem;
  font-variant-numeric: tabular-nums;
}

.minuteur.temps-faible {
  color: var(--danger);
  animation: clignote 1s infinite;
}

@keyframes clignote {
  50% {
    opacity: .5;
  }
}

.score-final {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent);
  margin: .5rem 0;
}

.note20 {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--headings);
  margin-bottom: 1rem;
}

.correction {
  border-left: 4px solid;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
}

.correction-ok {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success-text);
}

.correction-ko {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger-text);
}

.explication {
  color: var(--ink);
  font-style: italic;
  margin-top: .5rem;
}

.msg-erreur {
  color: var(--danger);
  text-align: center;
}

.msg-ok {
  color: var(--success);
  font-weight: 700;
  text-align: center;
}

.bonne-reponse {
  background: var(--success-bg) !important;
  border-color: var(--success) !important;
  font-weight: bold;
}

.mauvaise-reponse {
  background: var(--danger-bg) !important;
  border-color: var(--danger) !important;
  text-decoration: line-through;
}

/* ---------- 22. BLOC CTA « PRÊT À TESTER » ---------- */

.cta-section {
  text-align: center;
  margin: 3rem 0 2rem;
  padding: 2rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.cta-section h2 {
  margin-top: 0;
  color: var(--headings);
}

.cta-section p {
  color: var(--ink);
  max-width: 60ch;
  margin: 0 auto 1.5rem;
}

/* ---------- 23. LISTES D'INDICES (logique) ---------- */

.clues-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.clues-list li {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--bg);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

/* ---------- 24. FORMULES & MOTS EN ÉVIDENCE ---------- */

.formula {
  display: block;
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  font-weight: 600;
  color: var(--headings);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.word-box {
  display: inline-block;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.5rem 1.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--headings);
  margin: 0.5rem 0;
}

/* ---------- 25. DIAGRAMMES DE VENN ---------- */

.venn-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.venn-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  flex: 1;
  min-width: 160px;
  max-width: 220px;
}

.venn-diagram {
  position: relative;
  height: 112px;
  margin-bottom: 0.8rem;
}

.venn-circle {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.venn-intersection .circle-a {
  left: 10%;
  top: 16px;
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(255, 121, 0, 0.10);
}

.venn-intersection .circle-b {
  right: 10%;
  top: 16px;
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(26, 43, 76, 0.08);
}

.venn-inclusion .circle-b {
  left: 50%;
  transform: translateX(-50%);
  top: 2px;
  width: 106px;
  height: 106px;
  border-color: var(--navy);
  color: var(--navy);
  align-items: flex-start;
  padding-top: 2px;
  background: rgba(26, 43, 76, 0.05);
}

.venn-inclusion .circle-a {
  left: 50%;
  transform: translateX(-50%);
  top: 42px;
  width: 56px;
  height: 56px;
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(255, 121, 0, 0.12);
}

.venn-disjonction .circle-a {
  left: 5%;
  top: 16px;
  border-color: var(--accent);
  color: var(--accent-dark);
  background: rgba(255, 121, 0, 0.10);
}

.venn-disjonction .circle-b {
  right: 5%;
  top: 16px;
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(26, 43, 76, 0.08);
}

.venn-label {
  font-weight: 700;
  color: var(--headings);
  margin: 0 0 0.3rem;
}

.venn-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- 26. VISUELS DE POSITION (logique) ---------- */

.position-visual {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.position-visual .pos-slot {
  width: 48px;
  height: 48px;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--white);
}

.position-visual .pos-slot.filled {
  background: #eef1f5;
  color: var(--navy);
}

.circle-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem auto;
  position: relative;
  width: 200px;
  height: 200px;
}

.circle-visual .circle-border {
  width: 160px;
  height: 160px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  position: absolute;
}

.circle-visual .circle-person {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.circle-visual .circle-person:nth-child(2) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.circle-visual .circle-person:nth-child(3) {
  top: 35%;
  right: 0;
}

.circle-visual .circle-person:nth-child(4) {
  bottom: 5%;
  right: 15%;
}

.circle-visual .circle-person:nth-child(5) {
  bottom: 5%;
  left: 15%;
}

.circle-visual .circle-person:nth-child(6) {
  top: 35%;
  left: 0;
}

/* ---------- 27. GRILLES DE DÉMONSTRATION (sudoku) ---------- */

.demo-grid {
  display: inline-grid;
  gap: 0;
  border: 2px solid var(--navy);
  background: var(--navy);
  margin: 1rem 0;
  font-weight: 600;
}

.demo-grid .dc {
  background: var(--white);
  border: 1px solid #b8c0cc;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.demo-grid.cols-4 {
  grid-template-columns: repeat(4, 44px);
}

.demo-grid.cols-9 {
  grid-template-columns: repeat(9, 44px);
}

.demo-grid .dc.hl {
  background: var(--surface-2);
  color: var(--accent);
}

.demo-grid .dc.given {
  background: #eef1f5;
  color: var(--navy);
}

.demo-grid.cols-4 .dc:nth-child(4n+2) {
  border-right: 2px solid var(--navy);
}

.demo-grid.cols-4 .dc:nth-child(n+5):nth-child(-n+8) {
  border-bottom: 2px solid var(--navy);
}

.demo-grid.cols-9 .dc:nth-child(9n+3),
.demo-grid.cols-9 .dc:nth-child(9n+6) {
  border-right: 2px solid var(--navy);
}

.demo-grid.cols-9 .dc:nth-child(n+19):nth-child(-n+27),
.demo-grid.cols-9 .dc:nth-child(n+46):nth-child(-n+54) {
  border-bottom: 2px solid var(--navy);
}

.demo-grid .dc.xw {
  background: var(--surface-2);
  color: var(--accent);
  font-weight: bold;
}

.demo-grid .dc.xw-elim {
  background: #ffe5e5;
  color: #c0392b;
  text-decoration: line-through;
}

/* ---------- 28. GRILLES SUDOKU INTERACTIVES ---------- */

.sudoku-wrapper {
  margin: 1.5rem auto;
}

.sudoku-wrapper-9 {
  max-width: 460px;
}

.sudoku-wrapper-5 {
  max-width: 340px;
}

.sudoku-wrapper-4 {
  max-width: 300px;
}

.sudoku-grid {
  display: grid;
  border: 3px solid var(--navy);
  background: var(--navy);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid-cols-9 {
  grid-template-columns: repeat(9, 1fr);
}

.sudoku-cell {
  background: var(--white);
  border: 1px solid #b8c0cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  aspect-ratio: 1;
  user-select: none;
  transition: background 0.15s;
}

.grid-cols-9 .sudoku-cell {
  font-size: 1.25rem;
}

.grid-cols-5 .sudoku-cell {
  font-size: 1.4rem;
}

.grid-cols-4 .sudoku-cell {
  font-size: 1.5rem;
}

.grid-cols-4 .sudoku-cell:nth-child(4n+2) {
  border-right: 2px solid var(--navy);
}

.grid-cols-4 .sudoku-cell:nth-child(n+5):nth-child(-n+8) {
  border-bottom: 2px solid var(--navy);
}

.grid-cols-9 .sudoku-cell:nth-child(9n+3),
.grid-cols-9 .sudoku-cell:nth-child(9n+6) {
  border-right: 2px solid var(--navy);
}

.grid-cols-9 .sudoku-cell:nth-child(n+19):nth-child(-n+27),
.grid-cols-9 .sudoku-cell:nth-child(n+46):nth-child(-n+54) {
  border-bottom: 2px solid var(--navy);
}

.sudoku-cell.given {
  background: #eef1f5;
  color: var(--navy);
  cursor: default;
}

.sudoku-cell.user {
  color: var(--accent);
}

.sudoku-cell.selected {
  background: #ffe0b2;
}

.sudoku-cell.correct {
  background: var(--success-bg);
  color: var(--success-text);
}

.sudoku-cell.incorrect {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.sudoku-pad {
  display: grid;
  gap: 8px;
  margin-top: 1rem;
}

.sudoku-wrapper-4 .sudoku-pad {
  grid-template-columns: repeat(5, 1fr);
}

.sudoku-wrapper-5 .sudoku-pad {
  grid-template-columns: repeat(6, 1fr);
}

.sudoku-wrapper-9 .sudoku-pad {
  grid-template-columns: repeat(5, 1fr);
}

.sudoku-pad button {
  padding: 12px 0;
  font-size: 1.15rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sudoku-pad button:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.sudoku-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.sudoku-actions button {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: opacity 0.15s;
}

.sudoku-actions button:hover {
  opacity: 0.85;
}

.btn-check {
  background: var(--success);
  color: var(--white);
}

.btn-reset {
  background: var(--navy);
  color: var(--white);
}

.btn-hint {
  background: var(--accent);
  color: var(--white);
}

/* CORRECTIF : classe .btn-regen manquante (bouton « Régénérer » du sudoku) */
.btn-regen {
  background: var(--accent);
  color: var(--white);
}

.sudoku-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  text-align: center;
  display: none;
}

.sudoku-message.info {
  display: block;
  background: #e7f1ff;
  color: var(--navy);
}

.sudoku-message.success {
  display: block;
  background: var(--success-bg);
  color: var(--success-text);
}

.sudoku-message.error {
  display: block;
  background: var(--danger-bg);
  color: var(--danger-text);
}

/* ---------- 29. ENCART « POUR ALLER PLUS LOIN » ---------- */

.go-further-box {
  background: var(--bg);
  border-left: 4px solid var(--navy);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- 30. RESPONSIVE ---------- */

@media (max-width: 900px) {
  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    display: none;
  }

  .toc {
    display: block;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15.5px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .lesson-container {
    padding: 28px 20px;
  }

  .hero {
    padding: 44px 0;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .site-header .container {
    min-height: auto;
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px;
  }

  .main-nav {
    justify-content: center;
    gap: 12px;
  }

  .main-nav a {
    margin: 0 10px;
    font-size: .9rem;
  }

  .rule-cards {
    grid-template-columns: 1fr;
  }

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

  .pull-quote {
    font-size: 1.05rem;
  }

  .venn-card {
    max-width: 100%;
  }

  .position-visual .pos-slot {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }

  .circle-visual {
    width: 160px;
    height: 160px;
  }

  .circle-visual .circle-border {
    width: 120px;
    height: 120px;
  }

  .circle-visual .circle-person {
    width: 30px;
    height: 30px;
    font-size: 0.6rem;
  }

  .demo-grid .dc {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .demo-grid.cols-4 {
    grid-template-columns: repeat(4, 34px);
  }

  .demo-grid.cols-9 {
    grid-template-columns: repeat(9, 34px);
  }

  .sudoku-pad button {
    padding: 10px 0;
    font-size: 1rem;
  }
}

/* ---------- 31. ORIENTATION DANS L'ESPACE ---------- */

.compass {
  position: relative;
  width: 150px;
  height: 150px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  margin: 1rem auto;
  background: var(--surface);
}

.compass span {
  position: absolute;
  font-weight: 700;
  color: var(--navy);
  font-size: .95rem;
}

.compass .c-n {
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.compass .c-s {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.compass .c-e {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.compass .c-o {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.compass .c-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--navy);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.compass .c-arrow {
  position: absolute;
  left: calc(50% - 2px);
  top: calc(50% - 55px);
  width: 4px;
  height: 55px;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: 50% 100%;
}

.compass .c-arrow.nord {
  transform: rotate(0deg);
}

.compass .c-arrow.est {
  transform: rotate(90deg);
}

.compass .c-arrow.sud {
  transform: rotate(180deg);
}

.compass .c-arrow.ouest {
  transform: rotate(270deg);
}

.grid-board {
  display: inline-grid;
  grid-template-columns: 30px repeat(6, 42px);
  grid-template-rows: 30px repeat(6, 42px);
  gap: 3px;
  margin: 1rem auto;
}

.grid-board .gb-head {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  font-size: .85rem;
}

.grid-board .gb-cell {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-faint);
}

.grid-board .gb-cell.start {
  background: var(--surface-2);
  border: 2px solid var(--accent);
  color: var(--accent-text);
}

.grid-board .gb-cell.end {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

@media (max-width: 600px) {
  .grid-board {
    grid-template-columns: 24px repeat(6, 34px);
    grid-template-rows: 24px repeat(6, 34px);
  }
}

/* ---------- 32. HARMONISATION : CARTES EN 2 COLONNES ---------- */

.rule-cards.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 600px) {
  .rule-cards.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- 33. INTRUS GRAPHIQUES (figures) ---------- */

.fig-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.fig-box {
  flex: 0 1 120px;
  width: 120px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 8px;
  text-align: center;
}

.fig-box svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 4px;
}

.fig-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: .8rem;
}

.dot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-content: center;
  min-height: 40px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563EB;
  display: inline-block;
}

@media (max-width: 600px) {
  .fig-box {
    flex: 0 1 100px;
    width: 100px;
  }
}

.rule-illus {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 8px;
  max-width: 100px;
}

.rule-illus.wide {
  max-width: 100%;
}

/* ---------- 34. INTRUS LETTRES (alphabet + groupes) ---------- */

.alpha-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 1rem 0;
}

.alpha-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 4px 6px;
  min-width: 30px;
}

.alpha-cell .al-letter {
  font-weight: 700;
  color: var(--headings);
  font-size: .9rem;
}

.alpha-cell .al-rank {
  font-size: .7rem;
  color: var(--accent-text);
  font-weight: 600;
}

.letter-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0;
}

.letter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 16px;
}

.letter-group .lg-letters {
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--headings);
  font-size: 1.1rem;
}

.letter-group .lg-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.lg-letters.num {
  letter-spacing: 0;
}

/* ---------- 35. DOMINOS ---------- */

.domino-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 1rem 0;
}

.domino {
  display: inline-flex;
  border: 2px solid var(--navy);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.domino-half {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 44px;
  font-weight: 700;
  color: var(--headings);
  font-size: 1.1rem;
}

.domino-half + .domino-half {
  border-left: 2px solid var(--navy);
}

.domino-half.q {
  color: var(--accent);
}

.domino-arrow {
  color: var(--text-muted);
  font-weight: 700;
}

.domino-grid {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.domino-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Dominos à points (SVG) */

.dmd {
  display: inline-block;
  vertical-align: middle;
}

.dmd svg {
  width: 36px;
  height: auto;
  display: block;
}

.dmd-half {
  display: inline-block;
  vertical-align: middle;
}

.dmd-half svg {
  width: 30px;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .dmd svg {
    width: 30px;
  }

  .dmd-half svg {
    width: 26px;
  }
}

/* Dominos inclinés + grille en croix */

.dmd.rot-45 svg {
  transform: rotate(45deg);
}

.dmd.rot-90 svg {
  transform: rotate(90deg);
}

.dmd.rot-135 svg {
  transform: rotate(135deg);
}

.dmd.rot-45,
.dmd.rot-135 {
  margin: 10px 8px;
}

.dmd.rot-90 {
  margin: 4px 10px;
}

.cross-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
  justify-content: start;
  align-items: center;
  margin: 1rem 0;
}

.cross-grid .empty {
  visibility: hidden;
}

/* Figures de dominos (croix, cercle, spirale) */

.domino-shape {
  position: relative;
  margin: 1.2rem auto;
  max-width: 100%;
}

.domino-shape .dmd {
  position: absolute;
  margin: 0;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
}

/* ---------- 36. GRILLES MASTERMIND (tables de codes) ---------- */

.question-block table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: .95rem;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
}

.question-block th,
.question-block td {
  border: 1px solid var(--border-soft);
  padding: 10px 12px;
  text-align: center;
}

.question-block th {
  background: var(--navy);
  color: #FFFFFF;
  font-weight: 600;
  font-size: .85rem;
}

.question-block td:not(:last-child) {
  font-weight: 700;
  color: var(--headings);
  background: var(--surface);
}

.question-block td:last-child {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--accent-text);
  white-space: nowrap;
}

/* ---------- 37. MATRICES ---------- */

.mat-svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: .5rem 0;
}

.mat-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: .6rem 0;
}

.mat-opt {
  text-align: center;
}

.mat-opt .lbl {
  font-weight: 700;
  color: var(--accent-text);
  font-size: .9rem;
}

.mat-board {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 10px;
  justify-content: start;
  border: 4px solid #C2185B;
  padding: 12px;
  background: #fff;
  width: max-content;
  max-width: 100%;
}

.mat-board.cols2 {
  grid-template-columns: repeat(2, auto);
}

.mat-board.cols4 {
  grid-template-columns: repeat(4, auto);
}

.optvis {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.optvis svg {
  display: block;
}

/* ---------- 39. INSTRUCTIONS : chiffre centré au-dessus de la bande ---------- */

.rule-card .rule-card-title {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: .3rem;
}

.rule-card .optvis {
  display: block;
  width: max-content;
  margin: .3rem auto .6rem;
}

/* ---------- 40. CARTES À JOUER ---------- */

.carte-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px;
  width: max-content;
  margin: 1rem 0;
}

.carte-grid.cols-4 {
  grid-template-columns: repeat(4, auto);
}

/* ---------- 41. Dominos inline dans les tests ---------- */

.dmd-inline {
  display: inline-block;
  vertical-align: middle;
  margin: 0 3px;
}

.dmd-inline svg {
  width: 30px;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .dmd-inline svg {
    width: 24px;
  }
}

/* ---------- 42. Barre collante : minuteur + progression + note ---------- */

.qe-sticky {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #F4F6F8;
  padding: .6rem 0 .7rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(26, 43, 76, .12);
}

.qe-sticky-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .4rem;
}

.qe-sticky .minuteur {
  font-size: 1.1rem;
  margin: 0;
  text-align: left;
}

.qe-note-top {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.qe-note-top.ok {
  color: var(--success);
}

.qe-note-top.ko {
  color: var(--danger);
}

@media (max-width: 600px) {
  .qe-sticky-row {
    gap: .5rem;
  }

  .qe-note-top {
    font-size: .9rem;
  }
}

/* ---------- 43. Index des tests : présentation horizontale ---------- */

.type-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-top: 1.5rem;
}

.type-card h3 {
  margin: 0 0 .3rem;
  color: var(--text);
}

.type-desc {
  margin: 0 0 .5rem;
  color: var(--text-muted, #64748B);
  font-style: italic;
}

.niveaux-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.niveau-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .9rem;
}

.niveau-block h4 {
  margin: 0 0 .6rem;
  color: var(--text);
  font-size: 1rem;
}

.tests-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.test-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.test-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.test-btn.locked {
  opacity: .55;
  cursor: not-allowed;
  background: var(--bg-alt);
  color: var(--text-muted);
}

/* ---------- 44. AJOUTS MOTEUR DE TEST ---------- */

.qe-actions {
  text-align: center;
  margin: 1.5rem 0;
}

.qe-resultat {
  text-align: center;
  margin-top: 1.5rem;
}

.qe-option-text {
  flex: 1;
  min-width: 0;
}

.qe-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: .6rem 0;
}

.qe-visuel {
  margin: .6rem 0;
  overflow-x: auto;
}

.qe-svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.qe-domino-inline {
  width: 30px;
  height: auto;
}

.options label .optvis {
  flex-shrink: 0;
}

.options label input[type="radio"]:disabled {
  cursor: not-allowed;
}

.question-block .answer {
  line-height: 1.6;
}

/* =========================================================
FIN DES SECTIONS 1 À 44 — CI-DESSOUS LE BLOC UNIQUE DE REMPLACEMENT
========================================================= */

/* ---------- 45. MATRICES — STYLE EXAMEN ---------- */
.mx-exam { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 1rem 0; }
.mx-matrix { display: grid; grid-template-columns: repeat(3, 66px); border: 2px solid #333; background: #fff; }
.mx-cell { width: 66px; height: 66px; border: 1px solid #333; display: flex; align-items: center; justify-content: center; }
.mx-cell .mat-svg, .mx-fig .mat-svg { width: 54px; }
.mx-q { color: #29B6F6; font-size: 2.1rem; font-weight: 700; }
.mx-opts { display: grid; grid-template-columns: repeat(2, auto); gap: 14px 22px; }
.mx-opt { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.mx-letter { color: #E3131B; font-weight: 700; font-size: 1.15rem; }
.mx-fig { border: 1px solid #333; background: #fff; width: 66px; height: 66px; display: flex; align-items: center; justify-content: center; }
.mx-opt.selected .mx-fig { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 121, 0, .25); }
.mx-opt.selected { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); background: var(--surface-2); }
@media (max-width: 600px) {
  .mx-matrix { grid-template-columns: repeat(3, 54px); }
  .mx-cell { width: 54px; height: 54px; }
  .mx-cell .mat-svg, .mx-fig .mat-svg { width: 44px; }
}

/* ---------- 46. DOMINOS INTERACTIFS (dmd-play) ---------- */
[data-dmd-play] { text-align: center; }
[data-dmd-play] .domino-row { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: .8rem 0; }
[data-dmd-play] .domino-row .dmd-inline svg { width: 44px; height: auto; }
.dmd-halfrow { margin: .6rem 0; text-align: center; }
.dmd-halflabel { font-weight: 600; margin-bottom: .3rem; }
.dmd-halfvals { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dmd-half { border: 1px solid #333; background: #fff; border-radius: 8px; padding: 4px; cursor: pointer; }
.dmd-half.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 121, 0, .25); }
/* CORRECTIF : la classe .half-svg n'est jamais ajoutée aux SVG par dmdHalf().
   On cible directement les SVG dans le contexte [data-dmd-play]. */
[data-dmd-play] .dmd-half svg { width: 34px; height: 34px; display: block; color: var(--text); }
.dmd-single .nz-actions, .dmd-single .nz-msg { display: none; }
.dmd-half.good { border-color: var(--success); box-shadow: 0 0 0 3px rgba(40, 167, 69, .25); }
[data-dmd-play] .dmd-half.good svg { color: var(--success); }
.dmd-half.bad { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 53, 69, .25); }
.dmd-half.bad svg.half-svg { color: var(--danger); }
.nz-btn:disabled, .sudoku-actions button:disabled, .dmd-half:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 47. CARTES : figure + propositions horizontales ---------- */
.domino-row .mat-svg { display: inline-block; vertical-align: middle; margin: 0 4px; }
.qe-cartes .domino-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 1rem 0; }
.qe-cartes .options { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
.qe-cartes .options label { flex-direction: column; align-items: center; gap: 6px; width: 130px; text-align: center; font-size: .9rem; }

/* ---------- 48. PAGE HUB : grille des tests (6 niveaux) ---------- */
.tests-partie { margin: 2.2rem 0 1rem; color: var(--headings); }
.type-block { background: #fff; border: 1px solid #e3e6ea; border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; }
.type-block h3 { margin: 0 0 .2rem; color: var(--headings); }
.type-block .type-desc { font-style: italic; color: #666; margin: 0 0 1rem; }
.levels-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.level-card { background: #f8f9fb; border: 1px solid #e3e6ea; border-radius: 10px; padding: .9rem; }
.level-card h4 { margin: 0 0 .7rem; color: var(--headings); }
.test-link { display: flex; align-items: center; gap: .5rem; border: 1px solid #cfd4da; background: #fff; border-radius: 8px; padding: .45rem .8rem; margin-bottom: .5rem; text-decoration: none; color: var(--headings); font-weight: 600; }
.test-link:hover { border-color: var(--accent); }
.test-link.locked { opacity: .55; pointer-events: none; background: #eceff2; color: #8a9099; }
@media (max-width: 1100px) { .levels-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .levels-grid { grid-template-columns: repeat(2, 1fr); } }
/* ---------- 47. TABLEAUX DE PROPORTIONNALITÉ ---------- */
.tab-prop { width: auto; margin: 1rem auto; border: 2px solid var(--navy); border-collapse: collapse; background: #fff; }
.tab-prop caption { caption-side: top; font-weight: 700; color: var(--headings); padding-bottom: .3rem; }
.tab-prop th, .tab-prop td { border: 1px solid var(--border-soft); padding: 8px 14px; text-align: center; font-weight: 600; font-size: .95rem; }
.tab-prop th { background: var(--navy); color: #fff; text-align: left; }
.tab-prop td.q { color: var(--accent); font-weight: 700; background: var(--surface-2); }

/* --- Carrés logiques (Mastermind lettres) --- */
.ml-board{display:flex;flex-direction:column;gap:10px;margin:14px 0;}
.ml-line{display:flex;align-items:center;gap:12px;}
.ml-cells{display:flex;}
.ml-cell{width:34px;height:34px;display:flex;align-items:center;justify-content:center;
  border:2px solid #C2185B;color:#C2185B;font-weight:700;background:#fff;margin-right:-2px;}
.ml-clue{color:#C2185B;font-weight:600;font-size:.95rem;}
.ml-sol{display:flex;align-items:center;gap:10px;margin-top:8px;}
.ml-label{color:var(--text-muted);}

/* ---------- 50. LIEN DE NAVIGATION MIS EN AVANT ---------- */

.nav-highlight {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 6px 16px !important;
  border-radius: var(--radius);
  font-weight: 700;
}

.nav-highlight:hover {
  background: var(--accent-dark) !important;
  color: #fff !important;
  text-decoration: none;
}

/* ---------- 51. PAGE PSYCHOTECHNIQUES — CARTES DE TESTS ---------- */

.type-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.type-card h3 {
  margin-top: 0;
}

.type-desc {
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 1rem;
}

.niveaux-grid {
  display: grid;
  gap: 1rem;
}

.niveau-block {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.niveau-block h4 {
  font-size: .9rem;
  text-transform: capitalize;
  color: var(--headings);
  margin: 0 0 .6rem;
}

.tests-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.test-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--navy);
  transition: background .15s, border-color .15s;
}

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

.test-btn.locked {
  background: #f0f0f0;
  border-color: #ddd;
  color: #aaa;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- 52. ZONE STICKY MOTEUR DE TEST ---------- */

.qe-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1.5rem;
}

.qe-sticky-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.qe-note-top {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.qe-note-top.ok {
  color: var(--success);
}

.qe-note-top.ko {
  color: var(--danger);
}

.qe-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  align-items: center;
}

.qe-resultat {
  margin-top: 2rem;
  text-align: center;
}

/* ---------- 53. IMAGES & VISUELS DE QUESTIONS ---------- */

.qe-image {
  max-width: 300px;
  margin: .5rem 0 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}

.qe-visuel {
  margin: .5rem 0 1rem;
}

.optvis {
  display: inline-flex;
  vertical-align: middle;
}

.qe-option-text {
  margin-left: 4px;
}

.carte-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mat-board {
  display: grid;
  gap: 4px;
  margin: .5rem 0 1rem;
}

.mx-exam {
  margin: .5rem 0 1rem;
}

.mx-matrix {
  display: grid;
  gap: 4px;
  margin-bottom: 1rem;
}

.mx-cell {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.mx-q {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.mx-opts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mx-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s;
}

.mx-opt:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.mx-opt.selected {
  border-color: var(--accent);
  background: var(--surface-2);
}

.mx-opt.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.mx-opt.incorrect {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.mx-letter {
  font-weight: 700;
  color: var(--headings);
  font-size: .85rem;
}

.dmd-inline {
  display: inline-block;
  vertical-align: middle;
}

.dmd-inline svg {
  width: 36px;
  height: auto;
}

/* ---------- 54. NZ (cases à noircir) interactives ---------- */

.nz-grid {
  display: grid;
  width: max-content;
  margin: 0 auto;
  gap: 2px;
  background: var(--navy);
  border: 3px solid var(--navy);
  border-radius: 4px;
  padding: 2px;
}

.nz-clue {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--headings);
  background: var(--surface);
  min-width: 34px;
}

.nz-clue.nz-row {
  flex-direction: row;
  gap: 4px;
}

.nz-clue span {
  line-height: 1.1;
}

.nz-cell {
  width: 34px;
  height: 34px;
  border: none;
  background: #fff;
  cursor: pointer;
  border-radius: 2px;
  transition: background .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nz-cell.black {
  background: var(--navy);
}

.nz-cell:disabled {
  cursor: default;
}

.nz-cell.cross::before {
  content: "\2715";
  color: var(--danger);
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.nz-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.nz-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s;
}

.nz-btn.btn-check { background: var(--success); color: #fff; border-color: var(--success); }
.nz-btn.btn-hint  { background: var(--accent); color: #fff; border-color: var(--accent); }
.nz-btn.btn-reset-nz { background: var(--navy); color: #fff; border-color: var(--navy); }
.nz-btn.btn-regen { background: var(--accent); color: #fff; border-color: var(--accent); }
.nz-btn:hover { opacity: .85; }

.nz-msg {
  text-align: center;
  margin-top: .75rem;
  font-size: .9rem;
  font-weight: 600;
  min-height: 1.2rem;
}

/* ---------- 55. DOMINOS INTERACTIFS (dmd-play) ---------- */

.dmd-halfrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: .5rem 0;
}

.dmd-halflabel {
  font-weight: 600;
  color: var(--headings);
  font-size: .9rem;
  white-space: nowrap;
}

.dmd-halfvals {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dmd-half {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dmd-half svg {
  width: 34px;
  height: auto;
}

.dmd-half.selected {
  border-color: var(--accent);
  background: var(--surface-2);
}

.dmd-half.good {
  border-color: var(--success);
  background: var(--success-bg);
}

.dmd-half.bad {
  border-color: var(--danger);
  background: var(--danger-bg);
}

/* ---------- 56. RESPONSIVE — FORMULAIRES ---------- */

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .pricing-card .price {
    font-size: 1.8rem;
  }

  .qe-sticky-row {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }
}

/* ===== quiz-engine v9 — questions ouvertes & sujets de réflexion ===== */
.qe-textarea {
  width: 100%;
  min-height: 96px;
  padding: .75rem .9rem;
  font: inherit;
  font-size: .98rem;
  line-height: 1.55;
  color: var(--text, #1f2937);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  resize: vertical;
}

.qe-textarea:focus {
  outline: none;
  border-color: var(--primary, #1d4ed8);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}

.qe-textarea:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.qe-problematique {
  margin: .35rem 0 .6rem;
  padding: .6rem .8rem;
  background: #eef2ff;
  border-left: 3px solid #6366f1;
  border-radius: 6px;
}

.qe-canevas {
  margin: .35rem 0 .6rem;
  padding-left: 1.25rem;
}

.qe-canevas li {
  margin-bottom: .55rem;
}

.qe-a-corriger {
  display: inline-block;
  margin-top: .4rem;
  padding: .35rem .65rem;
  font-size: .9rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
}

.minuteur.sans-limite {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.qe-note-top.a-corriger {
  color: #92400e;
  background: #fef3c7;
}

/* =========================================================================
   Phase 2 — pages d'index des tests (tests/<matiere>/index.html)
   ========================================================================= */
.test-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 760px) { .test-grid { grid-template-columns: 1fr 1fr; } }
.test-card {
  background: var(--bg, #fff);
  border: 1px solid var(--border-light, #e8ecef);
  border-radius: var(--radius-md, 12px);
  padding: var(--space-4);
  box-shadow: 0 1px 2px rgba(16, 15, 40, .05);
}
.test-card--examen { border-color: var(--primary); box-shadow: 0 8px 28px rgba(86, 36, 208, .12); }
.test-card__head { display: flex; gap: .6rem; align-items: flex-start; flex-wrap: wrap; }
.test-card__head h3 { margin: 0; font-size: 1rem; flex: 1 1 auto; line-height: 1.35; }
.test-card__num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 2.2rem; padding: 0 .35rem;
  border-radius: var(--radius-sm, 6px);
  background: rgba(86, 36, 208, .1); color: var(--primary);
  font-weight: 700; font-size: .9rem;
}
.test-card__meta { color: var(--text-light); font-size: .85rem; margin: .55rem 0 .85rem; }
.test-card__actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.test-state { font-size: .74rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; white-space: nowrap; }
.test-state.is-done { background: rgba(10, 146, 31, .12); color: var(--success, #0a921f); }
.test-state.is-todo { background: rgba(86, 36, 208, .1); color: var(--primary); }
.test-niveaux { display: grid; gap: .6rem; margin-bottom: .9rem; }
.test-niveau { display: grid; gap: .35rem; font-size: .85rem; }
.test-niveau strong { text-transform: capitalize; color: var(--text-light); font-size: .8rem; }
.test-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.test-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid var(--border-light, #e8ecef);
  border-radius: 999px; padding: .3rem .7rem;
  font-size: .8rem; text-decoration: none; color: var(--text);
  background: var(--bg, #fff);
}
.test-chip:hover { border-color: var(--primary); color: var(--primary); }
a[data-quiz-id].is-locked, a.test-chip.is-locked { opacity: .65; cursor: not-allowed; pointer-events: none; }
.test-score { font-size: .72rem; font-weight: 700; color: var(--success, #0a921f); }

/* ===== Module Examen final (tableau-de-bord/examen.html) ===== */
.exam-vue[hidden] { display: none !important; }
.exam-conditions { display: grid; gap: var(--space-4, 1rem); margin: var(--space-4, 1rem) 0; }
.exam-consignes-liste { margin: var(--space-3, .75rem) 0 var(--space-3, .75rem) var(--space-5, 1.5rem); }
.exam-consignes-liste li { margin-bottom: .35rem; }
.exam-epreuves { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3, .75rem); margin: var(--space-4, 1rem) 0; }
.exam-epreuve { display: flex; flex-direction: column; gap: .3rem; padding: var(--space-3, .75rem); border: 1px solid var(--border-light, #e8ecef); border-radius: 12px; background: var(--bg, #fff); }
.exam-acceptation { display: flex; gap: .6rem; align-items: flex-start; margin: var(--space-4, 1rem) 0; font-weight: 600; cursor: pointer; }
.exam-acceptation input { margin-top: .2rem; }
.exam-barre { display: flex; flex-wrap: wrap; gap: var(--space-4, 1rem); align-items: center; justify-content: space-between; margin-bottom: var(--space-3, .75rem); }
.exam-etapes { display: flex; flex-wrap: wrap; gap: var(--space-3, .75rem); list-style: none; padding: 0; margin: 0; }
.exam-etapes li { display: flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--text-light, #6b7280); }
.exam-etapes li.encours { color: var(--primary, #5624d0); font-weight: 700; }
.exam-etapes li.fait { color: var(--success, #0a921f); }
.exam-etapes__num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--bg, #fff); border: 1px solid var(--border-light, #e8ecef); align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; }
.exam-etapes li.encours .exam-etapes__num { background: var(--primary, #5624d0); border-color: var(--primary, #5624d0); color: #fff; }
.exam-minuteur { text-align: right; }
.exam-minuteur .minuteur { font-size: 1.4rem; }
.exam-minuteur .minuteur.ko { color: #c62828; }
.exam-alerte { margin: var(--space-3, .75rem) 0; padding: var(--space-3, .75rem) var(--space-4, 1rem); border-radius: 10px; background: #fff4e5; border: 1px solid #f0b357; color: #8a5300; font-weight: 600; }
.exam-nav { display: flex; flex-wrap: wrap; gap: var(--space-3, .75rem); align-items: center; justify-content: space-between; margin: var(--space-4, 1rem) 0; padding-top: var(--space-3, .75rem); border-top: 1px solid var(--border-light, #e8ecef); }
.exam-ae-axes { display: grid; gap: var(--space-3, .75rem); margin: var(--space-3, .75rem) 0; }
.exam-ae-axe { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3, .75rem); font-weight: 600; }
.exam-ae-axe select { padding: .4rem .6rem; border: 1px solid var(--border-light, #e8ecef); border-radius: 8px; font: inherit; }
.exam-resultat-global { text-align: center; padding: var(--space-3, .75rem) 0 var(--space-2, .5rem); }
.exam-table { width: 100%; border-collapse: collapse; margin-top: var(--space-3, .75rem); }
.exam-table th, .exam-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--border-light, #e8ecef); text-align: left; font-size: .92rem; }
.exam-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-light, #6b7280); }
.exam-table .exam-note { font-weight: 700; white-space: nowrap; }
.exam-ok { color: var(--success, #0a921f); font-weight: 700; }
.exam-ko { color: #c62828; font-weight: 700; }
.cta-button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ===========================================================
   PHASE 3 — Remarque #6 (titres) + Priorité 5 / captures 14-16
   =========================================================== */

/* --- Remarque #6 : titres réduits (leçons et tests) --- */
.lesson-container h1 { font-size: 1.5rem; line-height: 1.3; }
.lesson-container h2 { font-size: 1.25rem; }
.lesson-container h3 { font-size: 1rem; }

/* --- Priorité 5 : logo navbar jamais souligné --- */
.logo, .logo:visited, .logo:hover, .logo:focus { text-decoration: none; }

/* --- Capture 14 : contour visible du bouton de validation --- */
.cta-button {
  display: inline-block;
  background: var(--primary);
  color: #FFFFFF;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 11px 26px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.cta-button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #FFFFFF;
  text-decoration: none;
}

/* =========================================================================
   Phase 3 — Remarque #10 : les tests présentés comme « Programme complet »
   ========================================================================= */
#tests-lecons .test-grid { grid-template-columns: 1fr; gap: 10px; }
#tests-lecons .test-grid [data-lessons-toggle] { order: 99; grid-column: 1 / -1; justify-self: center; margin-top: .35rem; }
#tests-lecons .test-card { padding: 14px 18px; }
#tests-lecons .test-card__head { align-items: center; }
#tests-lecons .test-card__meta { margin: .4rem 0 .7rem; }
#tests-lecons .test-card__actions .badge { margin-right: .4rem; }

/* =========================================================================
   Regroupement psychotechniques — structure de tests/psychotechniques/banque/index.json
   ========================================================================= */
.psycho-parties { display: grid; gap: var(--space-6); }
.psycho-partie__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-light);
}
.psycho-partie__titre { margin: 0; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dark, inherit); }
.psycho-partie__meta { font-size: .85rem; color: var(--text-light); white-space: nowrap; }

/* =========================================================================
   Phase 3 — Remarques #2 (navigation), #4 (refaire), #5 (auto-évaluation)
   ========================================================================= */
.qe-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nav-btn--verrou { opacity: .65; cursor: not-allowed; }
.nav-btn--fin { opacity: .75; cursor: default; border-style: dashed; }
.qe-nav-hint { min-height: 1.2em; margin: .4rem 0 0; color: var(--accent); font-size: .9rem; font-weight: 600; }

.qe-refaire-ligne { margin: 14px 0 6px; }
.qe-refaire-ligne .cta-button { font-size: .95rem; padding: 10px 20px; }

.qe-mc-titre { margin: 12px 0 6px; }
.qe-mc { margin: 0 0 8px; }
.qe-mc span {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 9px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: .85rem;
}
.qe-mc-ok { background: rgba(10, 146, 31, .10); border-color: var(--success, #0a921f) !important; color: var(--success, #0a921f); font-weight: 600; }
.qe-mc-ko { background: rgba(242, 101, 34, .10); border-color: var(--accent) !important; color: var(--accent); }

.qe-autoeval {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}
.qe-ae-titre { margin: 0 0 8px; }
.qe-ae-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  font-size: .95rem;
  line-height: 1.35;
}
.qe-ae-ligne select {
  flex: 0 0 auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  background: #fff;
}
.qe-ae-note { margin: 0; font-weight: 700; }

/* ---------- 57. PHASE 5 — MODE MIXTE (3 tests × 20 questions) ---------- */

.qe-cache {
  display: none !important;
}

.qe-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.25rem 0 .35rem;
}
.qe-tab {
  flex: 1 1 190px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  transition: border-color .15s, background .15s, color .15s;
}
.qe-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.qe-tab.active {
  background: #ffffff;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 9px 13px;
}
.qe-tab.locked {
  opacity: .65;
  cursor: not-allowed;
}
.qe-tab.locked:hover {
  border-color: var(--border);
  color: var(--text);
}
.qe-tab-etat {
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-muted);
}
.qe-tab-etat.ok { color: var(--success); }
.qe-tab-etat.ko { color: var(--danger); }
.qe-tab-etat.verrou { color: var(--danger); }

.qe-tabs-hint {
  min-height: 1.2em;
  margin: .25rem 0 .75rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--danger);
}

.qe-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 1rem;
  background: var(--navy);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.qe-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .16);
}
.qe-timer.warning {
  background: var(--warning);
  animation: clignote 1s infinite;
}
.qe-timer.critical {
  background: var(--danger);
  animation: clignote .5s infinite;
}
.qe-timer.sans-limite {
  font-size: .95rem;
  opacity: .85;
}
.qe-stats .qe-note-top {
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.qe-stats .qe-note-top:empty { display: none; }
.qe-stats .qe-note-top.ok { background: var(--success); }
.qe-stats .qe-note-top.ko { background: var(--danger); }

.qe-msg-verrou {
  padding: 14px 18px;
  margin-bottom: 1rem;
  background: var(--warning-bg);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text);
}

#qe-quiz .question-block {
  background: #ffffff;
}
.qe-explication {
  display: none;
  margin-top: 1rem;
  padding: 12px 16px;
  background: var(--info-bg);
  color: var(--info-text);
  border-left: 4px solid var(--info);
  border-radius: var(--radius-sm);
  font-size: .95rem;
}

.qe-navbtns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.qe-navbtns button {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #ffffff;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
}
.qe-navbtns button:disabled {
  opacity: .4;
  cursor: default;
}
.qe-navbtns button.check { background: var(--accent); }
.qe-navbtns button.check:disabled { background: var(--text-faint); }
.qe-navbtns .qe-lien-retour {
  align-self: center;
  margin-left: auto;
  padding: 10px 4px;
  font-weight: 600;
  color: var(--primary);
}
.qe-navbtns .qe-lien-retour:hover { text-decoration: underline; }

.qe-resultat {
  display: none;
  margin-top: 1.5rem;
  padding: 18px 22px;
  background: var(--navy);
  color: #ffffff;
  border-radius: var(--radius-md);
  text-align: center;
}
.qe-resultat.ok { background: var(--success); }
.qe-resultat.ko { background: var(--danger); }
.qe-res-titre {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .85;
}
.qe-res-score {
  font-size: 2.4rem;
  font-weight: 800;
  margin: .3rem 0;
}
.qe-res-note { font-size: 1.05rem; opacity: .95; }
.qe-res-temps, .qe-res-suite { margin: .75rem 0 0; font-weight: 600; }

@media (max-width: 640px) {
  .qe-tab { flex-basis: 100%; }
  .qe-res-score { font-size: 2rem; }
  .qe-stats { font-size: .92rem; }
}
