/* ═══════════════════════════════════════════════════════════
   ANGLAIS-PRATIQUE.ONLINE — Design System v2 (Duolingo-style)
   Stack : PHP 8.2 · MySQL · Vanilla JS · CSS3 Pure
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Couleurs principales */
  --green:       #58CC02;
  --green-dark:  #46A302;
  --green-light: #89E219;
  --green-bg:    #D7FFB8;

  --blue:        #1CB0F6;
  --blue-dark:   #0A91D1;
  --blue-bg:     #DDF4FF;

  --orange:      #FF9600;
  --orange-dark: #E08600;
  --orange-bg:   #FEEBCC;

  --red:         #FF4B4B;
  --red-dark:    #CC3B3B;
  --red-bg:      #FFD7D7;

  --purple:      #CE82FF;
  --purple-dark: #A56AD4;
  --purple-bg:   #F1D9FF;

  --yellow:      #FFC800;

  /* Fond & texte */
  --bg:          #FFFFFF;
  --bg-gray:     #F7F7F7;
  --bg-gray2:    #EBEBEB;
  --border:      #E5E5E5;
  --border2:     #CCCCCC;

  --text:        #3C3C3C;
  --text-muted:  #6E6E6E;
  --text-light:  #AFAFAF;

  /* Typographie */
  --font:        'DIN Round Pro', 'Nunito', 'Trebuchet MS', sans-serif;
  --font-display:'Poppins', var(--font);

  /* Rayons */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-2xl: 32px;

  /* Ombres */
  --shadow:    0 2px 0 rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);

  --transition: all .2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html   { scroll-behavior: smooth; font-size: 16px; }
