/*
 * saastisfaction.com — la page de Gotcha.
 *
 * Les couleurs sont celles de l'extension, reprises de `src/ui/tokens.css`.
 * Un produit dont le site ne ressemble pas au produit fait douter avant
 * même l'installation ; et l'extension assume un thème sombre unique,
 * parce qu'elle affiche des captures de pages claires qu'un fond sombre
 * détache. La page hérite du choix plutôt que de le contredire.
 *
 * Rien n'est chargé depuis un tiers : ni fonte, ni script, ni mesure
 * d'audience. C'est la même promesse que celle vendue par le produit,
 * tenue à l'endroit où elle se vérifie le plus facilement — l'onglet
 * réseau de n'importe quel visiteur.
 */

@import url('fonts.css');

:root {
  --bg: #12161c;
  --surface: #1a212a;
  --surface-2: #232c37;
  --surface-3: #2e3945;
  --line: #313d4a;

  --text: #e4ebf2;
  --text-2: #93a2b2;
  --text-3: #667482;

  --accent: #5acbe6;
  --accent-hi: #7bd8ed;
  --accent-dim: #2e93ac;
  --on-accent: #052029;

  --rec: #ff4438;
  --ok: #56d9a3;
  --warn: #e9b872;

  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'DejaVu Sans Mono', Menlo, monospace;

  --r-sm: 5px;
  --r-md: 7px;
  --r-lg: 9px;

  --col: 1120px;
  --prose: 660px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

a { color: var(--accent); text-decoration-color: var(--accent-dim); text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------------------------------------------------------------- *
 * Marque
 *
 * Le cadre et le plein : c'est le geste du produit — on entoure une
 * zone, on la garde. La même forme sert d'icône dans l'extension.
 * ---------------------------------------------------------------- */

.mark {
  width: 20px; height: 20px;
  border: 1.6px solid var(--accent);
  border-radius: 5px;
  position: relative;
  flex: none;
}
.mark::after {
  content: '';
  position: absolute; inset: 3.6px;
  background: var(--accent);
  border-radius: 1px;
}
.mark.lg { width: 30px; height: 30px; border-radius: 7px; border-width: 2px; }
.mark.lg::after { inset: 5.5px; border-radius: 2px; }

/* ---------------------------------------------------------------- *
 * Ossature
 * ---------------------------------------------------------------- */

.wrap { width: min(100% - 48px, var(--col)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }

section { padding-block: 88px; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 20px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin: 0 0 24px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 20px; }
h3 { font-size: 1.05rem; letter-spacing: -.01em; margin: 0 0 8px; }

p { margin: 0 0 18px; max-width: var(--prose); }

/* Quelques respirations ponctuelles. Elles vivent ici et non dans un
   attribut `style=""` parce que le CSP de la page refuse le style en
   ligne — sans 'unsafe-inline', qui rouvrirait la porte qu'on ferme. */
.gap-under { margin-bottom: 40px; }
.gap-over  { margin-top: 40px; }
.narrow    { max-width: var(--prose); }
.lede { font-size: 1.15rem; color: var(--text-2); }
.lede strong { color: var(--text); font-weight: 500; }

/* ---------------------------------------------------------------- *
 * Barre de navigation
 * ---------------------------------------------------------------- */

header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  color: var(--text); text-decoration: none; letter-spacing: -.01em;
}
header nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
header nav a { color: var(--text-2); text-decoration: none; font-size: .92rem; }
header nav a:hover { color: var(--text); }
@media (max-width: 720px) { header nav a.hide-sm { display: none; } }

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

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px;
  border-radius: var(--r-md);
  font-family: var(--sans); font-size: .95rem; font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--surface-3); color: var(--text); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600;
}
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }
.btn svg { width: 17px; height: 17px; }

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

/* Ligne à copier : un exécutable s'installe, il ne se clique pas. */
.copy {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
  font-family: var(--mono); font-size: .86rem;
  color: var(--text-2);
  max-width: 100%;
}
.copy code { color: var(--text); white-space: nowrap; overflow-x: auto; }
.copy code .sel { color: var(--accent); }
.copy button {
  font: inherit; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); background: none; border: 0; cursor: pointer;
  padding: 4px 6px; border-radius: 4px; flex: none;
}
.copy button:hover { color: var(--accent); background: var(--surface-2); }

.note { font-size: .88rem; color: var(--text-3); margin-top: 20px; }

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

.hero { padding-block: clamp(64px, 11vw, 128px) 88px; }
.hero h1 { max-width: 21ch; }
.hero .lede { max-width: 54ch; }

/* ---------------------------------------------------------------- *
 * Galerie d'exemples
 *
 * Chaque exemple porte la commande qui l'a produit, en légende. C'est ce
 * qui distingue une démonstration d'une illustration : le lecteur peut
 * recopier la ligne et obtenir le même fichier.
 * ---------------------------------------------------------------- */

.examples { display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; align-items: start; }
.examples > .demo { grid-column: 1 / -1; }
@media (max-width: 980px) { .examples { grid-template-columns: 1fr; } }

figure.ex { margin: 0; }
figure.ex img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
figure.ex figcaption { margin-top: 18px; }

