/* ════════════════════════════════════════════════════════════════════════
   Level catalog — styles partagés par A1/A2/B1/B2/C1/index.html
   Le HTML utilise des classes neutres .lvl-* qui prennent leur teinte
   depuis le bloc <style> spécifique de chaque page (gradient h1 etc.).
   ════════════════════════════════════════════════════════════════════════ */

body.lvl-catalog {
  color: var(--encre);
  font-family: "Inter", "Noto Sans SC", system-ui, sans-serif;
}

/* ─── Hero ─── */
.lvl-hero {
  position: relative;
  padding: clamp(50px, 7vw, 90px) 0 clamp(40px, 5vw, 60px);
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.lvl-hero .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.lvl-hero .breadcrumb {
  font-size: .88rem;
  color: var(--gris);
  margin-bottom: 12px;
}
.lvl-hero .breadcrumb a { color: var(--bleu-france); text-decoration: none; }
.lvl-hero .breadcrumb a:hover { text-decoration: underline; }
.lvl-hero .breadcrumb .sep { margin: 0 8px; color: #cbd5e1; }

.lvl-hero h1 {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 12px;
  color: var(--encre);
  font-weight: 700;
}
.lvl-hero .cn-title {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--gris);
  margin: 0 0 20px;
  font-weight: 600;
}
.lvl-hero .cn-title .accent { color: var(--rouge-france); font-weight: 800; }

.lvl-hero .lead {
  max-width: 700px;
  color: var(--gris);
  line-height: 1.7;
  margin: 0 0 24px;
  font-size: 1.05rem;
}
.lvl-hero .lead strong { color: var(--encre); }

/* ─── Stats row ─── */
.lvl-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.lvl-stat {
  background: white;
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .04),
    0 1px 2px rgba(0, 0, 0, .025),
    0 4px 12px rgba(0, 38, 84, .04);
  display: flex;
  align-items: center;
  gap: 12px;
}
.lvl-stat .num {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--bleu-france);
  line-height: 1;
}
.lvl-stat .lbl { font-size: .82rem; color: var(--gris); line-height: 1.2; }
.lvl-stat.complete .num { color: #16a34a; }
.lvl-stat.bonus    .num { color: #b45309; }
.lvl-stat.delf     .num { color: #4338ca; }
.lvl-stat.duration .num { color: var(--gris); }

/* ─── Progress (élève connecté) ─── */
.lvl-progress {
  margin-top: 12px;
  background: white;
  border-radius: 14px;
  padding: 16px 22px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .04),
    0 1px 3px rgba(0, 0, 0, .03);
  display: none;
  align-items: center;
  gap: 14px;
  max-width: 560px;
}
.lvl-progress.visible { display: flex; }
.lvl-progress .label { font-size: .85rem; color: var(--gris); white-space: nowrap; }
.lvl-progress .label strong { color: #16a34a; font-weight: 700; }
.lvl-progress .bar {
  flex: 1; height: 10px;
  background: #f1f5f9; border-radius: 999px; overflow: hidden;
}
.lvl-progress .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 999px;
  transition: width .6s ease;
}
.lvl-progress .pct {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--bleu-france);
  min-width: 42px;
  text-align: right;
}

/* ─── Units nav (sticky) ─── */
.units-nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.units-nav-wrap::before,
.units-nav-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 2;
}
.units-nav-wrap::before { left: 0;  background: linear-gradient(to right, rgba(255,255,255,.95), rgba(255,255,255,0)); }
.units-nav-wrap::after  { right: 0; background: linear-gradient(to left,  rgba(255,255,255,.95), rgba(255,255,255,0)); }
.units-nav {
  padding: 10px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.units-nav::-webkit-scrollbar { display: none; }
.units-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 8px; align-items: center;
  padding-right: 24px;
}
.units-nav .chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gris);
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}
.units-nav .chip:hover { background: rgba(0, 38, 84, .06); color: var(--bleu-france); }
.units-nav .chip.special { color: var(--rouge-france); }
.units-nav .chip.special:hover { background: rgba(239, 65, 53, .08); }
.units-nav .chip.active-chip { background: var(--bleu-france); color: white; }
.units-nav .chip.special.active-chip { background: var(--rouge-france); }