body   { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }
img    { max-width: 100%; }
a      { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-dark); }
ul     { list-style: none; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@700;800;900&display=swap');

/* ── Typographie ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p  { color: var(--text-muted); }

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
section    { padding: 70px 0; }
main       { min-height: calc(100vh - 160px); }

/* ── Boutons (style 3D Duolingo) ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.8rem;
  border-radius: var(--r-2xl);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  border-bottom: 4px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(2px); border-bottom-width: 2px; }

.btn-green  { background: var(--green);  border-bottom-color: var(--green-dark);  color: #fff; }
.btn-green:hover  { background: #64d800; color: #fff; }
.btn-blue   { background: var(--blue);   border-bottom-color: var(--blue-dark);   color: #fff; }
.btn-blue:hover   { background: #2fc1ff; color: #fff; }
.btn-orange { background: var(--orange); border-bottom-color: var(--orange-dark); color: #fff; }
.btn-outline { background: #fff; border: 2px solid var(--border2); border-bottom: 4px solid var(--border2); color: var(--text); }
.btn-outline:hover { background: var(--bg-gray); color: var(--text); }
.btn-ghost  { background: transparent; border: 2px solid var(--blue); border-bottom: 4px solid var(--blue); color: var(--blue); }
.btn-ghost:hover { background: var(--blue-bg); }
.btn-red    { background: var(--red); border-bottom-color: var(--red-dark); color: #fff; }
.btn-sm     { padding: .55rem 1.2rem; font-size: .82rem; border-bottom-width: 3px; }
.btn-lg     { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: default; transform: none !important; }

/* Alias legacy */
.btn-primary   { background: var(--green);  border-bottom-color: var(--green-dark);  color: #fff; }
.btn-primary:hover { background: #64d800; color:#fff; }
.btn-secondary { background: #fff; border: 2px solid var(--border2); border-bottom: 4px solid var(--border2); color: var(--text); }
.btn-secondary:hover { background: var(--bg-gray); color:var(--text); }
.btn-accent    { background: var(--orange); border-bottom-color: var(--orange-dark); color: #fff; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  padding: 0;
  height: 64px;
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon-wrap {
  width: 40px;
  height: 40px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.logo-text { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; color: var(--text); }
.logo-accent { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
  justify-content: center;
}
.nav-link {
  padding: .5rem .85rem;
  border-radius: var(--r-md);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-light);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: .3rem;
  text-decoration: none;
}
.nav-link:hover { background: var(--bg-gray); color: var(--text-muted); }
.nav-link.active { color: var(--blue); border-bottom: 3px solid var(--blue); border-radius: 0; }

.nav-stats {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.nav-stat {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: default;
}
.nav-stat .icon { font-size: 1.1rem; }
.nav-stat.streak { color: var(--orange); }
.nav-stat.hearts { color: var(--red); }
.nav-stat.xp     { color: var(--blue); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: var(--transition); }

/* ── Navbar Dropdown ───────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.nav-caret {
  font-size: .65rem;
  transition: transform .2s ease;
  display: inline-block;
}
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown.active > .nav-dropdown-toggle { color: var(--blue); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  z-index: 999;
  animation: dropDown .15s ease;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }

@keyframes dropDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .9rem;
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-dropdown-item:hover { background: var(--bg-gray); color: var(--text); }
.nav-dropdown-item.active { color: var(--blue); background: var(--blue-bg); }

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(180deg, #fff 0%, #f0fff0 100%);
  padding: 80px 0 60px;
  border-bottom: 2px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: .3rem .8rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero h1 span { color: var(--green); }
.hero-desc { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.8rem; max-width: 420px; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-lang-hint { font-size: .82rem; color: var(--text-light); }

/* Mascot / Visual */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.mascot-svg {
  width: 180px;
  filter: drop-shadow(0 12px 24px rgba(88,204,2,.25));
  animation: mascotFloat 3s ease-in-out infinite;
}
@keyframes mascotFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* Floating cards */
.hero-float {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: .7rem 1rem;
  font-size: .85rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  position: absolute;
  white-space: nowrap;
  animation: floatPop .6s ease forwards;
}
.hero-float-1 { top: 0;   right: -20px; color: var(--green); }
.hero-float-2 { bottom: 0; left: -20px; color: var(--orange); }
@keyframes floatPop { from { opacity:0;transform:scale(.8); } to { opacity:1;transform:scale(1); } }

/* ── Language Selector Cards ────────────────────────────────── */
.lang-selector {
  padding: 50px 0;
  background: var(--bg-gray);
  border-bottom: 2px solid var(--border);
}
.lang-selector h2 { text-align: center; margin-bottom: .5rem; }
.lang-selector > .container > p { text-align: center; margin-bottom: 2rem; }
.lang-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 640px;
  margin: 0 auto;
}
.lang-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #fff;
  border: 2px solid var(--border);
  border-bottom: 5px solid var(--border2);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}
.lang-card:hover { border-color: var(--green); border-bottom-color: var(--green-dark); transform: translateY(-3px); color: var(--text); }
.lang-card.selected { border-color: var(--green); background: var(--green-bg); }
.lang-flag { font-size: 2.5rem; flex-shrink: 0; }
.lang-info strong { display: block; font-size: 1rem; font-weight: 800; }
.lang-info span   { font-size: .82rem; color: var(--text-light); }

/* ── Features ───────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  text-align: center;
  padding: 2rem 1.2rem;
}
.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}
.feature-icon.green  { background: var(--green-bg); }
.feature-icon.blue   { background: var(--blue-bg); }
.feature-icon.orange { background: var(--orange-bg); }
.feature-icon.red    { background: var(--red-bg); }
.feature-icon.purple { background: var(--purple-bg); }
.feature-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.feature-card p  { font-size: .85rem; }

/* ── Section header ─────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green);
  margin-bottom: .5rem;
}
.section-header h2 { margin-bottom: .6rem; }
.section-header p  { max-width: 500px; margin: 0 auto; }

/* ── Stats ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  text-align: center;
}
.stat-card { padding: 1.5rem; }
.stat-num  { font-family: var(--font-display); font-size: 2.4rem; font-weight: 900; color: var(--green); }
.stat-label { font-size: .85rem; color: var(--text-muted); margin-top: .3rem; }

/* ═══════════════════════════════════════════════════════════
   PRACTICE ENGINE (page pratique — cœur du site)
   ═══════════════════════════════════════════════════════════ */

/* Barre supérieure d'une leçon */
.lesson-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.25rem;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 64px;
  z-index: 100;
}
.lesson-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
  flex-shrink: 0;
  padding: .3rem;
  border-radius: 50%;
  transition: var(--transition);
}
.lesson-close:hover { background: var(--bg-gray); color: var(--text); }
.lesson-progress-bar {
  flex: 1;
  height: 18px;
  background: var(--bg-gray2);
  border-radius: 10px;
  overflow: hidden;
}
.lesson-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 10px;
  transition: width .5s ease;
}
.hearts-display {
  display: flex;
  gap: .25rem;
  flex-shrink: 0;
}
.heart {
  font-size: 1.2rem;
  transition: all .3s;
}
.heart.lost { opacity: .25; filter: grayscale(1); transform: scale(.8); }
.xp-display {
  font-size: .85rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

/* Zone d'exercice */
.practice-wrap {
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 6rem;
}

.exercise-card {
  width: 100%;
  max-width: 640px;
  animation: exIn .3s ease;
}
@keyframes exIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

.ex-type-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  margin-bottom: 1.2rem;
}
.ex-question {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .6rem;
  line-height: 1.3;
}
.ex-source {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .4rem;
  background: var(--bg-gray);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.ex-source.rtl { direction: rtl; font-size: 2rem; }
.ex-audio-btn  {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: .3rem;
  border-radius: 50%;
  transition: var(--transition);
  flex-shrink: 0;
}
.ex-audio-btn:hover { background: var(--border); }

/* Options à choix multiple */
.mc-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 1.5rem;
}
.mc-option {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border: 2px solid var(--border2);
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-lg);
  background: #fff;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
  text-align: left;
}
.mc-option:hover { border-color: var(--blue); background: var(--blue-bg); }
.mc-option.selected { border-color: var(--blue); background: var(--blue-bg); }
.mc-option.correct  { border-color: var(--green); background: var(--green-bg); color: var(--green-dark); }
.mc-option.wrong    { border-color: var(--red); background: var(--red-bg); color: var(--red-dark); }
.mc-option:disabled { cursor: default; }
.mc-letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  flex-shrink: 0;
  opacity: .6;
}
.mc-option.correct .mc-letter, .mc-option.wrong .mc-letter { opacity: 1; }

