/* ECR en poche — site public (landing, tarifs, méthode, FAQ, pages légales).
   Feuille unique, sans police externe ni script. Copiée telle quelle dans apps/server/public/landing.css par
   apps/web/scripts/build.ts. Look volontairement clair et chaleureux (parents), avec des touches ludiques (enfants). */

:root {
  color-scheme: light;
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #e0e7ff;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --math: #2563eb;
  --math-soft: #dbeafe;
  --francais: #e11d48;
  --francais-soft: #ffe4e6;
  --allemand: #16a34a;
  --allemand-soft: #dcfce7;
  --ok: #16a34a;
  --bg: #fffdf8;
  --bg-2: #f6f4ee;
  --surface: #ffffff;
  --text: #1f2333;
  --text-2: #4b5063;
  --text-3: #6b7080;
  --border: #e8e4da;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 4px 14px rgba(31, 35, 51, 0.08), 0 1px 3px rgba(31, 35, 51, 0.06);
  --shadow-lg: 0 18px 40px rgba(31, 35, 51, 0.14);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  --max: 1080px;
  --max-text: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--primary);
}
h1,
h2,
h3,
h4 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
}
h2 {
  font-size: clamp(1.55rem, 3.6vw, 2.25rem);
}
h3 {
  font-size: 1.2rem;
}
p {
  margin: 0 0 1em;
}
ul,
ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}
li {
  margin-bottom: 0.35em;
}
strong {
  font-weight: 700;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-2);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 12px 0;
  z-index: 100;
}
.skip:focus {
  left: 0;
}
.wrap {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}
.prose {
  width: min(var(--max-text), 100% - 2.5rem);
  margin-inline: auto;
}
.prose h2 {
  margin-top: 2.2rem;
}
.prose h3 {
  margin-top: 1.6rem;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand {
  white-space: nowrap;
}
.brand svg {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.site-nav {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
  align-items: center;
}
.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--primary-strong);
}
.site-nav .btn {
  margin-left: 0.4rem;
  white-space: nowrap;
}
.site-nav a.btn-primary,
.site-nav a.btn-primary:hover {
  color: #fff;
}
@media (max-width: 760px) {
  .site-nav a:not(.btn) {
    display: none;
  }
  .site-nav .btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.92rem;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
  cursor: pointer;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.btn-primary:hover {
  background: var(--primary-strong);
  color: #fff;
}
.btn-kid {
  background: var(--accent);
  color: #3b2a05;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}
.btn-kid:hover {
  background: #e08c05;
  color: #3b2a05;
}
.btn-outline {
  background: var(--surface);
  color: var(--primary-strong);
  border-color: var(--primary-soft);
}
.btn-outline:hover {
  border-color: var(--primary);
}
.btn-lg {
  min-height: 56px;
  padding: 0.85rem 1.8rem;
  font-size: 1.08rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.cta-note {
  font-size: 0.9rem;
  color: var(--text-3);
  margin: 0.5rem 0 0;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(60% 55% at 85% 0%, #ede9fe 0%, transparent 70%),
    radial-gradient(45% 50% at 0% 100%, #fef3c7 0%, transparent 70%),
    var(--bg);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 1.2rem;
}
.hero .eyebrow .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
}
.hero h1 .accent {
  color: var(--primary);
}
.hero .sub {
  font-size: 1.18rem;
  color: var(--text-2);
  max-width: 34rem;
  margin-bottom: 1.6rem;
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual .phone {
  width: min(300px, 78%);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  border: 6px solid #1f2333;
  background: #1f2333;
  overflow: hidden;
  transform: rotate(-2deg);
}
.hero-visual .phone img {
  border-radius: 22px;
}
.hero-visual .mascot {
  position: absolute;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 8px 14px rgba(31, 35, 51, 0.18));
}
.hero-visual .mascot.m1 {
  left: -2%;
  bottom: 4%;
  transform: rotate(-8deg);
}
.hero-visual .mascot.m2 {
  right: 0;
  top: 4%;
  transform: rotate(8deg);
}
.hero-visual .mascot.m3 {
  right: 0;
  bottom: 0;
  width: 92px;
  height: 92px;
  transform: rotate(6deg);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-2);
}
.hero-facts li::before {
  content: '✓ ';
  color: var(--ok);
  font-weight: 800;
}
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    margin-top: 1rem;
  }
  .hero-visual .phone {
    width: min(260px, 70%);
  }
  .hero-visual .mascot {
    width: 84px;
    height: 84px;
  }
  .hero-visual .mascot.m3 {
    width: 70px;
    height: 70px;
  }
}

/* ---------- sections ---------- */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.section.alt {
  background: var(--bg-2);
}
.section-head {
  max-width: 44rem;
  margin-bottom: 2rem;
}
.kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-head p {
  color: var(--text-2);
  font-size: 1.08rem;
}
.grid {
  display: grid;
  gap: 1.2rem;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin-top: 0.4rem;
}
.card p:last-child {
  margin-bottom: 0;
}
.card .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.4rem;
  background: var(--primary-soft);
}
.card .icon.math {
  background: var(--math-soft);
}
.card .icon.francais {
  background: var(--francais-soft);
}
.card .icon.allemand {
  background: var(--allemand-soft);
}
.card .icon.amber {
  background: var(--accent-soft);
}
.card.step {
  position: relative;
  padding-top: 1.6rem;
}
.card.step .num {
  position: absolute;
  top: -14px;
  left: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #3b2a05;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.stat {
  text-align: center;
}
.stat .big {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat .big.amber {
  color: #b45309;
}
.stat p {
  color: var(--text-2);
  font-size: 0.98rem;
}
.muted {
  color: var(--text-3);
  font-size: 0.92rem;
}

/* ---------- daily routine ---------- */
.routine {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.routine ul.checks {
  list-style: none;
  padding: 0;
  margin: 0;
}
.routine ul.checks li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
}
.routine ul.checks li:last-child {
  border-bottom: 0;
}
.routine ul.checks .em {
  font-size: 1.4rem;
  line-height: 1.2;
  flex: none;
}
.routine ul.checks strong {
  display: block;
}
.chars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}
.chars figure {
  margin: 0;
  width: 108px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.4rem 0.5rem;
  box-shadow: var(--shadow);
}
.chars figure svg {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.3rem;
}
.chars figcaption {
  font-size: 0.8rem;
  font-weight: 700;
}
.chars figcaption small {
  display: block;
  font-weight: 500;
  color: var(--text-3);
  font-size: 0.72rem;
}
@media (max-width: 800px) {
  .routine {
    grid-template-columns: 1fr;
  }
}