/* ─── Unit blocks ─── */
.lvl-units { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.unit-v2 {
  padding: clamp(40px, 6vw, 70px) 0;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.unit-v2:last-of-type { border-bottom: 0; }
.unit-v2-header {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.unit-v2-number {
  font-family: "Playfair Display", serif;
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--bleu-france);
  flex-shrink: 0;
}
.unit-v2-title { flex: 1; min-width: 240px; }
.unit-v2-title .eyebrow {
  color: var(--rouge-france);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.unit-v2-title h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  color: var(--encre);
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.unit-v2-title .cn-sub {
  font-family: "Noto Serif SC", serif;
  color: var(--gris);
  font-size: 1.05rem;
  font-weight: 500;
}

/* ─── Lesson cards v2 ─── */
.lessons-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.lc {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: white;
  border-radius: 14px;
  padding: 18px 22px 16px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .04),
    0 1px 2px rgba(0, 0, 0, .025),
    0 4px 12px rgba(0, 38, 84, .04);
  transition:
    transform .4s cubic-bezier(.22, 1, .36, 1),
    box-shadow .4s cubic-bezier(.22, 1, .36, 1);
}
.lc::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  pointer-events: none;
  z-index: 2;
}
a.lc:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgba(0, 38, 84, .1),
    0 2px 4px rgba(0, 0, 0, .03),
    0 14px 36px rgba(0, 38, 84, .12),
    0 30px 60px rgba(0, 38, 84, .06);
}

.lc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--bleu-clair);
  text-transform: uppercase;
}
.lc-title {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  color: var(--encre);
  font-weight: 700;
  line-height: 1.25;
  margin: 4px 0;
  letter-spacing: -.005em;
}
.lc-cn {
  font-family: "Noto Serif SC", serif;
  color: var(--gris);
  font-size: .88rem;
  margin-top: auto;
}
.lc-arrow {
  position: absolute;
  right: 16px; bottom: 14px;
  color: #cbd5e1;
  transition: all .3s cubic-bezier(.22, 1, .36, 1);
  font-weight: 700;
  font-size: 1.1rem;
}
a.lc:hover .lc-arrow { color: var(--bleu-france); transform: translateX(4px); }

/* État complété */
.lc.completed::after {
  content: "✓";
  position: absolute;
  top: 12px; right: 12px;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 800;
  box-shadow: 0 0 0 2px white, 0 4px 12px rgba(22, 163, 74, .4);
  z-index: 3;
}