/* Input traduction */
.translate-input {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  font-family: var(--font);
  font-weight: 600;
  border: 2px solid var(--border2);
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-lg);
  outline: none;
  transition: var(--transition);
  color: var(--text);
}
.translate-input:focus      { border-color: var(--blue); }
.translate-input.correct    { border-color: var(--green); background: var(--green-bg); }
.translate-input.wrong      { border-color: var(--red);   background: var(--red-bg); }

/* Word order */
.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
  min-height: 50px;
  padding: .75rem;
  background: var(--bg-gray);
  border: 2px dashed var(--border2);
  border-radius: var(--r-lg);
}
.word-tile {
  padding: .5rem .9rem;
  background: #fff;
  border: 2px solid var(--border2);
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-md);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  color: var(--text);
}
.word-tile:hover { border-color: var(--blue); background: var(--blue-bg); }
.word-tile.used  { opacity: .3; cursor: default; pointer-events: none; }
.word-tile.correct { border-color: var(--green); background: var(--green-bg); color: var(--green-dark); }
.word-tile.wrong   { border-color: var(--red);   background: var(--red-bg);   color: var(--red-dark); }

.answer-track {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  min-height: 54px;
  padding: .75rem;
  border: 2px solid var(--border2);
  border-radius: var(--r-lg);
  margin-top: .75rem;
  background: #fff;
}
.answer-track:empty::after { content: 'Cliquez les mots pour les placer ici…'; color: var(--text-light); font-size: .85rem; }

/* Fill blank */
.fill-sentence {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--text);
  margin: 1.5rem 0;
}
.blank-input {
  display: inline-block;
  width: 120px;
  border: none;
  border-bottom: 3px solid var(--blue);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  outline: none;
  background: transparent;
  text-align: center;
  padding: .2rem .4rem;
}

/* ── Barre inférieure (Vérifier / Continuer) ────────────────── */
.lesson-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border-top: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 200;
}
.lesson-footer.correct-state { background: var(--green-bg); border-top-color: var(--green); }
.lesson-footer.wrong-state   { background: var(--red-bg);   border-top-color: var(--red); }

.feedback-msg {
  display: none;
  align-items: center;
  gap: .75rem;
  font-size: 1rem;
  font-weight: 700;
}
.feedback-msg.show { display: flex; }
.feedback-msg.correct-state { color: var(--green-dark); }
.feedback-msg.wrong-state   { color: var(--red-dark); }
.feedback-explanation { font-size: .85rem; font-weight: 400; color: var(--text-muted); }

