/* OxNotes — site vitrine. Papier × Galets.
   Tokens repris de lib/design/ox_theme.dart et docs/DESIGN_SYSTEM.md. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --ink: #252722;
  --muted: #65665e;
  --forest: #315c46;
  --on-forest: #ffffff;
  --surface: #f0eee6;
  --card: #fffdf8;
  --outline: #75796e;
  --line: #dedcd3;
  --mix: 22%;
  --soon-bg: #f8e8c4;
  --soon-ink: #6b4500;
  --ok-bg: #dbe8dd;
  --ok-ink: #1f4a33;
  --plan-bg: #e4e6ef;
  --plan-ink: #39405e;
  --todo-bg: #ffe08a;
  --todo-ink: #3a2a00;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 24px;
  --radius-s: 16px;
  --gutter: 12px;
  --page: min(1120px, 100% - 40px);
  --space: clamp(40px, 5vw, 64px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #1b1d19;
    --ink: #ecede5;
    --muted: #bbc1b6;
    --forest: #adcbb3;
    --on-forest: #163923;
    --surface: #252820;
    --card: #252820;
    --outline: #8c9388;
    --line: #3a4036;
    --mix: 10%;
    --soon-bg: #3d3420;
    --soon-ink: #f3d08a;
    --ok-bg: #26382c;
    --ok-ink: #bfe0c6;
    --plan-bg: #2c3040;
    --plan-ink: #cdd3f0;
    --todo-bg: #5c4700;
    --todo-ink: #fff3c4;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  font-kerning: normal;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 6px; }
strong { font-weight: 650; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li + li { margin-top: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
abbr[title] { text-decoration: underline dotted; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--forest); color: var(--on-forest);
  padding: 12px 18px; border-radius: 12px; font-weight: 650; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: var(--page); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.015em;
  min-height: 48px;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-toggle {
  display: none; margin-left: auto;
  min-width: 48px; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav li + li { margin: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px;
  border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 550;
}
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] { background: var(--surface); color: var(--forest); font-weight: 650; }
.lang-switch {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-left: 8px;
}
.lang-switch a, .lang-switch span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 40px; padding: 0 10px; border-radius: 999px;
  font-size: .95rem; font-weight: 650; text-decoration: none; color: var(--muted);
}
.lang-switch [aria-current="true"] { background: var(--forest); color: var(--on-forest); }
.lang-switch a:hover { color: var(--ink); background: var(--surface); }

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 12px 20px 20px; background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { padding: 0 16px; }
  .js .lang-switch { align-self: flex-start; margin: 4px 0 0; }
  .no-js .header-inner { flex-wrap: wrap; padding-block: 8px; }
  .no-js .site-nav { flex-wrap: wrap; margin-left: 0; }
  .no-js .site-nav ul { flex-wrap: wrap; }
}

/* ---------- Buttons & badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 650; font-size: 1.05rem; text-decoration: none; line-height: 1.2;
  border: 2px solid transparent; cursor: pointer;
}
.btn svg { width: 24px; height: 24px; flex: none; }
.btn-primary { background: var(--forest); color: var(--on-forest); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn[aria-disabled="true"] {
  background: var(--surface); color: var(--muted); border-color: var(--line); cursor: default;
}
.store-btn { flex-direction: row; text-align: left; }
.store-btn small { display: block; font-size: .8rem; font-weight: 500; opacity: .85; }
.store-btn span { display: block; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 650; line-height: 1.4;
  white-space: nowrap; vertical-align: middle;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag-soon { background: var(--soon-bg); color: var(--soon-ink); }
.tag-plan { background: var(--plan-bg); color: var(--plan-ink); }
.tag-pro { background: var(--ink); color: var(--paper); letter-spacing: .06em; }
.tag-pro::before { display: none; }

mark.todo {
  background: var(--todo-bg); color: var(--todo-ink);
  padding: 0 .3em; border-radius: 4px; font-weight: 600;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space); }
.section-tight { padding-block: var(--space); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.2rem; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--forest);
}
.lead { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.4rem); color: var(--muted); max-width: 40ch; }
.band { background: var(--surface); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(16px, 2.5vw, 32px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .cta-row { margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 1rem; color: var(--muted); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 28px 0 0; font-size: 1rem; color: var(--muted); }
.trust li { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 20px; height: 20px; color: var(--forest); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: 2; }
}

/* ---------- Galets (cartes) ---------- */
.galets {
  columns: 3 300px; column-gap: var(--gutter);
}
.galets > * { break-inside: avoid; margin-bottom: var(--gutter); }
.galet {
  --c: transparent;
  background: var(--card);
  background: color-mix(in srgb, var(--c) var(--mix), var(--paper));
  border-radius: var(--radius); padding: 24px 24px 26px;
}
.galet.plain { background: var(--card); border: 1px solid var(--line); }
.galet h3 { margin-bottom: .35em; }
.galet p:last-child, .galet ul:last-child { margin-bottom: 0; }
.galet .tag { margin-bottom: 12px; }
.galet-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--paper); color: var(--forest); margin-bottom: 16px;
}
.galet-icon svg { width: 24px; height: 24px; }
.galet ul { padding-left: 1.1em; }