/* ---------- screenshots tour ---------- */
.tour {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.tour figure {
  margin: 0;
}
.tour .shot {
  border-radius: 22px;
  border: 5px solid #1f2333;
  background: #1f2333;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 400 / 845;
}
.tour .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 16px;
}
.tour figcaption {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: var(--text-2);
}
.tour figcaption strong {
  display: block;
  color: var(--text);
}
@media (max-width: 900px) {
  .tour {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .tour {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
  .tour figcaption {
    font-size: 0.85rem;
  }
}

/* ---------- parents ---------- */
.parent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.parent-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}
.parent-list .em {
  font-size: 1.3rem;
  flex: none;
}
@media (max-width: 800px) {
  .parent-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 1.4rem;
}
.price-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem 1.6rem;
  box-shadow: var(--shadow);
}
.price-card.featured {
  border-color: var(--primary);
  box-shadow: 0 16px 36px rgba(79, 70, 229, 0.16);
}
.price-card .badge {
  position: absolute;
  top: -14px;
  left: 1.4rem;
  background: var(--accent);
  color: #3b2a05;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
}
.price-card .plan {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-2);
}
.price-card .amount {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.05;
  margin: 0.4rem 0 0.2rem;
  letter-spacing: -0.02em;
}
.price-card .amount small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0;
}
.price-card .equiv {
  color: var(--text-3);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
}
.price-card li {
  padding-left: 1.5em;
  position: relative;
  margin-bottom: 0.45rem;
}
.price-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 800;
}
.price-card .btn {
  width: 100%;
}
.included {
  margin-top: 2rem;
}
@media (max-width: 720px) {
  .pricing {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: var(--max-text);
  margin-inline: auto;
}
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1.2rem;
  margin-bottom: 0.7rem;
  box-shadow: var(--shadow);
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  font-size: 1.02rem;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.faq-list details[open] summary::after {
  content: '–';
}
.faq-list details > div {
  padding: 0 0 1.1rem;
  color: var(--text-2);
}
.faq-list details > div p:last-child {
  margin-bottom: 0;
}

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.2rem 0 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-2);
  font-weight: 700;
}
tr:last-child td {
  border-bottom: 0;
}
table.compact {
  min-width: 0;
}
/* Tables that stack into cards on narrow screens (cells carry data-label). */
@media (max-width: 700px) {
  table.stack {
    min-width: 0;
  }
  table.stack thead {
    display: none;
  }
  table.stack tr {
    display: block;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }
  table.stack tr:last-child {
    border-bottom: 0;
  }
  table.stack td {
    display: block;
    border: 0;
    padding: 0.3rem 0.9rem;
  }
  table.stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin-bottom: 0.1rem;
  }
  table.stack td:first-child {
    font-size: 1.05rem;
    padding-top: 0.5rem;
  }
}
.bareme td,
.bareme th {
  text-align: center;
}
.bareme td:first-child,
.bareme th:first-child {
  text-align: left;
}

