/* Goatching — site vitrine. Design aligné sur la charte (docs/brand/CHARTE.md) et
   l'app reskinée : fond clair chaud, cartes arrondies, accent bleu #4A7FF8,
   accents chauds corail/ambre, dégradé chaud atmosphérique derrière l'en-tête,
   pills très arrondis, ombres douces. Très grands titres serrés, mockups de
   téléphone en CSS pur. Police de marque Hanken Grotesk auto-hébergée (même
   fichier que l'app) — aucune ressource EXTERNE, on sert le .ttf. Mobile-first.

   Contrastes : les textes secondaires et les liens sont assombris par rapport
   aux tokens de l'app pour tenir le AA (4,5:1) sur fond clair (--secondary et
   --link plus foncés que l'accent de marque) ; les fonds pleins accent gardent
   le bleu de marque #4A7FF8 (texte blanc, réservé aux gros labels CTA).

   TOUJOURS CLAIR — décision explicite de Gauthier (2026-08-05) : contrairement
   à l'app (qui garde son sélecteur Système/Clair/Sombre), le site vitrine
   n'a plus de variante sombre. Ne pas réintroduire un bloc
   `@media (prefers-color-scheme: dark)` ici sans qu'on le redemande. */

/* Police de marque — variable (axe wght), auto-hébergée. swap = pas de texte
   invisible pendant le chargement (fallback système affiché immédiatement). */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("HankenGrotesk.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5F4F0;          /* fond clair aéré, légèrement chaud (charte) */
  --card: #FFFFFF;
  --label: #202020;       /* encre */
  --secondary: #6E6C63;   /* assombri vs charte #8C8A83 pour AA 4,5:1 sur --bg */
  --separator: rgba(32, 32, 32, 0.12);
  --accent: #4A7FF8;      /* bleu de marque : teintes, accents */
  --accent-fill: #4A7FF8; /* fonds pleins CTA avec texte blanc */
  --link: #3A66E0;        /* liens texte sur fond clair (assombri pour AA) */
  --on-accent: #FFFFFF;
  /* Couleurs de marque OPAQUES (charte) — pour les aplats : logo, pastilles.
     Distinctes des --halo-* : celles-ci sont volontairement translucides et ne
     servent QU'aux halos atmosphériques. Mêmes valeurs en clair et en sombre,
     comme kBrandCoral/kBrandAmber dans l'app (constantes hors thème). */
  --brand-coral: #FF7648;
  --brand-amber: #FFC757;
  /* Dégradé chaud atmosphérique (signature) : ambre au centre → corail → transparent. */
  --halo-amber: rgba(255, 199, 87, 0.42);
  --halo-coral: rgba(255, 118, 72, 0.40);
  --btn-shadow: rgba(74, 127, 248, 0.42);
  --card-shadow: 0 14px 34px -18px rgba(30, 30, 50, 0.22);
  --bezel: #0B0B0F;
  --bezel-edge: rgba(32, 32, 32, 0.20);
  --phone-shadow: rgba(28, 28, 30, 0.20);
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.018em;
  font-feature-settings: "tnum" 1; /* chiffres tabulaires (tableaux API/MCP) */
}

/* Ambiance chaude de marque sur TOUTE la page (pas seulement le hero) : halos
   ambre/corail/bleu très diffus, fixes, derrière le contenu — donne la couleur
   et la profondeur de la charte au reste de la page (sinon fond plat). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 30% at 88% 6%, rgba(255, 199, 87, 0.20), transparent 62%),
    radial-gradient(42% 30% at 6% 40%, rgba(255, 118, 72, 0.13), transparent 60%),
    radial-gradient(48% 32% at 94% 74%, rgba(74, 127, 248, 0.11), transparent 60%),
    radial-gradient(40% 28% at 12% 96%, rgba(255, 199, 87, 0.12), transparent 60%);
}
a:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-top: 64px;
  /* Signature : halo chaud atmosphérique (ambre → corail → transparent) posé en
     haut derrière le titre, comme dans l'app. */
  background:
    radial-gradient(ellipse 82% 52% at 50% 0%,
      var(--halo-amber) 0%, var(--halo-coral) 44%, transparent 72%);
}

