/* Pages d'inscription à la newsletter (liste GetResponse TPtJK) — feuille commune.
 * Source unique pour /formation-gratuite/, /optin-emailssecrets/ et /mesemailssecrets/ (et leurs alias).
 * Reprise telle quelle de la maquette validée (maquettes/formation-gratuite/, commit b15e80c) ;
 * seul le style du message de succès de la maquette a été retiré (la page redirige vers le merci).
 * Après modification : node newsletter/build.mjs (met à jour le ?v= des 3 pages), puis tester et déployer.
 */
:root {
  --yellow:       #FFCC00;
  --yellow-hover: #FFD633;
  --yellow-press: #E6B800;
  --yellow-tint:  #FFF8DB;
  --yellow-line:  #F1DE94;

  --black: #0A0A0A;
  --ink:   #121212;

  --n-0:   #FFFFFF;
  --n-50:  #FAFAF7;
  --n-100: #F2F2EE;
  --n-200: #E6E6E1;
  --n-300: #D2D2CC;
  --n-400: #A3A39D;
  --n-500: #6B6B66;
  --n-600: #4D4D49;

  --bg:        var(--n-50);
  --surface:   var(--n-0);
  --fg:        var(--ink);
  --fg-muted:  var(--n-600);
  --fg-subtle: var(--n-500);
  --border:    var(--n-200);
  --danger:    #B42318;
  --ok:        #12784A;

  --font-sans:  'Inter Tight', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --gutter: 20px;
  --shadow-md: 0 10px 30px rgba(10,10,10,.07);
  --shadow-lg: 0 30px 70px rgba(10,10,10,.12);
  --ease: cubic-bezier(.2,.7,.3,1);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden;
  font-family: var(--font-sans); font-size: 17px; line-height: 1.55;
  color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
.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; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }

mark {
  background: linear-gradient(180deg, transparent 56%, var(--yellow) 56%, var(--yellow) 94%, transparent 94%);
  color: inherit; padding: 0 .06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.h2 {
  font-weight: 700; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1;
  letter-spacing: -.025em; margin: 0 0 14px; text-wrap: balance;
}
.h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* ============ FORMULAIRE ============ */
.optin { width: 100%; max-width: 700px; margin: 0 auto; }
.optin-row { display: flex; flex-direction: column; gap: 10px; }
.input {
  width: 100%; height: 50px; padding: 0 16px;
  font: inherit; font-size: 17px; color: var(--fg);
  background: var(--surface); border: 1.5px solid var(--n-300); border-radius: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input::placeholder { color: var(--n-400); }
.input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 4px rgba(255,204,0,.38); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 50px; padding: 0 20px;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2; white-space: nowrap;
  color: var(--black); background: var(--yellow);
  border: 0; border-radius: 10px; cursor: pointer; touch-action: manipulation;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 6px 16px rgba(230,184,0,.35);
  transition: background 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.cta-btn:hover { background: var(--yellow-hover); transform: translateY(-1px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 10px 22px rgba(230,184,0,.45); }
.cta-btn:active { background: var(--yellow-press); transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 3px 8px rgba(230,184,0,.3); }
.cta-btn:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.cta-ico { display: inline-flex; flex-shrink: 0; transition: transform 160ms var(--ease); }
.cta-btn:hover .cta-ico { transform: translateX(3px); }
.cta-btn[aria-busy="true"] { pointer-events: none; }
.cta-btn[aria-busy="true"] .cta-ico svg { display: none; }
.cta-btn[aria-busy="true"] .cta-ico::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--black); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.optin-msg { margin: 10px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--danger); text-align: left; }
.optin-msg:empty { display: none; }
.optin-msg button { font: inherit; font-weight: 700; color: var(--fg); background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--yellow-press); text-underline-offset: 3px; cursor: pointer; }

/* Ligne de preuve sous le formulaire */
.readers { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-size: 15px; color: var(--fg-muted); }
.readers img { width: 150px; margin: -6px -8px -6px -10px; }
@media (max-width: 479px) { .readers { flex-direction: column; gap: 2px; font-size: 14.5px; } .readers img { width: 132px; margin: -6px 0; } }
.readers b { color: var(--fg); }