.c-coral { --c: #f28b83; } .c-honey { --c: #fcbc05; } .c-lemon { --c: #fff476; }
.c-sage { --c: #cbff90; } .c-mint { --c: #a7feea; } .c-sand { --c: #e6c9a9; }
.c-mist { --c: #e8eaee; } .c-sky { --c: #caf0f8; }
.c-terracotta { --c: #ba6b57; } .c-fjord { --c: #86a9b8; } .c-lavender { --c: #a5abc9; } .c-plum { --c: #8e738c; }

.stack { display: grid; gap: var(--gutter); list-style: none; padding: 0; margin: 0; }
.stack > li { margin: 0; }

/* ---------- Principles row ---------- */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); list-style: none; padding: 0; margin: 0; }
.principles li { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.principles strong { display: block; font-family: var(--serif); font-size: 1.25rem; margin-bottom: 4px; }
.principles span { color: var(--muted); font-size: 1rem; }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Pro block ---------- */
.pro-panel {
  border-radius: 32px; padding: clamp(28px, 5vw, 56px);
  background: #1b1d19; color: #ecede5;
  --muted: #bbc1b6; --forest: #adcbb3; --on-forest: #163923; --line: #3a4036; --card: #252820; --paper: #1b1d19; --mix: 14%;
  --soon-bg: #3d3420; --soon-ink: #f3d08a; --plan-bg: #2c3040; --plan-ink: #cdd3f0; --ok-bg: #26382c; --ok-ink: #bfe0c6;
}
@media (prefers-color-scheme: dark) { .pro-panel { background: #000; border: 1px solid #3a4036; } }
.pro-panel h2, .pro-panel h3 { color: #ecede5; }
.pro-panel a:not(.btn) { color: #adcbb3; }
.pro-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.pro-head > div { max-width: 640px; }
.pro-head p { color: var(--muted); font-size: 1.15rem; margin: 0; }
.pro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.pro-grid .galet { background: var(--card); background: color-mix(in srgb, var(--c) var(--mix), #252820); }
.pro-grid .galet p { color: var(--muted); font-size: 1rem; }
@media (max-width: 900px) { .pro-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pro-grid { grid-template-columns: 1fr; } }
.pro-foot { margin-top: 28px; color: var(--muted); font-size: 1rem; }

/* ---------- Platforms ---------- */
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.platform { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.platform h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.platform p { color: var(--muted); }
@media (max-width: 720px) { .platforms { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative;
  font-family: var(--serif); font-weight: 650; font-size: 1.25rem; min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details > div { padding-bottom: 20px; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .cta-row { justify-content: center; }
.cta-band p { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* ---------- Features page ---------- */
.page-hero { padding-block: clamp(24px, 3vw, 40px) 0; }
.page-hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); max-width: 18ch; }
.toc-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; }
.toc-chips li { margin: 0; }
.toc-chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem;
}
.toc-chips a:hover { background: var(--line); }

.feature-block { display: grid; grid-template-columns: 300px 1fr; gap: clamp(24px, 4vw, 56px); padding-block: 40px; border-top: 1px solid var(--line); }
.feature-block:first-of-type { border-top: 0; }
.feature-block h3 { font-size: 1.6rem; }
.feature-block .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.feature-block ul { margin: 0; }
.feature-block li::marker { color: var(--forest); }
@media (max-width: 760px) { .feature-block { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.swatches li { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .95rem; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); display: inline-block; }
.palette-name { font-weight: 650; margin: 18px 0 0; font-size: 1rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
caption { text-align: left; padding: 16px 18px 4px; font-weight: 650; font-family: var(--serif); font-size: 1.2rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 18px; border-bottom: 1px solid var(--line); }
thead th { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }
td.yes { color: var(--forest); font-weight: 650; white-space: nowrap; }
td.no { color: var(--muted); white-space: nowrap; }
.compare td:nth-child(2), .compare td:nth-child(3), .compare th:nth-child(2), .compare th:nth-child(3) { text-align: center; }
.compare { min-width: 560px; }

.callout {
  border-radius: var(--radius); padding: 22px 24px; background: var(--surface); border-left: 6px solid var(--forest);
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: #c48a1a; }

/* ---------- Legal pages ---------- */
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding-bottom: 80px; align-items: start; }
.legal-toc { position: sticky; top: 96px; font-size: .98rem; }
.legal-toc h2 { font-size: 1.1rem; margin-bottom: 10px; }
.legal-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.legal-toc li { margin: 0; counter-increment: toc; }
.legal-toc a {
  display: flex; gap: 8px; padding: 7px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.3;
}
.legal-toc a::before { content: counter(toc) "."; color: var(--muted); min-width: 1.6em; }
.legal-toc a:hover { background: var(--surface); }
.legal-body { max-width: 760px; }
.legal-body h2 { font-size: 1.6rem; margin-top: 2.4em; padding-top: .2em; }
.legal-body h2:first-of-type { margin-top: 1em; }
.legal-body h3 { font-size: 1.2rem; margin-top: 1.6em; }
.legal-body .num { color: var(--forest); margin-right: .35em; }
.legal-meta { color: var(--muted); font-size: 1rem; }
.summary-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin: 28px 0 8px; list-style: none; padding: 0; }
.summary-box li { margin: 0; border-radius: var(--radius); padding: 20px; background: var(--card); background: color-mix(in srgb, var(--c, transparent) var(--mix), var(--paper)); }
.summary-box strong { display: block; font-family: var(--serif); font-size: 1.12rem; margin-bottom: 4px; }
.summary-box span { color: var(--muted); font-size: 1rem; }
.legal-body .table-wrap { margin: 1em 0 1.5em; }
.legal-body table { min-width: 620px; }
@media (max-width: 900px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; background: var(--surface); border-radius: var(--radius); padding: 18px; }
  .summary-box { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 40px; font-size: 1rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: 1rem; font-family: var(--sans); font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li + li { margin-top: 2px; }
.footer-grid a { color: var(--ink); text-decoration: none; display: inline-flex; min-height: 40px; align-items: center; }
.footer-grid a:hover { text-decoration: underline; }
.footer-brand p { max-width: 36ch; margin-top: 12px; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .95rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Language chooser (racine) ---------- */
.chooser { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; text-align: center; }
.chooser .brand { justify-content: center; font-size: 2rem; }
.chooser .brand img { width: 56px; height: 56px; border-radius: 16px; }
.chooser .cta-row { justify-content: center; margin-top: 28px; }
.chooser p { color: var(--muted); }

@media print {
  .site-header, .site-footer, .legal-toc, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .legal { display: block; }
  a { color: #000; }
}
.table-note { margin-top: 16px; }
.platforms:has(> :only-child) { grid-template-columns: minmax(0, 560px); }