.logo {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(255, 118, 72, 0.42);
  overflow: hidden;
}
.logo img {
  width: 80px;
  height: 80px;
  display: block;
}

h1 {
  margin: 26px 0 14px;
  font-size: clamp(46px, 11vw, 76px);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.03;
}

.tagline {
  max-width: 36em;
  margin: 0 auto;
  font-size: clamp(18px, 4.6vw, 21px);
  line-height: 1.4;
  color: var(--secondary);
  text-wrap: balance;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  min-height: 54px;
  padding: 14px 20px;
  border-radius: 980px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 700;
  box-shadow: 0 10px 24px var(--btn-shadow);
}

.btn-primary:hover { box-shadow: 0 14px 30px var(--btn-shadow); }

.btn-primary .btn-ext { font-weight: 400; opacity: 0.8; }

.btn-secondary {
  background: var(--card);
  color: var(--link); /* texte bleu sur carte blanche : --link tient le AA */
  border: 0.5px solid var(--separator);
  box-shadow: 0 2px 10px var(--phone-shadow);
}

.ios-hint { margin: 14px 0 0; font-size: 15px; }

.ios-hint a {
  display: inline-block;
  padding: 14px 8px; /* zone tactile >= 44 px */
  color: var(--link);
  text-decoration: none;
}

.ios-hint a:hover { text-decoration: underline; }

/* ---------- Mockup téléphone (CSS pur) ---------- */

.phone {
  width: min(320px, 80vw);
  margin: 0 auto;
  padding: 11px;
  background: var(--bezel);
  border: 1px solid var(--bezel-edge);
  border-radius: 48px;
  box-shadow: 0 30px 70px var(--phone-shadow), 0 6px 18px var(--phone-shadow);
  /* L'écran est coupé en douceur : le bas du téléphone fond dans la page. */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 97%);
}

.phone img,
.chart img {
  display: block;
  width: 100%;
  height: auto;
}

.phone img { border-radius: 37px; }

.phone-hero { margin-top: 44px; }

/* Glow coloré diffus derrière les mockups des sections (profondeur charte) :
   corail pour l'un, bleu pour l'autre (celui en grid-flip). */
.feature-visual { position: relative; }
.feature-visual::before {
  content: "";
  position: absolute;
  inset: -4% -16% 14%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 118, 72, 0.24), transparent 74%);
}
.grid-flip .feature-visual::before {
  background: radial-gradient(closest-side, rgba(74, 127, 248, 0.22), transparent 74%);
}

/* ---------- Sections vitrines (texte / visuel) ---------- */

.feature { padding-top: 84px; }

.grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.feature-text { text-align: center; }

h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.08;
  text-wrap: balance;
}

.feature-text p {
  margin: 0 auto;
  max-width: 32em;
  font-size: clamp(17px, 4.2vw, 19px);
  color: var(--secondary);
}

.chart {
  max-width: 660px;
  margin: 36px auto 0;
}

/* ---------- Sections cartes ---------- */

.section { padding-top: 84px; }

/* Bande dégradé chaud pleine largeur derrière la section « Sur iPhone » — un
   moment de couleur assumé qui rythme la page (charte). */
#iphone {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 118, 72, 0.10) 42%,
    rgba(255, 199, 87, 0.14) 74%,
    transparent 100%
  );
  padding-bottom: 44px;
}

.section h2 { text-align: center; }

.section-intro {
  margin: 0 auto 24px;
  max-width: 32em;
  text-align: center;
  color: var(--secondary);
  text-wrap: balance;
}

.cards, .steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: var(--card-shadow);
}

.card h3 {
  margin: 12px 0 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.026em;
}

.card p {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.015em;
  color: var(--secondary);
}

.card strong { color: var(--label); font-weight: 600; }

/* Badge rond coloré (comme les pastilles de l'app) — rotation bleu/corail/ambre. */
.card-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 26px;
  background: rgba(74, 127, 248, 0.14);
}
.cards .card:nth-child(3n + 2) .card-emoji { background: rgba(255, 118, 72, 0.16); }
.cards .card:nth-child(3n + 3) .card-emoji { background: rgba(255, 199, 87, 0.24); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 700;
}

