/* ==========================================================================
   P'titPilot — feuille de style
   Mobile d'abord (375 px), puis adaptation aux écrans plus larges.
   ========================================================================== */

/* --- Réglages généraux ---------------------------------------------------- */

:root {
  /* Couleurs */
  --ivory: #f4f0e7;
  --surface: #fbf8f2;
  --beige: #c9b69c;
  --sage-50: #edf1ea;
  --sage-100: #dde4d8;
  --sage-300: #a9b9a5;
  --sage-500: #6f8777;
  --sage-700: #526d5b;
  --sage-800: #43594b;
  --sage-900: #303a33;
  --text: #303a33;
  --muted: #5d675e;
  --border: #e4dccd;
  --beige-border: #b6a389;
  --ink-rgb: 48, 58, 51;
  --header-bg: rgba(244, 240, 231, 0.92);

  /* Formes */
  --radius: 16px;
  --radius-small: 12px;
  --shadow: 0 1px 2px rgba(var(--ink-rgb), 0.05), 0 8px 24px rgba(var(--ink-rgb), 0.06);

  /* Typographie */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--text);
}

a {
  color: var(--sage-700);
}

::selection {
  background: var(--sage-100);
}

/* --- Mise en page --------------------------------------------------------- */

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.narrow {
  width: min(760px, 100% - 2.5rem);
}

.section {
  padding-block: 3.5rem;
}

/* --- En-tête -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding-block: 0.5rem;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--sage-700);
}

/* --- Boutons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  background: var(--sage-700);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--ivory);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(var(--ink-rgb), 0.2);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--sage-800);
}

.btn:active {
  transform: translateY(1px);
}

:is(a, button, summary, input):focus-visible {
  outline: 3px solid var(--sage-800);
  outline-offset: 3px;
}

.btn--ghost {
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  background: transparent;
  border-color: var(--sage-300);
  color: var(--sage-800);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--sage-50);
  border-color: var(--sage-500);
}

/* --- Haut de page --------------------------------------------------------- */

.hero {
  padding-block: 3.5rem 3rem;
  background: linear-gradient(180deg, var(--sage-50), var(--ivory) 90%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero-inner {
  max-width: 820px;
  margin-inline: auto;
}

.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2.5vw, 1.25rem);
  margin: 0 0 1rem;
  font-size: clamp(2.75rem, 11vw, 5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(56px, 15vw, 88px);
  height: clamp(56px, 15vw, 88px);
  border-radius: clamp(16px, 4.5vw, 24px);
  background: var(--sage-700);
  box-shadow: 0 6px 18px rgba(var(--ink-rgb), 0.2);
}

.hero-logo svg {
  width: 76%;
  height: 76%;
}

.hero-name {
  color: var(--sage-900);
}

.hero-tagline {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--sage-800);
  text-wrap: balance;
}

.hero-text {
  max-width: 60ch;
  margin: 0 auto 1.75rem;
  color: var(--muted);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

/* --- Le problème ---------------------------------------------------------- */

.problem p {
  color: var(--muted);
}

/* --- La solution ---------------------------------------------------------- */

.solution {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.steps {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.step h3 {
  color: var(--sage-800);
}

.step p {
  margin: 0;
  color: var(--muted);
}

/* --- La preuve ------------------------------------------------------------ */

.proof-list {
  display: grid;
  gap: 1.25rem;
  margin: 1.75rem 0 2rem;
  padding: 0;
  list-style: none;
}

.proof-list li {
  padding-left: 1.25rem;
  border-left: 3px solid var(--sage-300);
  color: var(--muted);
}

.sources {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  color: var(--muted);
}

.sources-title {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.sources-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.1rem;
}

/* --- Le prix -------------------------------------------------------------- */

.price {
  scroll-margin-top: 68px;
}

.price-card {
  padding: 1.75rem;
  background: var(--beige);
  border: 1px solid var(--beige-border);
  border-radius: 20px;
}

.price-card h2 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.price-main {
  font-size: 1.0625rem;
}

.price-card .btn {
  margin-top: 1.5rem;
}

#stripe-test-note {
  margin-top: 0.75rem;
}

/* --- Questions fréquentes ------------------------------------------------- */

.faq {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.faq-item {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.faq-item[open] {
  box-shadow: var(--shadow);
}

.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--sage-700);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--muted);
}

/* --- Dernier appel -------------------------------------------------------- */

.final-call {
  background: var(--sage-800);
  color: var(--ivory);
  text-align: center;
  padding-block: 4rem;
}

.final-call h2 {
  max-width: 26ch;
  margin-inline: auto;
  color: var(--ivory);
}

.final-call .btn {
  margin-top: 1rem;
  background: var(--ivory);
  color: var(--sage-900);
  box-shadow: none;
}

.final-call .btn:hover {
  background: var(--surface);
}

.final-call :is(a, button):focus-visible {
  outline-color: var(--ivory);
}

/* --- Liste d'attente ------------------------------------------------------ */

.waitlist {
  padding-block: 3rem 4rem;
  scroll-margin-top: 90px;
}

.waitlist-card {
  padding: 2rem 1.5rem;
  background: var(--sage-50);
  border: 1px solid var(--sage-300);
  border-radius: var(--radius);
  text-align: center;
}

.waitlist-card p {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--sage-900);
}

.waitlist-form {
  display: grid;
  gap: 0.85rem;
  max-width: 24rem;
  margin-inline: auto;
  text-align: left;
}

.waitlist-form label {
  font-weight: 600;
  color: var(--text);
}

.waitlist-form input {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--sage-500);
  border-radius: var(--radius-small);
  color: var(--text);
  font: inherit;
}

.waitlist-form .btn {
  width: 100%;
}

.waitlist-card .waitlist-note {
  margin: 1rem 0 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--muted);
}

#liste-attente:target .waitlist-card {
  border-color: var(--sage-700);
  box-shadow: 0 0 0 4px var(--sage-100);
}

/* --- Pied de page --------------------------------------------------------- */

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

/* --- Téléphones : boutons pleine largeur --------------------------------- */

@media (max-width: 559px) {
  .hero .btn,
  .price .btn,
  .final-call .btn {
    width: 100%;
  }
}

/* --- Tablettes et ordinateurs -------------------------------------------- */

@media (min-width: 720px) {
  .section {
    padding-block: 5rem;
  }

  .hero {
    padding-block: 5.5rem 5rem;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .price-card {
    padding: 2.5rem;
  }

  .final-call {
    padding-block: 6rem;
  }

  /* Confort de lecture : environ 70 caractères par ligne */
  .problem p,
  .step p,
  .proof-list li,
  .sources,
  .sources-list,
  .price-card p,
  .faq-item p {
    max-width: 70ch;
  }
}

/* --- Accessibilité : mouvement réduit ------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
