/* ════════════════════════════════════════════════════════════
   Korvia — site web produit
   Palette « Carnet » : ocre brûlé sur papier kraft, sérif éditorial.
   Cohérent avec l'application. Aucune dépendance.
   ════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500;1,6..72,600&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Kraft / ocre palette */
  --bg:        oklch(94.5% 0.017 78);
  --bg-2:      oklch(92.0% 0.020 75);
  --surface:   oklch(98.4% 0.008 80);
  --surface-2: oklch(95.6% 0.014 76);
  --surface-3: oklch(91.5% 0.020 72);
  --ink:       oklch(23.0% 0.022 52);
  --ink-2:     oklch(38.0% 0.024 56);
  --ink-3:     oklch(54.0% 0.020 60);
  --divider:   oklch(85.0% 0.018 72);
  --divider-2: oklch(78.0% 0.020 70);

  --accent:    oklch(55.0% 0.130 60);   /* ocre brûlé */
  --accent-2:  oklch(44.0% 0.115 56);   /* foncé */
  --accent-3:  oklch(63.0% 0.130 64);   /* clair */
  --accent-wash: oklch(91.0% 0.045 64);

  --ok:        oklch(52.0% 0.090 150);
  --ok-wash:   oklch(91.0% 0.032 150);
  --warn:      oklch(64.0% 0.125 75);
  --crit:      oklch(50.0% 0.150 25);

  --ink-dark:  oklch(21.0% 0.018 58);   /* dark sections bg */
  --ink-dark-2: oklch(26.0% 0.020 58);

  --radius:    6px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --maxw: 1180px;
  --maxw-narrow: 780px;

  --shadow-sm: 0 1px 2px oklch(40% 0.02 60 / 0.06), 0 2px 6px oklch(40% 0.02 60 / 0.05);
  --shadow:    0 2px 6px oklch(40% 0.02 60 / 0.07), 0 12px 32px oklch(40% 0.02 60 / 0.09);
  --shadow-lg: 0 8px 24px oklch(35% 0.02 60 / 0.12), 0 32px 64px oklch(35% 0.02 60 / 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
em.acc { font-style: italic; color: var(--accent); }

/* i18n: hide the inactive language. Default FR shown. */
[data-en] { } /* swapped by JS */

/* ── Layout ─────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 32px; }
section { position: relative; }
.section-pad { padding: 96px 0; }
.section-pad-sm { padding: 64px 0; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  font-family: var(--sans);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: var(--radius);
  font: 500 16px/1 var(--sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: oklch(98% 0.01 80); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--divider-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--divider); }
.btn-soft:hover { background: var(--surface-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 17px; }
.btn-link { color: var(--accent-2); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.btn-link:hover { color: var(--accent); }

/* ── Nav (injected) ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: oklch(94.5% 0.017 78 / 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--divider);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  height: 68px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--accent); color: oklch(98% 0.01 80);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 17px;
}
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.brand-name em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-link {
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 15px; font-weight: 450; color: var(--ink-2);
  transition: background .12s, color .12s; white-space: nowrap;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 500; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--divider-2); border-radius: 999px;
  overflow: hidden; height: 34px; background: var(--surface);
}
.lang-toggle button {
  border: 0; background: transparent; cursor: pointer;
  font: 500 13px/1 var(--sans); color: var(--ink-3);
  padding: 0 12px; height: 100%;
}
.lang-toggle button.active { background: var(--ink); color: var(--surface); }
.nav-burger { display: none; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-burger {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius);
    border: 1px solid var(--divider-2); background: var(--surface); cursor: pointer;
  }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero { padding: 88px 0 72px; overflow: hidden; }
.hero h1 {
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1.04; letter-spacing: -0.028em;
}
.hero-sub {
  font-size: 20px; color: var(--ink-2); line-height: 1.55;
  max-width: 540px; margin-top: 22px;
}
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }

/* ── Badges / chips ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--accent-wash); color: var(--accent-2);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--divider);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--radius-lg); padding: 28px;
}
.card-soft { background: var(--surface-2); border-color: transparent; }

/* ── Feature rows ───────────────────────────────────────────── */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row.flip .feature-text { order: 2; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--accent-wash); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.feature-row h3 { font-size: 30px; line-height: 1.1; }
.feature-row p { margin-top: 14px; color: var(--ink-2); font-size: 17px; }
.feature-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; list-style: none; font-size: 15.5px; color: var(--ink-2); }
.feature-list { padding: 0; }
.feature-list svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.flip .feature-text { order: 0; }
}