.hint {
  margin: 18px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--secondary);
}

/* ---------- Note Android ---------- */

.callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 660px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}

.callout-emoji { font-size: 26px; line-height: 1.3; }

.callout p {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.015em;
  color: var(--secondary);
}

.callout strong { color: var(--label); font-weight: 600; }

/* ---------- Footer ---------- */

.footer {
  margin-top: 84px;
  padding: 28px 0 40px;
  border-top: 0.5px solid var(--separator);
  text-align: center;
}

.footer p { margin: 0; font-size: 13px; color: var(--secondary); }

.footer a {
  display: inline-block;
  padding: 12px 8px; /* zone tactile >= 44 px */
  color: var(--link);
  font-size: 15px;
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

.footer-devnote { margin-top: 4px; }
.footer-devnote a { display: inline; padding: 0; }

/* ---------- Pages doc (/api, /mcp) ---------- */

.doc-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}

.doc-nav .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
}

.doc-nav a { color: var(--link); text-decoration: none; font-size: 15px; }
.doc-nav a:hover { text-decoration: underline; }
.doc-nav .brand { font-weight: 700; color: var(--label); letter-spacing: -0.026em; }
.doc-nav .spacer { flex: 1; }

.doc {
  padding-top: 56px;
  /* Même signature chaude que le hero, plus discrète, derrière le titre. */
  background:
    radial-gradient(ellipse 90% 32% at 50% 0%,
      var(--halo-amber) 0%, var(--halo-coral) 46%, transparent 72%);
}
.doc .wrap { max-width: 760px; }

.doc h1 {
  font-size: clamp(34px, 8vw, 52px);
  margin: 0 0 12px;
}

.doc .lede {
  font-size: clamp(18px, 4.4vw, 21px);
  color: var(--secondary);
  margin: 0 0 8px;
  text-wrap: balance;
}

.doc h2 {
  margin: 52px 0 14px;
  font-size: clamp(24px, 5.5vw, 32px);
  text-align: left;
  scroll-margin-top: 72px;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.026em;
}

.doc p, .doc li { color: var(--label); }
.doc p { margin: 0 0 14px; }
.doc a { color: var(--link); }

.doc ol, .doc ul { margin: 0 0 16px; padding-left: 1.3em; }
.doc li { margin: 6px 0; }

.doc code {
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: color-mix(in srgb, var(--label) 8%, transparent);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

.doc pre {
  margin: 0 0 18px;
  padding: 18px 20px;
  background: var(--card);
  border: 0.5px solid var(--separator);
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: 0 2px 10px var(--phone-shadow);
}

.doc pre code {
  background: none;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--label);
}

.doc .note {
  display: flex;
  gap: 14px;
  background: var(--card);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0 0 18px;
  border: 0.5px solid var(--separator);
}

.doc .note.warn { border-color: color-mix(in srgb, #FF3B30 45%, var(--separator)); }
.doc .note-emoji { font-size: 22px; line-height: 1.3; }
.doc .note p { margin: 0; font-size: 15px; color: var(--secondary); }
.doc .note strong { color: var(--label); }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 15px;
}

.doc th, .doc td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--separator);
  vertical-align: top;
}

.doc th { font-weight: 600; color: var(--secondary); font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; }
.doc td code { font-size: 0.82em; }

.doc .pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-fill);
  color: var(--on-accent);
  letter-spacing: 0.02em;
}

/* ---------- Apparitions au défilement (activées par JS) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Écrans plus larges ---------- */

@media (min-width: 640px) {
  .hero { padding-top: 88px; }
  .cta { flex-direction: row; justify-content: center; }
  .btn { width: auto; padding: 14px 28px; }
  .btn-primary { font-size: 19px; }
  .phone-hero { margin-top: 52px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .feature, .section { padding-top: 130px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .feature-text { text-align: left; }
  .feature-text p { margin: 0; }
  .feature-text-center { text-align: center; }
  .feature-text-center p { margin: 0 auto; }
  /* Alternance : visuel à gauche une section sur deux. */
  .grid-flip .feature-visual { order: -1; }
  .phone { width: min(340px, 80vw); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .footer { margin-top: 130px; }
}