/* La démonstration filmée prend toute la largeur : le sujet est une
   interface entière, la réduire de moitié la rendrait illisible. */
figure.ex.demo { grid-column: 1 / -1; margin-top: 44px; }
figure.ex.demo video {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
figure.ex.demo figcaption { display: grid; grid-template-columns: minmax(0, 22ch) 1fr; gap: 8px 32px; align-items: baseline; }
figure.ex.demo figcaption b { margin: 0; }
@media (max-width: 780px) { figure.ex.demo figcaption { grid-template-columns: 1fr; } }
figure.ex figcaption b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; margin-bottom: 12px; }
/* `>` et non un descendant quelconque : sans lui, le `<code>` en ligne
   d'un paragraphe de légende héritait du bloc — un mot au milieu d'une
   phrase se retrouvait encadré sur toute la largeur, coupant la phrase
   en trois. */
figure.ex figcaption > code {
  display: block; white-space: pre; overflow-x: auto;
  font-family: var(--mono); font-size: .74rem; line-height: 1.85;
  color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; margin-bottom: 12px;
}
figure.ex figcaption > code .cmd { color: var(--accent); }
figure.ex figcaption > code .sel { color: var(--warn); }
figure.ex figcaption p { font-size: .92rem; color: var(--text-2); margin: 0; max-width: none; }

/* ---------------------------------------------------------------- *
 * La capture du héros
 *
 * Elle n'illustre pas le produit : elle en sort. Le PNG affiché ici a
 * été fabriqué par la commande écrite en légende, sur la maquette de
 * site/demo. Une page qui vend des captures d'écran et n'en montre
 * aucune demande à être crue sur parole.
 * ---------------------------------------------------------------- */

figure.shot { margin: 56px 0 0; }
figure.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
figure.shot figcaption {
  margin-top: 16px;
  font-family: var(--mono); font-size: .78rem; line-height: 1.9;
  color: var(--text-3);
  overflow-x: auto;
  white-space: pre;
}
figure.shot figcaption .cmd { color: var(--accent-dim); }
figure.shot figcaption .sel { color: var(--text-2); }
figure.shot .said {
  font-family: var(--sans); font-size: .88rem; color: var(--text-2);
  margin-top: 14px; white-space: normal; max-width: var(--prose);
}

/* ---------------------------------------------------------------- *
 * Deux portes
 * ---------------------------------------------------------------- */

.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 860px) { .doors { grid-template-columns: 1fr; } }
.door { background: var(--bg); padding: 32px; }
.door p { color: var(--text-2); font-size: .95rem; }
.door p:last-child { margin-bottom: 0; }

.keys { display: flex; gap: 6px; align-items: center; margin: 0 0 18px; flex-wrap: wrap; }
kbd {
  font-family: var(--mono); font-size: .78rem;
  padding: 3px 7px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--surface-3);
  color: var(--text-2);
}

/* ---------------------------------------------------------------- *
 * Deux publics sous une ligne
 *
 * La ligne retourne le nom — « gotcha », ce que dit le lecteur qui a
 * compris. Dessous, une cellule par public : une raison, et la porte
 * des docs qui le concerne.
 * ---------------------------------------------------------------- */

.who { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 860px) { .who { grid-template-columns: 1fr; } }
.who > div { background: var(--bg); padding: 32px; }
.who .eyebrow { margin-bottom: 14px; }
.who p { color: var(--text-2); font-size: .95rem; }
.who p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- *
 * Code
 * ---------------------------------------------------------------- */

pre {
  font-family: var(--mono); font-size: .84rem; line-height: 1.75;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; margin: 0 0 20px;
  overflow-x: auto;
}
pre .cmd { color: var(--accent); }
pre .opt { color: var(--text); }
pre .sel { color: var(--warn); }
pre .cm  { color: var(--text-3); }
code { font-family: var(--mono); font-size: .9em; }
p code, li code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--text); }

/* ---------------------------------------------------------------- *
 * Raisons — une liste, pas une grille de cartes. Chaque point porte
 * un argument qui se lit, pas un slogan sous une icône.
 * ---------------------------------------------------------------- */

