/* ------------------------------------------------------------------
   Où est ton zéro ? — guide.oliviercolas.fr
   Design system oliviercolas.fr. Une colonne, une marge, rien qui
   se bat pour l'attention.
   ------------------------------------------------------------------ */

:root {
  --bg: #faf6ef;
  --bg-alt: #f3eadc;
  --surface: #fffdf9;
  --ink: #2a2118;
  --ink-soft: #5c4f42;
  --ink-faint: #6f6254;
  --border: #e5d8c5;
  --border-strong: #d2c0a8;

  --accent: #a84b26;
  --accent-hover: #8f3c1c;
  --accent-soft: #f4e0d4;

  --dark: #2c2218;
  --dark-surface: #3a2e22;
  --dark-border: #5c4a38;
  --dark-ink: #faf3e8;
  --dark-ink-soft: #cbb9a4;

  --danger: #b44a2f;

  --font-display: 'Fraunces', 'Iowan Old Style', Palatino, Georgia, serif;
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.0625rem, 1.02rem + 0.25vw, 1.1875rem);
  --step-2: clamp(1.375rem, 1.28rem + 0.5vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.3vw, 2.75rem);
  --step-4: clamp(2rem, 1.45rem + 2.8vw, 3rem);
  --step-5: clamp(2.25rem, 1.2rem + 5vw, 4rem);

  --space-section: clamp(3rem, 1.8rem + 5vw, 5.5rem);
  --gutter: clamp(1.25rem, 0.7rem + 2.4vw, 2.5rem);
  --sheet: 1180px;
  --measure: 720px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(17, 17, 17, 0.05);
  --shadow-lg: 0 32px 64px -24px rgba(17, 17, 17, 0.22);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; z-index: 50; border-radius: var(--r-sm);
}
.skip:focus { left: 12px; top: 12px; }

/* --- une seule feuille, une seule colonne -------------------------------- */

.masthead, main, .footer { max-width: var(--sheet); margin-inline: auto; }

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ header */

.masthead {
  background: var(--surface);
}

.bar {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.nav a { transition: color .2s var(--ease); }
.nav a:hover { color: var(--accent); }

.bar-action {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  font: inherit;
  font-weight: 600;
  font-size: var(--step--1);
  padding: .65em 1.1em;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.bar-action:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* -------------------------------------------------------------------- hero */

.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem); }

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 7vw, 5.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.standfirst {
  margin: 0 0 2rem;
  max-width: 46ch;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

/* -------------------------------------------------------- le document */

.document { padding: 0 0 clamp(2.5rem, 5vw, 4rem); }

.proofs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.proofs li { margin: 0; }

.proofs img {
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
}

.proofs figcaption {
  margin-top: .5rem;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.doc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
  font-size: var(--step--1);
  color: var(--ink-faint);
}

/* ------------------------------------------------------------------ boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  font: inherit;
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.2;
  padding: .8em 1.35em;
  min-height: 48px;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.link-action {
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.link-action:hover { color: var(--accent-hover); }

/* -------------------------------------------------------------- diagnostic */

.diagnostic {
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: var(--r-lg);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  margin-bottom: var(--space-section);
}

.diagnostic h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.diag-intro p { margin: 0 0 2rem; max-width: 52ch; color: var(--dark-ink-soft); }

.diag-list { list-style: none; margin: 0; padding: 0; }

.q {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.15rem 0;
}
.q + .q { margin-top: .35rem; }

.qtext { margin: 0; max-width: 46ch; }
.qname {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--dark-ink-soft);
  margin-bottom: .25rem;
}

.qbtns { display: flex; gap: .5rem; flex-shrink: 0; }

.qbtns button {
  background: transparent;
  color: var(--dark-ink);
  border: 1px solid var(--dark-border);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  padding: .5em 1.1em;
  min-width: 60px;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.qbtns button:hover { border-color: var(--dark-ink); }
.qbtns button[aria-pressed="true"] { background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); }
.q.answered .qtext { opacity: .55; }

.diag-foot { display: flex; gap: 1.25rem; align-items: center; margin-top: 1.75rem; }