/* ============ HERO ============ */
.hero {
  padding: clamp(44px, 9vh, 96px) 0 0; text-align: center; overflow: hidden;
  background:
    radial-gradient(ellipse 900px 520px at 50% -10%, var(--yellow-tint) 0%, rgba(255,248,219,0) 72%),
    var(--bg);
}
.for {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fg);
}
.for::before, .for::after { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--yellow); }
/* Mobile (jusqu'à 599px) : toujours 2 lignes, coupées après « coachs ». Sans ça, une seule ligne étirée
   sur toute la largeur des grands téléphones (412-479px), ou « ambitieux » seul en 2e ligne (480-599px).
   La largeur max (en em) laisse passer « …COACHS » (≈15,7em) mais pas « …COACHS ET » (≈17,9em). */
@media (max-width: 599px) { .for { display: block; max-width: 16.8em; margin: 0 auto 12px; font-size: 11.5px; letter-spacing: .06em; line-height: 1.5; text-wrap: balance; } .for::before, .for::after { display: none; } }
.display {
  font-weight: 800; font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -.045em; text-wrap: balance;
  margin: 0 0 22px;
}
/* Très petits téléphones (320px) : à 40px, « bouche-à-oreille. » (insécable) dépasse de l'écran
   et « du » tombe seul sur sa ligne. À 36px, le titre tient sur 4 lignes comme sur les autres téléphones. */
@media (max-width: 359px) { .display { font-size: 36px; } }
.nw { white-space: nowrap; }
.br-d { display: none; }
@media (min-width: 700px) { .br-d { display: inline; } }
.sub { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.5; color: var(--fg-muted); max-width: 760px; margin: 0 auto 32px; text-wrap: balance; }
.sub b { color: var(--fg); font-weight: 600; }
@media (max-width: 479px) { .sub { font-size: 16.5px; margin-bottom: 26px; } }

/* Boîte de réception (aperçu des vrais emails) */
.inbox {
  max-width: 640px; margin: clamp(48px, 7vh, 72px) auto 0; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-bottom: 0;
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); overflow: hidden;
}
.inbox-top {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  background: var(--n-50); border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--fg-muted);
}
.dots { display: flex; gap: 6px; }
@media (max-width: 479px) { .inbox-label { display: none; } }
.inbox-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--yellow); color: var(--black); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--n-300); }
.mails { list-style: none; margin: 0; padding: 0; }
.mail { position: relative; display: flex; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--n-100); }
.mail img { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.mail-main { min-width: 0; flex: 1; }
.mail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.mail-head b { font-weight: 600; color: var(--fg-muted); }
.mail-head span { font-size: 12.5px; color: var(--fg-subtle); white-space: nowrap; }
.mail-subj { font-size: 15.5px; font-weight: 600; line-height: 1.3; margin: 2px 0; }
.mail-prev { font-size: 14px; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail.is-new { background: var(--yellow-tint); }
.mail.is-new::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--yellow); }
.mail.is-new .mail-head b, .mail.is-new .mail-head span { color: var(--fg); font-weight: 800; }
.mail.is-new .mail-subj { font-weight: 800; }

/* ============ TÉMOIGNAGES ============ */
.love { padding: clamp(64px, 8vw, 104px) 0; background: var(--n-100); border-top: 1px solid var(--border); }
.love-sub { font-size: 18px; color: var(--fg-muted); margin: 0 auto; max-width: 560px; }
.wall-box { position: relative; margin-top: 40px; max-height: 720px; overflow: hidden; }
.wall-box.open { max-height: none; }
.wall-box:not(.open)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none;
  background: linear-gradient(180deg, rgba(242,242,238,0), var(--n-100) 85%);
}
@media (max-width: 679px) { .wall-box { max-height: 900px; margin-top: 32px; } }
.wall { columns: 2; column-gap: 12px; }
@media (min-width: 1000px) { .wall { columns: 3; column-gap: 18px; } }
.wall.js-cols { columns: auto; display: flex; gap: 12px; align-items: flex-start; }
@media (min-width: 1000px) { .wall.js-cols { gap: 18px; } }
.wall-col { flex: 1; min-width: 0; }
.wall figure {
  break-inside: avoid; margin: 0 0 18px; padding: 22px 22px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(10,10,10,.04), 0 8px 24px rgba(10,10,10,.06);
}
.wall blockquote { margin: 0; font-size: 17.5px; line-height: 1.45; font-weight: 500; letter-spacing: -.008em; color: var(--fg); }
.wall blockquote::before {
  content: "\201C"; display: block; height: 26px; margin-bottom: 4px;
  font-family: var(--font-serif); font-size: 60px; line-height: .9; color: var(--yellow-press);
}
.wall blockquote mark { font-weight: 700; }
.wall figcaption { margin-top: 16px; display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; color: var(--fg); }
.ini { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--black); color: var(--yellow); font-size: 13px; font-weight: 800; }
@media (max-width: 679px) {
  .wall figure { margin-bottom: 12px; padding: 16px 15px 14px; border-radius: 14px; }
  .wall blockquote { font-size: 15px; line-height: 1.42; }
  .wall blockquote::before { font-size: 46px; height: 20px; }
  .wall figcaption { margin-top: 12px; font-size: 13px; gap: 8px; }
  .ini { width: 24px; height: 24px; font-size: 11.5px; }
}
.wall-more[hidden] { display: none; }
.wall-more { display: flex; justify-content: center; margin-top: 8px; position: relative; z-index: 1; }
.wall-more button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 700; font-size: 15.5px; color: var(--fg);
  background: var(--surface); border: 1.5px solid var(--n-300); border-radius: 999px; cursor: pointer;
}
.wall-more button:hover { border-color: var(--black); }
.wall-more button:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }

