/* ============================================================
   LES CARNETS DE LÉKA — design tokens
   ============================================================ */
:root {
  --bg: #0F172A;
  --surface: #16213A;
  --surface-2: #1D2C4C;
  --border: #2A3B5E;
  --text: #E7ECF3;
  --text-muted: #8B97AC;
  --accent-red: #E41E20;
  --accent-red-dim: #7A1213;
  --accent-teal: #2DD4BF;
  --accent-teal-dim: #12554D;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-display: "Montserrat", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow-soft: 0 12px 30px rgba(0,0,0,0.35);
  --ease: cubic-bezier(.2,.8,.25,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(680px circle at 12% -8%, rgba(228, 30, 32, 0.10), transparent 60%),
    radial-gradient(620px circle at 92% 4%, rgba(45, 212, 191, 0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

p { color: var(--text-muted); max-width: 62ch; }

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent-teal); color: #04231F;
  padding: .6em 1em; border-radius: 0 0 var(--radius-sm) 0; z-index: 200;
}
.skip-link:focus { left: 0; }

.storage-banner {
  background: var(--accent-red-dim); border-bottom: 1px solid var(--accent-red);
  padding: 1rem 1.5rem; position: relative; z-index: 60;
}
.storage-banner-inner { max-width: 900px; margin: 0 auto; }
.storage-banner-inner strong { display: block; margin-bottom: .35rem; }
.storage-banner-inner p { margin: 0 0 .85rem; font-size: .9rem; max-width: none; }

.install-banner {
  position: fixed; left: .75rem; right: .75rem; bottom: -120px; z-index: 90;
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: .9rem 1rem; box-shadow: 0 12px 32px rgba(0,0,0,.45);
  transition: bottom .25s var(--ease);
}
.install-banner.is-visible { bottom: .75rem; }
.install-banner-icon { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.install-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.install-banner-text span { font-size: .82rem; color: var(--text-muted); }
.install-banner-btn { flex: none; padding: .55rem .9rem; font-size: .88rem; white-space: nowrap; }
.install-banner-close {
  flex: none; background: none; border: none; color: var(--text-muted); font-size: 1rem;
  cursor: pointer; padding: .25rem;
}
.install-banner-close:hover { color: var(--text); }
@media (min-width: 640px) {
  .install-banner { left: auto; right: 1.5rem; width: 360px; }
}

/* ============================================================
   BOOT OVERLAY (fun once-per-session loading animation)
   ============================================================ */
.boot-overlay {
  position: fixed; inset: 0; z-index: 500; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .45s ease;
}
.boot-overlay.is-hidden { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; max-width: 440px; padding: 2rem; }
.boot-logo { display: block; margin: 0 auto 1.5rem; animation: boot-pulse 1.1s ease-in-out infinite; }
@keyframes boot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.boot-lines { font-family: monospace; font-size: .82rem; color: var(--accent-teal); text-align: left; min-height: 130px; }
.boot-line {
  opacity: 0; animation: boot-flicker-in .5s steps(1, end) forwards;
  margin-bottom: .5rem; line-height: 1.4;
}
.boot-line::before { content: "> "; color: var(--accent-red); }
.boot-ok { color: #4ADE80; font-weight: 700; }
@keyframes boot-flicker-in {
  0% { opacity: 0; }
  8% { opacity: 1; }
  14% { opacity: .15; }
  22% { opacity: 1; }
  28% { opacity: .2; }
  38% { opacity: 1; }
  46% { opacity: .4; }
  55% { opacity: 1; }
  100% { opacity: 1; }
}

.boot-cursor {
  display: inline-block; width: .55em; color: var(--accent-teal); font-weight: 700;
  animation: boot-blink 1s steps(1, end) infinite;
}
@keyframes boot-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .boot-overlay { display: none; }
}

:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}
.section-sub { margin-top: -.25rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.header-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .75rem 1.5rem;
}
.logo {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--text);
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
}
.logo-mascot { color: var(--accent-teal); display: flex; }
.logo-mascot img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.logo-name { color: var(--accent-red); }

.main-nav { display: flex; gap: 1.5rem; }
.main-nav a {
  text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: .95rem;
  transition: color .15s var(--ease); position: relative; padding-bottom: 2px;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--accent-teal); border-radius: 2px; transition: width .2s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: .6rem; }

