/* =====================================================
   LILYA.FR — Design System v3
   ===================================================== */

:root {
  --bg:      #FDFAF4;
  --surface: #FFFFFF;
  --ink:     #0F0E0C;
  --ink-2:   #3D3A35;
  --muted:   #78726A;
  --border:  rgba(15,14,12,0.09);
  --bdr-str: rgba(15,14,12,0.18);

  --purple:   #6D28D9;
  --purple-d: #5B21B6;
  --purple-l: #F5F3FF;
  --purple-m: #8B5CF6;
  --purple-mm:#C4B5FD;

  --coral:   #E54D2E;
  --coral-d: #C2410C;
  --coral-l: #FFF4F2;

  --green: #059669; --green-l: #ECFDF5;
  --red:   #DC2626; --red-l:   #FEF2F2;

  --sh-xs: 0 1px 4px rgba(0,0,0,0.05);
  --sh-sm: 0 3px 12px rgba(0,0,0,0.07);
  --sh:    0 10px 32px rgba(0,0,0,0.09);
  --sh-lg: 0 24px 64px rgba(109,40,217,0.18);
  --sh-purple: 0 12px 40px rgba(109,40,217,0.4);

  --r-xs: 6px; --r-sm: 12px; --r: 20px; --r-lg: 32px; --pill: 999px;

  --body: "Nunito", system-ui, sans-serif;
  --head: "Fraunces", Georgia, serif;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  font-family: var(--body); color: var(--ink);
  background: var(--bg); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,video { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; }
fieldset { border: none; }
a { color: var(--purple); }

/* === LAYOUT === */
.wrap    { width: min(1140px, 100% - 40px); margin: 0 auto; }
.wrap-md { width: min(820px,  100% - 40px); margin: 0 auto; }
.wrap-sm { width: min(600px,  100% - 40px); margin: 0 auto; }
.section { padding: 80px 0; }
.section-top { padding-top: 48px; }

.skip { position:absolute; left:-9999px; background:#000; color:#fff; padding:8px 16px; border-radius:var(--r-sm); }
.skip:focus { left:16px; top:16px; z-index:200; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.cahier-matieres { display: flex; flex-direction: column; gap: 0; }
.cahier-matieres .opt-card { margin-bottom: 10px; }
.cahier-matieres .opt-card:has(input:checked) { border-color: var(--coral); background: var(--coral-l); }
.cahier-matieres .opt-card:has(input:checked) .opt-title { color: var(--coral-d); }
.classe-field { border: 0; margin: 0; padding: 0; }
.classe-field .opt-card { margin-bottom: 10px; }

/* ============================
   HEADER
   ============================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,250,244,0.88); backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.hd-inner {
  display: flex; align-items: center;
  height: 68px; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-img { height: 46px; background: #fff; border-radius: 14px; padding: 5px 14px; box-shadow: var(--sh-sm); }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 700;
  padding: 8px 13px; border-radius: var(--r-sm); font-size: 0.94rem;
  transition: background 0.14s, color 0.14s;
}
.main-nav a:hover { background: var(--purple-l); color: var(--purple); }
.main-nav a.active { color: var(--purple); }
.main-nav a.nav-cta {
  background: var(--ink); color: #fff; border-radius: var(--pill); padding: 9px 18px; margin-left: 6px;
}
.main-nav a.nav-cta:hover { background: var(--purple); color: #fff; }

.burger {
  display: none; border: none; background: none;
  width: 40px; height: 40px; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ============================
   FLASH
   ============================ */
.flash {
  width: min(1140px,100% - 40px); margin: 14px auto;
  padding: 12px 18px; border-radius: var(--r-sm); font-weight: 700;
}
.flash-success { background: var(--green-l); color: #065F46; border-left: 3px solid var(--green); }
.flash-error   { background: var(--red-l);   color: #7F1D1D; border-left: 3px solid var(--red); }

/* ============================
   TYPOGRAPHY
   ============================ */
h1 { font-family: var(--head); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; font-size: clamp(2.4rem,5vw,4.4rem); }
h2 { font-family: var(--head); font-weight: 700; line-height: 1.1;  letter-spacing: -0.025em; font-size: clamp(1.7rem,3.5vw,2.6rem); }
h3 { font-weight: 800; line-height: 1.2; font-size: 1.05rem; }
em { font-style: italic; }
.lede    { font-size: 1.1rem; color: var(--muted); line-height: 1.7; }
.lede-sm { font-size: 0.95rem; color: var(--muted); line-height: 1.65; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--purple-l); color: var(--purple);
  font-weight: 800; font-size: 0.78rem; padding: 5px 12px;
  border-radius: var(--pill); text-transform: uppercase; letter-spacing: 0.08em;
}
.eyebrow-coral { background: var(--coral-l); color: var(--coral-d); }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--pill); padding: 14px 26px;
  font-weight: 800; font-size: 1rem; font-family: var(--body);
  text-decoration: none; transition: all 0.2s; white-space: nowrap; cursor: pointer;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary { background: linear-gradient(180deg, #7C3AED 0%, var(--purple) 62%); color: #fff; box-shadow: 0 2px 16px rgba(109,40,217,0.28), inset 0 1px 0 rgba(255,255,255,0.22); }
.btn-primary:hover { background: var(--purple-d); transform: translateY(-2px); box-shadow: 0 6px 28px rgba(109,40,217,0.42); color: #fff; }

.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 2px 14px rgba(229,77,46,0.24); }
.btn-coral:hover { background: var(--coral-d); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(229,77,46,0.36); color: #fff; }

.btn-outline { background: transparent; color: var(--purple); box-shadow: inset 0 0 0 2px var(--purple); }
.btn-outline:hover { background: var(--purple-l); transform: translateY(-2px); color: var(--purple); }

.btn-ghost { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--bdr-str); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); transform: translateY(-1px); }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-xs { padding: 6px 12px; font-size: 0.8rem; }

.card  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-xs); }
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-sm); padding: 28px; }

/* ============================
   HERO — composition unique
   ============================ */
.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
}
.hero-home {
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  background:
    linear-gradient(165deg, #FFF8EF 0%, #F7EFE3 42%, #EDE4D6 100%);
}
.hero-atmosphere {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 70% at 88% 40%, rgba(232, 140, 70, 0.22) 0%, transparent 62%),
    radial-gradient(ellipse 40% 50% at 8% 90%, rgba(30, 53, 68, 0.08) 0%, transparent 55%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 28px,
      rgba(15, 14, 12, 0.015) 28px,
      rgba(15, 14, 12, 0.015) 29px
    );
}
.hero-home-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  width: min(1140px, 100% - 40px);
  margin: 0 auto;
}
.hero-brand {
  font-family: var(--head);
  font-size: clamp(3.4rem, 7.2vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--ink);
  margin: 0 0 14px;
  animation: hero-rise 0.7s ease both;
}
.hero-title {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  animation: hero-rise 0.75s 0.08s ease both;
}
.hero-sub {
  max-width: 34ch;
  margin: 0 0 30px;
  color: var(--ink-2);
  animation: hero-rise 0.75s 0.14s ease both;
}
.hero-actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  animation: hero-rise 0.75s 0.2s ease both;
}
.hero-actions .btn-primary {
  background: linear-gradient(180deg, #E89A52 0%, #C46A28 70%);
  color: #1A120C;
  box-shadow: 0 2px 16px rgba(196, 106, 40, 0.32);
}
.hero-actions .btn-primary:hover {
  background: #A8521C;
  color: #fff;
  box-shadow: 0 6px 24px rgba(168, 82, 28, 0.4);
}
.hero-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(30, 53, 68, 0.22);
}
.hero-stage {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-stage::before {
  content: "";
  position: absolute;
  width: min(100%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 140, 70, 0.35) 0%, transparent 68%);
  bottom: 8%;
  animation: hero-glow 5s ease-in-out infinite alternate;
}
.hero-mascot {
  position: relative;
  z-index: 2;
  width: min(280px, 70%);
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(92, 36, 16, 0.22));
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hero-glow {
  from { transform: scale(0.92); opacity: 0.7; }
  to   { transform: scale(1.06); opacity: 1; }
}

/* Legacy hero bits still used elsewhere */
.hero-layout { display: grid; grid-template-columns: 1fr 0.72fr; align-items: center; gap: 60px; }
.hero-text { max-width: 580px; }
.hero-title em { color: var(--coral); }
.hero-visual { position: relative; }
.hero-demo { display: none; }

/* ============================
   CLASS GRID — primaire / collège
   ============================ */
.classes-sec { padding: 12px 0 88px; }
.classes-head { margin-bottom: 36px; max-width: 36rem; }
.classes-head h2 { margin-bottom: 8px; }
.classes-head .lede { margin: 0; }