/* ============ QUI T'ÉCRIT ============ */
.about { padding: clamp(64px, 8vw, 104px) 0; }
.about-card { display: grid; gap: 28px; align-items: center; max-width: 980px; margin: 0 auto; }
@media (min-width: 820px) { .about-card { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 52px; } }
.about-photo { width: 100%; max-width: 460px; margin: 0 auto; }
.about-text p { font-size: 18px; color: var(--fg-muted); }
.about-text p b { color: var(--fg); }
.about-text .press { margin-top: 14px; font-size: 14px; color: var(--fg-subtle); }

/* ============ INSCRIPTION EN 2 ÉTAPES ============ */
.step1 { display: flex; justify-content: center; }
.cta-btn--solo {
  width: auto; min-width: 400px; height: 64px; padding: 0 40px; gap: 10px;
  font-size: 19px; border-radius: 12px;
  box-shadow: 0 0 0 6px rgba(255,204,0,.25), inset 0 -2px 0 rgba(0,0,0,.12), 0 10px 24px rgba(230,184,0,.35);
}
.cta-btn--solo:hover { box-shadow: 0 0 0 9px rgba(255,204,0,.28), inset 0 -2px 0 rgba(0,0,0,.12), 0 14px 28px rgba(230,184,0,.45); }
.cta-btn--solo .cta-ico svg { width: 20px; height: 20px; }
@media (max-width: 479px) {
  .cta-btn--solo { width: auto; min-width: 0; height: 50px; padding: 0 20px; font-size: 16px;
    box-shadow: 0 0 0 4px rgba(255,204,0,.25), inset 0 -2px 0 rgba(0,0,0,.12), 0 8px 18px rgba(230,184,0,.3); }
  .cta-btn--solo .cta-ico svg { width: 18px; height: 18px; }
}
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.55); animation: fade 200ms ease both; }
.modal-panel {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; text-align: center;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  padding: 26px 22px calc(24px + env(safe-area-inset-bottom)); animation: sheet 280ms var(--ease) both;
}
@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
  .modal-panel { border-radius: 22px; padding: 38px 40px 30px; animation: pop 240ms var(--ease) both; }
}

.modal-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--fg-muted); cursor: pointer; }
.modal-close:hover { background: var(--n-100); color: var(--fg); }
.modal-close:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
.progress {
  position: relative; height: 28px; margin: 0 46px 22px; border-radius: 999px; overflow: hidden;
  background: var(--n-100); box-shadow: inset 0 1px 2px rgba(10,10,10,.08);
}
.progress-fill {
  position: absolute; inset: 0 auto 0 0; width: 50%; display: flex; align-items: center; justify-content: center;
  border-radius: inherit; background-color: var(--yellow);
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 10px, rgba(255,255,255,0) 10px 20px);
  animation: fill 600ms 120ms var(--ease) both;
}
.progress-text { font-size: 12.5px; font-weight: 800; letter-spacing: .01em; color: var(--black); white-space: nowrap; }
@keyframes fill { from { width: 8%; } }
@media (prefers-reduced-motion: reduce) { .progress-fill { animation: none; } }
.modal h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 30px); line-height: 1.15; letter-spacing: -.024em; text-wrap: balance; }
.modal-sub { margin: 0 0 18px; font-size: 15.5px; color: var(--fg-muted); }
.optin--modal { max-width: none; }
.optin--modal .optin-row { flex-direction: column; gap: 10px; }
.optin--modal .optin-row .cta-btn { width: 100%; }
.optin--modal .optin-row .input { flex: none; }
.optin--modal .optin-msg { text-align: center; }
.modal-note { margin: 12px 0 0; text-align: center; font-size: 13.5px; color: var(--fg-subtle); }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-panel { animation: none; } }