.stat-pill {
  display: flex; align-items: center; gap: .35rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: .35rem .7rem; font-weight: 600; font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.stat-xp { color: var(--accent-teal); }
.stat-streak { color: var(--accent-red); }

.lang-toggle {
  display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
}
.lang-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-weight: 700; font-size: .78rem; padding: .4rem .65rem; cursor: pointer;
  font-family: var(--font-body); transition: background .15s var(--ease), color .15s var(--ease);
}
.lang-btn.is-active { background: var(--accent-teal); color: #04231F; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.4rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, #ff3b3d, var(--accent-red));
  color: #fff; box-shadow: 0 4px 14px rgba(228, 30, 32, 0.25);
}
.btn-primary:hover { background: linear-gradient(135deg, #ff5052, #ff2c2e); box-shadow: 0 6px 18px rgba(228, 30, 32, 0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--accent-teal); color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 3rem 1.5rem 1rem; }
.hero-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-display); color: var(--accent-teal);
  font-size: 1rem; margin-bottom: .6rem; max-width: none;
}
.hero-sub { font-size: 1.05rem; margin-bottom: 1.75rem; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-art { display: flex; justify-content: center; }
.hero-mascot { width: min(100%, 320px); filter: drop-shadow(0 16px 30px rgba(0,0,0,.45)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============================================================
   LEARNING PATH
   ============================================================ */
.path-section { background: linear-gradient(180deg, transparent, var(--surface) 4%, var(--surface) 96%, transparent); }

.learn-path {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 0; position: relative;
}
.path-node {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.1rem 0; position: relative;
}
.path-node:not(:last-child)::after {
  content: ""; position: absolute; left: 27px; top: 64px; bottom: -1.1rem;
  width: 3px; background: var(--border); border-radius: 3px;
}
.path-node.is-complete:not(:last-child)::after { background: var(--accent-teal-dim); }

.node-badge {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  background: var(--surface-2); border: 2px solid var(--border); color: var(--text-muted);
  position: relative; z-index: 1;
}
.path-node.is-unlocked .node-badge { border-color: var(--accent-red); color: var(--text); background: var(--accent-red-dim); }
.path-node.is-complete .node-badge { border-color: var(--accent-teal); color: #04231F; background: var(--accent-teal); }

.node-main { flex: 1; }
.node-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 0; }
.node-desc { margin: .15rem 0 0; font-size: .9rem; }

.node-btn {
  flex: none; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: .6rem 1.1rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); transition: border-color .15s var(--ease), background .15s var(--ease);
}
.path-node.is-unlocked .node-btn { background: var(--accent-red); border-color: var(--accent-red); }
.path-node.is-unlocked .node-btn:hover { background: #ff2c2e; }
.path-node.is-locked .node-btn { opacity: .4; cursor: not-allowed; }
.path-node.is-complete .node-btn { border-color: var(--accent-teal); }

/* ============================================================
   DISCOVER THE COUNTRY
   ============================================================ */
.city-grid {
  margin-top: 2.5rem; display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.city-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column;
}
.city-card-link { text-decoration: none; color: inherit; transition: transform .15s var(--ease), border-color .15s var(--ease); }
.city-card-link:hover { transform: translateY(-3px); border-color: var(--accent-teal); }
.city-postcard { width: 100%; height: 140px; display: block; position: relative; }
.city-postcard svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.city-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2;
  display: block;
}
.city-postcard-lg { height: 220px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 1.5rem; }
.city-body { padding: 1.25rem 1.4rem 1.5rem; }
.city-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin: 0; }
.city-tag { color: var(--accent-teal); font-size: .82rem; font-weight: 600; margin: .15rem 0 .75rem; }
.city-text { font-size: .92rem; margin: 0; }

/* ============================================================
   ARTICLE PAGES (city / history detail)
   ============================================================ */
.article-wrap { max-width: 720px; }
.article-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: .3rem; }
.article-tag { color: var(--accent-teal); font-weight: 600; margin-top: 0; }
.photo-credit { font-size: .78rem; color: var(--text-muted); margin: -1rem 0 1.5rem; }
.photo-credit a { color: var(--text-muted); }
.photo-gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: -0.5rem 0 2rem; }
.gallery-item { margin: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.gallery-item img { width: 100%; height: 150px; object-fit: cover; display: block; }
.gallery-item img, .city-postcard-lg .city-photo { cursor: zoom-in; }
.gallery-item figcaption { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .65rem; }
.gallery-caption { font-size: .82rem; line-height: 1.25; }
.gallery-license { font-size: .7rem; color: var(--text-muted); }

.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 200; background: rgba(6, 10, 20, .92);
  display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.25rem;
}
.lightbox-backdrop[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: min(1100px, 92vw); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.lightbox-img { max-width: 100%; max-height: 78vh; border-radius: var(--radius-md); box-shadow: 0 20px 60px rgba(0,0,0,.5); object-fit: contain; }
.lightbox-figure figcaption { color: var(--text-muted); font-size: .9rem; text-align: center; }
.lightbox-close {
  position: fixed; top: 1.2rem; right: 1.4rem; z-index: 201; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer;
}
.lightbox-close:hover { background: var(--surface); }
.article-year { color: var(--accent-red); font-family: var(--font-display); font-weight: 700; margin-bottom: .3rem; }
.article-text { font-size: 1.02rem; margin-bottom: 2rem; }
.lesson-preview { margin-top: 1.5rem; }
.lesson-preview h2 { font-size: 1.1rem; }
.lesson-vocab-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lesson-vocab-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .6rem .8rem; font-size: .88rem; color: var(--text-muted);
}
.lesson-vocab-list strong { color: var(--text); }
.lesson-vocab-en { display: block; font-size: .78rem; opacity: .8; }
.lesson-culture {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent-red);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
}
.lesson-culture p { font-size: .92rem; margin: 0 0 .8rem; }
.lesson-culture p:last-child { margin-bottom: 0; }

