/* =====================================================================
   LVDigital - Design System de la vitrine (« Le Fil »)
   Voir VITRINE_DESIGN_DIRECTION.md. Sombre premium + accent lime unique,
   typographie Bricolage Grotesque (display) + système (texte) + mono (chiffres).
   Plat, mat, beaucoup de vide, mouvement au service du sens.
   ===================================================================== */

/* ── Police display (locale, variable) ── */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+2074, U+20AC, U+2122, U+2212;
}

:root {
  /* Couleurs - encre + accent unique */
  --ink: #0a0b0e;
  --ink-2: #101218;
  --panel: #15171f;
  --panel-2: #1b1e28;
  --line: #23262f;
  --line-soft: #191c24;
  --text: #f4f1ea;
  --muted: #9aa0b0;
  --faint: #7e8494;
  --accent: #c6f135;
  --accent-deep: #a8d420;
  --accent-soft: rgba(198, 241, 53, 0.12);
  --accent-line: rgba(198, 241, 53, 0.30);
  --ok: #5cc98a;
  --amber: #f0a832;
  --error: #f0736a;

  /* Section « papier » (moment calme, clair) */
  --paper: #f6f5f1;
  --paper-2: #eceae3;
  --paper-line: #ddd9cf;
  --paper-ink: #16171b;
  --paper-muted: #5c5e66;

  /* Typo */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-text: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Rythme */
  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-pill: 999px;
  --dur-fast: 160ms; --dur: 280ms; --dur-slow: 640ms;
  --ease: cubic-bezier(.2,.8,.2,1);
  --maxw: 1120px; --readw: 720px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }

/* ── Conteneurs ── */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.section { position: relative; padding-block: clamp(72px, 12vh, 140px); }
.eyebrow { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }

/* Titres fluides */
.display { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.h-xl { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
.h-lg { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: var(--readw); }

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-family: var(--font-text); font-weight: 650; font-size: 0.98rem; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn--primary { background: var(--text); color: var(--ink); }
.btn--primary:hover { background: #ffffff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: color-mix(in srgb, var(--text) 40%, transparent); background: var(--panel); }
/* Accent réservé aux moments forts (rare), lisible car texte encre foncé. */
.btn--accent { background: var(--accent); color: var(--ink); font-weight: 700; }
.btn--accent:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line-soft); }
.nav__in { display: flex; align-items: center; gap: 20px; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand__mark { width: 26px; height: 26px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__link {
  padding: 8px 12px; border-radius: var(--r-sm); color: var(--muted); font-size: 0.92rem; font-weight: 550;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--panel); }
.nav__cta { margin-left: 8px; }
@media (max-width: 900px) { .nav__links { display: none; } }

/* ── Le Fil (colonne narrative) ── */
.thread { position: relative; }
.thread__rail {
  position: absolute; left: clamp(14px, 3vw, 34px); top: 0; bottom: 0; width: 2px;
  background: var(--line); border-radius: 2px;
}
.thread__fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 0%;
  background: linear-gradient(var(--accent), var(--accent-deep));
  border-radius: 2px; transition: height 120ms linear;
}
/* Chapitre relié au Fil */
.chapter { position: relative; padding-left: clamp(46px, 8vw, 92px); padding-block: clamp(48px, 8vh, 96px); }
.chapter__node {
  position: absolute; left: clamp(6px, 3vw, 26px); top: clamp(52px, 8vh, 100px);
  width: 20px; height: 20px; border-radius: var(--r-pill);
  background: var(--ink-2); border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 10px; color: var(--faint);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.chapter.on .chapter__node { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.12); }
.chapter__k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.chapter__t { font-size: clamp(1.6rem, 3.4vw, 2.5rem); margin: 10px 0 12px; max-width: 16ch; }
.chapter__d { color: var(--muted); max-width: 46ch; }
.chapter__media { margin-top: 22px; }

/* Révélation au scroll */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .thread__fill { transition: none; }
}

/* ── Cartes / nœuds génériques ── */
.node-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 0.72rem; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.badge--ok { color: var(--ok); border-color: rgba(92,201,138,.45); background: rgba(92,201,138,.12); }
.badge--amber { color: var(--amber); border-color: rgba(240,168,50,.45); background: rgba(240,168,50,.12); }

