:root {
  color-scheme: light;
  --purple: #6C3FA0;
  --purple-deep: #4A2875;
  --purple-light: #f3ecfa;
  --gold: #FFE066;
  --gold-warm: #F59E0B;
  --ink: #1f1330;
  --ink-soft: #4b5563;
  --cream: #fbf9f4;
  --card: #ffffff;
  --border: rgba(108, 63, 160, 0.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }

/* Hamburger + drawer */
.nav-burger {
  background: #fff;
  border: 1.5px solid rgba(108, 63, 160, 0.2);
  border-radius: 8px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  transition: background .15s ease, border-color .15s ease;
}
.nav-burger:hover { background: var(--purple-light); border-color: rgba(108, 63, 160, 0.4); }
.nav-burger svg { display: block; }

.nav-left { display: flex; align-items: center; }

.nav-drawer {
  position: fixed; inset: 0;
  z-index: 100;
  visibility: hidden;
}
.nav-drawer[data-open="true"] { visibility: visible; }
.nav-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(31, 19, 48, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-drawer[data-open="true"] .nav-drawer-backdrop { opacity: 1; }
.nav-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 88vw);
  background: #fff;
  box-shadow: -4px 0 30px rgba(31, 19, 48, 0.15);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  padding: 18px 22px 32px;
}
.nav-drawer[data-open="true"] .nav-drawer-panel { transform: translateX(0); }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.nav-drawer-title {
  font-weight: 800; font-size: 18px; color: var(--purple); letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 10px;
}
.nav-drawer-title img { width: 30px; height: 30px; border-radius: 8px; background: var(--purple-light); padding: 2px; }
.nav-drawer-close {
  background: transparent; border: 0;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); cursor: pointer;
}
.nav-drawer-close:hover { background: var(--purple-light); color: var(--purple); }
.nav-drawer-section { display: flex; flex-direction: column; margin-top: 18px; }
.nav-drawer-label {
  margin: 0 0 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--gold-warm);
}
.nav-drawer-section a {
  padding: 11px 0;
  border-bottom: 1px solid rgba(108, 63, 160, 0.06);
  font-size: 15px; color: var(--ink); font-weight: 500;
  text-decoration: none;
}
.nav-drawer-section a:hover { color: var(--purple); }
.nav-drawer-section a:last-child { border-bottom: 0; }
.nav-drawer-section a[aria-current="page"] { color: var(--purple); font-weight: 700; }
.nav-drawer-section a[aria-current="page"]::before { content: "● "; color: var(--gold-warm); font-size: 10px; vertical-align: middle; margin-right: 4px; }
.nav-drawer-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple); color: #fff;
  padding: 12px 18px; border-radius: 10px;
  font-size: 15px; font-weight: 700;
  margin-top: 22px; text-decoration: none;
}

/* Anchored sections: clear the sticky nav (~60px) + breathing room */
:target, #install { scroll-margin-top: 80px; }
html { scroll-behavior: smooth; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: rgba(251, 249, 244, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 640px) { .nav { padding: 12px 20px; } }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--purple); font-size: 16px; letter-spacing: .3px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: block; object-fit: contain;
  background: var(--purple-light); padding: 2px;
}
@media (min-width: 640px) {
  .brand { font-size: 18px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-size: 13px; font-weight: 700; color: var(--purple);
  padding: 7px 12px; border-radius: 8px;
  border: 1.5px solid rgba(108, 63, 160, 0.25); background: #fff;
  transition: background .15s ease, border-color .15s ease;
}
.nav-link:hover { background: var(--purple-light); border-color: rgba(108, 63, 160, 0.4); }
.nav-cta {
  font-size: 13px; font-weight: 700; color: #fff; background: var(--purple);
  padding: 7px 14px; border-radius: 8px;
}
@media (min-width: 640px) {
  .nav-cta { font-size: 14px; padding: 8px 16px; }
  .nav-link { font-size: 14px; padding: 8px 14px; }
  .nav-actions { gap: 10px; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 56px 20px 64px;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(255,224,102,0.25), transparent 60%),
    radial-gradient(900px 360px at -10% 110%, rgba(108,63,160,0.18), transparent 60%);
  text-align: center;
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purple-light); color: var(--purple);
  font-weight: 700; font-size: 13px; letter-spacing: .4px;
  padding: 6px 12px; border-radius: 999px;
  text-transform: uppercase; margin-bottom: 20px;
}
.hero-eyebrow .flag { width: 18px; height: 12px; border-radius: 2px; overflow: hidden; display: inline-block; }
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5.5vw, 48px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--purple), var(--gold-warm));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  margin: 0 auto 28px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  max-width: 660px;
}
.store-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
}
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 12px;
  font-size: 15px; font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 24px rgba(31,19,48,.15);
}
.store-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31,19,48,.2); }
.store-btn small { display: block; font-size: 11px; opacity: .7; font-weight: 500; letter-spacing: .3px; text-transform: uppercase; line-height: 1.1; margin-bottom: 2px; }
.store-btn strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.1; }

/* Section base */
.section { max-width: 920px; margin: 0 auto; padding: 56px 20px; }
.section-title {
  font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--gold-warm); margin: 0 0 10px; text-align: center;
}
h2 {
  margin: 0 0 28px; font-size: clamp(24px, 3.6vw, 32px);
  color: var(--ink); font-weight: 800; letter-spacing: -0.01em; text-align: center;
}
.lede {
  font-size: 17px; line-height: 1.7; color: var(--ink-soft);
  max-width: 680px; margin: 0 auto 24px;
}
.lede.center { text-align: center; }