.related-box {
  margin: 1.5rem 0 2rem; padding: 1.25rem 1.4rem; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
}
.related-label { font-weight: 700; margin: 0 0 .75rem; font-size: .92rem; }
.related-link {
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: .5rem 1rem; margin: 0 .5rem .5rem 0; font-size: .88rem; font-weight: 600; color: var(--text);
  transition: border-color .15s var(--ease);
}
.related-link:hover { border-color: var(--accent-teal); }
.related-year { color: var(--accent-red); font-weight: 700; }

/* ============================================================
   HISTORY TIMELINE
   ============================================================ */
.history-timeline {
  list-style: none; margin: 3rem 0 0; padding: 0; counter-reset: history;
  position: relative;
}
.history-item {
  position: relative; padding: 0 0 2.25rem 2.75rem;
}
.history-item::before {
  counter-increment: history; content: counter(history);
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--accent-red); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem; z-index: 1;
}
.history-item:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--border);
}
.history-link { display: block; text-decoration: none; color: inherit; }
.history-link:hover .history-title { color: var(--accent-teal); }
.history-year {
  font-family: var(--font-display); color: var(--accent-red); font-weight: 700;
  font-size: .95rem; margin: 0 0 .2rem;
}
.history-title { font-weight: 700; margin: 0 0 .35rem; font-size: 1.05rem; transition: color .15s var(--ease); }
.history-text { font-size: .92rem; margin: 0; }

.history-pager {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.history-pager a {
  text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: .9rem;
  max-width: 45%; transition: color .15s var(--ease);
}
.history-pager a:hover { color: var(--accent-teal); }

/* ============================================================
   HOME TEASERS (links out to the three hubs)
   ============================================================ */
.home-teasers {
  display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 3rem;
}
.home-section-title { text-align: center; margin: 0 0 1.5rem; }
.home-lead { margin-bottom: 1.75rem; }
.home-lead-centered { text-align: center; margin-left: auto; margin-right: auto; }
.home-outcomes {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem; margin-bottom: 1.75rem;
}
.home-outcomes-title { font-weight: 700; margin: 0 0 .75rem; }
.home-outcomes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-outcomes-list li { color: var(--text-muted); font-size: .92rem; white-space: nowrap; }
@media (max-width: 560px) {
  .home-outcomes-list { grid-template-columns: 1fr; }
  .home-outcomes-list li { white-space: normal; }
}
.home-section-title-spaced { margin-top: 3.5rem; }
.home-teasers-spaced { margin-top: 3.5rem; }
.home-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 2.5rem;
  padding: 1.75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.home-stat { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 100px; }
.home-stat strong { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; color: var(--accent-teal); }
.home-stat span { font-size: .82rem; color: var(--text-muted); text-align: center; }
.teaser-static { cursor: default; }
.teaser-static:hover { transform: none; border-color: var(--border); }
.teaser-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.75rem; transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.teaser-card:hover { transform: translateY(-3px); border-color: var(--accent-red); }
.teaser-emoji { font-size: 1.8rem; display: block; margin-bottom: .75rem; }
.teaser-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin: 0 0 .35rem; }
.teaser-text { font-size: .9rem; margin: 0; }

/* Breadcrumb */
.breadcrumb {
  font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-teal); }

/* Locked node link replacement (span instead of button) */
.node-btn.is-disabled { opacity: .4; cursor: not-allowed; display: inline-flex; }

/* ============================================================
   TRACKS (parcours par niveau)
   ============================================================ */