.verify-btn {
  min-width: 180px;
  background: var(--bg-gray2);
  border: none;
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-2xl);
  padding: .9rem 2rem;
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-light);
  cursor: default;
  transition: var(--transition);
}
.verify-btn.active {
  background: var(--green);
  border-bottom-color: var(--green-dark);
  color: #fff;
  cursor: pointer;
}
.verify-btn.active:hover  { background: #64d800; }
.verify-btn.active:active { transform: translateY(2px); border-bottom-width: 2px; }
.verify-btn.continue { background: var(--green); border-bottom-color: var(--green-dark); color: #fff; cursor: pointer; }
.verify-btn.skip { background: none; border: 2px solid var(--border2); border-bottom: 4px solid var(--border2); color: var(--text-muted); cursor: pointer; margin-right: auto; }

/* ── Écran de fin ────────────────────────────────────────────── */
.completion-screen {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 1.5rem;
  animation: exIn .4s ease;
}
.completion-trophy { font-size: 5rem; margin-bottom: 1rem; animation: trophyPop .6s ease; }
@keyframes trophyPop { from { transform: scale(0); } 80% { transform: scale(1.15); } to { transform: scale(1); } }
.completion-title { font-size: 2rem; font-weight: 900; color: var(--text); margin-bottom: .5rem; }
.completion-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.completion-stat { padding: 1.2rem; border: 2px solid var(--border); border-radius: var(--r-lg); }
.completion-stat .val { font-size: 2rem; font-weight: 900; }
.completion-stat .lbl { font-size: .8rem; color: var(--text-light); margin-top: .2rem; }
.completion-stat.xp   .val { color: var(--blue); }
.completion-stat.acc  .val { color: var(--green); }
.completion-stat.time .val { color: var(--orange); }

/* ═══════════════════════════════════════════════════════════
   PRACTICE HOMEPAGE (choose topic)
   ═══════════════════════════════════════════════════════════ */
.skill-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1.25rem;
  max-width: 480px;
  margin: 0 auto;
}
.skill-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}
.skill-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  text-decoration: none;
}
.skill-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: none;
  border-bottom: 5px solid transparent;
  transition: var(--transition);
  position: relative;
}
.skill-btn.green  { background: var(--green);  border-bottom-color: var(--green-dark); }
.skill-btn.blue   { background: var(--blue);   border-bottom-color: var(--blue-dark); }
.skill-btn.orange { background: var(--orange); border-bottom-color: var(--orange-dark); }
.skill-btn.purple { background: var(--purple); border-bottom-color: var(--purple-dark); }
.skill-btn.locked { background: var(--bg-gray2); border-bottom-color: var(--border2); filter: grayscale(1); cursor: default; }
.skill-node:hover .skill-btn:not(.locked) { transform: scale(1.08); }
.skill-node:active .skill-btn { transform: translateY(3px); border-bottom-width: 2px; }
.skill-label { font-size: .78rem; font-weight: 700; color: var(--text-muted); text-align: center; max-width: 80px; }
.skill-stars { font-size: .7rem; color: var(--yellow); }
.skill-progress-ring {
  position: absolute;
  top: -4px; left: -4px;
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 4px solid var(--bg-gray2);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   BADGES / TOASTS / UTILS
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-green  { background: var(--green-bg);  color: var(--green-dark); }
.badge-blue   { background: var(--blue-bg);   color: var(--blue-dark); }
.badge-orange { background: var(--orange-bg); color: var(--orange-dark); }
.badge-red    { background: var(--red-bg);    color: var(--red-dark); }
.badge-purple { background: var(--purple-bg); color: var(--purple-dark); }

/* Legacy badge support */
.badge-beginner     { background: var(--green-bg);  color: var(--green-dark); }
.badge-intermediate { background: var(--blue-bg);   color: var(--blue-dark); }
.badge-advanced     { background: var(--purple-bg); color: var(--purple-dark); }

/* XP Toast */
.xp-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--blue);
  color: #fff;
  border-radius: 30px;
  padding: .6rem 1.4rem;
  font-weight: 700;
  font-size: .9rem;
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 500;
}
.xp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Streak toast */
.streak-banner {
  background: linear-gradient(135deg, var(--orange), #FF6D00);
  color: #fff;
  text-align: center;
  padding: .75rem;
  font-weight: 700;
  font-size: .9rem;
  display: none;
}

/* ─── Cours / Blog (pages existantes) ──────────────────────── */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.course-card  { display: flex; flex-direction: column; gap: .75rem; }
.course-card h3 { font-size: 1rem; }
.course-card-header { display: flex; justify-content: space-between; align-items: center; }
.course-icon { font-size: 2rem; }

.blog-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.post-card  { display: flex; flex-direction: column; gap: .6rem; }
.post-thumbnail { font-size: 2.5rem; padding: 1.5rem; background: var(--bg-gray); border-radius: var(--r-md); text-align: center; }
.post-meta  { display: flex; gap: .5rem; align-items: center; }
.post-date  { font-size: .75rem; color: var(--text-light); }
.read-more  { color: var(--green); font-weight: 700; font-size: .88rem; margin-top: auto; }

/* ─── CTA Section ────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--green) 0%, #3dae00 100%);
  text-align: center;
  padding: 80px 1.25rem;
}
.cta-section h2 { color: #fff; margin-bottom: .75rem; }
.cta-section p  { color: rgba(255,255,255,.85); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-actions    { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Dashboard ──────────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
.dash-sidebar   { display: flex; flex-direction: column; gap: 1rem; }
.dash-avatar    { width: 80px; height: 80px; border-radius: 50%; background: var(--green-bg); font-size: 2.5rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.dash-stat-row  { display: flex; justify-content: space-around; text-align: center; }
.dash-stat-val  { font-weight: 900; font-size: 1.5rem; }
.dash-stat-lbl  { font-size: .75rem; color: var(--text-light); }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group    { margin-bottom: 1.25rem; }
.form-label    { display: block; font-size: .85rem; font-weight: 700; color: var(--text-muted); margin-bottom: .4rem; }
.form-input    { width: 100%; padding: .8rem 1rem; border: 2px solid var(--border2); border-radius: var(--r-lg); font-size: .95rem; font-family: var(--font); outline: none; transition: var(--transition); color: var(--text); background: var(--bg); }
.form-input:focus { border-color: var(--blue); }

/* ─── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg-gray);
  border-top: 2px solid var(--border);
  padding: 50px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-brand p { font-size: .85rem; color: var(--text-muted); margin: 1rem 0; }
.footer-col h4 { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin-bottom: 1rem; }
.footer-col ul  { display: flex; flex-direction: column; gap: .5rem; }
.footer-col li a { font-size: .85rem; color: var(--text-muted); }
.footer-col li a:hover { color: var(--green); }
.footer-bottom {
  border-top: 2px solid var(--border);
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--text-light);
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom p { color: var(--text-light); font-size: .8rem; }
.footer-bottom strong { color: var(--text-muted); }
.footer-bottom-links { display: flex; align-items: center; gap: .5rem; }
.footer-bottom-links a { color: var(--text-light); }
.footer-bottom-links a:hover { color: var(--blue); }
.footer-bottom-links span { color: var(--border2); }
.social-links { display: flex; gap: .5rem; margin-top: .75rem; }
.social-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: var(--transition); }
.social-btn:hover { border-color: var(--green); transform: translateY(-2px); }

/* ─── Cours / Hero cards ─────────────────────────────────────── */
.hero-card-main {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 340px;
}
.hero-word .wotd-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--green); margin-bottom: .5rem; }
.hero-word .word       { font-size: 1.8rem; font-weight: 900; color: var(--text); }
.hero-word .phonetic   { font-size: .9rem; color: var(--text-light); margin-bottom: .4rem; }
.hero-word .definition { font-size: .88rem; color: var(--text-muted); }
.progress-bar-wrap label { font-size: .75rem; color: var(--text-light); display: block; margin: .75rem 0 .25rem; }
.progress-bar { background: var(--bg-gray2); border-radius: 6px; height: 12px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 6px; }
.hero-float-card { background: var(--bg); border: 2px solid var(--border); border-radius: var(--r-lg); padding: .65rem 1rem; font-size: .82rem; font-weight: 700; box-shadow: var(--shadow-md); }
.hero-float-card-1 { color: var(--green); }
.hero-float-card-2 { color: var(--orange); }