.reasons { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.reason { background: var(--bg); padding: 28px 0; display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
@media (max-width: 780px) { .reason { grid-template-columns: 1fr; gap: 10px; } }
.reason h3 { margin: 0; color: var(--text); }
.reason p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* ---------------------------------------------------------------- *
 * Tarifs
 * ---------------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 1040px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }
.plan {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; background: var(--surface);
  display: flex; flex-direction: column;
}
.plan.feature { border-color: var(--accent-dim); }
.plan h3 { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.plan.feature h3 { color: var(--accent); }
.price { font-family: var(--display); font-size: 2.3rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-bottom: 4px; }
.price small { font-family: var(--sans); font-size: .85rem; font-weight: 400; color: var(--text-3); letter-spacing: 0; margin-left: 6px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.plan li { font-size: .92rem; color: var(--text-2); padding-left: 20px; position: relative; }
.plan li::before { content: ''; position: absolute; left: 0; top: .62em; width: 9px; height: 1.5px; background: var(--surface-3); }
.plan li.yes::before { background: var(--accent); }
/* Un lien dans une ligne d'offre reste une ligne d'offre : même couleur, soulignement discret. */
.plan li a { color: inherit; text-decoration-color: var(--surface-3); }
.plan li a:hover { color: var(--accent); text-decoration-color: var(--accent-dim); }
.plan .foot { margin-top: auto; padding-top: 24px; font-size: .85rem; color: var(--text-3); }

.banner {
  border: 1px solid var(--accent-dim); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg));
  padding: 18px 22px; margin-bottom: 8px;
  font-size: .95rem; color: var(--text-2);
  max-width: none;
}
.banner strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- *
 * Pied
 * ---------------------------------------------------------------- */

footer { border-top: 1px solid var(--line); padding-block: 48px 64px; color: var(--text-3); font-size: .88rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: flex-start; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
footer a { color: var(--text-2); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer p { margin: 8px 0 0; max-width: 42ch; font-size: .85rem; }

/* ---------------------------------------------------------------- *
 * Pages de texte — mentions, conditions, support
 * ---------------------------------------------------------------- */

.doc { padding-block: 64px 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.doc h2 { font-size: 1.25rem; margin-top: 44px; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .updated { font-family: var(--mono); font-size: .8rem; color: var(--text-3); }

/* ---------------------------------------------------------------- *
 * Documentation
 *
 * Une colonne de navigation collante, un article. Chaque image porte
 * la commande qui l'a produite — c'est la même règle que sur la page
 * d'accueil, et c'est elle qui fait de ces pages un démonstrateur et
 * non un mode d'emploi illustré à la main.
 * ---------------------------------------------------------------- */

.docs { padding-block: 48px 96px; }
.docs .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .docs .wrap { grid-template-columns: 1fr; gap: 28px; } }

.docs-nav { position: sticky; top: 84px; font-size: .92rem; }
@media (max-width: 860px) { .docs-nav { position: static; } }
.docs-nav .eyebrow { margin-bottom: 12px; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav a {
  display: block; color: var(--text-2); text-decoration: none;
  padding: 6px 0 6px 12px; border-left: 2px solid var(--line);
}
.docs-nav a:hover { color: var(--text); }
.docs-nav a[aria-current] { color: var(--accent); border-left-color: var(--accent); }
.docs-nav li li a { font-size: .84rem; color: var(--text-3); padding: 4px 0 4px 24px; }
.docs-nav li li a:hover { color: var(--text-2); }

.docs article > .eyebrow { margin-bottom: 14px; }
.docs article h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 18px; }
.docs article h2 { font-size: 1.5rem; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.docs article h3 { font-size: 1.1rem; margin-top: 32px; }
.docs article p, .docs article li { color: var(--text-2); }
.docs article ul, .docs article ol { padding-left: 22px; max-width: var(--prose); margin: 0 0 18px; }
.docs article li { margin-bottom: 8px; }
.docs article li p { margin-bottom: 6px; }
.docs article strong { color: var(--text); font-weight: 600; }
.docs article pre { max-width: 820px; }
.docs figure.ex { margin: 28px 0 40px; }
.docs figure.ex.narrow { max-width: 620px; }
.docs figure.ex.mid { max-width: 820px; }

/* Une liste d'étapes numérotées comme le produit numérote les siennes. */
.steps { list-style: none; padding: 0; counter-reset: step; max-width: var(--prose); }
.steps li { position: relative; padding-left: 40px; margin-bottom: 14px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--rec); color: #fff;
  font: 700 12px/24px var(--mono); text-align: center;
}

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); background: var(--surface);
  padding: 14px 18px; margin: 20px 0 24px; max-width: var(--prose);
  font-size: .95rem; color: var(--text-2);
}
.callout.warn { border-left-color: var(--warn); }
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }

table.keys { border-collapse: collapse; font-size: .92rem; margin: 16px 0 28px; max-width: var(--prose); width: 100%; }
table.keys th, table.keys td {
  text-align: left; padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top;
}
table.keys th {
  color: var(--text-3); font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
}
table.keys td:first-child { color: var(--text); white-space: nowrap; }

.docs .pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.docs .pager a { text-decoration: none; color: var(--text); }
.docs .pager a:hover { color: var(--accent); }
.docs .pager small {
  display: block; color: var(--text-3); font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px;
}
.docs .pager .next { text-align: right; margin-left: auto; }

/* Le guide produit par l'agent, rendu tel quel dans la page. */
.guide {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px 36px; margin: 28px 0 36px; background: var(--surface);
}
.guide h3:first-child { margin-top: 0; }
.guide figure.ex { margin: 20px 0 28px; }
.guide figure.ex img { background: var(--bg); }
@media (max-width: 640px) { .guide { padding: 20px; } }

/* Une ancre ne doit pas se cacher sous la barre collante. */
.docs article h2, .docs article h3 { scroll-margin-top: 84px; }

/* Les boutons d'achat, au pied de chaque offre. */
.plan .buy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.plan .buy .btn { flex: 1 1 auto; justify-content: center; }