.track-block {
  margin-top: 1.25rem; padding: 1.5rem 1.75rem; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface);
}
.track-block:first-child { margin-top: 2.5rem; }
.track-block[open] { padding-bottom: 1.75rem; }

.track-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  cursor: pointer; list-style: none; border-radius: var(--radius-sm);
  margin: -.5rem; padding: .5rem; transition: background .15s var(--ease);
}
.track-header:hover { background: var(--surface-2); }

/* ============================================================
   HOW IT WORKS (Apprendre hub explainer)
   ============================================================ */
.howto-grid {
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 2rem 0 3rem;
}
.howto-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
}
.howto-emoji { font-size: 1.5rem; display: block; margin-bottom: .6rem; }
.howto-item h3 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 .5rem; }
.howto-item p { font-size: .88rem; margin: 0; }

/* ============================================================
   CITY CULTURE SECTIONS (Découvrir — cuisine, à goûter, musique...)
   ============================================================ */
.culture-tabs {
  display: flex; gap: .5rem; overflow-x: auto; margin: 2rem 0 2.5rem;
  padding-bottom: .5rem; -webkit-overflow-scrolling: touch;
}
.culture-tabs a {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .55rem 1.1rem; font-size: .85rem; font-weight: 600; color: var(--text);
  text-decoration: none; transition: border-color .15s var(--ease), background .15s var(--ease);
}
.culture-tabs a:hover { border-color: var(--accent-teal); background: var(--surface-2); }
.culture-section { margin-bottom: 3rem; scroll-margin-top: 90px; }
.culture-section h2 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .9rem; }
.culture-section--featured {
  background: var(--surface); border: 1px solid var(--accent-red); border-radius: var(--radius-md);
  padding: 1.75rem;
}
.culture-meta { font-size: .88rem; color: var(--text-muted); margin: .4rem 0; }
.recipe-meta-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin: 1rem 0 1.5rem; }
.recipe-meta-row .culture-meta { margin: 0; }
.recipe-meta-row strong { color: var(--text); }
.recipe-subtitle { font-family: var(--font-display); font-size: 1.02rem; margin: 1.5rem 0 .6rem; }
.recipe-list { margin: 0; padding-left: 1.3rem; font-size: .92rem; }
.recipe-list li { margin-bottom: .45rem; line-height: 1.5; }
.recipe-steps li { padding-left: .2rem; }
.recipe-tip {
  margin-top: 1.5rem; padding: .9rem 1.1rem; background: var(--surface-2);
  border-left: 3px solid var(--accent-teal); border-radius: var(--radius-sm);
  font-size: .88rem;
}
.culture-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.culture-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
}
.culture-card h3 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 .3rem; }
.culture-card-category {
  font-size: .72rem; font-weight: 700; color: var(--accent-teal); text-transform: uppercase;
  letter-spacing: .03em; margin: 0 0 .4rem;
}
.culture-card p:not(.culture-card-category) { font-size: .88rem; margin: 0; }
.culture-card-item h3 { font-size: 1rem; margin: 0 0 .3rem; }
.culture-card-item--compact h3 { font-size: .88rem; }
.culture-card-item--compact p { font-size: .82rem; }
.culture-card-item--stacked {
  margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border);
}

.festival-lineup { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.lineup-venue { font-size: .82rem; font-weight: 700; color: var(--accent-red); margin: 0 0 .7rem; }
.lineup-day { margin-bottom: .6rem; }
.lineup-day-label { font-size: .78rem; font-weight: 700; color: var(--text-muted); margin: 0 0 .15rem; text-transform: uppercase; letter-spacing: .02em; }
.lineup-artists { font-size: .88rem; margin: 0; }
.lineup-artists a { color: var(--accent-teal); text-decoration: none; }
.lineup-artists a:hover { text-decoration: underline; }
.lineup-note { margin-top: .8rem; font-size: .75rem; color: var(--text-muted); font-style: italic; }

@media (max-width: 720px) {
  .culture-tabs { margin: 1.5rem -1.25rem 2rem; padding-left: 1.25rem; padding-right: 1.25rem; }
}
.track-header::-webkit-details-marker { display: none; }
.track-header::marker { content: ""; }
.track-header-text { display: flex; flex-direction: column; gap: .3rem; }
.track-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.track-subtitle { color: var(--text-muted); font-size: .92rem; }
.track-progress {
  display: inline-block; align-self: flex-start; margin-top: .1rem; font-size: .82rem; font-weight: 700;
  color: var(--accent-teal); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: .25rem .8rem;
}
.track-goal { display: block; margin-top: .4rem; font-size: .85rem; color: var(--accent-red); font-weight: 600; }
.track-header-chevron {
  flex: none; font-size: 1.1rem; color: var(--text-muted);
  transition: transform .2s var(--ease);
}
.track-block[open] .track-header-chevron { transform: rotate(180deg); }
.track-block .learn-path,
.track-block .track-soon { margin-top: 1.5rem; }
.track-soon {
  padding: 1rem 1.25rem; border: 1px dashed var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted); font-size: .9rem;
}
.path-node--alphabet .node-badge { border-color: var(--accent-teal); background: var(--accent-teal-dim); color: var(--text); font-size: 1.2rem; }