.btn-sand { background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); }
.btn-sand:hover { background: #fff; border-color: #fff; color: var(--dark); }

.link-sand {
  background: none; border: 0;
  color: var(--dark-ink);
  font: inherit; font-weight: 600;
  border-bottom: 1px solid var(--dark-border);
  cursor: pointer; padding: .3rem 0;
}
.link-sand:hover { border-color: var(--dark-ink); color: var(--dark-ink); }

.diag-result { margin-top: 1.75rem; }
.diag-result .verdict {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .8rem;
  max-width: 34ch;
}
.diag-result p { margin: 0 0 .6rem; max-width: 52ch; color: var(--dark-ink-soft); }
.diag-result a { color: var(--dark-ink); }

/* ------------------------------------------------------------------ article */

.section { padding: var(--space-section) 0; }

.section h2,
.close h2 {
  margin: 0 0 .9rem;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.note {
  margin: 0 0 1.75rem;
  max-width: 50ch;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink-faint);
}

.guide h3 {
  margin: 2.2rem 0 .6rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.guide p { margin: 0 0 1.05rem; max-width: 68ch; }

.guide ul, .guide ol { margin: 0 0 1.4rem; padding-left: 1.25rem; max-width: 66ch; }
.guide ul { list-style: none; }
.guide ul li { position: relative; }
.guide ul li::before {
  content: "";
  position: absolute;
  left: -1.1rem; top: .68em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.guide li { margin-bottom: .5rem; }

blockquote {
  margin: 1.8rem 0;
  padding-left: 1.3rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 44ch;
}

pre {
  margin: 0 0 1.4rem;
  padding: 1.15rem 1.3rem;
  background: var(--bg-alt);
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: var(--step--1);
  line-height: 1.6;
}

code { font-family: var(--font-mono); font-size: 1em; }

.tablewrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 1.6rem;
  border-radius: var(--r-md);
  background: var(--bg-alt);
}

table { border-collapse: collapse; width: 100%; font-size: var(--step--1); line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: .8rem 1rem; hyphens: auto; }
th {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
td { border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- chapitres */

.chapter {
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: var(--r-lg);
  padding: var(--space-section) 0;
  margin-bottom: var(--space-section);
}

.chapter h2 {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.028em;
  margin: 0 0 .9rem;
}

.chapter .note { color: var(--dark-ink-soft); }
.chapter h3 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  margin: 2rem 0 .5rem;
  color: #fff;
}
.chapter p { color: var(--dark-ink-soft); max-width: 68ch; }
.chapter strong { color: var(--dark-ink); }
.chapter a { color: var(--dark-ink); }
.chapter ul li::before { background: var(--dark-ink); }
.chapter blockquote { border-left-color: var(--dark-ink); color: var(--dark-ink); }
.chapter pre { background: var(--dark-surface); border-color: var(--dark-border); color: var(--dark-ink); }
.chapter .tablewrap { background: var(--dark-surface); border-color: var(--dark-border); }
.chapter th { background: var(--dark-surface); color: var(--dark-ink-soft); border-bottom-color: var(--dark-border); }
.chapter td { border-bottom-color: var(--dark-border); }

/* ------------------------------------------------------------------ clôture */

.close { padding: var(--space-section) 0 0; }

.close .big {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 1.8rem;
}

/* --------------------------------------------------------------------- pied */

.footer {
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: var(--r-lg);
  padding: var(--space-section) 0 2.5rem;
  margin-top: var(--space-section);
}

.fname {
  margin: 0 0 2.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: .98;
}

.fcols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  font-size: var(--step--1);
}
.fcols p { margin: 0; line-height: 1.6; color: var(--dark-ink-soft); }
.flabel {
  color: var(--dark-ink-soft);
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: .45rem;
}
.footer a { color: var(--dark-ink); }
.footer a:hover { color: #fff; }

/* ------------------------------------------------------------------ dialog */

dialog#capture {
  width: min(500px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.5rem 2.25rem 2rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
dialog#capture::backdrop { background: rgba(42, 33, 24, .72); }
dialog#capture:not([open]) { display: none; }

dialog h2 {
  margin: 0 0 .8rem;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.06;
}
.cap-lead { margin: 0 0 1.5rem; max-width: 40ch; color: var(--ink-soft); }

dialog label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .45rem;
}

dialog input[type="email"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  font: inherit;
  font-size: var(--step-1);
  padding: .75rem 1rem;
  margin-bottom: 1.25rem;
  transition: border-color .2s var(--ease);
}
dialog input[type="email"]:focus { border-color: var(--accent); outline: none; }
dialog input[type="email"]::placeholder { color: #b3a493; }

.check {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: var(--step--1);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  color: var(--ink-soft);
}
.check input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }

.hp { position: absolute; left: -9999px; }
.err { color: var(--danger); font-size: var(--step--1); margin: 0 0 .8rem; }
dialog .btn { width: 100%; }
.fin { font-size: 0.8125rem; color: var(--ink-faint); margin: 1rem 0 0; }

.x {
  position: absolute;
  top: .8rem; right: .8rem;
  background: none; border: 0;
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
  padding: .4rem .55rem;
  border-radius: var(--r-sm);
}
.x:hover { color: var(--ink); background: var(--bg-alt); }

.done-t {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  margin: 0 0 .5rem;
}
.done p { margin: 0 0 1.3rem; }

/* ------------------------------------------------------------------ motion */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero h1 { animation: rise .55s var(--ease) both; }
.standfirst { animation: rise .55s var(--ease) .06s both; }
.hero-actions { animation: rise .55s var(--ease) .12s both; }

.pdf-viewer h2 { animation: rise .55s var(--ease) both; }
.q { animation: rise .5s var(--ease) both; }
.q:nth-child(1) { animation-delay: .06s; }
.q:nth-child(2) { animation-delay: .12s; }
.q:nth-child(3) { animation-delay: .18s; }
.q:nth-child(4) { animation-delay: .24s; }
.q:nth-child(5) { animation-delay: .3s; }

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

/* ------------------------------------------------------------------- phone */

@media (max-width: 860px) {
  .section h2, .chapter h2, .close h2 { font-size: 1.55rem; }
  .bar { height: 64px; gap: 1rem; }
  .nav { display: none; }

  .hero { padding-top: 2rem; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); }
  .standfirst { font-size: var(--step-1); }

  .proofs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proofs li:nth-child(n+3) { display: none; }

  .q { flex-direction: column; gap: .8rem; align-items: stretch; }
  .qbtns button { flex: 1; min-height: 44px; }

  .fcols { grid-template-columns: 1fr; gap: 1.5rem; }

  dialog#capture { padding: 2.25rem 1.4rem 1.75rem; }
}