/* État « à venir » — cartes non cliquables */
.lc.soon {
  background: #fafafa;
  opacity: .65;
  cursor: not-allowed;
  pointer-events: auto;
}
.lc.soon .lc-tag { color: #94a3b8; }
.lc.soon .lc-title { color: #64748b; }
.lc.soon .lc-arrow { display: none; }
.lc.soon .lc-status {
  position: absolute;
  bottom: 12px; right: 14px;
  font-size: .68rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(148, 163, 184, .15);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Variantes typées */
.lc.savoir-faire {
  background: linear-gradient(135deg, #fafaff, #f5f3ff);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, .12), 0 1px 2px rgba(0, 0, 0, .02), 0 4px 12px rgba(79, 70, 229, .05);
}
a.lc.savoir-faire:hover { box-shadow: 0 0 0 1px rgba(79, 70, 229, .25), 0 14px 36px rgba(79, 70, 229, .15), 0 30px 60px rgba(79, 70, 229, .07); }
.lc.savoir-faire .lc-tag { color: #4338ca; }
a.lc.savoir-faire:hover .lc-arrow { color: #4338ca; }

.lc.delf {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, .15), 0 1px 2px rgba(0, 0, 0, .02), 0 4px 12px rgba(217, 119, 6, .06);
}
a.lc.delf:hover { box-shadow: 0 0 0 1px rgba(217, 119, 6, .3), 0 14px 36px rgba(217, 119, 6, .18), 0 30px 60px rgba(217, 119, 6, .08); }
.lc.delf .lc-tag { color: #b45309; }
a.lc.delf:hover .lc-arrow { color: #b45309; }

/* Cartes avec image */
.lc.with-thumb, .lc.bonus, .lc.flash {
  overflow: hidden; padding: 0; min-height: 220px;
}
.lc.with-thumb .lc-thumb,
.lc.bonus .bonus-thumb,
.lc.flash .flash-thumb {
  width: 100%; aspect-ratio: 16/10;
  background-size: cover; background-position: center;
  background-color: #f3f4f6;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
a.lc.with-thumb:hover .lc-thumb,
a.lc.bonus:hover .bonus-thumb,
a.lc.flash:hover .flash-thumb { transform: scale(1.06); }
.lc.with-thumb .lc-body,
.lc.bonus .bonus-body,
.lc.flash .flash-body {
  padding: 14px 20px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.lc.with-thumb .lc-title,
.lc.bonus .lc-title,
.lc.flash .lc-title { font-size: 1rem; margin-top: 0; }

.lc.bonus {
  box-shadow: 0 0 0 1px rgba(217, 119, 6, .1), 0 1px 2px rgba(0, 0, 0, .03), 0 4px 12px rgba(217, 119, 6, .06);
}
a.lc.bonus:hover { box-shadow: 0 0 0 1px rgba(217, 119, 6, .25), 0 14px 36px rgba(217, 119, 6, .18), 0 30px 60px rgba(217, 119, 6, .08); }
.lc.bonus .lc-tag { color: #b45309; }

.lc.bonus.special-coco { box-shadow: 0 0 0 1px rgba(236, 72, 153, .15), 0 1px 2px rgba(0, 0, 0, .03), 0 4px 12px rgba(236, 72, 153, .07); }
a.lc.bonus.special-coco:hover { box-shadow: 0 0 0 1px rgba(236, 72, 153, .3), 0 14px 36px rgba(236, 72, 153, .2), 0 30px 60px rgba(236, 72, 153, .09); }
.lc.bonus.special-coco .lc-tag { color: #ec4899; }

.lc.flash {
  box-shadow: 0 0 0 1px rgba(236, 72, 153, .12), 0 1px 2px rgba(0, 0, 0, .03), 0 4px 12px rgba(236, 72, 153, .06);
}
a.lc.flash:hover { box-shadow: 0 0 0 1px rgba(236, 72, 153, .28), 0 14px 36px rgba(236, 72, 153, .18), 0 30px 60px rgba(236, 72, 153, .08); }
.lc.flash .lc-tag { color: #be185d; }

.lc.situation {
  color: white;
  background: linear-gradient(135deg, #7c2d12, #5b1a1a);
  min-height: 180px;
  box-shadow: 0 0 0 1px rgba(124, 45, 18, .3), 0 4px 12px rgba(92, 26, 26, .2), 0 12px 28px rgba(92, 26, 26, .25);
}
a.lc.situation:hover { box-shadow: 0 0 0 1px rgba(124, 45, 18, .5), 0 14px 36px rgba(92, 26, 26, .35), 0 30px 60px rgba(92, 26, 26, .15); }
.lc.situation .lc-tag { color: #fbbf24; }
.lc.situation .lc-title { color: white; }
.lc.situation .lc-cn { color: #fde68a; }
.lc.situation .lc-arrow { color: #fbbf24; }
a.lc.situation:hover .lc-arrow { color: white; }
.lc.situation.disputes { background: linear-gradient(135deg, #7f1d1d, #450a0a); }

/* Banner final */
.lvl-complete-banner {
  max-width: 1200px;
  margin: 60px auto 30px;
  padding: 0 24px;
}
.lvl-complete-inner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 20px;
  padding: 32px 36px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(212, 175, 55, .15);
}
.lvl-complete-inner h3 {
  font-family: "Playfair Display", serif;
  color: #78350f;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 8px;
}
.lvl-complete-inner h3 strong { color: var(--rouge-france); font-style: italic; }
.lvl-complete-inner p {
  color: #92400e;
  margin: 0 0 16px;
  font-size: 1rem;
}
.lvl-complete-inner .next-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: var(--bleu-france);
  color: white;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 38, 84, .25);
  transition: all .2s ease;
}
.lvl-complete-inner .next-btn:hover {
  background: var(--rouge-france);
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  .unit-v2-header { gap: 12px; }
  .unit-v2-number { font-size: 3rem; }
  .lvl-stats .lvl-stat { padding: 10px 14px; gap: 8px; }
  .lvl-stats .lvl-stat .num { font-size: 1.3rem; }
}