/* ============================================================
   PROGRESS EXPORT / IMPORT (no-account save system)
   ============================================================ */
.progress-box {
  margin-top: 2rem; padding: 1.75rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.progress-box textarea {
  width: 100%; min-height: 70px; margin-top: 1rem; padding: .75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: monospace; font-size: .85rem; resize: vertical;
}
.progress-actions { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }

/* ============================================================
   MOOD PICKER (post-lesson feedback)
   ============================================================ */
.mood-row { display: flex; gap: .6rem; margin: 1.25rem 0; flex-wrap: wrap; }
.mood-btn {
  font-size: 1.8rem; line-height: 1; padding: .6rem .75rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 2px solid var(--border); cursor: pointer;
  transition: border-color .15s var(--ease), transform .12s var(--ease);
}
.mood-btn:hover { transform: translateY(-2px); }
.mood-btn.is-selected { border-color: var(--accent-teal); background: var(--accent-teal-dim); }
.mood-note {
  width: 100%; min-height: 70px; padding: .75rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: .92rem; resize: vertical;
}
.mood-video-link {
  display: block; margin: -.5rem 0 1rem; padding: .7rem .9rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: .88rem; text-decoration: none;
}
.mood-video-link:hover { border-color: var(--accent-teal); color: var(--text); }

.feedback-stars { display: flex; gap: .3rem; margin: .5rem 0 1.1rem; }
.feedback-star {
  background: none; border: none; font-size: 1.7rem; line-height: 1; cursor: pointer;
  color: var(--border); padding: 0; transition: color .1s var(--ease), transform .1s var(--ease);
}
.feedback-star:hover { transform: scale(1.15); }
.feedback-star.is-filled { color: #FFC542; }
.feedback-actions { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.feedback-status { margin-top: .8rem; font-size: .88rem; }
.feedback-status.is-ok { color: var(--accent-teal); }
.feedback-status.is-error { color: var(--accent-red); }
.mood-video-link strong { color: var(--text); }

/* ============================================================
   ACCOUNT PAGE ("Mon compte")
   ============================================================ */
.account-box {
  margin-top: 1.75rem; padding: 1.75rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.account-box h2 { font-size: 1.1rem; margin-top: 0; }
.account-box--warning { border-color: var(--accent-red); background: var(--accent-red-dim); }
.account-box--review { border-color: var(--accent-teal); }
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.review-list a {
  display: block; padding: .7rem .9rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 600;
}
.review-list a:hover { border-color: var(--accent-teal); }
.review-nudge {
  display: block; margin-bottom: 1.5rem; padding: .8rem 1.1rem; background: var(--accent-teal-dim);
  border: 1px solid var(--accent-teal); border-radius: var(--radius-sm); color: var(--text);
  text-decoration: none; font-weight: 600; font-size: .92rem;
}
.account-intro { display: flex; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.account-intro-mascot { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.account-intro h1 { margin-bottom: .2rem; }

.page-intro-flex { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; margin-bottom: .5rem; }
.page-intro-flex.reverse { flex-direction: row-reverse; }
.page-intro-text { flex: 1 1 320px; min-width: 0; }
.page-mascot-inset { flex: none; filter: drop-shadow(0 12px 22px rgba(0,0,0,.35)); }
.page-mascot-inset.is-framed { border-radius: var(--radius-md); box-shadow: 0 12px 30px rgba(0,0,0,.4); filter: none; }
.mascot-apprendre { width: 190px; }
.mascot-decouvrir { width: 260px; }
.mascot-histoire { width: 170px; }
.mascot-videotheque { width: 210px; }
.mascot-compte { width: 190px; }
@media (max-width: 720px) {
  .page-intro-flex, .page-intro-flex.reverse { flex-direction: column-reverse; gap: 1.25rem; text-align: left; }
  .page-mascot-inset { width: 140px !important; margin: 0 auto; }
}
.account-welcome { display: flex; gap: 1.25rem; align-items: flex-start; }
.account-welcome-mascot { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.account-welcome-body { flex: 1; min-width: 0; }
.account-motivate { color: var(--accent-teal); font-weight: 600; margin: 0 0 1rem; }
.account-welcome--compact { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); margin-top: 1.5rem; }
.account-welcome--compact p { margin: 0; font-size: .92rem; }
.account-collapsible summary {
  cursor: pointer; list-style: none; font-size: 1.1rem; font-weight: 700; font-family: var(--font-display);
  display: flex; align-items: center; justify-content: space-between;
}
.account-collapsible summary::-webkit-details-marker { display: none; }
.account-collapsible summary::after { content: "▾"; color: var(--text-muted); font-weight: 400; transition: transform .15s var(--ease); }
.account-collapsible[open] summary::after { transform: rotate(180deg); }
.account-collapsible .progress-box { margin-top: 1.5rem; }
.account-collapsible .progress-box h3 { font-size: 1rem; margin: 0 0 .4rem; }
#account-danger-zone:not(:empty) { margin-top: 1.25rem; }
.account-input {
  width: 100%; padding: .7rem .9rem; margin: .75rem 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: .95rem;
}
.account-checkbox {
  display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--text-muted);
  margin-bottom: 1rem; cursor: pointer;
}
.account-note { font-size: .85rem; color: var(--text-muted); margin-top: 1.25rem; }
.profile-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.profile-btn { font-weight: 600; }
.account-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1.25rem 0; }
.account-stat {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .9rem 1.4rem; min-width: 100px;
}
.account-stat strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-teal); }
.account-stat span { font-size: .78rem; color: var(--text-muted); }
.account-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.account-danger { border-color: var(--accent-red); color: var(--accent-red); }
.mood-entry { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.mood-entry:last-child { border-bottom: none; }
.mood-entry-emoji { font-size: 1.6rem; flex: none; }
.mood-entry-date { color: var(--text-muted); font-size: .82rem; }
.mood-entry-note { margin: .35rem 0 0; font-size: .9rem; }

@media (max-width: 560px) {
  .account-welcome { flex-direction: column; }
  .account-intro { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   VIDÉOTHÈQUE
   ============================================================ */
.video-group { margin-top: 2.5rem; }
.video-group:first-child { margin-top: 2rem; }
.video-group-title {
  font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 1.25rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}
.video-filter-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 2rem 0 1.75rem; }
.video-filter-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 999px; padding: .5rem 1.1rem; font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.video-filter-btn:hover { border-color: var(--accent-teal); color: var(--text); }
.video-filter-btn.is-active { background: var(--accent-teal); border-color: var(--accent-teal); color: #04231F; }
.video-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.video-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.video-card:hover { transform: translateY(-3px); border-color: var(--accent-teal); }
.video-thumb-wrap {
  position: relative; aspect-ratio: 16 / 9; background: #000; cursor: pointer; overflow: hidden;
}
.video-thumb-wrap iframe, .video-thumb-wrap .video-thumb {
  width: 100%; height: 100%; display: block; object-fit: cover; border: none;
}
.video-play-btn {
  position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content;
  background: rgba(15, 23, 42, 0.75); color: var(--text); border: 1px solid var(--accent-teal);
  border-radius: 999px; padding: .7rem 1.3rem; font-weight: 700; font-size: .9rem; cursor: pointer;
  transition: background .15s var(--ease);
}
.video-thumb-wrap:hover .video-play-btn { background: var(--accent-red); border-color: var(--accent-red); }
.video-body { padding: 1.1rem 1.3rem 1.4rem; }
.video-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.video-category, .video-level {
  display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px;
  padding: .2rem .65rem; border: 1px solid var(--border);
}
.video-category { color: var(--accent-red); background: var(--accent-red-dim); border-color: var(--accent-red); }
.video-level { color: var(--accent-teal); background: var(--surface-2); }
.video-title { font-size: 1.02rem; font-weight: 700; margin: 0 0 .5rem; line-height: 1.35; }
.video-desc { font-size: .88rem; margin: 0 0 .8rem; }
.video-meta { font-size: .82rem; margin: 0 0 .5rem; color: var(--text-muted); }
.video-meta strong { color: var(--text); }
.video-yt-link { font-size: .82rem; font-weight: 600; color: var(--accent-red); text-decoration: none; }
.video-yt-link:hover { text-decoration: underline; }

.badge-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 1rem; }
.badge-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem;
  padding: 1.1rem .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2);
}
.badge-card.is-earned { border-color: var(--accent-teal); }
.badge-card.is-locked { opacity: .38; filter: grayscale(1); }
.badge-emoji { font-size: 1.8rem; }
.badge-title { font-size: .78rem; font-weight: 600; margin: 0; }

/* Avatars */
.avatar-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1.25rem; }
.avatar-btn {
  font-size: 1.4rem; line-height: 1; padding: .5rem .65rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 2px solid var(--border); cursor: pointer;
  transition: border-color .15s var(--ease), transform .12s var(--ease);
}
.avatar-btn:hover { transform: translateY(-2px); }
.avatar-btn.is-selected { border-color: var(--accent-teal); background: var(--accent-teal-dim); }
.profile-btn-avatar { margin-right: .3rem; }
.dashboard-head { display: flex; align-items: center; gap: .85rem; margin-bottom: .25rem; }
.dashboard-head h2 { margin: 0; }
.dashboard-avatar {
  font-size: 1.8rem; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 2px solid var(--accent-teal); border-radius: 50%; flex: none;
}

/* Collections */
.collection-item { margin-bottom: 1.1rem; }
.collection-item:last-child { margin-bottom: 0; }
.collection-item-head { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .35rem; }
.collection-item-head span:last-child { color: var(--text-muted); font-weight: 600; }
.collection-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.collection-bar-fill { height: 100%; background: var(--accent-teal); border-radius: 999px; transition: width .3s var(--ease); }

/* ============================================================
   ABOUT / AUTHOR
   ============================================================ */
.author-box {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2.5rem; box-shadow: var(--shadow-soft);
}
.author-avatar-img { flex: none; width: 160px; height: auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,.35)); }
.author-links { display: flex; gap: 1.25rem; margin-top: 1.5rem; flex-wrap: wrap; }
.bmc-btn {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem;
  background: #FFDD00; color: #1a1a1a; font-weight: 700; text-decoration: none;
  padding: .65rem 1.2rem; border-radius: var(--radius-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.bmc-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(255,221,0,.35); }
.bmc-note { margin-top: .6rem; font-size: .82rem; color: var(--text-muted); max-width: 42em; }
.author-link { text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--accent-teal); }
.author-link:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  color: var(--text-muted); font-size: .9rem;
}
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a { text-decoration: none; color: var(--text-muted); }
.footer-nav a:hover { color: var(--text); }
.footer-copy p { margin: 0; }
.footer-signature {
  margin: 0; padding: .7rem 1.5rem .95rem; border-top: 1px solid var(--border);
  max-width: none;
}
.footer-signature-inner {
  display: flex; align-items: center; justify-content: flex-end; gap: .5rem;
  width: 100%; max-width: 1180px; margin: 0 auto;
  font-family: "Dancing Script", cursive; font-weight: 700; font-size: 1.35rem; line-height: 1;
  color: var(--text-muted); letter-spacing: .02em;
}
.footer-signature [data-i18n="footer.credit"]::before { content: "✦ "; font-family: var(--font-display); font-size: .7rem; vertical-align: middle; color: var(--accent-red); }
.footer-signature-mascot { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* ============================================================
   MODAL / LESSON ENGINE
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 8, 16, 0.72);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  padding: 1rem; backdrop-filter: blur(4px);
}
.modal-backdrop[hidden] { display: none; }

