/* Gestion de stock - public site. Same tokens as app.css. Plain CSS, system fonts, no external resources. */
:root {
  --bg: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9; --text: #0f172a; --muted: #475569;
  --border: #e2e8f0; --border-strong: #94a3b8;
  --primary: #334155; --accent: #047857; --accent-hover: #065f46; --accent-text: #ffffff; --accent-soft: #e6f4ee;
  --warn: #8a5a00; --warn-soft: #fff3d6; --warn-border: #c28a1a;
  --radius: 8px; --radius-sm: 6px; --radius-lg: 14px; --header-h: 64px;
  --accent-on-soft: #065f46; --hero-glow: #e6f4ee;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a; --surface: #1e293b; --surface-2: #273449; --text: #f1f5f9; --muted: #a8b3c5;
    --border: #334155; --border-strong: #64748b;
    --primary: #cbd5e1; --accent: #34d399; --accent-hover: #6ee7b7; --accent-text: #052e22; --accent-soft: #11382c;
    --warn: #f0c36a; --warn-soft: #382c10; --warn-border: #8a6d1c;
    --accent-on-soft: #6ee7b7; --hero-glow: #11382c;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--surface); color: var(--text);
  padding: 10px 16px; border: 2px solid var(--accent); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; color: var(--primary); text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--primary); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--primary); color: var(--bg); }
