/* Ça s'apprend : feuille de style unique, pensée d'abord pour le téléphone.
   Plan de design : /site/plan-design.md. Une seule audace : la pousse du logo qui grandit. */

@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/assets/fonts/nunito.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/assets/fonts/nunito-bold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --cream: #F7EFE3;
  --cream-2: #EFE3D2;
  --paper: #FFFBF5;
  --navy: #2E3A59;
  --ink-soft: #5E6680;
  --coral: #F29E7C;
  --coral-2: #EE8A63;
  --sage: #A8C3A0;
  --sage-soft: #DCE8D8;
  --stem: #6F8F68;
  --line: #E6D9C6;
  --danger: #A8432A;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(46, 58, 89, .06), 0 8px 24px rgba(46, 58, 89, .06);
  --gutter: max(16px, env(safe-area-inset-left));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font: 500 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--navy); text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--stem); }
button, a, input, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--stem); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .h2 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 16px; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.12; }
h2, .h2 { font-size: clamp(26px, 4.6vw, 34px); }
h3, .h3 { font-family: var(--serif); font-size: 20px; }
p { margin: 0 0 16px; }
strong, b { font-weight: 800; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.measure { max-width: 34em; }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }
.hidden { display: none !important; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: var(--paper); padding: 8px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Boutons : principal plein, secondaire contour, tertiaire lien ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  background: var(--coral); color: var(--navy);
  border: 2px solid var(--coral); border-radius: 999px;
  font: 800 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .15s;
}
.btn:hover { background: var(--coral-2); border-color: var(--coral-2); color: var(--navy); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; border-color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--paper); }
.btn.light { background: var(--paper); border-color: var(--line); }
.btn.light:hover { border-color: var(--navy); background: var(--paper); }
.btn.google { background: var(--paper); border-color: var(--line); width: 100%; }
.btn.google:hover { border-color: var(--navy); background: var(--paper); }
.btn.google svg { width: 20px; height: 20px; }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 4px 0; font: 800 15px var(--sans); color: var(--navy); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--stem); }

/* ---------- En-tête (identique sur toutes les pages) ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 239, 227, .92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; padding-top: env(safe-area-inset-top); }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 600 20px var(--serif); color: var(--navy); text-decoration: none; white-space: nowrap; }
.logo svg { width: 26px; height: 30px; }
.logo:hover { color: var(--navy); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 8px 10px; border-radius: 8px; font-weight: 800; font-size: 15px; text-decoration: none; color: var(--navy); }
.nav a:not(.btn):hover { background: var(--cream-2); }
.nav a[aria-current="page"]:not(.btn) { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .btn { min-height: 40px; padding: 8px 16px; font-size: 15px; margin-left: 4px; }
.nav .hide-mobile { display: none; }

/* ---------- Accueil : première vue ---------- */
.hero { padding: 32px 0 48px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.sprout { width: 76px; height: 96px; margin: 0 0 16px -6px; overflow: visible; }
.sprout .stem { stroke-dasharray: 46; stroke-dashoffset: 0; }
.sprout .leaf-l, .sprout .leaf-r { transform-box: fill-box; }
.sprout .leaf-l { transform-origin: 100% 100%; }
.sprout .leaf-r { transform-origin: 0% 100%; }
.sprout .ripple { fill: none; stroke: var(--sage); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.js .sprout .stem { animation: grow-stem 1.1s cubic-bezier(.3, .7, .2, 1) .2s both; }
.js .sprout .leaf-l { animation: grow-leaf .9s cubic-bezier(.3, 1.4, .5, 1) 1.0s both; }
.js .sprout .leaf-r { animation: grow-leaf .9s cubic-bezier(.3, 1.4, .5, 1) 1.25s both; }
.js .sprout .ripple { animation: ripple 2.4s ease-out .1s both; }
.js .sprout .ripple.r2 { animation-delay: .7s; }
@keyframes grow-stem { from { stroke-dashoffset: 46; } to { stroke-dashoffset: 0; } }
@keyframes grow-leaf { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ripple { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

.hero h1 { max-width: 12em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 24px 0 12px; }
.reassure { font-size: 15px; color: var(--ink-soft); margin: 0; }

.clip { margin: 0; }
.clip video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); background: var(--navy); box-shadow: var(--shadow); }
.clip figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.tint { background: var(--paper); }
.section-head { margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); max-width: 34em; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; }
.steps li::before { content: counter(step); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--sage-soft); color: var(--stem); font: 600 20px/44px var(--serif); text-align: center; }
.steps strong { display: block; font-size: 18px; }
.steps span { color: var(--ink-soft); }