.lesson-modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-soft); position: relative;
  animation: pop-in .22s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-close {
  position: absolute; top: 1rem; right: 1rem; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: .9rem;
}
.modal-header { padding: 1.75rem 1.75rem 1rem; }
.modal-header h2 { font-size: 1.3rem; padding-right: 2rem; }
.modal-progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: .75rem; }
.modal-progress-bar { height: 100%; width: 0%; background: var(--accent-teal); transition: width .3s var(--ease); }
.modal-body { padding: .5rem 1.75rem 1.75rem; min-height: 220px; }
.modal-footer { padding: 0 1.75rem 1.75rem; display: flex; justify-content: flex-end; }

/* Flashcards */
.flashcard {
  width: 100%; height: 220px; perspective: 1000px; cursor: pointer;
}
.flashcard-inner {
  position: relative; width: 100%; height: 100%; text-align: center;
  transition: transform .5s var(--ease); transform-style: preserve-3d;
}
.flashcard.is-flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2);
  padding: 1.5rem;
}
.flashcard-face.back { transform: rotateY(180deg); border-color: var(--accent-teal); }
.flashcard-word { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }
.flashcard-hint { color: var(--text-muted); font-size: .85rem; }
.flashcard-tap-hint { margin-top: 1rem; font-size: .8rem; color: var(--text-muted); text-align: center; }
.flashcard-listen {
  margin-top: .6rem; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: .35rem .8rem; font-size: .8rem; font-weight: 600; cursor: pointer;
}
.flashcard-listen:hover { border-color: var(--accent-teal); }