.cycle {
  margin-bottom: 28px;
  padding: 22px 20px 20px;
  border-radius: calc(var(--r) + 6px);
}
.cycle-primaire {
  background: linear-gradient(180deg, rgba(240, 184, 122, 0.16) 0%, rgba(240, 184, 122, 0.05) 100%);
  border: 1px solid rgba(196, 106, 40, 0.14);
}
.cycle-college {
  background: linear-gradient(180deg, rgba(30, 53, 68, 0.08) 0%, rgba(15, 31, 42, 0.04) 100%);
  border: 1px solid rgba(30, 53, 68, 0.14);
}
.cycle-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px;
  margin-bottom: 16px;
}
.cycle-label {
  font-weight: 800; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.12em; margin: 0;
}
.cycle-primaire .cycle-label { color: #8B3A14; }
.cycle-college .cycle-label { color: #1E3544; }
.cycle-hint {
  margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--muted);
}

.class-grid   { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.class-pick   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 520px; margin-top: 22px; }
.class-pick .class-card { font: inherit; cursor: pointer; width: 100%; }
.classe-field { border: 0; padding: 0; margin: 0 0 14px; }
.classe-field legend { font-weight: 800; margin-bottom: 8px; }
.classe-switch { margin: -8px 0 22px; font-size: .92rem; }
.class-grid-4 { grid-template-columns: repeat(4, 1fr); }

.class-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 7px; padding: 20px 12px 16px; text-decoration: none;
  background: var(--surface);
  border: 2px solid #E8E2D9;
  border-radius: var(--r); color: var(--ink); text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.class-card:hover {
  transform: translateY(-4px);
  color: inherit;
}

/* Ouvertes : dégradé progressif (plus foncé = plus haut dans le cycle) */
.class-card.is-open {
  background: linear-gradient(155deg, var(--cc-from) 0%, var(--cc-to) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--cc-to) 38%, transparent);
}
.class-card.is-open:hover {
  transform: translateY(-5px) scale(1.02);
  filter: brightness(1.04);
}
.class-card.is-open .cc-label { color: #fff; }
.class-card.is-open .cc-sub { color: rgba(255,255,255,0.78); }
.class-card.is-open .cc-badge {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}
.class-card.is-college.is-open {
  box-shadow: 0 12px 30px rgba(15, 31, 42, 0.28);
}
.class-card.is-soon {
  opacity: 0.72;
  background: #F7F2EA;
}

.cc-emoji {
  font-size: 1.85rem; line-height: 1;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.08));
  transition: transform 0.22s;
}
.class-card:hover .cc-emoji { transform: scale(1.12); }