/* ── Product mock frame ─────────────────────────────────────── */
.mock {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--divider-2); background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.mock-bar {
  height: 40px; background: var(--surface-2); border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; gap: 7px; padding: 0 14px;
}
.mock-dot { width: 11px; height: 11px; border-radius: 50%; }
.mock-body { padding: 20px; }
.mock-url {
  margin-left: 14px; height: 24px; border-radius: 6px; background: var(--bg);
  border: 1px solid var(--divider); flex: 1; max-width: 320px;
  display: flex; align-items: center; padding: 0 10px;
  font: 400 12px/1 var(--mono); color: var(--ink-3);
}

/* striped placeholder */
.ph {
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 9px, var(--surface-3) 9px 18px);
  border: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: center;
  font: 400 12px/1 var(--mono); color: var(--ink-3);
  border-radius: var(--radius);
}

/* ── Stats ──────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat-num { font-family: var(--serif); font-size: 52px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.stat-lbl { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; gap: 32px 20px; } }

/* ── Pricing ────────────────────────────────────────────────── */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price-card {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.price-name { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.price-amount { font-family: var(--serif); font-size: 48px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; margin: 14px 0 4px; }
.price-amount small { font-family: var(--sans); font-size: 15px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.price-features { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.price-features svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

/* ── Testimonial ────────────────────────────────────────────── */
.quote {
  font-family: var(--serif); font-size: 28px; line-height: 1.4; font-weight: 400;
  letter-spacing: -0.012em; color: var(--ink); text-wrap: pretty;
}
.quote-big { font-size: 34px; }
.quote-by { margin-top: 24px; display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); flex-shrink: 0;
}

/* ── Logos strip ────────────────────────────────────────────── */
.logos { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: center; }
.logo-item {
  font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--ink-3);
  letter-spacing: -0.01em; opacity: 0.8; display: flex; align-items: center; gap: 9px;
}
.logo-item .glyph { width: 26px; height: 26px; border-radius: 6px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-style: italic; font-size: 14px; }

/* ── Dark CTA band ──────────────────────────────────────────── */
.band-dark { background: var(--ink-dark); color: oklch(94% 0.012 80); }
.band-dark h2 { color: oklch(96% 0.012 80); }
.band-dark .eyebrow { color: var(--accent-3); }
.band-dark p { color: oklch(80% 0.014 78); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { background: var(--ink-dark); color: oklch(82% 0.014 78); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
.footer h4 { color: oklch(92% 0.012 80); font-family: var(--sans); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.footer a { display: block; color: oklch(76% 0.014 78); font-size: 15px; padding: 5px 0; transition: color .12s; }
.footer a:hover { color: oklch(94% 0.012 80); }
.footer .brand-name { color: oklch(94% 0.012 80); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid oklch(40% 0.02 60 / 0.4); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 14px; color: oklch(68% 0.014 78); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }

/* ── FAQ accordion ──────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--divider); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 24px 0; display: flex; align-items: center; gap: 16px;
  font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em;
}
.faq-q .chev { margin-left: auto; flex-shrink: 0; transition: transform .2s; color: var(--ink-3); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a-inner { padding-bottom: 24px; color: var(--ink-2); font-size: 16.5px; max-width: 660px; }
.faq-item.open .faq-a { max-height: 400px; }

/* ── Docs layout ────────────────────────────────────────────── */
.docs-shell { display: grid; grid-template-columns: 248px 1fr; gap: 0; min-height: calc(100vh - 68px); }
.docs-side {
  border-right: 1px solid var(--divider); padding: 36px 22px; position: sticky; top: 68px;
  height: calc(100vh - 68px); overflow-y: auto; background: var(--bg);
}
.docs-side::-webkit-scrollbar { width: 0; }
.docs-group-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin: 22px 0 8px; }
.docs-group-title:first-child { margin-top: 0; }
.docs-link { display: block; padding: 7px 12px; border-radius: var(--radius); font-size: 14.5px; color: var(--ink-2); }
.docs-link:hover { background: var(--surface-2); }
.docs-link.active { background: var(--accent-wash); color: var(--accent-2); font-weight: 500; }
.docs-main { padding: 48px 56px; max-width: 860px; }
.docs-main h1 { font-size: 40px; }
.docs-main h2 { font-size: 27px; margin: 44px 0 14px; padding-top: 8px; }
.docs-main h3 { font-size: 20px; margin: 28px 0 10px; }
.docs-main p { margin: 14px 0; color: var(--ink-2); }
.docs-main ul, .docs-main ol { color: var(--ink-2); padding-left: 22px; }
.docs-main li { margin: 7px 0; }
.docs-toc { position: sticky; top: 90px; }
@media (max-width: 1040px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side { display: none; }
  .docs-main { padding: 36px 24px; }
}

/* ── Code blocks ────────────────────────────────────────────── */
.code {
  background: var(--ink-dark); color: oklch(90% 0.01 80);
  border-radius: var(--radius-lg); padding: 20px 22px; overflow-x: auto;
  font: 400 14px/1.65 var(--mono); margin: 18px 0;
}
.code-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  background: var(--ink-dark-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font: 500 13px/1 var(--mono); color: oklch(72% 0.014 78);
  border-bottom: 1px solid oklch(40% 0.02 60 / 0.4);
}
.code-head + .code { border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin-top: 0; }
.tok-key { color: oklch(72% 0.13 64); }   /* ocre */
.tok-str { color: oklch(72% 0.11 150); }  /* sage */
.tok-num { color: oklch(76% 0.10 80); }
.tok-com { color: oklch(58% 0.012 78); font-style: italic; }
.tok-punc { color: oklch(70% 0.014 78); }
code.inline { font-family: var(--mono); font-size: 0.88em; background: var(--surface-3); padding: 2px 6px; border-radius: 4px; color: var(--accent-2); }

/* ── API method tags ────────────────────────────────────────── */
.method { display: inline-flex; align-items: center; font: 600 12px/1 var(--mono); padding: 4px 8px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.method.get { background: var(--ok-wash); color: var(--ok); }
.method.post { background: var(--accent-wash); color: var(--accent-2); }
.method.del { background: oklch(92% 0.04 25); color: var(--crit); }
.method.put { background: oklch(93% 0.05 80); color: var(--warn); }
.endpoint { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface-2); border: 1px solid var(--divider); border-radius: var(--radius); font-family: var(--mono); font-size: 14.5px; margin: 16px 0; }

/* ── Tables ─────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 18px 0; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--divider-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--divider); color: var(--ink-2); vertical-align: top; }
.tbl td .mono { color: var(--accent-2); }

/* ── Blog ───────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { display: flex; flex-direction: column; }
.post-thumb { aspect-ratio: 16/10; border-radius: var(--radius-lg); margin-bottom: 16px; }
.post-cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-2); }
.post-title { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.2; margin: 8px 0; letter-spacing: -0.01em; }
.post-meta { font-size: 13.5px; color: var(--ink-3); margin-top: auto; }
@media (max-width: 860px) { .post-grid { grid-template-columns: 1fr; } }

/* ── Mobile menu ────────────────────────────────────────────── */
.mobile-menu { display: none; position: fixed; inset: 68px 0 0; z-index: 99; background: var(--bg); padding: 24px 32px; flex-direction: column; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 8px; font-size: 19px; font-family: var(--serif); border-bottom: 1px solid var(--divider); }

/* utilities */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--ink-3); }
.divider { height: 1px; background: var(--divider); border: 0; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px){ .grid-2, .grid-3 { grid-template-columns: 1fr; } }