/* ============================================================
   ALPHABET REFERENCE PAGE
   ============================================================ */
.alphabet-intro { margin-bottom: 1rem; }
.alphabet-listen-note {
  font-size: .85rem; color: var(--text-muted); background: var(--surface);
  border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: .85rem 1rem; margin-bottom: 1.5rem;
}
.article-wrap .btn-primary { margin-bottom: 2.5rem; }
.letter-group-title {
  font-family: var(--font-display); font-size: 1.15rem; margin: 2.5rem 0 1.25rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}
.letter-grid {
  display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.letter-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.1rem 1.2rem;
}
.letter-card--voyelle { border-left-color: var(--accent-teal); }
.letter-card--digramme { border-left-color: var(--accent-red); }
.letter-glyph { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin: 0; }
.letter-ipa { color: var(--text-muted); font-size: .82rem; margin: .1rem 0 .6rem; font-family: monospace; }
.letter-explain { font-size: .85rem; margin: 0 0 .6rem; }
.letter-example { font-size: .85rem; margin: 0 0 .7rem; }
.letter-listen {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: .4rem .85rem; font-size: .8rem; font-weight: 600; cursor: pointer;
}
.letter-listen:hover { border-color: var(--accent-teal); }

/* QCM */
.qcm-question { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 1.25rem; }
.qcm-options { display: grid; gap: .7rem; }
.qcm-option {
  text-align: left; padding: .85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  cursor: pointer; font-size: .98rem; font-family: var(--font-body); transition: border-color .15s var(--ease), background .15s var(--ease);
}
.qcm-option:hover:not(:disabled) { border-color: var(--accent-teal); }
.qcm-option.is-correct { border-color: var(--accent-teal); background: var(--accent-teal-dim); }
.qcm-option.is-wrong { border-color: var(--accent-red); background: var(--accent-red-dim); }
.qcm-option:disabled { cursor: default; }