.brand-mark svg { width: 20px; height: 20px; }
.site-nav { display: none; align-items: center; gap: 4px 22px; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; padding: 10px 0; font-weight: 500; font-size: .9375rem; }
.site-nav a:not(.btn):hover { color: var(--accent); text-decoration: underline; }
.site-nav .btn { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
.menu-m { position: relative; }
.menu-m summary {
  list-style: none; cursor: pointer; padding: 8px 14px; min-height: 44px; display: flex; align-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-weight: 600;
}
.menu-m summary::-webkit-details-marker { display: none; }
.menu-m[open] summary { background: var(--surface-2); }
.menu-m nav {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 8px;
}
.menu-m nav a:not(.btn) { color: var(--text); text-decoration: none; padding: 12px; border-radius: var(--radius-sm); min-height: 44px; }
.menu-m nav a:not(.btn):hover { background: var(--surface-2); }
.menu-m nav .btn { margin-top: 6px; }
@media (min-width: 980px) { .site-nav { display: flex; } .menu-m { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
  background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn.secondary { background: transparent; color: var(--primary); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--primary); }
.btn.lg { min-height: 52px; padding: 12px 26px; font-size: 1.0625rem; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color .15s, border-color .15s, color .15s; } }

/* Typography (docs, legal, pricing) */
main { padding: 32px 0 56px; }
h1 { font-size: 1.875rem; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.375rem; line-height: 1.3; margin: 40px 0 8px; }
h3 { font-size: 1.0625rem; line-height: 1.3; margin: 20px 0 4px; }
p { margin: 0 0 12px; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.section-intro { color: var(--muted); max-width: 60ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.cta.center { justify-content: center; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { display: inline-grid; place-items: center; flex: none; }
.ico svg { width: 20px; height: 20px; }

/* Grids and cards (pricing page, docs) */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.panel h3, .panel h2 { margin-top: 0; }
.panel p, .panel ul { margin: 4px 0; }
.plans { align-items: stretch; }
.plans .panel { display: flex; flex-direction: column; }
.plans .panel .btn-row { margin-top: auto; padding-top: 12px; }
.price { font-size: 1.5rem; font-weight: 700; margin: 8px 0; }

/* ===== Landing page ===== */
.lp { padding: 0; }
.lp h1, .lp h2, .lp h3 { margin: 0; }
.lp .eyebrow { margin: 0 0 12px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lp .section { padding: 56px 0; }
.lp .section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.lp .head { max-width: 680px; margin-bottom: 32px; }
.lp .head h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.2; letter-spacing: -.01em; color: var(--text); }
.lp .head .section-intro { margin: 12px 0 0; font-size: 1.0625rem; }
.lp .narrow { max-width: 820px; }
@media (min-width: 900px) { .lp .section { padding: 96px 0; } .lp .head { margin-bottom: 48px; } }

/* Hero */
.hero { padding: 40px 0 48px; background: linear-gradient(180deg, var(--hero-glow) 0, var(--bg) 100%); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; color: var(--text); text-wrap: balance; }
.hero .lead { margin: 20px 0 0; font-size: 1.1875rem; max-width: 56ch; }
.hero .cta { margin-top: 28px; }
.reassure { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--muted); font-size: .9375rem; }
.reassure .ico { color: var(--accent); }
@media (min-width: 960px) {
  .hero { padding: 80px 0 88px; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
}

/* Hero product mock: pure HTML/CSS, scaled with container units, fixed aspect ratio */
.mock { container-type: inline-size; width: 100%; aspect-ratio: 5 / 4; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); overflow: hidden; }
.mock-in { height: 100%; font-size: 3.1cqw; line-height: 1.35; display: flex; flex-direction: column; color: var(--text); }
.mock-bar { display: flex; align-items: center; gap: .5em; padding: .8em 1.1em; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-bar .dot { width: .7em; height: .7em; border-radius: 50%; background: var(--border-strong); }
.mock-title { margin-left: .6em; font-weight: 700; }
.mock-tag { margin-left: auto; padding: .1em .7em; border: 1px solid var(--border-strong); border-radius: 99px; color: var(--muted); font-size: .85em; }
.mock-body { flex: 1; padding: 1.1em; display: flex; flex-direction: column; gap: 1em; min-height: 0; }
.mock-kpis { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1em; }
.kpi { display: flex; flex-direction: column; padding: .9em 1em; border: 1px solid var(--border); border-radius: .7em; background: var(--bg); }
.kpi-l { color: var(--muted); font-size: .85em; }
.kpi-v { font-size: 1.9em; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.kpi-s { color: var(--muted); font-size: .85em; }
.spark { width: 100%; height: 1.8em; margin-top: .3em; color: var(--accent); }
.kpi-warn { background: var(--warn-soft); border-color: var(--warn-border); }
.kpi-warn .kpi-v, .kpi-warn .kpi-l, .kpi-warn .kpi-s { color: var(--warn); }
.mock-cols { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1em; min-height: 0; }
.mock-card { border: 1px solid var(--border); border-radius: .7em; padding: .9em 1em; background: var(--bg); min-width: 0; }
.mock-h { display: block; font-weight: 700; font-size: .9em; margin-bottom: .5em; }
.mock-list { list-style: none; margin: 0; padding: 0; }
.mock-list li { display: flex; align-items: center; justify-content: space-between; gap: .5em; padding: .45em 0; border-top: 1px solid var(--border); white-space: nowrap; }
.mock-list li span:first-child { overflow: hidden; text-overflow: ellipsis; }
.pill { padding: .05em .6em; border-radius: 99px; background: var(--surface-2); font-size: .9em; font-weight: 600; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--accent-soft); color: var(--accent-on-soft); }
.pill.out { background: var(--surface-2); color: var(--text); }

/* Trust strip */
.trust { padding: 20px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px 24px; grid-template-columns: 1fr; }
.trust-list li { display: flex; align-items: center; gap: 12px; font-size: .9375rem; font-weight: 500; color: var(--text); }
.trust-list .ico { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-on-soft); }
@media (min-width: 640px) { .trust-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .trust-list { grid-template-columns: repeat(5, 1fr); } }

/* Problem to solution */
.pairs { display: grid; gap: 16px; }
.pair { display: grid; gap: 8px; align-items: stretch; grid-template-columns: 1fr; }
.pain, .gain { padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.pain { background: var(--surface); }
.pain .ico { color: var(--warn); margin-bottom: 10px; }
.pain h3, .gain h3 { font-size: 1.125rem; margin-bottom: 6px; }
.pain p, .gain p { margin: 0; color: var(--muted); }
.gain { background: var(--accent-soft); border-color: transparent; }
.gain h3 { color: var(--accent-on-soft); }
.gain p { color: var(--text); }
.pair-arrow { display: none; place-items: center; color: var(--muted); }
.pair-arrow svg { width: 24px; height: 24px; }
@media (min-width: 800px) { .pair { grid-template-columns: 1fr 40px 1fr; } .pair-arrow { display: grid; } }

/* Features bento */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
.tile { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.section.alt .tile { background: var(--bg); }
.tile h3 { font-size: 1.1875rem; line-height: 1.25; margin: 14px 0 8px; }
.tile p { margin: 0; color: var(--muted); }
.icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-on-soft); }
.icon svg { width: 22px; height: 22px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.chips li { padding: 4px 12px; border-radius: 99px; border: 1px solid var(--border-strong); font-size: .875rem; font-weight: 600; color: var(--primary); }
@media (prefers-reduced-motion: no-preference) { .tile, .persona, .plan { transition: border-color .2s; } }
.tile:hover, .persona:hover { border-color: var(--border-strong); }
@media (min-width: 680px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .t-mv { grid-column: span 2; } .t-al { grid-column: span 2; } .t-ro { grid-column: span 2; }
  .t-mv, .t-al, .t-ro { padding: 32px; }
}

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700;
}
.steps h3 { font-size: 1.125rem; margin: 16px 0 6px; }
.steps p { margin: 0; color: var(--muted); }
.step-art { display: block; width: 100%; max-width: 220px; height: auto; aspect-ratio: 2 / 1; }
.step-art .a-fill { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.5; }
.step-art .a-line { stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.step-art .a-bg { fill: var(--border-strong); }
.step-art .a-prim { fill: var(--primary); }
.step-art .a-warn { fill: var(--warn-border); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Personas */
.personas { display: grid; gap: 16px; grid-template-columns: 1fr; }
.persona { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.persona h3 { font-size: 1.125rem; margin: 14px 0 6px; }
.persona p { margin: 0; color: var(--muted); }
@media (min-width: 680px) { .personas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .personas { grid-template-columns: repeat(4, 1fr); } }

/* Pricing preview */
.plan-grid { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 820px; margin: 0 auto 24px; }
.plan { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 28px; }
.plan h3 { font-size: 1.25rem; }
.plan-price { margin: 0; }
.plan-price .amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.plan-price .per { color: var(--muted); }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.plan-list .ico { color: var(--accent); margin-top: 2px; }
.plan .btn { align-self: stretch; }
@media (min-width: 720px) { .plan-grid { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq-list details, details.faq { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin: 10px 0; }
.faq-list summary, details.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); flex: none; }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.faq-list details p { margin: 0 0 14px; color: var(--muted); }
.lp .faq-list { margin-bottom: 16px; }

/* Final CTA */
.final { padding: 56px 0; }
.cta-band {
  --accent: #34d399; --accent-hover: #6ee7b7; --accent-text: #052e22;
  padding: 48px 24px; text-align: center; background: #1e293b; color: #f1f5f9; border-radius: var(--radius-lg); border: 1px solid #334155;
}
.cta-band h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.2; color: #f8fafc; }
.cta-band p { margin: 12px auto 0; color: #cbd5e1; max-width: 52ch; }
.cta-band .btn.secondary { color: #f1f5f9; border-color: #64748b; }
.cta-band .btn.secondary:hover { background: #334155; color: #fff; border-color: #94a3b8; }
.cta-band .cta { margin-top: 28px; }
@media (min-width: 900px) { .final { padding: 80px 0; } .cta-band { padding: 72px 32px; } }

/* Scroll reveal: only applied by site.js, to elements below the fold, never under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .rv-hide { opacity: 0; transform: translateY(14px); }
  .rv-hide.rv-in { opacity: 1; transform: none; transition: opacity .35s ease-out, transform .35s ease-out; }
}

/* Placeholders and draft banner */
.draft-banner {
  background: var(--warn-soft); color: var(--warn); border: 2px solid var(--warn-border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 24px; font-weight: 700;
}
.ph { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 3px; }

/* Docs and legal */
.doc { display: grid; gap: 24px; grid-template-columns: 1fr; }
.doc-nav-d { display: none; }
@media (min-width: 860px) {
  .doc { grid-template-columns: 230px minmax(0, 1fr); gap: 40px; }
  .doc-nav-d { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
  .doc-nav-m { display: none; }
}
.doc-nav-d ul { list-style: none; margin: 8px 0 0; padding: 0; border-left: 1px solid var(--border); }
.doc-nav-d li a { display: block; padding: 6px 12px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); }
.doc-nav-d li a:hover { color: var(--text); }
.doc-nav-d [aria-current] { color: var(--accent); font-weight: 700; border-left-color: var(--accent); }
.doc-nav-m { margin-bottom: 8px; }
.doc-nav-m ul { list-style: none; margin: 8px 0 0; padding: 0; }
.doc-nav-m li a { display: block; padding: 10px 4px; }
.doc-nav-m [aria-current] { font-weight: 700; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 32px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.legal-wrap .prose { margin: 0 auto; }
pre, code { font-family: var(--mono); font-size: 0.875rem; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap { overflow-x: auto; }

/* Docs accordions */
.prose details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px; margin: 8px 0; }
.prose summary, .doc-nav-m summary { cursor: pointer; font-weight: 600; }
.doc-nav-m { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; }
.doc-nav-m summary { padding: 12px 0; min-height: 44px; }


/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 36px 0; font-size: 0.9375rem; }
.site-footer .foot-brand { color: var(--muted); }
.site-footer .foot-brand strong { color: var(--text); }
.site-footer ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer li a { display: inline-block; padding: 10px 0; }