/* ---------- callouts ---------- */
.callout {
  border-left: 5px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
}
.callout.amber {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.callout p:last-child {
  margin-bottom: 0;
}
.draft {
  background: var(--accent-soft);
  border: 1px dashed #d97706;
  color: #78350f;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  margin: 1rem 0 1.8rem;
}
.page-hero {
  padding: clamp(2rem, 5vw, 3.5rem) 0 1rem;
  background:
    radial-gradient(50% 60% at 100% 0%, #ede9fe 0%, transparent 70%),
    var(--bg);
}
.page-hero .lead {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 40rem;
}
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}
.toc ol {
  margin: 0.3rem 0 0;
  columns: 2;
  column-gap: 2rem;
}
.toc li {
  break-inside: avoid;
}
@media (max-width: 600px) {
  .toc ol {
    columns: 1;
  }
}
.principles {
  counter-reset: p;
  list-style: none;
  padding: 0;
}
.principles li {
  counter-increment: p;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.1rem;
}
.principles li::before {
  content: counter(p);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent);
  color: #3b2a05;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.principles strong {
  display: block;
}

/* ---------- final CTA ---------- */
.cta-band {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  text-align: center;
}
.cta-band h2 {
  color: #fff;
}
.cta-band p {
  color: #e0e7ff;
  max-width: 36rem;
  margin-inline: auto;
}
.cta-band .btn-primary {
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.cta-band .btn-primary:hover {
  background: #eef2ff;
}
.cta-band .cta-row {
  justify-content: center;
  margin-top: 1.2rem;
}
.cta-band .cta-note {
  color: #c7d2fe;
}

/* ---------- footer ---------- */
.site-footer {
  background: #1f2333;
  color: #c9cbd6;
  padding: 2.5rem 0 2rem;
  font-size: 0.93rem;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 0.35rem;
}
.site-footer a {
  color: #dfe1ea;
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer .brand {
  color: #fff;
  margin-bottom: 0.6rem;
}
.site-footer .legal {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: #9a9db0;
}
@media (max-width: 720px) {
  .site-footer .cols {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
@media print {
  .site-header,
  .site-footer,
  .cta-band {
    display: none;
  }
}