/* Compat anciennes pages (commencer, etc.) */
.cc-bubble {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; flex-shrink: 0;
  transition: transform 0.22s;
}
.class-card:hover .cc-bubble { transform: scale(1.1); }
.class-card.is-lit {
  background: linear-gradient(150deg, #C45E2A 0%, #8B3A14 100%);
  border-color: transparent;
  color: #fff;
}
.class-card.is-lit .cc-label { color: #fff; }
.class-card.is-lit .cc-sub { color: rgba(255,255,255,0.7); }
.class-card.is-lit .cc-badge {
  background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.28);
}

.cc-label { font-weight: 800; font-size: 1.05rem; }
.cc-sub   { font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.cc-badge {
  font-size: 0.7rem; font-weight: 800; padding: 3px 9px;
  border-radius: 8px; margin-top: 2px;
  border: 1.5px solid var(--border);
}
.badge-active { background: rgba(196, 94, 42, 0.12); color: #8B3A14; border-color: rgba(196, 94, 42, 0.22); }
.badge-soon   { background: #F3EFE8; color: var(--muted); border-color: #E0D9CE; }

.home-how {
  padding: 72px 0;
  background:
    linear-gradient(180deg, #F4F0E8 0%, #FDFAF4 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.home-bilan {
  padding: 72px 0;
  background: linear-gradient(160deg, #1E3544 0%, #0F1F2A 55%, #2A1810 100%);
  color: #F7F2EA;
}
.home-bilan-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.home-bilan h2 { color: #fff; margin: 10px 0 12px; }
.home-bilan .lede { color: rgba(247, 242, 234, 0.82); }
.home-bilan .eyebrow {
  background: rgba(240, 184, 122, 0.18);
  color: #F0B87A;
}
.home-bilan-points {
  margin: 18px 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.home-bilan-points li {
  position: relative;
  padding-left: 22px;
  font-weight: 700;
  color: rgba(247, 242, 234, 0.92);
}
.home-bilan-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: #F0B87A;
}
.home-bilan .btn-primary {
  background: linear-gradient(180deg, #F0B87A 0%, #D8893A 70%);
  color: #1A120C;
  box-shadow: 0 2px 16px rgba(216, 137, 58, 0.35);
}
.home-bilan .btn-primary:hover {
  background: #C46A28;
  color: #fff;
}
.home-bilan-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  backdrop-filter: blur(8px);
}
.home-bilan-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F0B87A;
  margin: 0 0 12px;
}
.home-bilan-score {
  font-family: var(--head);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  margin: 0 0 12px;
  color: #fff;
}
.home-bilan-score strong { font-weight: 700; }
.home-bilan-meta { margin: 0 0 10px; font-weight: 700; color: rgba(247,242,234,0.9); }
.home-bilan-note { margin: 0; font-size: 0.85rem; color: rgba(247,242,234,0.55); }
@media (max-width: 860px) {
  .home-bilan-inner { grid-template-columns: 1fr; }
}
.home-print .print-teaser-vis {
  position: relative;
  min-height: 140px;
}
.print-sheet {
  position: absolute;
  right: 18%;
  top: 10%;
  width: 88px; height: 112px;
  background: #fff;
  border: 1px solid #E4DDD2;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(15,14,12,0.1);
  transform: rotate(6deg);
}
.print-sheet::before {
  content: "";
  position: absolute; left: 14px; right: 14px; top: 18px;
  height: 6px; border-radius: 3px; background: #EDE6DA;
  box-shadow: 0 14px 0 #EDE6DA, 0 28px 0 #EDE6DA, 0 42px 0 #EDE6DA;
}
.print-sheet-2 {
  right: 32%;
  top: 22%;
  transform: rotate(-8deg);
  background: #FFF8F0;
}

/* ============================
   NUMBERED STEPS
   ============================ */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; margin-top: 48px; }
.step-n {
  font-family: var(--head); font-size: 3.2rem; font-weight: 700;
  color: #C4A484; line-height: 1; margin-bottom: 14px;
}
.home-how .step-n { color: #B8895C; }
.cycle-college + .home-how .step-n,
.home-how .step-item:nth-child(3) .step-n,
.home-how .step-item:nth-child(4) .step-n { color: #7A8F9C; }
.step-item h3 { margin-bottom: 7px; }
.step-item p  { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

/* ============================
   PRINT TEASER
   ============================ */
.print-teaser {
  background: linear-gradient(140deg, #FFF9F7 0%, #FFEDE7 100%);
  border: 2px solid rgba(229,77,46,0.18); border-radius: var(--r-lg);
  padding: 56px 52px; display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 48px; margin-top: 24px;
}
.home-coeur-card {
  background: linear-gradient(145deg, #fff9f3 0%, #f8e6d4 100%);
  border: 2px solid rgba(180, 90, 50, 0.16);
  border-radius: var(--r-lg);
  padding: 48px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.75fr);
  gap: 32px;
  align-items: center;
}
.home-coeur-card h2 { margin: 12px 0; }
.home-beats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.home-beats li {
  background: #fff;
  border-radius: 16px;
  padding: 14px 6px;
  text-align: center;
}
.home-beats strong {
  display: block;
  font-family: var(--head);
  font-size: 1.05rem;
  line-height: 1.15;
}
.home-beats span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}
.home-beats li:last-child { background: #1c1410; color: #fff8f1; }
.home-beats li:last-child span { color: #e7c3b2; }

.print-teaser h2 { margin: 14px 0 12px; }
.print-teaser .lede { font-size: 1rem; }
.print-teaser-vis { font-size: 5.5rem; line-height: 1.1; text-align: center; }

/* ============================
   SUBJECT GRID (classe.php)
   ============================ */
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.subject-grid-lancer { margin-top: 12px; }
.subject-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--surface); border: 2px solid #E8E2D9;
  border-radius: var(--r); text-decoration: none; color: var(--ink);
  transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.subject-card.avail:hover { border-color: var(--purple); box-shadow: var(--sh); transform: translateX(4px); color: var(--ink); }
.subject-card.soon { opacity: 0.58; }
.subject-card-hasard {
  margin-top: 20px;
  border-color: var(--purple);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(249, 115, 22, 0.08));
}
.subject-card-hasard:hover { transform: translateY(-2px); }
.sc-icon { font-size: 2.2rem; flex-shrink: 0; }
.sc-label { font-weight: 800; font-size: 1.05rem; }
.sc-desc  { font-size: 0.84rem; color: var(--muted); }
.sc-arrow { margin-left: auto; font-size: 1.1rem; color: var(--purple); }

/* ============================
   UNITS (cm1-francais.php)
   ============================ */
.units-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.unit-card {
  display: block; padding: 22px;
  background: var(--surface); border: 2px solid #E8E2D9;
  border-radius: var(--r); text-decoration: none; color: var(--ink);
  transition: all 0.22s; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.unit-card:hover { border-color: var(--purple); box-shadow: var(--sh); transform: translateY(-3px); color: var(--ink); }
.uc-top   { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.uc-emoji { font-size: 1.8rem; flex-shrink: 0; margin-top: 1px; }
.uc-title { font-weight: 800; font-size: 1rem; line-height: 1.3; }
.uc-goal  { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.uc-foot  { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.uc-score { font-size: 0.78rem; font-weight: 700; color: var(--purple); white-space: nowrap; }
.progress { flex: 1; height: 6px; background: #E8E2D9; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--purple); border-radius: 3px; }

/* ============================
   QUIZ (lecon.php)
   ============================ */
.quiz-wrap { max-width: 700px; margin: 0 auto; }

.lesson-block {
  background: var(--surface); border: 1px solid #E8E2D9;
  border-radius: var(--r); padding: 24px; margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.lesson-block-label {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--purple); margin-bottom: 10px;
}
.lesson-block h3 { font-size: 0.97rem; margin: 12px 0 5px; }
.lesson-block ul, .lesson-block ol { padding-left: 18px; }
.lesson-block li { margin-bottom: 4px; font-size: 0.93rem; }
.lesson-block p  { font-size: 0.93rem; margin-bottom: 8px; }

.quiz-form { margin-top: 24px; }
.quiz-form-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.quiz-form-hd h2 { font-size: 1.2rem; }
.quiz-count { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.quiz-hint  { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; }

.q-block {
  background: var(--surface); border: 1.5px solid #E8E2D9;
  border-radius: var(--r); padding: 18px; margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.q-hd  { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.q-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.76rem; font-weight: 800; color: var(--muted); flex-shrink: 0; margin-top: 1px;
}
.q-text  { font-weight: 700; font-size: 0.95rem; line-height: 1.5; }
.q-multi { font-size: 0.78rem; color: var(--purple); font-weight: 700; margin-bottom: 8px; }

.choice-list { display: grid; gap: 7px; }
.choice-lbl {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
  border: 2px solid #E8E2D9; border-radius: var(--r-sm);
  cursor: pointer; background: var(--surface);
  transition: border-color 0.12s, background 0.12s;
  font-weight: 600; font-size: 0.93rem;
}
.choice-lbl:hover { border-color: var(--purple-mm); background: var(--purple-l); }
.choice-lbl input { flex-shrink: 0; margin-top: 3px; accent-color: var(--purple); }

/* Seules les réponses sélectionnées incorrectes → rouge. Jamais de vert. */
.choice-lbl.is-wrong { border-color: var(--red); background: var(--red-l); color: var(--red); }
.choice-lbl.is-wrong:hover { border-color: var(--red); background: var(--red-l); }

.q-explain {
  margin-top: 10px; padding: 10px 14px;
  background: var(--red-l); border-left: 3px solid var(--red);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.84rem; color: #7F1D1D; font-weight: 600;
}

.quiz-submit-row { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.score-box { text-align: center; padding: 32px 24px; margin-top: 18px; }
.score-emo   { font-size: 3rem; display: block; margin-bottom: 6px; }
.score-val   { font-family: var(--head); font-size: 4rem; font-weight: 700; color: var(--purple); line-height: 1; display: block; }
.score-denom { font-size: 1.6rem; color: var(--muted); }
.score-msg   { color: var(--muted); margin: 8px 0 22px; font-size: 0.97rem; }
.score-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ============================
   WIZARD (imprimer.php)
   ============================ */
.wiz-steps { display: flex; gap: 6px; margin: 14px 0 28px; }
.wiz-steps span { flex: 1; height: 5px; background: #E8E2D9; border-radius: 3px; transition: background 0.25s; }
.wiz-steps span.on { background: var(--purple); }

.dur-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.dur-tile[hidden] { display: none !important; }
.dur-tile {
  position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 5px; padding: 16px 8px;
  border: 2px solid #E8E2D9; border-radius: var(--r-sm);
  cursor: pointer; text-align: center; transition: all 0.15s;
}
.dur-tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.dur-tile:has(input:checked) { border-color: var(--purple); background: var(--purple-l); }
.dur-time { font-family: var(--head); font-size: 1.4rem; font-weight: 700; line-height: 1; }
.dur-desc { font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.dur-tile:has(input:checked) .dur-desc { color: var(--purple-d); }

.opt-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
  border: 2px solid #E8E2D9; border-radius: var(--r-sm);
  cursor: pointer; margin-bottom: 8px; transition: all 0.15s; font-weight: 600;
}
.opt-card:has(input:checked) { border-color: var(--purple); background: var(--purple-l); }
.opt-card input { flex-shrink: 0; margin-top: 3px; accent-color: var(--purple); }
.opt-title { font-weight: 800; display: block; }
.opt-desc  { font-size: 0.85rem; color: var(--muted); }
.opt-card:has(input:checked) .opt-desc { color: var(--purple-d); }

/* ============================
   FORMS
   ============================ */
.fg { margin-bottom: 18px; }
.fg label { display: block; font-weight: 800; margin-bottom: 6px; font-size: 0.95rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; border: 2px solid var(--bdr-str); border-radius: 14px;
  padding: 12px 16px; font: inherit; background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=date] {
  min-height: 54px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 14px 16px;
}
input[type=date]::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.1);
}
.fhelp { font-size: 0.85rem; color: var(--muted); margin-top: 5px; }
.chk {
  display: block;
  position: relative;
  padding-left: 1.85rem;
  font-weight: 600;
  margin: 14px 0;
  cursor: pointer;
  line-height: 1.45;
  color: var(--ink-2);
}
.chk input {
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--purple);
}
.chk a { font-weight: 800; }
.form-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.form-actions .btn {
  min-height: 52px;
  flex: 1 1 148px;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  padding: 14px 18px;
}

/* ============================
   BREADCRUMB
   ============================ */
.crumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.84rem; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--purple); }
.crumb-sep { color: #D5CFC7; }
.crumb-cur { color: var(--ink); font-weight: 700; }

/* ============================
   AUTH
   ============================ */
.auth-page { max-width: 420px; margin: 56px auto; }
.auth-page .panel { padding: 36px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--muted); }

/* ============================
   ESPACE
   ============================ */
.stats-row { display: flex; gap: 14px; margin: 24px 0; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 100px; text-align: center; padding: 22px 10px; }
.stat-n { font-family: var(--head); font-size: 2.8rem; font-weight: 700; color: var(--purple); line-height: 1; }
.stat-l { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ============================
   LEGAL / CONTACT
   ============================ */
.legal-page { max-width: 680px; margin: 40px auto; }
.legal-page h2 { margin: 24px 0 8px; font-size: 1.15rem; }
.legal-page p, .legal-page ul { margin-bottom: 10px; font-size: 0.97rem; }
.legal-page li { margin-left: 18px; }

/* ============================
   FOOTER
   ============================ */
.site-footer { background: #0F0E0C; color: #C5BEB5; padding: 60px 0 28px; margin-top: 100px; }
.ft-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.ft-logo { height: 40px; background: #fff; border-radius: 12px; padding: 5px 12px; margin-bottom: 14px; }
.ft-tag  { font-size: 0.88rem; line-height: 1.65; color: #9A9188; }
.site-footer h3 { color: #fff; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.13em; margin-bottom: 14px; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.site-footer a  { color: #C5BEB5; text-decoration: none; font-size: 0.9rem; }
.site-footer a:hover { color: #fff; }
.ft-copy { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 22px; text-align: center; font-size: 0.78rem; color: #716B62; }

/* ============================
   CAHIER
   ============================ */
.cahier-body { background: #fff; }
.cahier-sheet {
  width: min(760px, calc(100% - 24px));
  margin: 8px auto 32px;
  background: #fff;
  padding: 28px 22px 36px;
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}
.cahier-head, .cahier-hd {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  border-bottom: 2px solid #000; padding-bottom: 12px; margin-bottom: 16px;
}
.cahier-q, .q-print { margin: 18px 0; page-break-inside: avoid; }
.cahier-q p, .q-print p { margin-bottom: 6px; }
.cahier-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 24px;
}
.cahier-toolbar .btn { width: 100%; white-space: normal; line-height: 1.3; min-height: 50px; }
@media (min-width: 720px) {
  .cahier-sheet { padding: 36px 40px 44px; }
  .cahier-toolbar { flex-direction: row; flex-wrap: wrap; }
  .cahier-toolbar .btn { width: auto; flex: 1; }
}
.dotline { border-bottom: 1px dotted #aaa; height: 28px; margin: 5px 0; }

/* ============================
   PARCOURS — STATUTS & ÉTOILES
   ============================ */
.statut-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--pill);
  font-size: 0.76rem; font-weight: 800; white-space: nowrap; letter-spacing: .01em;
}
.statut-nc { background: #F1EFEA; color: #6B6660; }
.statut-ec { background: #FEF3C7; color: #B45309; }
.statut-ok { background: var(--green-l); color: #047857; }
.statut-rv { background: #FEF2F2; color: #B91C1C; }

.etoiles { display: inline-flex; gap: 1px; font-size: 1rem; line-height: 1; }
.etoiles .et { color: #E4DFD6; }
.etoiles .et.on { color: #F59E0B; text-shadow: 0 1px 0 rgba(0,0,0,.08); }

.statut-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: #E1DCD3; }
.statut-dot-en_cours  { background: #F59E0B; }
.statut-dot-maitrisee { background: var(--green); }

/* ============================
   PARCOURS — PAGE CM1 (domaines)
   ============================ */
.page-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }

/* Carte joueur (XP / niveau / série) */
.player-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #1E1B4B 0%, #4C1D95 60%, #6D28D9 100%);
  color: #fff; border-radius: var(--r); padding: 18px 22px; margin-bottom: 22px;
  box-shadow: var(--sh-purple);
}
.pc-avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 1.8rem; }
.pc-avatar img { width: 46px; height: auto; }
.pc-name  { font-family: var(--head); font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.pc-level { font-size: 0.82rem; opacity: .85; margin-top: 2px; }
.pc-bar   { height: 8px; background: rgba(255,255,255,.18); border-radius: var(--pill); overflow: hidden; margin-top: 8px; }
.pc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #FDE68A, #F59E0B); border-radius: var(--pill); }
.pc-bar-lbl { font-size: 0.72rem; opacity: .8; margin-top: 4px; }
.pc-stats { display: flex; gap: 14px; }
.pc-stat  { text-align: center; min-width: 54px; }
.pc-stat b { display: block; font-family: var(--head); font-size: 1.35rem; line-height: 1; }
.pc-stat span { font-size: 0.68rem; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }

/* Mission du jour */
.mission-box {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  background: var(--surface); border: 2px solid var(--purple-mm); border-radius: var(--r);
  padding: 18px 22px; margin-bottom: 26px; box-shadow: var(--sh-sm); position: relative; overflow: hidden;
}
.mission-box::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(180deg, var(--purple), var(--coral)); }
.mission-bravo { border-color: #6EE7B7; }
.mission-cta   { border-color: #FECACA; }
.mission-icon  { width: 54px; height: 54px; border-radius: 16px; background: var(--purple-l); display: grid; place-items: center; font-size: 1.6rem; }
.mission-label { font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; color: var(--purple); margin-bottom: 2px; }
.mission-title { font-family: var(--head); font-size: 1.25rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.mission-desc  { font-size: 0.85rem; color: var(--muted); margin-top: 3px; }

/* Grille domaines */
.domaines-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.domaine-card {
  --c: var(--dc, var(--purple));
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border-radius: var(--r); padding: 18px 18px 16px;
  border: 2px solid var(--border); box-shadow: var(--sh-xs); position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.domaine-card::after { content: ''; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--c) 10%, transparent); }
.domaine-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--c); }
.dc-head  { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; position: relative; }
.dc-emoji { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.55rem; background: color-mix(in srgb, var(--c) 14%, white); }
.dc-label { display: block; font-size: 1.02rem; font-weight: 900; }
.dc-sub   { display: block; font-size: 0.78rem; color: var(--muted); }
.dc-accroche { font-size: 0.85rem; color: var(--ink-2); margin: 0 0 10px; }
.dc-progress { height: 8px; }
.dc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.dc-dots { display: flex; gap: 5px; }

.progress-bar { height: 8px; background: rgba(15,14,12,.07); border-radius: var(--pill); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple-m)); border-radius: var(--pill); transition: width .5s ease; }

/* Domaine hero */
.domaine-hero {
  --c: var(--dc, var(--purple));
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, white), color-mix(in srgb, var(--c) 4%, white));
  border: 2px solid color-mix(in srgb, var(--c) 22%, white);
  border-radius: var(--r); padding: 26px 30px; margin-bottom: 18px;
}
.dh-emoji { width: 68px; height: 68px; border-radius: 20px; background: #fff; display: grid; place-items: center; font-size: 2.1rem; box-shadow: var(--sh-xs); }
.dh-text h1 { margin-bottom: 2px; }
.dh-accroche { color: var(--ink-2); margin-bottom: 8px; }
.dh-stat  { font-size: 0.86rem; color: var(--muted); font-weight: 700; }

/* Chemin de compétences */
.comp-path { position: relative; display: flex; flex-direction: column; gap: 12px; padding-left: 26px; }
.comp-path::before { content: ''; position: absolute; left: 10px; top: 20px; bottom: 20px; width: 3px; background: #E9E4DB; border-radius: 3px; }
.comp-card {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  text-decoration: none; color: var(--ink);
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--r);
  padding: 14px 18px; box-shadow: var(--sh-xs); transition: all .18s;
}
.comp-card::before {
  content: ''; position: absolute; left: -26px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: #E1DCD3; border: 3px solid var(--bg); box-shadow: 0 0 0 2px #E9E4DB;
}
.comp-card.st-en_cours::before  { background: #F59E0B; box-shadow: 0 0 0 2px #F59E0B; }
.comp-card.st-maitrisee::before { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.comp-card.is-next { border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-l), var(--sh-sm); }
.comp-card:hover { border-color: var(--purple); box-shadow: var(--sh); transform: translateX(3px); }
.cc-emoji { width: 46px; height: 46px; border-radius: 14px; background: var(--purple-l); display: grid; place-items: center; font-size: 1.4rem; }
.cc-info strong { display: block; font-weight: 900; font-size: 1rem; line-height: 1.25; }
.cc-info span   { display: block; font-size: 0.82rem; color: var(--muted); }
.cc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.cc-duree { font-size: 0.74rem; color: var(--muted); font-weight: 700; }
.cc-next-tag { position: absolute; top: -10px; right: 14px; background: var(--purple); color: #fff; font-size: .68rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--pill); }

/* ============================
   SESSION (mission)
   ============================ */
.session-body .site-footer { display: none; }
.session-body main { min-height: calc(100vh - 72px); }
.session { --c: var(--dc, var(--purple)); width: min(720px, 100% - 32px); margin: 0 auto; padding: 14px 0 120px; }

/* barre du haut */
.ses-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.ses-quit { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: var(--muted); background: var(--surface); border: 2px solid var(--border); font-weight: 700; }
.ses-quit:hover { color: var(--ink); border-color: var(--bdr-str); }
.ses-steps { list-style: none; display: flex; justify-content: center; gap: 6px; }
.ses-step { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); font-size: .78rem; font-weight: 800; color: var(--muted); background: transparent; transition: all .25s; }
.ses-step.is-active { background: var(--purple); color: #fff; box-shadow: 0 4px 14px rgba(109,40,217,.3); }
.ses-step.is-done   { color: var(--green); }
.ses-step.is-done .ses-step-ico::after { content: ' ✓'; }
.ses-xp { justify-self: end; display: inline-flex; align-items: baseline; gap: 4px; background: #FFF7E6; border: 2px solid #FDE68A; color: #92400E; padding: 6px 12px; border-radius: var(--pill); font-weight: 900; font-size: .95rem; }
.ses-xp-bolt { font-size: .9rem; }
.ses-xp-unit { font-size: .7rem; letter-spacing: .05em; }
.ses-xp.bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.18); } 100% { transform: scale(1); } }

.ses-progress { height: 10px; background: rgba(15,14,12,.07); border-radius: var(--pill); overflow: hidden; margin: 14px 0 22px; }
.ses-progress-fill { height: 100%; width: 0; border-radius: var(--pill); background: linear-gradient(90deg, var(--purple), var(--coral)); transition: width .6s cubic-bezier(.2,.8,.2,1); }

/* écrans */
.scr { animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.slide-in { animation: fadeUp .3s ease; }

/* intro / prêt */
.scr-intro, .scr-ready { display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: center; }
.intro-mascot img { width: 100%; height: auto; filter: drop-shadow(0 12px 24px rgba(109,40,217,.18)); animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.intro-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); padding: 28px 30px; box-shadow: var(--sh); }
.intro-domaine { display: inline-block; font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); padding: 4px 10px; border-radius: var(--pill); margin-bottom: 10px; }
.intro-title { font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.1; margin-bottom: 8px; }
.intro-objectif { color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.intro-msg { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.intro-plan { display: grid; gap: 14px; margin-bottom: 24px; }
.plan-item { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; }
.plan-ico { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; box-shadow: var(--sh-xs); }
.plan-item strong { display: block; font-size: .92rem; }
.plan-item span:last-child { font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.intro-duree { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.btn-xl { width: 100%; padding: 16px 24px; font-size: 1.08rem; border-radius: 18px; }
.ready-badge { display: inline-block; background: var(--green-l); color: #047857; font-weight: 900; font-size: .78rem; padding: 5px 12px; border-radius: var(--pill); margin-bottom: 10px; }
.ready-rules { list-style: none; display: grid; gap: 8px; margin: 0 0 20px; }
.ready-rules li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); }
.ready-rules li span { background: #FFF7E6; color: #92400E; font-weight: 900; font-size: .8rem; padding: 3px 9px; border-radius: var(--pill); white-space: nowrap; }

/* échauffement */
.warm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.warm-eyebrow { font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; color: var(--purple); }
.warm-count { font-size: .82rem; font-weight: 800; color: var(--muted); background: var(--surface); border: 2px solid var(--border); padding: 3px 10px; border-radius: var(--pill); }
.slide { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); padding: 26px 28px 28px; box-shadow: var(--sh); min-height: 300px; }
.slide-kind { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: var(--pill); margin-bottom: 12px; }
.slide-regle   .slide-kind { background: var(--purple-l); color: var(--purple); }
.slide-exemple .slide-kind { background: #ECFEFF; color: #0E7490; }
.slide-astuce  .slide-kind { background: #FFF7E6; color: #B45309; }
.slide-rappel  .slide-kind { background: #F1EFEA; color: #57534E; }
.slide-title { font-size: 1.5rem; margin-bottom: 14px; line-height: 1.15; }
.slide-body { font-size: 1.05rem; line-height: 1.7; color: var(--ink-2); }
.slide-body p { margin-bottom: 12px; }
.slide-body ul, .slide-body ol { margin: 0 0 12px 20px; }
.slide-body li { margin-bottom: 8px; }
.slide-body strong { color: var(--ink); }
.slide-body em { font-style: italic; color: var(--ink); background: #FBF7EE; padding: 1px 6px; border-radius: 6px; }
.slide-body mark { background: #FDE68A; color: var(--ink); padding: 0 4px; border-radius: 4px; font-weight: 800; }
.slide-body .tok { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--purple); color: #fff; font-weight: 900; margin: 0 2px; }
.slide-body .liste-4 { list-style: none; margin-left: 0; display: grid; gap: 8px; }
.slide-body .liste-4 li { background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; }
.slide-body table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.slide-body td { padding: 8px 10px; border: 1px solid var(--border); font-size: 1rem; }
.slide-body .etapes { counter-reset: e; list-style: none; margin-left: 0; }
.slide-body .etapes li { position: relative; padding-left: 38px; }
.slide-body .etapes li::before { counter-increment: e; content: counter(e); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .85rem; }
.slide-dots { display: flex; justify-content: center; gap: 7px; margin: 16px 0 6px; }
.slide-dots span { width: 9px; height: 9px; border-radius: 50%; background: #E1DCD3; transition: all .25s; }
.slide-dots span.is-on { background: var(--purple); transform: scale(1.2); }
.slide-dots span.is-read { background: var(--green); }
.xp-pill { display: inline-block; margin-left: 8px; background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: var(--pill); font-size: .74rem; font-weight: 900; letter-spacing: .04em; }

/* actions fixes en bas sur mobile */
.ses-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; }
.ses-actions-epreuve { justify-content: stretch; flex-direction: column; align-items: stretch; }
.ses-actions-row { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.ses-actions-epreuve .btn { flex: 1; }
.btn.is-waiting { opacity: 0.85; box-shadow: none; }
.valider-hint { margin: 0; font-weight: 700; font-size: .92rem; color: #6d28d9; }
.valider-hint.is-ready { color: #047857; }
.valider-hint.is-shake { animation: shake .45s ease; }
.atelier-status { margin: 4px 0 10px; font-weight: 700; color: #6d28d9; }
.atelier-status.is-ready { color: #047857; }
.atelier-steps li.is-todo label { outline: 2px solid #c4b5fd; background: #f5f3ff; }
.intro-resume { display: none; gap: 10px; margin-top: 14px; text-align: left; }
.intro-resume:not([hidden]) { display: grid; }

/* épreuve */
.combo { display: inline-flex; align-items: center; gap: 4px; background: #FFF1E6; color: #C2410C; border: 2px solid #FDBA74; font-weight: 900; font-size: .78rem; padding: 3px 10px; border-radius: var(--pill); }
.combo.pop { animation: bump .4s ease; }
.ex-block { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); padding: 24px 26px; box-shadow: var(--sh); transition: border-color .25s; }
.ex-block.is-correct { border-color: var(--green); }
.ex-block.is-wrong-block { border-color: var(--red); }
.ex-block.shake { animation: shake .45s ease; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.ex-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ex-num { font-size: .78rem; font-weight: 900; color: var(--muted); }
.ex-type-badge { font-size: .7rem; font-weight: 900; padding: 3px 9px; border-radius: var(--pill); text-transform: uppercase; letter-spacing: .06em; }
.ex-type-qcm       { background: var(--purple-l); color: var(--purple); }
.ex-type-trou      { background: #FFF7E6; color: #B45309; }
.ex-type-selection { background: var(--green-l); color: #047857; }
.ex-type-ordre     { background: #ECFEFF; color: #0E7490; }
.ex-consigne { font-weight: 800; font-size: 1.12rem; line-height: 1.45; margin-bottom: 16px; color: var(--ink); }
.ex-contexte { background: #FBF7EE; border-left: 4px solid #F59E0B; border-radius: var(--r-xs); padding: 10px 14px; margin-bottom: 14px; font-style: italic; color: var(--ink-2); }
.ex-phrase { font-size: 1.25rem; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; line-height: 1.6; }
.ex-blank { min-width: 90px; display: inline-block; text-align: center; border-bottom: 3px dashed var(--purple-mm); color: var(--purple); font-weight: 900; padding: 0 10px; transition: all .2s; }
.ex-blank.filled { border-bottom-color: transparent; background: var(--purple-l); border-radius: 10px; padding: 2px 12px; }
.ex-blank.is-right { background: var(--green-l); color: #047857; }

/* choix QCM */
.ex-qcm-choices { display: grid; gap: 12px; }
.ex-choice { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 13px 14px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface); font-size: 1rem; font-weight: 600; color: var(--ink); transition: all .15s; }
.ex-choice:hover:not(:disabled) { border-color: var(--purple-mm); background: #FCFAFF; }
.ex-choice-letter { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--bg); display: grid; place-items: center; font-weight: 900; font-size: .85rem; color: var(--muted); }
.ex-choice.is-selected { border-color: var(--purple); background: var(--purple-l); }
.ex-choice.is-selected .ex-choice-letter { background: var(--purple); color: #fff; }
.ex-choice.is-wrong { border-color: var(--red); background: var(--red-l); }
.ex-choice.is-wrong .ex-choice-letter { background: var(--red); color: #fff; }
.ex-choice.is-right { border-color: var(--green); background: var(--green-l); }
.ex-choice.is-right .ex-choice-letter { background: var(--green); color: #fff; }
.ex-choice:disabled { cursor: default; }

/* chips (trou + ordre) */
.ex-chips, .ex-ordre-pool { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-chip { padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 2px solid var(--bdr-str); font-size: 1rem; font-weight: 800; color: var(--ink); transition: all .15s; box-shadow: 0 2px 0 var(--bdr-str); }
.ex-chip:hover:not(:disabled) { border-color: var(--purple); color: var(--purple); transform: translateY(-1px); }
.ex-chip.is-selected { border-color: var(--purple); background: var(--purple-l); color: var(--purple); box-shadow: 0 2px 0 var(--purple); }
.ex-chip.is-wrong { border-color: var(--red); background: var(--red-l); color: var(--red); box-shadow: 0 2px 0 var(--red); }
.ex-chip.is-right { border-color: var(--green); background: var(--green-l); color: #047857; box-shadow: 0 2px 0 var(--green); }
.ex-chip:disabled { cursor: default; opacity: .85; }

/* sélection de mots */
.ex-mots { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; font-size: 1.2rem; line-height: 1.5; }
.ex-mot { padding: 6px 12px; border-radius: 12px; background: transparent; border: 2px solid transparent; font-size: 1.15rem; font-weight: 600; color: var(--ink); transition: all .15s; }
.ex-mot:hover:not(:disabled) { background: var(--purple-l); border-color: var(--purple-mm); }
.ex-mot.is-selected { background: var(--purple); color: #fff; border-color: var(--purple); }
.ex-mot.is-wrong { background: var(--red); color: #fff; border-color: var(--red); }
.ex-mot.is-right { background: var(--green); color: #fff; border-color: var(--green); }
.ex-mot:disabled { cursor: default; }
.ex-punct { font-size: 1.15rem; color: var(--muted); }

/* ordre */
.ex-ordre-zone { min-height: 62px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; border: 2px dashed var(--purple-mm); border-radius: 16px; background: #FCFAFF; margin-bottom: 14px; transition: all .2s; }
.ex-ordre-zone.is-wrong { border-color: var(--red); background: var(--red-l); }
.ex-ordre-zone.is-right { border-color: var(--green); background: var(--green-l); border-style: solid; }
.ex-ordre-placeholder { color: var(--muted); font-size: .9rem; font-style: italic; }
.ex-ordre-fin { font-size: 1.3rem; font-weight: 900; color: var(--muted); margin-left: -4px; }

/* feedback */
.ex-feedback { margin-top: 18px; padding: 14px 16px; border-radius: 16px; border: 2px solid; animation: fadeUp .3s ease; }
.ex-feedback-head { font-weight: 900; font-size: 1.02rem; margin-bottom: 4px; }
.ex-feedback-txt { font-size: .95rem; line-height: 1.55; margin: 0; }
.fb-ok    { background: var(--green-l); border-color: #6EE7B7; color: #065F46; }
.fb-retry { background: #FFF7E6; border-color: #FCD34D; color: #92400E; }
.fb-ko    { background: var(--red-l); border-color: #FCA5A5; color: #991B1B; }

/* +XP flottant */
.xp-float { position: absolute; inset: 0; pointer-events: none; }
.xp-float-item { position: absolute; transform: translate(-50%, 0); font-weight: 900; color: #B45309; background: #FDE68A; padding: 4px 10px; border-radius: var(--pill); font-size: .9rem; animation: floatUp 1.1s ease forwards; box-shadow: var(--sh-sm); z-index: 40; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }

/* résultat */
.scr-result { position: relative; text-align: center; }
.res-mascot img { width: 170px; height: auto; margin: 0 auto -30px; position: relative; z-index: 2; filter: drop-shadow(0 14px 24px rgba(109,40,217,.2)); animation: popIn .6s cubic-bezier(.2,1.4,.4,1); }
@keyframes popIn { from { opacity: 0; transform: scale(.6) translateY(20px); } to { opacity: 1; transform: none; } }
.res-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); padding: 44px 28px 28px; box-shadow: var(--sh); }
.res-stars { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.res-star { font-size: 2.6rem; color: #E4DFD6; transform: scale(.7); opacity: .6; }
.res-star.on { color: #F59E0B; text-shadow: 0 4px 12px rgba(245,158,11,.45); animation: starPop .5s cubic-bezier(.2,1.6,.4,1) forwards; animation-delay: var(--d, 0s); }
@keyframes starPop { 0% { transform: scale(.3) rotate(-20deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.res-title { font-size: 2rem; margin-bottom: 6px; }
.res-sub { color: var(--muted); max-width: 440px; margin: 0 auto 18px; }
.res-xp { display: inline-flex; align-items: baseline; gap: 6px; background: linear-gradient(135deg, #FDE68A, #F59E0B); color: #78350F; padding: 10px 22px; border-radius: var(--pill); margin-bottom: 20px; box-shadow: 0 8px 22px rgba(245,158,11,.35); }
.res-xp-val { font-family: var(--head); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.res-xp-unit { font-weight: 900; font-size: .9rem; letter-spacing: .06em; }
.res-detail { list-style: none; display: grid; gap: 6px; max-width: 380px; margin: 0 auto 16px; text-align: left; }
.res-detail li { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg); border-radius: var(--r-sm); font-size: .92rem; }
.res-detail li span:last-child { font-weight: 900; }
.res-detail .res-bonus { background: #FFF7E6; color: #92400E; }
.res-statut { font-weight: 900; margin-bottom: 8px; color: var(--muted); }
.res-statut.is-ok { color: #047857; }
.res-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.res-chip { background: var(--surface); border: 2px solid var(--border); padding: 5px 12px; border-radius: var(--pill); font-weight: 800; font-size: .84rem; }
.res-niveau { background: var(--bg); border-radius: var(--r); padding: 14px 16px; margin: 0 auto 16px; max-width: 420px; text-align: left; }
.res-niveau-head { display: flex; justify-content: space-between; font-weight: 800; font-size: .88rem; margin-bottom: 8px; }
.res-niveau-rest { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.res-levelup { font-weight: 900; color: var(--purple); margin-top: 8px; }
.res-guest { background: #FFF7E6; border: 2px solid #FDE68A; border-radius: var(--r); padding: 14px 16px; margin: 0 auto 16px; max-width: 460px; font-size: .9rem; color: #78350F; }
.res-guest strong { display: block; margin-bottom: 4px; }
.res-guest-btns { display: flex; gap: 12px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.res-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.result-loading { padding: 60px 0; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 4px solid var(--purple-l); border-top-color: var(--purple); border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* confettis */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.confetti i { position: absolute; top: -12px; left: calc(var(--i) * 4.2%); width: 9px; height: 14px; border-radius: 2px; background: hsl(calc(var(--i) * 37), 85%, 60%); animation: confetti 2.6s ease-in forwards; animation-delay: calc(var(--i) * .06s); }
@keyframes confetti { to { transform: translateY(560px) rotate(720deg); opacity: 0; } }

/* ============================
   ESPACE / DASHBOARD
   ============================ */
.espace-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r); padding: 16px 12px; text-align: center; box-shadow: var(--sh-xs); }
.stat-val { display: block; font-family: var(--head); font-size: 1.8rem; font-weight: 700; color: var(--purple); line-height: 1; }
.stat-unit { font-size: 1rem; }
.stat-lbl { display: block; font-size: .76rem; color: var(--muted); margin-top: 5px; font-weight: 700; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 30px 0 12px; }
.section-h h2 { font-size: 1.3rem; }
.section-h a { font-size: .85rem; font-weight: 800; text-decoration: none; }
.parent-panel { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r); padding: 20px 22px; margin-top: 30px; }
.parent-panel h2 { font-size: 1.15rem; margin-bottom: 8px; }
.parent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.parent-grid h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.parent-grid ul { list-style: none; display: grid; gap: 6px; }
.parent-grid li { display: flex; justify-content: space-between; font-size: .9rem; background: var(--bg); padding: 7px 10px; border-radius: var(--r-xs); }
.parent-tip { background: var(--purple-l); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 14px; font-size: .92rem; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 920px) {
  .hero-layout { grid-template-columns: 1fr; gap: 40px; }
  .hero-home-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stage { min-height: 220px; order: -1; }
  .hero-mascot { width: min(180px, 46%); }
  .hero-text   { max-width: 100%; }
  .hero-demo   { display: none; }
  .class-grid   { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .class-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cycle { padding: 16px 12px; }
  .subject-grid, .units-grid { grid-template-columns: 1fr; }
  .steps-grid   { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .ft-grid      { grid-template-columns: 1fr 1fr; gap: 28px; }
  .print-teaser { grid-template-columns: 1fr; padding: 36px 28px; }
  .print-teaser-vis { display: none; }
  .home-coeur-card { grid-template-columns: 1fr; padding: 32px 22px; }
  .site-header { background: rgba(253,250,244,0.97); }
  .burger { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 68px; right: 16px;
    flex-direction: column; background: var(--surface); border-radius: var(--r);
    padding: 10px; min-width: 200px; max-width: calc(100vw - 32px);
    box-shadow: var(--sh-lg); z-index: 50;
    border: 1px solid #E8E2D9;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 14px; border-radius: var(--r-sm); }
  .dur-grid { grid-template-columns: repeat(2, 1fr); }
  .espace-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .domaines-grid { grid-template-columns: repeat(2, 1fr); }
  .parent-grid { grid-template-columns: 1fr; }
  .player-card { grid-template-columns: auto 1fr; }
  .pc-stats { grid-column: 1 / -1; justify-content: space-around; border-top: 1px solid rgba(255,255,255,.15); padding-top: 12px; }
}

@media (max-width: 560px) {
  .class-grid, .class-grid-4, .class-pick { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hero { padding: 40px 0 56px; }
  .hero-home { min-height: 0; }
  .hero-brand { margin-bottom: 12px; }
  .hero-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .hero-trust { justify-content: center; }
  .cycle-college .class-grid { grid-template-columns: repeat(2, 1fr); }
  .ft-grid { grid-template-columns: 1fr; gap: 28px; }
  .home-beats { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; gap: 20px; }
  .domaines-grid { grid-template-columns: 1fr; }
  .mission-box { grid-template-columns: auto 1fr; }
  .mission-box .btn { grid-column: 1 / -1; text-align: center; }
  .page-title-row { flex-direction: column; align-items: stretch; }
  .global-progress-widget { text-align: left; }
  .wrap-sm { width: min(600px, 100% - 24px); }
  input[type=date] { min-height: 56px; font-size: 1.16rem; padding: 16px; }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 28px;
  }
  .form-actions .btn { min-height: 52px; flex: none; width: 100%; white-space: normal; }

  /* session mobile : plein écran, actions collées en bas */
  .session { width: min(720px, 100% - 24px); padding-bottom: 110px; }
  .ses-step-lbl { display: none; }
  .ses-step { padding: 6px 9px; }
  .ses-step.is-active .ses-step-lbl { display: inline; }
  .scr-intro, .scr-ready { grid-template-columns: 1fr; text-align: center; }
  .intro-mascot img { width: 120px; margin: 0 auto; }
  .intro-card { padding: 22px 18px; }
  .intro-plan .plan-item { text-align: left; }
  .slide { padding: 20px 18px 22px; min-height: 0; }
  .slide-title { font-size: 1.3rem; }
  .slide-body { font-size: 1rem; }
  .ex-block { padding: 18px 16px; }
  .ex-consigne { font-size: 1.04rem; }
  .ses-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: rgba(253,250,244,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--border); gap: 14px; }
  .ses-actions .btn { flex: 1; text-align: center; min-height: 50px; }
  .res-card { padding: 40px 18px 22px; }
  .res-title { font-size: 1.6rem; }
}

/* ============================
   BILAN ADAPTATIF
   ============================ */
.bilan-top-title { justify-self: center; font-weight: 900; font-size: .92rem; color: var(--ink-2); }
.bilan-calm { background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px; font-size: .9rem; color: var(--ink-2); margin-bottom: 8px; }
.bilan-intro-prenom { margin: 18px 0 4px; }
.bilan-intro-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 26px;
}
.bilan-intro-actions .btn { width: 100%; justify-content: center; min-height: 50px; }
.bilan-intro-actions .bilan-parents { margin-top: 0; }
.bilan-parents, .bilan-methode { margin-top: 16px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r); padding: 14px 16px; font-size: .9rem; color: var(--ink-2); }
.bilan-parents summary, .bilan-methode summary { cursor: pointer; font-weight: 900; color: var(--ink); }
.bilan-parents p, .bilan-methode p { margin: 10px 0 0; line-height: 1.6; }
.bilan-costaud { background: #FEF3C7; color: #92400E; font-weight: 900; font-size: .75rem; padding: 4px 10px; border-radius: var(--pill); }
.bilan-bulle { margin: 14px 0 0; background: #FFF7E6; border-radius: var(--r-sm); padding: 10px 12px; color: #92400E; font-weight: 700; font-size: .9rem; }
.bilan-choices { display: grid; gap: 12px; }
.bilan-choice { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface); font-weight: 700; color: var(--ink); font-size: 1rem; transition: all .18s; box-shadow: 0 1px 0 rgba(15,14,12,0.04); }
.bilan-choice svg { width: 52px; height: 52px; flex: none; }
.bilan-choice:hover { border-color: var(--purple-mm); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(109,40,217,0.08); }
.bilan-choice.is-selected { border-color: var(--purple); background: var(--purple-l); box-shadow: 0 0 0 4px var(--purple-l); }
.bilan-toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--ink); color: #fff; font-weight: 800; padding: 10px 16px; border-radius: var(--pill); z-index: 40; animation: fadeIn .2s ease; }

.bilan-visual-slot { margin: 0 0 14px; }
.bilan-visual { margin: 0 auto 8px; max-width: 420px; }
.bilan-visual svg { display: block; width: 100%; height: auto; border-radius: 14px; background: #fff; border: 1px solid #E7E5E4; }
.ses-actions-bilan { margin-bottom: 10px; gap: 14px; }
@media (min-width: 641px) {
  .ses-actions-bilan { gap: 18px; }
}
.panel [data-step] h2 { margin-bottom: 8px; }
.panel [data-step] .lede { margin-bottom: 20px; }
.panel .opt-card { margin-bottom: 12px; }
.panel .fg { margin-bottom: 22px; }
.panel .fhelp { margin-top: 8px; }
.bilan-flag {
  display: block; margin: 4px auto 0; background: none; border: 0; color: var(--muted);
  font-size: 0.82rem; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 8px;
}
.bilan-flag:hover { color: var(--purple-d); }
.bilan-flag-dialog {
  border: 0; border-radius: 18px; padding: 22px; max-width: 420px; width: calc(100% - 32px);
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.bilan-flag-dialog::backdrop { background: rgba(28, 25, 23, .45); }
.bilan-flag-dialog h3 { margin: 0 0 8px; font-family: var(--head); }
.bilan-flag-dialog p { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.bilan-flag-dialog textarea {
  width: 100%; border: 2px solid #E8E2D9; border-radius: 12px; padding: 10px 12px;
  font: inherit; resize: vertical;
}
.bilan-flag-dialog textarea:focus { outline: none; border-color: var(--purple); }

.bilan-cahier-plan {
  background: #FFF7ED;
  border: 2px solid #FDBA74;
  padding: 20px 20px 18px;
  margin-top: 24px;
}
.bilan-cahier-kicker {
  font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em;
  color: #C2410C; margin: 0 0 12px;
}
.bilan-cahier-facts { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.bilan-cahier-facts li { font-size: .95rem; color: var(--ink-2); line-height: 1.5; }
.bilan-cahier-facts strong { color: var(--ink); display: inline; margin-right: 4px; }

.bilan-cahier-form { margin-top: 22px; padding: 28px 22px 26px; }
.bilan-cahier-form .fg { margin-bottom: 26px; }
.bilan-cahier-form h2 {
  font-family: var(--head);
  font-size: 1.35rem;
  margin: 6px 0 12px;
  line-height: 1.2;
}
.bilan-cahier-form .lede { margin-bottom: 20px; }
.bilan-cahier-form .chk { margin: 16px 0; }
.bilan-cahier-form .form-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin-top: 28px;
}
.bilan-cahier-form .form-actions .btn {
  width: 100%;
  flex: none;
}
.bilan-cahier-back {
  display: inline-block;
  margin-top: 22px;
  font-weight: 800;
}

.cahier-email-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.45;
}
.cahier-email-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 22px;
}
.cahier-email-actions .btn {
  flex: none;
  width: 100%;
  min-height: 52px;
}
.cahier-email-back {
  margin-top: 12px;
}
.cahier-email-back .btn {
  flex: none;
  width: 100%;
}
.cahier-skip-confirm {
  margin-top: 22px;
  padding: 20px 18px 18px;
  border-radius: 16px;
  background: #FEF2F2;
  border: 2px solid #FECACA;
  color: #7F1D1D;
}
.cahier-skip-confirm p { margin: 0 0 12px; font-size: .92rem; line-height: 1.55; }
.cahier-skip-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.cahier-skip-actions .btn {
  flex: none;
  width: 100%;
  min-height: 52px;
  white-space: normal;
  line-height: 1.3;
  padding: 14px 16px;
}
.btn-outline-skip {
  background: #fff;
  color: #7F1D1D;
  box-shadow: inset 0 0 0 2px #B91C1C;
}
.btn-outline-skip:hover {
  background: #FEE2E2;
  color: #7F1D1D;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .cahier-skip-actions { grid-template-columns: 1fr; }
}

.bilan-teaser { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px dashed var(--purple-mm); border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; }
.bilan-teaser:hover { border-style: solid; border-color: var(--purple); }
.bilan-teaser-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--purple-l); display: grid; place-items: center; font-size: 1.3rem; }
.bilan-teaser strong { display: block; }
.bilan-teaser-go { font-weight: 900; color: var(--purple); white-space: nowrap; }
.bilan-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 22px; }
.bilan-pill { background: var(--surface); border: 2px solid var(--border); border-radius: var(--pill); padding: 6px 12px; font-size: .82rem; font-weight: 800; }

.bilan-rapport { padding-bottom: 40px; }
.bilan-qi {
  position: relative;
  overflow: hidden;
  margin: 18px 0 22px;
  padding: 20px 16px 16px;
  border-radius: 20px;
  background: linear-gradient(160deg, #F5F3FF 0%, #FFF7ED 55%, #ECFEFF 100%);
  border: 1px solid #E9D5FF;
  box-shadow: 0 10px 28px rgba(109,40,217,0.10), inset 0 1px 0 rgba(255,255,255,0.7);
  text-align: center;
}
.bilan-qi::before {
  content: "";
  position: absolute; inset: -40% 20% auto;
  height: 90px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.7), transparent 70%);
  pointer-events: none;
}
.bilan-qi-kicker {
  margin: 0;
  font: 600 .78rem/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6D28D9;
}
.bilan-qi-score {
  margin: 4px 0 2px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}
.bilan-qi-num {
  font-family: var(--head);
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1;
  color: #4C1D95;
  animation: qiPop .55s cubic-bezier(.2,1.4,.4,1);
}
@keyframes qiPop {
  from { opacity: 0; transform: scale(.72) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.bilan-qi-unit {
  font: 700 1.05rem/1 Georgia, serif;
  color: #7C3AED;
}
.bilan-qi-label {
  margin: 0 0 10px;
  font: 600 1rem/1.35 Georgia, serif;
  color: #44403C;
}
.bilan-qi-graph { margin: 0 auto 8px; max-width: 360px; }
.bilan-qi-pos {
  margin: 8px 0 6px;
  font-size: .95rem;
  color: #292524;
}
.bilan-qi-disclaimer {
  margin: 0;
  font-size: .8rem;
  line-height: 1.4;
  color: #78716C;
}
.bilan-domaines { display: grid; gap: 12px; text-align: left; margin: 8px 0 22px; }
.bilan-dom { background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px; }
.bilan-dom-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.bilan-dom p { margin: 8px 0 0; font-size: .88rem; color: var(--ink-2); }
.niv-badge { font-size: .72rem; font-weight: 900; padding: 3px 9px; border-radius: var(--pill); white-space: nowrap; }
.niv-avance { background: #DBEAFE; color: #1D4ED8; }
.niv-ok { background: var(--green-l); color: #047857; }
.niv-moy { background: #FEF3C7; color: #B45309; }
.niv-prio { background: #FEE2E2; color: #B91C1C; }
.niv-tard { background: #F1EFEA; color: #57534E; }
.bilan-h { font-size: 1.15rem; text-align: left; margin: 18px 0 10px; }
.bilan-recos { display: grid; gap: 8px; }
.bilan-reco { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px solid var(--purple-mm); border-radius: var(--r); padding: 12px 14px; }
.bilan-reco:hover { border-color: var(--purple); box-shadow: var(--sh-sm); }
.bilan-reco-n { width: 30px; height: 30px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-weight: 900; }
.bilan-reco-txt strong { display: block; }
.bilan-reco-txt em { display: block; font-style: normal; color: var(--muted); font-size: .84rem; font-weight: 600; }
.bilan-reco-go { color: var(--purple); font-weight: 900; font-size: 1.2rem; }
.bilan-note, .bilan-temps { text-align: left; color: var(--ink-2); font-size: .92rem; margin: 12px 0; }
.bilan-persona { list-style: none; text-align: left; display: grid; gap: 8px; margin: 0 0 8px; }
.bilan-persona li { background: var(--purple-l); border-radius: var(--r-sm); padding: 10px 12px; font-size: .92rem; }
.bilan-exemples { text-align: left; background: var(--bg); border-radius: var(--r); padding: 12px 14px; margin: 8px 0 16px; }
.bilan-exemples summary { cursor: pointer; font-weight: 900; }
.bilan-ex { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; font-size: .92rem; }
.bilan-ex p { margin: 4px 0; }
.bilan-ex-q { font-weight: 800; color: var(--ink); }
.bilan-ex-note { color: #B45309; font-weight: 700; font-size: .82rem; }
.bilan-methode { text-align: left; margin-top: 18px; }
.bilan-methode-meta { color: var(--muted); font-size: .82rem; }
.bilan-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .85rem; }
.bilan-table th, .bilan-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.bilan-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

@media (max-width: 560px) {
  .bilan-teaser { grid-template-columns: auto 1fr; }
  .bilan-teaser-go { grid-column: 1 / -1; }
  .bilan-choice { font-size: .95rem; }
  .bilan-choice svg { width: 42px; height: 42px; }
  .bilan-dom-head { align-items: flex-start; }
}

/* ============================
   LECTURE, HISTOIRE, ATELIER
   ============================ */
.lecture-card, .atelier-card, .histoire-card {
  background: #fffdf8;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 16px 6px;
  margin-bottom: 16px;
}
.lecture-kicker, .atelier-kicker, .histoire-kicker {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 6px;
}
.lecture-title, .atelier-title, .histoire-title { margin: 0 0 10px; font-family: Fraunces, serif; }
.lecture-body, .histoire-body { font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.lecture-body { max-height: 420px; overflow: auto; padding-right: 6px; }
.lecture-body p, .histoire-body p { margin: 0 0 12px; }
.histoire-card { background: #fbf6ea; }
.histoire-chute { background: #fff; border-left: 4px solid #f59e0b; padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.atelier-matos, .atelier-then { color: var(--ink-2); }
.atelier-steps { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.atelier-steps label { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.atelier-check { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--purple); }
.fg select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); font: inherit; background: #fff; }
.lecture-print p { line-height: 1.55; }

/* Gratter, jeux, jauge, partage, cours, thèmes par classe */
.gratter-card, .jeu-card {
  background: linear-gradient(135deg, #fff9f0, #fff);
  border: 2px dashed var(--purple-mm);
  border-radius: var(--r-sm);
  padding: 14px 16px 8px;
  margin-bottom: 14px;
}
.gratter-reveal {
  position: relative;
  min-height: 72px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  margin: 10px 0 14px;
  background: #cbd5e1;
}
.gratter-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #334155;
  background: repeating-linear-gradient(45deg, #94a3b8, #94a3b8 8px, #64748b 8px, #64748b 16px);
  transition: opacity .35s;
}
.gratter-hidden {
  display: block;
  padding: 16px;
  font-weight: 700;
  color: var(--ink);
}
.gratter-reveal.is-revealed .gratter-mask { opacity: 0; pointer-events: none; }
.jeu-memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.jeu-card-btn {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}
.jeu-card-back, .jeu-card-face { display: block; }
.jeu-card-btn:not(.is-open):not(.is-match) .jeu-card-face { display: none; }
.jeu-card-btn.is-open .jeu-card-back, .jeu-card-btn.is-match .jeu-card-back { display: none; }
.jeu-card-btn.is-match { background: #dcfce7; border-color: #22c55e; }
.jeu-anag-zone {
  min-height: 44px;
  margin-top: 10px;
  padding: 10px;
  border: 2px dashed var(--purple-mm);
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.res-jauge {
  text-align: left;
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin: 14px 0;
}
.res-jauge-head { display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; margin-bottom: 8px; }
.res-jauge-bar { height: 10px; }
.res-jauge-txt { margin: 8px 0 0; font-size: .88rem; color: var(--ink-2); }
.res-jauge-elite .progress-fill { background: linear-gradient(90deg, #f59e0b, #eab308); }
.res-cours, .res-share, .res-invite {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin: 12px 0;
  font-size: .92rem;
}
.res-share-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.res-invite-row { display: flex; gap: 8px; margin-top: 8px; }
.res-invite-inp { flex: 1; font-size: .82rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); }
.class-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.class-card.is-soon { opacity: .55; cursor: not-allowed; }
.classe-radios { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 12px; }
.classe-radios .chk {
  display: flex;
  align-items: center;
  gap: 8px;
  position: static;
  padding: 10px 8px;
  margin: 0;
  border: 1.5px solid var(--bdr-str);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.9rem;
}
.classe-radios .chk input {
  position: static;
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex: none;
}
.classe-radios .chk:has(input:checked) {
  border-color: var(--purple);
  background: var(--purple-l);
  color: var(--purple-d);
}
.invite-banner { background: var(--purple-l); padding: 10px 12px; border-radius: 12px; font-size: .92rem; }
.cours-page { padding-bottom: 48px; }
.cours-coach { color: var(--ink-2); font-size: .95rem; }
.cours-progress { height: 6px; background: var(--border); border-radius: 99px; margin: 16px 0; overflow: hidden; }
.cours-progress-fill { height: 100%; background: var(--theme-primary, var(--purple)); width: 0; transition: width .25s; }
.cours-after { margin-top: 20px; text-align: center; }
.theme-cp .btn-primary, .theme-ce1 .btn-primary { background: var(--theme-primary, var(--purple)); }
.theme-6e .ses-progress-fill, .theme-5e .ses-progress-fill, .theme-4e .ses-progress-fill, .theme-3e .ses-progress-fill {
  background: var(--theme-primary, var(--purple));
}

.nav-drop { position: relative; }
.nav-drop-btn {
  background: none;
  border: none;
  font: inherit;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
  padding: 8px 10px;
}
.nav-drop-btn:hover { color: var(--purple); }
.nav-drop-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-md);
  padding: 10px 12px;
}
.nav-drop-panel.is-open { display: block; }
.nav-drop-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 8px 0 4px;
}
.nav-drop-label:first-child { margin-top: 0; }
.nav-drop-link {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: .92rem;
}
.nav-drop-link:hover, .nav-drop-link.is-active { background: var(--purple-l); color: var(--purple); }
.ft-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.ft-classes { list-style: none; padding: 0; margin: 0; }
.ft-classes li { margin: 4px 0; }

/* ============================
   PRINT MEDIA
   ============================ */
@media print {
  .site-header, .site-footer, .flash, .no-print, .burger { display: none !important; }
  body { background: #fff; }
  .cahier-sheet { box-shadow: none; width: 100%; padding: 0; margin: 0; }
  a { color: inherit; text-decoration: none; }
  .choice-lbl { border: 1px solid #ccc !important; background: #fff !important; }
}