/* Desktop : fenêtre plus large et plus aérée (le mobile reste en pleine largeur) */
@media (min-width: 900px) {
  .modal-panel { max-width: 720px; padding: 52px 64px 40px; border-radius: 24px; }
  .modal-close { top: 16px; right: 16px; }
  .progress { height: 32px; margin: 0 64px 26px; }
  .progress-text { font-size: 13.5px; }
  .modal h2 { font-size: 40px; margin-bottom: 10px; }
  .modal-sub { font-size: 18px; margin-bottom: 26px; }
  .optin--modal .optin-row { gap: 12px; }
  .optin--modal .input { height: 62px; font-size: 19px; padding: 0 20px; border-radius: 12px; }
  .optin--modal .cta-btn { height: 62px; font-size: 18.5px; border-radius: 12px; }
  .modal-note { font-size: 14.5px; margin-top: 16px; }
}

/* ============ CTA FINAL ============ */
.final {
  padding: clamp(64px, 8vw, 104px) 0; text-align: center;
  background: var(--yellow-tint); border-top: 1px solid var(--yellow-line);
}
.final .h2 { margin-bottom: 28px; }

.reassure { margin: 10px 0 0; font-size: 13.5px; color: var(--fg-subtle); }

/* ============ FOOTER ============ */
.footer { background: var(--black); color: rgba(255,255,255,.6); padding: 36px 0; font-size: 13px; line-height: 1.6; text-align: center; }
.footer p { max-width: 720px; margin: 0 auto 10px; }
.footer a { color: rgba(255,255,255,.85); }
.foot-logo { width: 76px; margin: 0 auto 18px; border-radius: 6px; }

/* ============ NOTIFICATION « UN INDÉPENDANT S'EST INSCRIT » ============
 * Vrais inscrits de moins de 6 h (newsletter.js + /api/recent-signups). Créée seulement s'il y en a.
 * Sous la fenêtre d'inscription (z-index 100). Maquette validée : variante A, badge « Vérifié ».
 */
.sp {
  position: fixed; left: 24px; bottom: 24px; z-index: 90;
  display: flex; max-width: 290px;
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(10,10,10,.12), 0 2px 6px rgba(10,10,10,.05);
  opacity: 0; transform: translateY(12px); visibility: hidden;
  transition: opacity 320ms var(--ease), transform 320ms var(--ease), visibility 0s linear 320ms;
}
.sp.is-in { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.sp-main {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 12px 18px 12px 12px;
  font: inherit; color: inherit; text-align: left;
  background: none; border: 0; border-radius: inherit; cursor: pointer;
}
.sp-main:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.sp-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--black); }
.sp-ico svg { width: 20px; height: 20px; }
.sp-txt { display: grid; gap: 2px; min-width: 0; }
.sp-title { font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; white-space: nowrap; }
.sp-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; color: var(--fg-subtle); white-space: nowrap; }
.sp-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--n-300); }
.sp-ok { display: inline-flex; align-items: center; gap: 4px; }
.sp-ok i { width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--black); }
.sp-ok svg { width: 8px; height: 8px; }
.sp-x {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  color: var(--fg-subtle); background: var(--surface); border: 1px solid var(--border);
  opacity: 0; transition: opacity 150ms ease;
}
.sp-x svg { width: 10px; height: 10px; }
.sp:hover .sp-x, .sp-x:focus-visible { opacity: 1; }
@media (hover: none) { .sp-x { opacity: 1; } }
/* Téléphone : version compacte, croix dans la carte */
@media (max-width: 639px) {
  .sp { left: 12px; bottom: 12px; max-width: calc(100% - 24px); border-radius: 12px; }
  .sp-main { gap: 10px; padding: 8px 40px 8px 8px; }
  .sp-ico { width: 34px; height: 34px; }
  .sp-ico svg { width: 17px; height: 17px; }
  .sp-title { font-size: 14px; }
  .sp-meta { font-size: 12px; gap: 6px; }
  .sp-x { top: 50%; right: 6px; width: 28px; height: 28px; transform: translateY(-50%); border: 0; background: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sp { transform: none; transition: opacity 200ms linear, visibility 0s linear 200ms; }
  .sp.is-in { transition-delay: 0s; }
}