.qcm-help {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: .9rem; display: flex; gap: .6rem; align-items: flex-start;
}
.qcm-help.is-correct { border-color: var(--accent-teal); background: rgba(45, 212, 191, 0.08); }
.qcm-help.is-wrong { border-color: var(--accent-red); background: rgba(228, 30, 32, 0.08); }
.qcm-help-label { font-weight: 700; flex: none; }
.qcm-help.is-correct .qcm-help-label { color: var(--accent-teal); }
.qcm-help.is-wrong .qcm-help-label { color: var(--accent-red); }

/* Drag & drop sentence builder */
.dd-prompt { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 1rem; }
.dd-target {
  min-height: 56px; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .75rem; border: 2px dashed var(--border); border-radius: var(--radius-sm); margin-bottom: 1rem;
}
.dd-target.is-over { border-color: var(--accent-teal); }
.dd-bank { display: flex; flex-wrap: wrap; gap: .5rem; }
.dd-chip {
  padding: .55rem .9rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; cursor: grab; font-weight: 600; font-size: .92rem; user-select: none;
}
.dd-chip.is-placed { opacity: .35; cursor: default; }
.dd-chip:active { cursor: grabbing; }
.dd-feedback { margin-top: 1rem; font-weight: 600; }
.dd-feedback.correct { color: var(--accent-teal); }
.dd-feedback.wrong { color: var(--accent-red); }
.dd-help {
  margin-top: .6rem; padding: .75rem .9rem; border-radius: var(--radius-sm);
  border: 1px dashed var(--border); font-size: .88rem; color: var(--text);
}
.dd-help strong { color: var(--accent-red); }

/* Toast */
.toast {
  position: fixed; top: 1.25rem; left: 50%; transform: translateX(-50%) translateY(-140%);
  background: var(--surface); border: 1px solid var(--accent-teal); border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft); z-index: 150; transition: transform .35s var(--ease);
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }
.toast-inner { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.4rem; }
.toast-emoji { font-size: 1.6rem; }
.toast-title { margin: 0; font-weight: 700; font-family: var(--font-display); }
.toast-sub { margin: 0; color: var(--accent-teal); font-weight: 600; }

#confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 140;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; max-width: 220px; margin: 0 auto; }
  .author-box { grid-template-columns: 1fr; text-align: left; }
  .author-avatar-img { margin: 0 auto; }
}

@media (max-width: 620px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav {
    order: 3; width: 100%; justify-content: center; padding-top: .5rem; border-top: 1px solid var(--border);
    flex-wrap: wrap; row-gap: .5rem; column-gap: 1.1rem;
  }
  .path-node { align-items: flex-start; }
  .node-btn { padding: .55rem .8rem; font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mascot { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