/* ── Section « papier » (calme, clair) ── */
.paper { background: var(--paper); color: var(--paper-ink); }
.paper .lead, .paper .chapter__d { color: var(--paper-muted); }
.paper .eyebrow, .paper .chapter__k { color: #8a8c93; }

/* ── FAQ ── */
.faq__item { border-top: 1px solid var(--line); }
.faq__q { width: 100%; text-align: left; background: none; border: none; color: var(--text); font-family: var(--font-display); font-weight: 650; font-size: 1.1rem; padding: 20px 0; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; }
.faq__q::after { content: "+"; color: var(--accent); font-weight: 400; transition: transform var(--dur) var(--ease); }
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { color: var(--muted); padding: 0 0 20px; max-width: 62ch; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--line); padding-block: 56px; color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ── Utilitaires ── */
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Menu mobile (burger + tiroir) — construit par app.js, présent sur toutes les pages ── */
.nav__burger {
  display: none; margin-left: 8px; width: 42px; height: 42px; flex: 0 0 auto;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.nav__burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) { .nav__burger { display: inline-flex; } }

.nav__drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; opacity: 0; transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur); }
.nav__drawer.open { visibility: visible; opacity: 1; transition: opacity var(--dur) var(--ease), visibility 0s; }
.nav__drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.nav__drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(82vw, 320px);
  background: var(--ink-2); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; padding: 78px 18px 24px;
  overflow-y: auto; transform: translateX(100%); transition: transform var(--dur) var(--ease);
}
.nav__drawer.open .nav__drawer-panel { transform: translateX(0); }
.nav__drawer-panel a { padding: 12px 14px; border-radius: var(--r-sm); color: var(--text); font-size: 1rem; font-weight: 550; }
.nav__drawer-panel a.nav__link { color: var(--muted); }
.nav__drawer-panel a:hover { background: var(--panel); color: var(--text); }
.nav__drawer-panel .btn { margin-top: 8px; justify-content: center; }
body.nav-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .nav__drawer, .nav__drawer-panel, .nav__burger span { transition: none; } }

/* ── Section Produit (espace de gestion mis en avant) ── */
.product__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .product__grid { grid-template-columns: 1fr; gap: 28px; } }
.product__benefits { list-style: none; display: grid; gap: 14px; margin: 6px 0 24px; padding: 0; }
.product__benefits li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 0.96rem; }
.product__benefits svg { flex: 0 0 auto; color: var(--accent); margin-top: 3px; }
.product__benefits b { color: var(--text); }
.product__price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.product__price .amt { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--text); }
.product__price .per { color: var(--faint); font-family: var(--font-mono); font-size: 0.85rem; }
.appcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: 0 24px 60px -34px rgba(0,0,0,.85); }
.appcard__bar { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.appcard__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.appcard__title { margin-left: 8px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.applist { display: grid; gap: 8px; }
.approw { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 11px 12px; background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm); }
.approw__who { color: var(--text); font-weight: 600; font-size: 0.9rem; }
.approw__ref { color: var(--faint); font-family: var(--font-mono); font-size: 0.72rem; margin-top: 2px; }
.approw__amt { font-weight: 700; font-size: 0.9rem; }
.tag { font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.tag--draft { color: var(--amber); background: rgba(240,168,50,.14); }
.tag--sent { color: var(--muted); background: var(--panel-2); }
.tag--paid { color: var(--ok); background: rgba(92,201,138,.14); }
.appkpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.appkpi { background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 11px 12px; }
.appkpi__v { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.appkpi__l { color: var(--faint); font-size: 0.7rem; margin-top: 2px; }

/* ── Bandeau rareté (compteur essai) — hauteur réservée, pas de layout shift ── */
.promobar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  max-width: var(--maxw); margin: 4px auto 10px; padding: 12px 20px; min-height: 46px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-pill); text-align: center; }
.promobar:hover { border-color: var(--accent); }
.promobar__txt { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.promobar__txt b { color: var(--accent); }
.promobar__cta { color: var(--accent); font-weight: 700; font-size: 0.88rem; white-space: nowrap; }

/* ── Configurateur : mise en avant de l'option gestion ── */
.cfg__grp--reco { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r-md); padding: 14px 16px; }
.cfg__reco { margin-left: 8px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); background: rgba(198,241,53,.16); padding: 3px 9px; border-radius: var(--r-pill); }
.cfg__reco-note { margin: 12px 2px 0; font-size: 0.84rem; color: var(--muted); }
.cfg__reco-note a { color: var(--accent); font-weight: 600; }

/* ── Bandeau preuve produit (section Preuves, thème paper) ── */
.proofbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: center; margin-top: 30px; }
.proofbar__count { font-weight: 700; color: var(--paper-ink); background: #fff; border: 1px solid var(--paper-line); padding: 7px 14px; border-radius: var(--r-pill); font-size: 0.86rem; }
.proofbar__badge { font-size: 0.8rem; color: var(--paper-muted); background: var(--paper-2); border: 1px solid var(--paper-line); padding: 7px 12px; border-radius: var(--r-pill); }

/* ── Lien d'évitement (accessibilité) ── */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--accent); color: var(--ink); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; transition: top var(--dur-fast) var(--ease); }
.skip-link:focus { top: 12px; outline: 2px solid var(--text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