/* ---------- Thèmes, séries, épisodes ---------- */
.theme { margin-bottom: 40px; }
.theme-name { font: 800 15px var(--sans); color: var(--stem); margin: 0 0 8px; }
.series { background: var(--paper); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.series-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.series-head h3 { margin: 0; font-size: 24px; }
.series-meta { font-size: 15px; color: var(--ink-soft); }
.progress { height: 8px; border-radius: 999px; background: var(--cream-2); overflow: hidden; margin: 0 0 16px; }
.progress span { display: block; height: 100%; width: 0; background: var(--stem); border-radius: inherit; transition: width .6s ease; }
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.episode { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px 12px; padding: 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--navy); background: var(--cream); border: 2px solid transparent; }
a.episode:hover { border-color: var(--sage); color: var(--navy); }
.episode.current { border-color: var(--coral); background: var(--paper); }
.episode .ep-num { width: 36px; height: 36px; border-radius: 50%; background: var(--paper); font: 600 17px/36px var(--serif); text-align: center; color: var(--navy); }
.episode.seen .ep-num { background: var(--stem); color: var(--paper); font-size: 0; }
.episode.seen .ep-num::after { content: ''; display: inline-block; width: 12px; height: 7px; border: solid var(--paper); border-width: 0 0 3px 3px; transform: translateY(-3px) rotate(-45deg); }
.episode .ep-title { font-weight: 800; line-height: 1.3; }
.episode .ep-pitch { grid-column: 2 / 4; font-size: 15px; color: var(--ink-soft); line-height: 1.45; }
.episode .ep-time { font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.episode.locked .ep-time::before { content: ''; display: inline-block; width: 10px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--ink-soft); border-radius: 2px; border-top-width: 6px; }
.pill-new { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--coral); color: var(--navy); font: 800 12px/1.5 var(--sans); vertical-align: 2px; }
.coming { margin-top: 24px; color: var(--ink-soft); font-size: 16px; }
.coming strong { color: var(--navy); }

/* Reprendre (haut de l'espace membre) */
.resume { display: grid; gap: 16px; background: var(--navy); color: var(--paper); border-radius: var(--r); padding: 24px; margin-bottom: 40px; }
.resume p { margin: 0; }
.resume .resume-label { font-size: 15px; color: var(--sage); font-weight: 800; }
.resume .resume-title { font: 600 24px/1.25 var(--serif); }
.resume .btn { justify-self: start; }

/* Tutoriel première visite (dans la page, jamais en fenêtre) */
.tuto { background: var(--sage-soft); border-radius: var(--r); padding: 24px; margin-bottom: 32px; }
.tuto h2 { font-size: 24px; margin-bottom: 12px; }
.tuto ol { margin: 0 0 16px; padding-left: 20px; }
.tuto li { margin-bottom: 8px; }