/* ─── Animations ─────────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: none; }
@keyframes shake { 0%,100% { transform:translateX(0); } 25%,75% { transform:translateX(-6px); } 50% { transform:translateX(6px); } }
.shake { animation: shake .4s ease; }
@keyframes correct-bounce { 0%,100% { transform:scale(1); } 50% { transform:scale(1.04); } }
.correct-bounce { animation: correct-bounce .3s ease; }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-grid     { grid-template-columns: 1fr; }
  .hero-visual   { display: none; }
  .nav-links     {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    gap: .25rem;
    z-index: 999;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .hamburger     { display: block; }
  .nav-stats     { gap: .4rem; }
  .nav-stat span { display: none; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .mc-options    { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .lesson-footer { flex-wrap: wrap; }
  .verify-btn    { width: 100%; }
  .footer-bottom { flex-direction: column; text-align: center; gap: .75rem; }

  /* Dropdown mobile : s'ouvre en inline */
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--border);
    border-radius: 0;
    margin-left: 1rem;
    padding: 4px 0;
    animation: none;
    background: transparent;
  }
  .nav-dropdown-divider { display: none; }
}
@media (max-width: 480px) {
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .completion-stats { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   QUIZ ENGINE — Design Duolingo professionnel
   ════════════════════════════════════════════════════════════ */

.quiz-container {
  max-width: 640px;
  margin: 0 auto;
}

.quiz-wrapper {
  background: var(--bg);
  border: 2px solid var(--border);
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 0;
  overflow: hidden;
}

/* ── Header: question counter + score ── */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px 0;
}
.quiz-header .quiz-counter {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.quiz-header .quiz-score {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 800;
  color: var(--orange);
}
.quiz-header .quiz-score .score-icon {
  font-size: 1.1rem;
}

/* ── Progress bar ── */
.quiz-progress-bar {
  height: 10px;
  background: var(--bg-gray2);
  border-radius: 5px;
  margin: 16px 28px 0;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-light));
  border-radius: 5px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.quiz-progress-fill::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 8px;
  right: 8px;
  height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 3px;
}

