/* CRPE Malin · site vitrine. Mêmes couleurs que l'app (src/theme/tokens.ts) : papier, encre, bleu, jaune, rouge cartable. */
@font-face { font-family: 'Baloo 2'; src: url('fonts/Baloo2_800ExtraBold.ttf') format('truetype'); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito_400Regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito_700Bold.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito_800ExtraBold.ttf') format('truetype'); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito_900Black.ttf') format('truetype'); font-style: normal; font-weight: 900; font-display: swap; }
:root {
  --paper: #FFF9EE;
  --surface: #FFFFFF;
  --sunken: #F4E7D3;
  --ink: #1B1F3B;
  --muted: #6B5A3E;
  --line: #F0E3C8;
  --blue: #2563EB;
  --blue-dark: #1D4FD8;
  --blue-soft: #E7EEFF;
  --yellow: #FFC83D;
  --yellow-dark: #E0A100;
  --yellow-soft: #FFF1C9;
  --red: #C8403F;
  --red-dark: #A9322F;
  --green: #22B573;
  --flame: #FF7A1A;
  --wood: #C79A68;
  --radius: 20px;
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 36em; }
.eyebrow { font: 800 .85rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }

/* ===== Boutons, façon app (relief en bas) ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border: 0; border-radius: 16px;
  font: 900 1.05rem/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 5px 0 var(--blue-dark); }
.btn-primary:active { box-shadow: 0 2px 0 var(--blue-dark); }
.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 var(--yellow-dark); }
.btn-yellow:active { box-shadow: 0 2px 0 var(--yellow-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px var(--line) inset, 0 5px 0 var(--line); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ===== En-tête ===== */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 249, 238, .92); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); }
.reading-progress { position: absolute; inset: 0 0 auto; height: 3px; background: var(--blue); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 900 1.35rem/1 var(--body); letter-spacing: -.01em; }
.brand img { width: 42px; height: 42px; }
.brand b { color: var(--blue); font-weight: 900; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); font-weight: 800; text-decoration: none; font-size: 1rem; }
.nav a:hover { color: var(--blue); }
.top .btn { padding: 11px 18px; font-size: .95rem; }
.mobile-menu { display: none; }
@media (max-width: 860px) {
  .nav { display: none; }
  .top .wrap { gap: 12px; }
  .top .btn { display: none; }
  .mobile-menu { display: block; margin-left: auto; }
  .mobile-menu summary { cursor: pointer; font-weight: 900; padding: 12px; }
  .mobile-menu nav { position: absolute; top: 70px; right: 16px; left: 16px; display: grid; gap: 4px; padding: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 8px 20px #1b1f3b20; }
  .mobile-menu a { padding: 10px; font-weight: 800; text-decoration: none; }
}

/* ===== Accueil (hero) ===== */
.hero { padding: 64px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { margin-bottom: 28px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 14px; background: var(--ink); color: #fff; text-decoration: none; }
.store svg { width: 24px; height: 24px; fill: #fff; flex: none; }
.store span { display: grid; line-height: 1.1; font-size: .72rem; opacity: .85; }
.store strong { font-size: 1.05rem; opacity: 1; font-weight: 800; }
.soon { font-size: .9rem; color: var(--muted); font-weight: 700; }
.hero-art { position: relative; display: flex; justify-content: flex-end; padding-right: 10px; min-height: 560px; }
.stage { position: relative; }
.hero-art .phone { transform: rotate(4deg); }
.hero-art .phone::before { content: none; }
.hero-art .gaston { position: absolute; width: 200px; left: -150px; bottom: -14px; filter: drop-shadow(0 12px 18px rgba(27, 31, 59, .18)); animation: bob 3.2s ease-in-out infinite; }
.bubble { position: absolute; left: -165px; bottom: 222px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 10px 16px; font-weight: 800; font-size: .95rem; box-shadow: 0 4px 0 var(--line); width: 210px; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; padding-bottom: 20px; justify-content: center; }
  .hero-art .gaston { width: 130px; left: -70px; bottom: -10px; }
  .bubble { display: none; }
}

/* ===== Téléphone ===== */
.phone { width: 290px; aspect-ratio: 375 / 812; border-radius: 44px; background: var(--ink); padding: 11px; box-shadow: 0 30px 60px -20px rgba(27, 31, 59, .45); position: relative; flex: none; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
.phone::before { content: ''; position: absolute; top: 20px; left: 50%; width: 76px; height: 20px; translate: -50% 0; background: var(--ink); border-radius: 20px; z-index: 1; }
@media (max-width: 520px) { .phone { width: 240px; } }

/* ===== Bandeau des chiffres ===== */
.figures { background: var(--blue); color: #fff; padding: 52px 0; }
.figures ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; text-align: center; }
.figures li { padding: 8px 18px; }
.figures li + li { border-left: 1px solid rgba(255,255,255,.3); }
.figures strong { display: block; margin-bottom: 12px; font: 800 clamp(2.8rem, 5.4vw, 4.4rem)/1 var(--display); color: var(--yellow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures span { display: block; font-weight: 800; line-height: 1.4; }
.figures small { display: block; margin-top: 6px; font-size: .8rem; line-height: 1.4; }
@media (max-width: 700px) {
  .figures { padding: 28px 0; }
  .figures ul { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .figures li { padding-inline: 8px; }
  .figures li:nth-child(3) { border-left: 0; }
}

/* ===== Sections ===== */
section { padding: 96px 0; }
section[id], #chiffres, #telecharger { scroll-margin-top: 90px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: 0 6px 0 var(--line); }
.steps .num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--yellow); font: 900 1.3rem/1 var(--body); margin-bottom: 16px; box-shadow: 0 4px 0 var(--yellow-dark); }
.center .steps .num { margin-inline: auto; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature[id] { scroll-margin-top: 100px; }
#preparation-langues-oral { align-items: start; }
@media (min-width: 861px) {
  #preparation-langues-oral { row-gap: 0; }
  #preparation-langues-oral > div {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
  }
}
.feature + .feature { margin-top: 110px; }
.feature.flip .feature-art { order: -1; }
.feature-art { display: flex; justify-content: center; align-items: flex-end; gap: 10px; position: relative; }
.feature-art .gaston { width: 150px; margin-left: -40px; z-index: 1; }
.feature ul { padding: 0; list-style: none; margin: 18px 0 0; display: grid; gap: 12px; }
.feature li { display: flex; gap: 12px; font-weight: 700; }
.feature li::before { content: ''; flex: none; width: 24px; height: 24px; margin-top: 3px; border-radius: 8px; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 36px; } .feature.flip .feature-art { order: 0; } }

/* Étagère des matières */
.shelf-band { background: var(--sunken); }
.subjects { text-align: left; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 44px; }
.subject { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 16px; padding: 14px 16px; border: 2px solid var(--line); }
.subject .cover { flex: none; display: grid; place-items: center; width: 44px; height: 54px; border-radius: 6px 8px 8px 6px; color: #fff; font: 900 .95rem/1 var(--body); box-shadow: inset 7px 0 0 rgba(0, 0, 0, .18), 0 3px 0 rgba(0, 0, 0, .15); }
.subject strong { display: block; line-height: 1.25; font-size: 1rem; }
.subject small { color: var(--muted); font-weight: 700; font-size: .85rem; }

/* Tarifs */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; align-items: stretch; }
.plans.plans-2 { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan .price { font: 800 2.6rem/1 var(--display); }
.plan .price small { font: 700 1rem var(--body); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 6px 0 18px; display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
.plan li::before { content: '✓  '; color: var(--green); font-weight: 900; }
.plan.best { border-color: var(--blue); box-shadow: 0 6px 0 var(--blue-dark); position: relative; }
.tag { position: absolute; top: -15px; left: 24px; background: var(--yellow); color: var(--ink); font: 900 .8rem/1 var(--body); padding: 7px 12px; border-radius: 10px; letter-spacing: .04em; text-transform: uppercase; }
@media (min-width: 901px) {
  .plans { row-gap: 10px; }
  .plan { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
  .plan ul { grid-row: 4; align-self: start; }
}
@media (max-width: 900px) { .plans, .plans.plans-2 { grid-template-columns: 1fr; } }

/* Bandeau cadeau */
.gift-band { background: var(--yellow); padding: 70px 0; }
.gift-band .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; }
.gift-band h2 { margin-bottom: .2em; }
.gift-band p { margin: 0; font-weight: 700; color: #5a4300; }
@media (max-width: 860px) { .gift-band .wrap { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* Carte cadeau */
.giftcard { width: 330px; aspect-ratio: 1.6; border-radius: 22px; background: var(--blue); color: #fff; padding: 22px 24px; position: relative; overflow: hidden;
  box-shadow: 0 22px 40px -18px rgba(29, 79, 216, .7); transform: rotate(-4deg); }
.giftcard::after { content: ''; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.giftcard .gc-brand { font: 900 1.15rem/1 var(--body); }
.giftcard .gc-brand b { color: var(--yellow); }
.giftcard .gc-big { font: 800 2.2rem/1 var(--display); margin-top: 20px; }
.giftcard .gc-small { font-weight: 700; opacity: .9; font-size: .95rem; }
.giftcard img { position: absolute; right: 10px; bottom: -6px; width: 112px; }
@media (max-width: 420px) {
  .giftcard { width: min(280px, calc(100vw - 64px)); }
  .feature-art .phone { width: min(240px, 65vw); }
  .feature-art .gaston { width: clamp(90px, 25vw, 105px); }
  .top .wrap { gap: 12px; }
  .brand { white-space: nowrap; font-size: 1.1rem; }
  .top .btn { padding-inline: 12px; font-size: .85rem; }
}

/* FAQ */
.faq { max-width: 780px; margin: 44px auto 0; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 900; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--blue); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: var(--muted); }

/* Appel final */
.final { text-align: center; }
.final img { width: 170px; margin: 0 auto 10px; }

/* ===== Pied de page ===== */
footer { background: var(--ink); color: #D6D8E6; padding: 56px 0 40px; font-size: .95rem; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer .brand { color: #fff; }
footer .brand b { color: var(--yellow); }
footer h4 { color: #fff; font: 900 1rem var(--body); margin: 0 0 12px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer a { color: #D6D8E6; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 22px; color: #9EA2BC; font-size: .85rem; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; } }

/* ===== Page Offrir ===== */
.gift-hero { padding: 60px 0 30px; }
.gift-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.gift-visual { display: grid; place-items: center; padding-top: 50px; gap: 26px; position: sticky; top: 100px; }
@media (min-width: 901px) { .gift-visual .giftcard { scale: 1.2; } }
form.gift { display: grid; gap: 16px; margin-top: 26px; }
form.gift label { display: grid; gap: 6px; font-weight: 800; }
form.gift label span { font-weight: 700; color: var(--muted); font-size: .9rem; }
form.gift input, form.gift textarea { font: 700 1.05rem var(--body); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 14px; padding: 13px 15px; width: 100%; }
form.gift input:focus, form.gift textarea:focus { outline: none; border-color: var(--blue); }
form.gift textarea { min-height: 96px; resize: vertical; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; border-top: 2px dashed var(--line); font-weight: 800; }
.total strong { font: 800 2rem/1 var(--display); }
.note { font-size: .88rem; color: var(--muted); }
.error { color: #B3362E; font-weight: 800; min-height: 1.4em; margin: 0; }
@media (max-width: 900px) { .gift-hero .wrap { grid-template-columns: 1fr; } .gift-visual { order: -1; padding-top: 0; position: static; } }

/* Page de remerciement : la carte à imprimer */
.printable { background: var(--surface); border: 2px solid var(--line); border-radius: 26px; padding: 34px; max-width: 640px; margin: 30px auto; text-align: center; box-shadow: 0 8px 0 var(--line); }
.printable .code { white-space: nowrap; font: 900 clamp(1.25rem, 6.4vw, 2.6rem)/1 ui-monospace, 'SF Mono', Consolas, monospace; letter-spacing: .05em; background: var(--yellow-soft); border: 3px dashed var(--yellow-dark); border-radius: 16px; padding: 20px; margin: 18px 0; }
.printable .msg { font-style: italic; color: var(--muted); font-size: 1.1rem; }
.printable img { width: 120px; margin: 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 520px) { .printable { padding: 24px 16px; } .printable .code { padding: 16px 8px; } }
@media print {
  .top, footer, .actions, .no-print { display: none !important; }
  body { background: #fff; }
  .printable { box-shadow: none; border: 2px solid #ddd; margin: 0 auto; }
}

/* ===== Pages légales ===== */
.legal-page { max-width: 780px; padding: 60px 0 90px; }
.legal-page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal-page h2 { font-size: 1.6rem; margin-top: 1.6em; }
.legal-page p, .legal-page li { color: #3a3550; }
.todo { background: var(--yellow-soft); border: 2px solid var(--yellow); border-radius: 8px; padding: 0 6px; font-weight: 800; }
.draft { background: var(--yellow-soft); border: 2px solid var(--yellow); border-radius: 14px; padding: 14px 18px; font-weight: 700; }