/* ---------- Cartes, tarif, questions ---------- */
.card { background: var(--paper); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.price-card { max-width: 460px; margin: 0 auto; text-align: left; }
.price { font: 600 52px/1 var(--serif); margin: 0 0 8px; }
.price small { font: 800 18px var(--sans); color: var(--ink-soft); }
.checklist { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 13px; height: 7px; border: solid var(--stem); border-width: 0 0 3px 3px; transform: rotate(-45deg); }

details.faq { border-bottom: 1px solid var(--line); }
details.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 800; font-size: 17px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border: solid var(--navy); border-width: 0 2.5px 2.5px 0; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details.faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details.faq p { color: var(--ink-soft); padding-bottom: 8px; }

.notice { padding: 14px 16px; border-radius: var(--r-sm); background: var(--paper); border-left: 4px solid var(--sage); margin: 16px 0; font-size: 15px; }
.notice.ok { border-left-color: var(--stem); background: var(--sage-soft); }
.notice.warn { border-left-color: var(--coral); background: #FCEBDD; }
.notice.err { border-left-color: var(--danger); background: #F8E1DA; color: #6E2A1B; }
.notice.health { margin-top: 40px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 12px; margin-top: 16px; }
.form label:not(.check) { font-weight: 800; font-size: 15px; }
input[type="email"], input[type="text"] {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: 500 17px var(--sans); color: var(--navy);
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-sm);
}
input[type="email"]:focus { border-color: var(--stem); outline: none; box-shadow: 0 0 0 3px var(--sage-soft); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--stem); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 14px; margin: 8px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-box { max-width: 460px; margin: 0 auto; }
.spinner { display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px; border: 3px solid var(--line); border-top-color: var(--stem); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.field-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.field-row:last-of-type { border-bottom: 0; }
.field-row span { color: var(--ink-soft); }

/* ---------- Page cours ---------- */
.back { display: inline-block; margin-bottom: 16px; font-weight: 800; font-size: 15px; }
.course-layout { display: grid; gap: 32px; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--navy); color: var(--paper); display: grid; place-items: center; text-align: center; padding: 16px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ai-mention { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }
.course-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.course-side h2 { font-size: 22px; margin-bottom: 4px; }

/* ---------- Pages légales ---------- */
.legal h2 { font-size: 22px; margin-top: 32px; }
.legal p, .legal li { max-width: 40em; }
.todo { background: #FCEBDD; color: var(--danger); padding: 0 4px; border-radius: 4px; font-weight: 800; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy); color: #D9DDEA; padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); font-size: 15px; margin-top: 24px; }
.site-footer a { color: var(--paper); text-decoration-color: var(--sage); }
.site-footer a:hover { color: var(--sage); }
.site-footer .logo { color: var(--paper); margin-bottom: 12px; }
.footer-grid { display: grid; gap: 32px; }
.footer-title { font-weight: 800; color: var(--paper); margin-bottom: 8px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 251, 245, .08); }
.socials a:hover { background: rgba(255, 251, 245, .16); }
.socials svg { width: 20px; height: 20px; fill: var(--paper); }
.footer-bottom { border-top: 1px solid rgba(255, 251, 245, .14); margin-top: 32px; padding-top: 20px; font-size: 13px; color: #B9BFD3; }
.footer-bottom p { max-width: 60em; }

/* ---------- Plus grand écran ---------- */
@media (min-width: 680px) {
  .nav .hide-mobile { display: inline-block; }
  .section { padding: 80px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .resume { grid-template-columns: 1fr auto; align-items: center; padding: 28px 32px; }
  .resume .btn { justify-self: end; }
  .series { padding: 32px; }
}
@media (min-width: 940px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .course-layout { grid-template-columns: 1fr 340px; align-items: start; }
  .course-side { position: sticky; top: 88px; }
}

@media (pointer: fine) { html, body { overscroll-behavior: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .js .sprout .ripple { animation: none; opacity: 0; }
}

/* Ajustements après captures du 16 oct. */
.nav a { white-space: nowrap; }
#course-pitch { margin-top: 16px; }
.section.tint .card { background: var(--cream); box-shadow: none; }
.logo svg { flex-shrink: 0; }
#subscribe { margin-bottom: 40px; }
@media (max-width: 400px) {
  .logo { font-size: 18px; }
  .nav a:not(.btn) { padding: 8px 6px; }
  .nav .btn { padding: 8px 12px; margin-left: 2px; }
}