/* ── Question text ── */
.quiz-question {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  padding: 28px 28px 8px;
  line-height: 1.4;
}
.quiz-question-hint {
  font-size: .88rem;
  color: var(--text-muted);
  padding: 0 28px 20px;
}

/* ── Options grid ── */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 28px 28px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-lg);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.quiz-option:hover:not(:disabled) {
  background: var(--bg-gray);
  border-color: var(--border2);
  transform: translateY(-1px);
}
.quiz-option:active:not(:disabled) {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

/* Option letter badge */
.quiz-option .option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-gray);
  border: 2px solid var(--border);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .9rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.quiz-option:hover:not(:disabled) .option-letter {
  background: var(--blue-bg);
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Correct / Wrong states ── */
.quiz-option.correct {
  background: var(--green-bg) !important;
  border-color: var(--green) !important;
  border-bottom-color: var(--green-dark) !important;
  color: var(--green-dark) !important;
  animation: quizCorrectPop 0.4s ease;
}
.quiz-option.correct .option-letter {
  background: var(--green) !important;
  border-color: var(--green-dark) !important;
  color: #fff !important;
}

.quiz-option.wrong {
  background: var(--red-bg) !important;
  border-color: var(--red) !important;
  border-bottom-color: var(--red-dark) !important;
  color: var(--red-dark) !important;
  animation: quizWrongShake 0.4s ease;
}
.quiz-option.wrong .option-letter {
  background: var(--red) !important;
  border-color: var(--red-dark) !important;
  color: #fff !important;
}

.quiz-option:disabled {
  cursor: default;
  opacity: 0.7;
}
.quiz-option.correct:disabled,
.quiz-option.wrong:disabled {
  opacity: 1;
}

@keyframes quizCorrectPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes quizWrongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ── Explanation panel ── */
.quiz-explanation {
  margin: 0 28px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.35s ease;
}
.quiz-explanation.show {
  max-height: 200px;
  opacity: 1;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--bg-gray);
  border-radius: var(--r-md);
  border-left: 4px solid var(--blue);
  font-size: .9rem;
  color: var(--text);
  line-height: 1.6;
}
.quiz-explanation.show::before {
  content: '💡 ';
}

/* ── Next button area ── */
.quiz-footer {
  padding: 0 28px 28px;
  display: flex;
  justify-content: flex-end;
}