/* Props */
.props {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .props { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .props { grid-template-columns: repeat(3, 1fr); } }
.prop {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
}
.prop-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--gold-warm); margin-bottom: 10px; }
.prop h3 { margin: 0 0 6px; font-size: 17px; color: var(--purple); }
.prop p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }

/* Steps */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 36px; height: 36px; border-radius: 999px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.step h3 { margin: 0 0 4px; font-size: 16.5px; color: var(--ink); }
.step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

/* Stats */
.stats {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff;
  padding: 40px 20px;
  position: relative; overflow: hidden;
}
.stats::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(800px 300px at 100% 0%, rgba(255, 224, 102, 0.15), transparent 60%),
    radial-gradient(600px 300px at 0% 100%, rgba(255, 255, 255, 0.06), transparent 60%);
  pointer-events: none;
}
.stats-inner {
  max-width: 920px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px; position: relative; z-index: 1;
}
@media (min-width: 720px) { .stats-inner { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat-value {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 900; line-height: 1; letter-spacing: -0.02em; color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-value .plus { color: var(--gold); font-size: 0.68em; margin-left: 3px; vertical-align: super; font-weight: 800; }
.stat-label { margin-top: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.85); letter-spacing: 0.2px; line-height: 1.4; }

/* Cross-links */
.cross-links {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.cross-link {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  display: flex; align-items: center; gap: 12px;
}
.cross-link:hover { transform: translateY(-2px); border-color: rgba(108,63,160,.28); box-shadow: 0 10px 24px rgba(108,63,160,.08); }
.cross-link-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.cross-link-icon[data-g="quiz"]   { background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); }
.cross-link-icon[data-g="chasse"] { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.cross-link-icon[data-g="dictee"] { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%); }
.cross-link-icon[data-g="exos"]   { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.cross-link-icon[data-g="fiches"] { background: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%); }
.cross-link-icon[data-g="flash"]  { background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%); }
.cross-link-icon[data-g="calcul"] { background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%); }
.cross-link-icon[data-g="bfem"]   { background: linear-gradient(135deg, #6C3FA0 0%, #9b5bd1 100%); }
.cross-link-icon[data-g="bac"]    { background: linear-gradient(135deg, #4A2875 0%, #6C3FA0 100%); }
.cross-link-icon[data-g="primaire"] { background: linear-gradient(135deg, #f59e0b 0%, #FFE066 100%); }
.cross-link-icon svg { width: 20px; height: 20px; }
.cross-link strong { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.cross-link span { display: block; color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }

/* Story */
.story {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff; padding: 56px 20px;
}
.story-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.story h2 { color: #fff; }
.story p { font-size: 16.5px; color: rgba(255,255,255,.88); max-width: 640px; margin: 0 auto 14px; line-height: 1.7; }
.story .section-title { color: var(--gold); }
.story strong { color: var(--gold); font-weight: 700; }

/* CTA footer */
.cta-foot { text-align: center; }
.cta-foot p { color: var(--ink-soft); max-width: 520px; margin: 0 auto 24px; font-size: 16px; line-height: 1.7; }

/* Subjects pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--purple);
}

/* Phone mockup showcase */
section.showcase {
  background:
    radial-gradient(900px 500px at 90% 0%, rgba(255, 224, 102, 0.22), transparent 60%),
    radial-gradient(900px 500px at 10% 100%, rgba(108, 63, 160, 0.14), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, #f1ecf8 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 20px;
  text-align: center;
}
.showcase-inner { max-width: 1080px; margin: 0 auto; }
.phone-strip {
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 28px;
  justify-content: center;
  align-items: flex-end;
}
.phone-strip figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 220px;
  transition: transform 0.35s ease;
}
.phone-strip figure:nth-child(3n+1) { transform: rotate(-1.5deg); }
.phone-strip figure:nth-child(3n+2) { transform: rotate(0.8deg); }
.phone-strip figure:nth-child(3n+3) { transform: rotate(-0.6deg); }
.phone-strip figure:hover { transform: rotate(0) translateY(-6px); }

.phone-strip .phone {
  position: relative;
  width: 100%;
  padding: 12px 9px;
  border-radius: 34px;
  background: linear-gradient(160deg, #1a0f2e 0%, #2a1b42 100%);
  box-shadow:
    0 24px 60px -8px rgba(74, 40, 117, 0.35),
    0 10px 20px -4px rgba(74, 40, 117, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 3px #000;
}
.phone-strip .phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 68px; height: 6px; border-radius: 4px; background: #0a0512; z-index: 2;
}
.phone-strip .phone::after {
  content: ""; position: absolute; top: 72px; right: -2px;
  width: 3px; height: 42px; border-radius: 2px; background: #1a0f2e;
}
.phone-strip img {
  display: block; width: 100%; height: auto; border-radius: 24px;
  background: #fff; aspect-ratio: 360 / 640; object-fit: cover;
}
.phone-strip figcaption {
  display: inline-block;
  background: #fff;
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(108, 63, 160, 0.08);
}
@media (max-width: 540px) {
  .phone-strip { gap: 28px 18px; }
  .phone-strip figure { width: 180px; }
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px; text-align: center;
  color: var(--ink-soft); font-size: 13px;
}
footer a { color: var(--purple); font-weight: 600; }
footer .foot-links { margin-top: 8px; font-size: 12.5px; }
footer .foot-links a { margin: 0 6px; }
