/* ==========================================================================
   Payée — design system
   Sobre, pro, mobile-first. Aucune dépendance externe (perf + RGPD).
   Palette : fond #F8FAFC, encre #0F172A, accent "encaissé" #16A34A, CTA #C2410C.
   ========================================================================== */

:root {
  --bg: #F8FAFC;
  --bg-alt: #FFFFFF;
  --ink: #0F172A;
  --muted: #475569;
  --border: #E2E8F0;
  --accent: #16A34A;
  --accent-dark: #15803D;
  --cta: #C2410C;
  --cta-dark: #9A3412;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --container: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset minimal ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, figure { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 0.4em;
}
.section-lead { color: var(--muted); max-width: 640px; margin-bottom: 2em; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.6em;
}

/* Header ---------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.nav-links {
  display: none;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--accent-dark); }
@media (min-width: 720px) {
  .nav-links { display: flex; }
}

/* Boutons ----------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-cta {
  background: var(--cta);
  color: #fff;
}
.btn-cta:hover { background: var(--cta-dark); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Hero -------------------------------------------------------------------- */
.hero {
  padding: 64px 0 48px;
}
.hero h1 {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.1rem);
  line-height: 1.1;
  max-width: 16ch;
}
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 56ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 1.6em;
}

/* Bandeau stats ------------------------------------------------------------ */
.stats {
  background: var(--ink);
  color: #fff;
}
.stats .container { padding-top: 44px; padding-bottom: 44px; }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  text-align: center;
}
.stats-grid strong {
  display: block;
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  color: var(--accent);
  margin-bottom: 0.2em;
}
.stats-grid span { color: #CBD5E1; font-size: 0.95rem; }
.stats-source {
  margin-top: 24px;
  font-size: 0.75rem;
  color: #94A3B8;
  text-align: center;
}
@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Étapes -------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  counter-reset: step;
}
.step {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* Cards fonctionnalités ------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
@media (min-width: 560px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Pricing --------------------------------------------------------------------- */
.pricing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .pricing { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}
.pricing-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}
.pricing-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}
.pricing-card h3 { margin-bottom: 0.2em; }
.price { font-size: 2.1rem; font-weight: 800; margin: 0.2em 0; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pricing-card ul { list-style: none; padding: 0; color: var(--muted); flex-grow: 1; }
.pricing-card li { padding: 6px 0; border-top: 1px solid var(--border); font-size: 0.92rem; }
.pricing-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}
.pioneer-box {
  margin-top: 28px;
  background: #F0FDF4;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
}
.pioneer-box strong { color: var(--accent-dark); }

/* Formulaire pionniers ---------------------------------------------------------- */
.form-pionnier {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  max-width: 480px;
  margin: 0 auto;
}
.form-pionnier .field { margin-bottom: 16px; }
.form-pionnier label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-pionnier input,
.form-pionnier select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
}
.form-pionnier input:focus,
.form-pionnier select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
#form-msg { min-height: 1.4em; font-size: 0.92rem; margin-top: 12px; }

/* FAQ ----------------------------------------------------------------------------- */
.faq details {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
}
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* Footer -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.footer-links a { color: var(--muted); }

/* ==========================================================================
   Refonte v2 — hero tamponné, jalons, icônes, compteur pionniers
   ========================================================================== */

/* Hero 2 colonnes + facture tamponnée */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}
.hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem);
}
.invoice-visual { display: flex; justify-content: center; }
.invoice {
  position: relative;
  width: min(340px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 22px 24px 26px;
  transform: rotate(-1.5deg);
  font-variant-numeric: tabular-nums;
}
.inv-head {
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.inv-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--muted);
}
.inv-line span:last-child { color: var(--ink); font-weight: 600; }
.inv-late { color: var(--cta) !important; }
.inv-total { border-bottom: 0; font-size: 1.05rem; }
.inv-total span:last-child { font-weight: 800; }
.stamp {
  position: absolute;
  right: 14px;
  bottom: 8px;
  transform: rotate(-12deg);
  border: 3px solid var(--accent-dark);
  color: var(--accent-dark);
  border-radius: 10px;
  padding: 6px 16px 8px;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
  background: rgba(240, 253, 244, 0.85);
  box-shadow: inset 0 0 0 1.5px rgba(21, 128, 61, 0.35);
}
.stamp small {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
@media (prefers-reduced-motion: no-preference) {
  .stamp {
    animation: stamp-in 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) 0.5s both;
  }
  @keyframes stamp-in {
    0% { opacity: 0; transform: rotate(-12deg) scale(2.4); }
    70% { opacity: 1; transform: rotate(-12deg) scale(0.94); }
    100% { opacity: 1; transform: rotate(-12deg) scale(1); }
  }
  .card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 4px 6px rgba(15,23,42,0.06), 0 14px 32px rgba(15,23,42,0.1); }
}

/* Bandeau stats renforcé */
.stats-grid strong {
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Jalons temporels des étapes */
.step-when {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  background: #F0FDF4;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

/* Icônes des cartes fonctionnalités */
.card-ico {
  width: 28px;
  height: 28px;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

/* Pricing mis en avant */
.pricing-card { position: relative; }
.badge-pop {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 4px 14px;
  margin: 0;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .pricing-card.is-featured { transform: scale(1.04); }
}

/* Compteur de places pionniers */
.places {
  font-weight: 800;
  color: var(--cta-dark);
  font-variant-numeric: tabular-nums;
  margin: -1em 0 1.6em;
}

/* Accessibilité clavier */
a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Pages secondaires (simulateur, lettres, mentions) --------------------------------- */
.page-header { padding: 40px 0 8px; }
.page-header h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem); max-width: 30ch; }
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }
pre.lettre {
  white-space: pre-wrap;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
}