/* ── Result screen ── */
.quiz-result {
  text-align: center;
  padding: 48px 28px;
}
.quiz-result-emoji {
  font-size: 4.5rem;
  margin-bottom: 16px;
  animation: quizResultBounce 0.6s ease;
}
@keyframes quizResultBounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.quiz-result h2 {
  margin-bottom: 8px;
}
.quiz-result-score {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.quiz-result-pct {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── Circular progress ring ── */
.quiz-ring-wrap {
  width: 180px;
  height: 180px;
  margin: 0 auto 32px;
  position: relative;
}
.quiz-ring-wrap svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}
.quiz-ring-bg {
  fill: none;
  stroke: var(--bg-gray2);
  stroke-width: 4;
}
.quiz-ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}
.quiz-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.quiz-ring-pct {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text);
}
.quiz-ring-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.quiz-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .quiz-question { font-size: 1.15rem; padding: 20px 20px 8px; }
  .quiz-options { padding: 12px 20px 20px; }
  .quiz-option { padding: 14px 16px; font-size: .93rem; }
  .quiz-option .option-letter { width: 32px; height: 32px; font-size: .8rem; }
  .quiz-header, .quiz-progress-bar, .quiz-explanation, .quiz-footer { margin-left: 20px; margin-right: 20px; padding-left: 0; padding-right: 0; }
  .quiz-header { padding: 16px 0 0; }
  .quiz-result { padding: 32px 20px; }
}

/* ════════════════════════════════════════════════════════════
   TAG PILLS & RESOURCE CARDS
   ════════════════════════════════════════════════════════════ */

.tag-pill {
  display: inline-block;
  background: var(--bg-gray);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.video-card:hover,
.card[href]:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* ── Vocab tables (resource articles) ── */
.vocab-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--bg);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  border-bottom: 4px solid var(--border2);
  margin: 20px 0;
}
.vocab-tbl thead {
  background: var(--bg-gray2);
}
.vocab-tbl th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.vocab-tbl td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.vocab-tbl tr:last-child td { border-bottom: none; }
.vocab-tbl tr:hover td { background: var(--bg-gray); }
.vocab-tbl .en-word { font-weight: 700; color: var(--text); }
.vocab-tbl .ipa { font-style: italic; color: var(--text-muted); font-size: .85rem; }

/* ── Dialogue bubbles (conversation articles) ── */
.dialogue-wrap {
  max-width: 560px;
  margin: 20px 0;
}
.dialogue-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  margin-bottom: 8px;
  max-width: 85%;
  font-size: .92rem;
  line-height: 1.5;
}
.dialogue-bubble.speaker-a {
  background: var(--blue-bg);
  border: 1px solid #B3E0F7;
  border-bottom-left-radius: 4px;
  margin-right: auto;
}
.dialogue-bubble.speaker-b {
  background: var(--green-bg);
  border: 1px solid #B3E8A0;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}
.dialogue-bubble .speaker-name {
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
  display: block;
}
.dialogue-bubble.speaker-a .speaker-name { color: var(--blue-dark); }
.dialogue-bubble.speaker-b .speaker-name { color: var(--green-dark); }

/* ── Callout boxes (resource articles) ── */
.callout-box {
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: .92rem;
}
.callout-box.info {
  background: var(--blue-bg);
  border-left: 4px solid var(--blue);
}
.callout-box.tip {
  background: var(--green-bg);
  border-left: 4px solid var(--green);
}
.callout-box.warning {
  background: var(--orange-bg);
  border-left: 4px solid var(--orange);
}
.callout-box.error {
  background: var(--red-bg);
  border-left: 4px solid var(--red);
}
.callout-box strong:first-child {
  display: block;
  margin-bottom: 6px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Article prose ── */
.article-prose h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  color: var(--text);
}
.article-prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}
.article-prose p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}
.article-prose ul, .article-prose ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.article-prose li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--text-muted);
}
.article-prose strong { color: var(--text); }

/* ── Mini quiz (in-article) ── */
.mini-quiz {
  background: var(--bg-gray);
  border: 2px solid var(--border);
  border-bottom: 4px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 28px;
  margin: 32px 0;
}
.mini-quiz h3 {
  margin: 0 0 20px;
  font-size: 1.1rem;
}
.mq-question {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.mq-question p {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.mq-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: .9rem;
  background: var(--bg);
  transition: all .15s;
}
.mq-option:hover { border-color: var(--blue); background: var(--blue-bg); }
.mq-option.selected { border-color: var(--blue); background: var(--blue-bg); }
.mq-option.correct { border-color: var(--green) !important; background: var(--green-bg) !important; }
.mq-option.wrong { border-color: var(--red) !important; background: var(--red-bg) !important; }
.mq-option .letter {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg-gray);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem;
  flex-shrink: 0;
}

/* ── Ad slot ── */
.ad-slot {
  background: var(--bg-gray);
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: .85rem;
  margin: 24px 0;
}
