/* ==========================================================================
   QRFlow — feuille de style
   Identite "Print & Signal" : papier chaud + encre + vert scan.
   Sommaire :
     1. Tokens (variables)
     2. Font-face (Space Grotesk, auto-hebergee)
     3. Reset & base
     4. Typographie
     5. Boutons
     6. Formulaires
     7. Header / navigation
     8. Footer
     9. Messages flash
    10. Cartes & tables
    11. Accueil (hero, demo, sections marketing)
    12. Tarifs
    13. Tableau de bord
    14. Detail QR & analytics
    15. Generateur QR statique
    16. Pages legales & erreurs
    17. Utilitaires
    18. Responsive & preferences
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --paper: #f6f5f0;          /* fond de page, blanc papier chaud */
  --surface: #ffffff;        /* cartes */
  --surface-2: #efeee7;      /* puits, chips, code */
  --line: #e4e2d8;           /* bordures hairline */
  --line-strong: #cfcdc1;

  /* Encre */
  --ink: #1b1d20;            /* titres + texte courant */
  --ink-2: #4d535c;          /* texte secondaire (7:1 sur blanc) */
  --muted: #5f6670;          /* texte discret (≥ 5:1 sur blanc) */

  /* Accent : vert scan (viseur qui verrouille un code) */
  --accent: #0b7c57;         /* 5.3:1 sur blanc — ok en texte et en fond de bouton */
  --accent-hover: #085e42;
  --accent-soft: #e1f2ea;
  --accent-ink: #096348;     /* texte accent sur fonds teintes */

  /* Etats */
  --danger: #b42318;
  --danger-hover: #932015;
  --danger-soft: #fbeae8;
  --warning-ink: #7a5800;
  --warning-soft: #faf2d8;
  --warning-line: #e2c96d;
  --info-ink: #1c5cab;
  --info-soft: #e4edfa;
  --success-ink: #006300;

  /* Data-viz (palette validee, mode clair) */
  --viz-1: #2a78d6;          /* bleu — series simples, barres */
  --viz-2: #008300;          /* vert — courbe de scans */
  --viz-3: #e87ba4;          /* magenta — 3e categorie */
  --viz-other: #898781;
  --viz-grid: #e1e0d9;
  --viz-axis: #898781;
  --viz-heat: #1c5cab;

  /* Typo */
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Echelle 1.25 sur base 16 */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.5625rem;
  --fs-xl: 1.953rem;
  --fs-2xl: 2.441rem;
  --fs-3xl: 3.052rem;

  /* Geometrie (espacement en multiples de 4px) */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(27, 29, 32, 0.06);
  --shadow-md: 0 2px 4px rgba(27, 29, 32, 0.05), 0 8px 24px -12px rgba(27, 29, 32, 0.18);
  --shadow-lg: 0 4px 8px rgba(27, 29, 32, 0.05), 0 20px 48px -20px rgba(27, 29, 32, 0.28);

  --speed: 150ms;
}

/* --------------------------------------------------------------------------
   2. Font-face — Space Grotesk (variable 400–700), fichiers locaux
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F;
}

/* --------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

/* Certains composants (ex. .qr-result, .empty-state) forcent display: flex,
   ce qui ecraserait le display: none implicite de [hidden] sans cette regle. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main { flex: 1; }

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

::selection { background: var(--accent-soft); color: var(--accent-hover); }

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

.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* --------------------------------------------------------------------------
   4. Typographie
   -------------------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 12px;
}

h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }

p { margin: 0 0 16px; }

a {
  color: var(--accent-ink);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--speed) ease;
}
a:hover { text-decoration: underline; color: var(--accent-hover); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   5. Boutons — primaire / secondaire / danger
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--speed) ease, border-color var(--speed) ease,
    color var(--speed) ease, box-shadow var(--speed) ease, transform var(--speed) ease;
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(1px); }
.btn:disabled {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--muted);
  cursor: not-allowed;
}

.btn-secondary,
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
  color: var(--ink);
}

.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }

.btn-lg { padding: 13px 26px; font-size: var(--fs-base); border-radius: 12px; }
.btn-block { display: flex; width: 100%; margin-top: 12px; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 4px;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.link-btn:hover { color: var(--accent-hover); }

/* --------------------------------------------------------------------------
   6. Formulaires
   -------------------------------------------------------------------------- */
.form-card {
  max-width: 440px;
  margin: 32px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.form-card h1 { font-size: var(--fs-lg); margin-bottom: 8px; }

.form-card label,
.form-label {
  display: block;
  margin: 16px 0 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  margin-top: 6px;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}
.input::placeholder { color: var(--muted); }
.input:hover { border-color: var(--ink-2); }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

.color-fields { display: flex; gap: 16px; flex-wrap: wrap; }
.color-field-group { flex: 1; min-width: 160px; }
.color-field-group label {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  margin: 16px 0 6px;
}
.input-color {
  width: 100%;
  height: 44px;
  padding: 4px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--speed) ease;
}
.input-color:hover { border-color: var(--ink-2); }

.color-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.color-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: transform var(--speed) ease, opacity var(--speed) ease, border-color var(--speed) ease;
}
.color-swatch:hover:not(:disabled) { transform: scale(1.15); }
.color-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.color-swatch[aria-pressed="true"] { border-color: var(--ink); border-width: 2px; }
.color-swatch:disabled { opacity: 0.25; cursor: not-allowed; filter: grayscale(70%); }

.color-preview-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.color-preview {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  overflow: hidden;
}
.color-preview-back {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.color-preview-fill { width: 44%; height: 44%; border-radius: 3px; }
.color-contrast-status { font-size: var(--fs-xs); color: var(--muted); }
.color-contrast-status .err { margin-top: 2px; }
.color-ratio-ok { color: var(--success-ink); }
.color-ratio-bad { color: var(--danger); }
.color-ratio-note { display: block; color: var(--muted); font-style: italic; }
.color-swap-btn { margin-top: 12px; }

.logo-field { display: block; margin: 16px 0 6px; }

.file-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.file-upload-input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-upload-input:focus-visible + .file-upload-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.file-upload-btn { margin: 0; padding: 8px 14px; font-size: var(--fs-sm); }
.file-upload-name { overflow-wrap: anywhere; }

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: var(--fs-sm);
  font-weight: 400;
}
.checkbox-field input { width: auto; accent-color: var(--accent); }

.range-input { width: 100%; margin: 6px 0 12px; accent-color: var(--accent); }

.err {
  display: block;
  color: var(--danger);
  font-size: var(--fs-xs);
  font-weight: 600;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   7. Header / navigation
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 12px;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 245, 240, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { flex: 0 0 auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav > a:not(.btn):not(.plan-badge) {
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-md);
  transition: background var(--speed) ease, color var(--speed) ease;
}
.site-nav > a:not(.btn):not(.plan-badge):hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}
.site-nav > a.active {
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.site-nav > .btn { margin-left: 8px; padding: 8px 16px; }

.plan-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}
.site-nav > .plan-badge { margin: 0 4px; }
.plan-badge:hover { text-decoration: none; border-color: var(--ink-2); }
.plan-badge-pro {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.lang-switch {
  display: inline-flex;
  margin-left: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.lang-switch a {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 4px 10px;
  color: var(--muted);
  transition: background var(--speed) ease, color var(--speed) ease;
}
.lang-switch a:hover { text-decoration: none; color: var(--ink); }
.lang-switch a.active { background: var(--ink); color: var(--paper); }

/* Burger (mobile) — pilote par un petit script avec nonce dans base.html */
.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
.nav-burger:hover { border-color: var(--ink); }
.nav-burger svg { display: block; }
.nav-burger .icon-close { display: none; }
.nav-burger[aria-expanded="true"] .icon-open { display: none; }
.nav-burger[aria-expanded="true"] .icon-close { display: block; }

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 48px;
}
.site-footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-brand p {
  color: var(--muted);
  font-size: var(--fs-sm);
  max-width: 300px;
  margin: 10px 0 0;
}
.footer-col h3 {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--ink-2); font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--ink); }
.footer-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-xs);
}
.footer-trust span { display: flex; align-items: center; gap: 6px; }
.footer-trust span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: var(--fs-xs);
}
.footer-legal {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   9. Messages flash
   -------------------------------------------------------------------------- */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  font-size: var(--fs-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.flash::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background-color: currentColor;
  -webkit-mask: var(--flash-icon) center / contain no-repeat;
  mask: var(--flash-icon) center / contain no-repeat;
}
.flash-success {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  --flash-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.2 14.4-4-4 1.7-1.7 2.3 2.3 4.9-4.9 1.7 1.7-6.6 6.6z'/%3E%3C/svg%3E");
}
.flash-danger {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
  --flash-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}
.flash-warning {
  background: var(--warning-soft);
  border-color: var(--warning-line);
  color: var(--warning-ink);
  --flash-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 1 21h22L12 2zm1 15h-2v-2h2v2zm0-4h-2V9h2v4z'/%3E%3C/svg%3E");
}
.flash-info {
  background: var(--info-soft);
  border-color: var(--info-ink);
  color: var(--info-ink);
  --flash-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}
.flash .inline-form { display: inline; }

/* --------------------------------------------------------------------------
   10. Cartes & tables
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--speed) ease, transform var(--speed) ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { margin-top: 0; }
.card-featured { border-color: var(--accent); box-shadow: var(--shadow-md); }

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: var(--fs-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.table th {
  text-align: left;
  padding: 10px 14px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--speed) ease; }
.table tbody tr:hover { background: var(--paper); }

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   11. Accueil — hero, demo signature, sections marketing
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0 40px;
}
.hero > * { min-width: 0; }
.hero h1 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-ink);
}
.hero-lead {
  color: var(--ink-2);
  font-size: var(--fs-md);
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 34em;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: var(--fs-sm); margin: 16px 0 0; }

/* Demo signature : QR imprime -> lien controle */
.hero-demo {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
}
.demo-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  text-align: center;
  max-width: 100%;
  min-width: 0;
}
.demo-print { transform: rotate(-2deg); }
.demo-dest { transform: rotate(1.5deg); min-width: 220px; }
.demo-tag {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.demo-qr {
  display: block;
  width: 148px;
  height: 148px;
  margin: 0 auto;
  shape-rendering: crispEdges;
  color: var(--ink);
}
.demo-poster-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; align-items: center; }
.demo-poster-line { height: 6px; border-radius: 3px; background: var(--surface-2); }
.demo-poster-line.w1 { width: 70%; }
.demo-poster-line.w2 { width: 45%; }

.demo-link {
  flex: 0 0 auto;
  width: 72px;
  height: 2px;
  margin: 0 -6px;
  background-image: linear-gradient(90deg, var(--accent) 55%, transparent 45%);
  background-size: 10px 2px;
  background-repeat: repeat-x;
  position: relative;
  z-index: 1;
  animation: demo-dash 1.2s linear infinite;
}
.demo-link::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -4px;
  border: 5px solid transparent;
  border-left-color: var(--accent);
}
@keyframes demo-dash {
  to { background-position: 10px 0; }
}

.demo-dest-rows {
  display: grid;
  margin: 4px 0 12px;
}
.demo-url {
  grid-area: 1 / 1;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  opacity: 0;
  animation: demo-cycle 7.5s infinite;
}
.demo-url b { color: var(--ink); font-weight: 700; }
.demo-url:nth-child(2) { animation-delay: 2.5s; }
.demo-url:nth-child(3) { animation-delay: 5s; }
@keyframes demo-cycle {
  0%, 30% { opacity: 1; transform: translateY(0); }
  33.3%, 96% { opacity: 0; transform: translateY(-6px); }
  97% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.demo-chip {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}

/* Sections marketing */
.home-section { margin-top: 72px; }
.home-section > h2 {
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.home-section > .section-lead {
  color: var(--ink-2);
  max-width: 40em;
  margin-bottom: 32px;
}

/* Etapes : vraie sequence -> numerotation justifiee, reliee par un fil */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step { position: relative; padding-top: 16px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 24px;
  border-top: 2px solid var(--line-strong);
}
.step h3 { font-size: var(--fs-md); margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }

/* Bloc fonctionnalites : une grande carte analytics + deux cartes standard */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.feature-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.feature-wide h3 { font-size: var(--fs-lg); }
.features .card p { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: 0; }

/* Mini-dashboard illustratif dans la carte analytics */
.mini-dash {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}
.mini-dash-stats { display: flex; gap: 24px; margin-bottom: 12px; }
.mini-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.1;
}
.mini-stat span { font-size: var(--fs-xs); color: var(--muted); }
.mini-bars { display: flex; align-items: flex-end; gap: 5px; height: 72px; }
.mini-bars span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--viz-2);
  opacity: 0.85;
  min-height: 8%;
}

/* Aperçu de personnalisation */
.swatch-row { display: flex; gap: 8px; margin-top: 16px; }
.swatch {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

/* Bloc "Ce que le Pro débloque" : trois mockups + CTA */
.pro-unlock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pro-unlock-card { text-align: center; }
.pro-unlock-card h3 { font-size: var(--fs-md); margin: 0 0 6px; }
.pro-unlock-card p { color: var(--ink-2); font-size: var(--fs-sm); margin: 0; }
.pro-unlock-cta { text-align: center; margin-top: 32px; }

.pro-qr-mock { position: relative; width: 148px; height: 148px; margin: 0 auto 16px; }
.pro-qr-mock .demo-qr { margin: 0; }
.qr-logo-mock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  padding: 6px;
  background: var(--surface);
  border-radius: var(--r-sm);
  box-sizing: border-box;
}
.qr-logo-mock::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-sm);
}

.pro-mini-dash { text-align: left; margin: 0 auto 16px; max-width: 220px; }
.mini-dash-row { display: flex; align-items: center; gap: 8px; }
.mini-dash-row + .mini-dash-row { margin-top: 8px; }
.mini-dash-label { flex: 0 0 56px; font-size: var(--fs-xs); color: var(--ink-2); }
.mini-dash-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.mini-dash-bar span { display: block; height: 100%; border-radius: 3px; background: var(--viz-2); }
.mini-dash-pct { flex: 0 0 auto; width: 34px; text-align: right; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

.export-badges { display: flex; justify-content: center; gap: 8px; margin: 0 auto 16px; }

/* Apparition au scroll : .reveal est posee par home-reveal.js juste avant
   d'observer l'element, .revealed quand il entre dans le viewport. Sans JS
   (ou si l'observer ne tourne pas), aucune classe n'est posee et tout reste
   visible ; en reduced-motion le JS ne fait rien et ce bloc est inactif. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    translate: 0 18px;
    transition: opacity 0.55s ease, translate 0.55s ease,
      box-shadow var(--speed) ease, transform var(--speed) ease;
  }
  .reveal.revealed { opacity: 1; translate: 0 0; }
  /* Leger decalage en cascade dans les grilles (opacity et translate
     seulement : le box-shadow/transform du hover reste immediat) */
  .steps .step:nth-child(2).reveal { transition-delay: 0.1s, 0.1s, 0s, 0s; }
  .steps .step:nth-child(3).reveal { transition-delay: 0.2s, 0.2s, 0s, 0s; }
  .pro-unlock .card:nth-child(2).reveal { transition-delay: 0.1s, 0.1s, 0s, 0s; }
  .pro-unlock .card:nth-child(3).reveal { transition-delay: 0.2s, 0.2s, 0s, 0s; }

  /* Montee des barres des mini-dash a l'entree dans le viewport */
  .reveal .mini-bars span {
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
  }
  .reveal .mini-bars span:nth-child(n+4) { transition-delay: 0.25s; }
  .reveal .mini-bars span:nth-child(n+7) { transition-delay: 0.35s; }
  .reveal .mini-bars span:nth-child(n+10) { transition-delay: 0.45s; }
  .reveal.revealed .mini-bars span { transform: scaleY(1); }

  .reveal .mini-dash-bar span {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
  }
  .reveal .mini-dash-row:nth-child(2) .mini-dash-bar span { transition-delay: 0.3s; }
  .reveal .mini-dash-row:nth-child(3) .mini-dash-bar span { transition-delay: 0.4s; }
  .reveal.revealed .mini-dash-bar span { transform: scaleX(1); }
}

/* Cas d'usage */
.usecases {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.usecases li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.usecases li b { color: var(--ink); font-weight: 600; }

/* Bande tarifs (accueil) + CTA final */
.home-pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* FAQ (details/summary natif, sans JS) */
.faq { max-width: 42em; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-family: var(--font-display);
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0 0 16px; color: var(--ink-2); }

.upsell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 72px;
  background: var(--ink);
  border: 0;
  color: var(--paper);
}
.upsell h2 { margin: 0 0 6px; font-size: var(--fs-lg); color: #fff; }
.upsell p { margin: 0; color: #c8cbd0; max-width: 36em; }
.upsell .btn { flex: 0 0 auto; background: #fff; border-color: #fff; color: var(--ink); }
.upsell .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* --------------------------------------------------------------------------
   12. Tarifs
   -------------------------------------------------------------------------- */
.plan-name { font-size: var(--fs-md); margin-bottom: 4px; }
.price {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.price span { font-size: var(--fs-sm); color: var(--muted); font-weight: 400; font-family: var(--font-body); }
.price-note { font-size: var(--fs-xs); margin: -12px 0 16px; }
.plan-features { list-style: none; margin: 0 0 20px; padding: 0; }
.plan-features li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.6 1.6 5.8 5.8L21 7.9l-1.6-1.6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.6 1.6 5.8 5.8L21 7.9l-1.6-1.6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan-tag {
  float: right;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}
.pro-status { text-align: center; color: var(--success-ink); font-weight: 700; margin: 0; }

.pricing-compare-wrap { margin-top: 32px; overflow-x: auto; }
.pricing-compare { margin: 0; text-align: center; }
.pricing-compare th,
.pricing-compare td { text-align: center; }
.pricing-compare th[scope="row"] { text-align: left; font-weight: 600; color: var(--ink); }
.pricing-compare .col-featured {
  background: var(--accent-soft);
  border-left: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.pricing-compare thead .col-featured { color: var(--accent-ink); font-weight: 700; }
.pricing-compare tfoot td { padding: 16px 14px; border-bottom: 0; }
.cell-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 700;
}
.cell-yes { background: var(--accent-soft); color: var(--accent-ink); }
.cell-no { background: var(--surface-2); color: var(--muted); }
.pricing-note { margin-top: 16px; text-align: center; color: var(--ink-2); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   13. Tableau de bord
   -------------------------------------------------------------------------- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-header h1 { margin-bottom: 4px; }
.page-header .page-sub { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.qr-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease,
    transform var(--speed) ease;
}
.qr-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.qr-card h3 { margin: 0; font-size: var(--fs-md); overflow-wrap: anywhere; }
.qr-card-url {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qr-card-stats {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.qr-card-stats b {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1;
}
.qr-card-stats span { color: var(--muted); font-size: var(--fs-xs); }
.qr-card-footer { margin-top: auto; }
.qr-card-footer a { font-weight: 600; font-size: var(--fs-sm); }

/* Etat vide */
.dash-empty {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  margin-top: 24px;
}
.dash-empty .demo-qr {
  width: 96px;
  height: 96px;
  color: var(--line-strong);
  margin-bottom: 20px;
}
.dash-empty h2 { font-size: var(--fs-md); margin-bottom: 8px; }
.dash-empty p { color: var(--muted); max-width: 32em; margin: 0 auto 20px; }

/* --------------------------------------------------------------------------
   14. Detail QR & analytics
   -------------------------------------------------------------------------- */
.qr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.qr-header h1 { margin: 0 0 6px; display: flex; align-items: center; gap: 12px; }
.qr-header .btn { flex: 0 0 auto; }

.detail-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 24px;
}

.qr-img {
  width: 100%;
  max-width: 220px;
  display: block;
  margin: 0 auto 16px;
  background: #fff;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.stat-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 24px 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-card .stat-label {
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-top: 4px;
}
.stat-delta {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  line-height: 1.6;
}
.stat-delta.up { color: var(--success-ink); background: #e2f2e2; }
.stat-delta.down { color: var(--danger); background: var(--danger-soft); }

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-sm);
  min-height: 160px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--paper);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 40px 0 16px;
}
.section-title h2 { margin: 0; font-size: var(--fs-lg); }

.period-switch a {
  color: var(--muted);
  margin-left: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: color var(--speed) ease, border-color var(--speed) ease, background var(--speed) ease;
}
.period-switch a:hover { color: var(--ink); text-decoration: none; border-color: var(--line-strong); }
.period-switch a.active { color: var(--paper); background: var(--ink); }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.chart-card h3 { margin: 0 0 4px; font-size: var(--fs-base); }
.chart-hint { color: var(--muted); font-size: var(--fs-xs); margin: 0 0 14px; }
.stat-card .chart-hint { margin: 6px 0 0; }
.chart-card canvas { max-height: 260px; }
.analytics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 16px;
}
.chart-card-spaced { margin-bottom: 16px; }

.map-container { position: relative; width: 100%; max-width: 760px; height: 320px; margin: 0 auto; }
.map-container canvas { max-height: none; }

.legend-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.legend-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

.heatmap-wrap { overflow-x: auto; }
.heatmap {
  display: grid;
  grid-template-columns: 34px repeat(24, minmax(18px, 1fr));
  gap: 2px;
  min-width: 640px;
}
.heatmap-hour { font-size: 10px; color: var(--muted); text-align: center; align-self: end; }
.heatmap-day { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; }
.heatmap-cell { aspect-ratio: 1; border-radius: 3px; background: var(--viz-heat); }
.recent-row-hidden { display: none; }

.tz-select {
  margin-left: 6px;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-xs);
  max-width: 220px;
}

/* Placeholders flous de la version gratuite */
.demo-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.demo-bar {
  height: 24px;
  border-radius: 4px;
  background: var(--viz-1);
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #fff;
  font-size: var(--fs-xs);
  min-width: 70px;
}
.heatmap-placeholder {
  height: 140px;
  border-radius: var(--r-sm);
  background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--paper) 10px 20px);
}

.pro-locked { position: relative; }
.pro-locked .pro-locked-content {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}
.pro-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(246, 245, 240, 0.3), rgba(246, 245, 240, 0.85));
  border-radius: var(--r-lg);
}
.pro-overlay p { margin: 0; font-weight: 700; max-width: 340px; }

/* --------------------------------------------------------------------------
   15. Generateur QR statique
   -------------------------------------------------------------------------- */
.page-head { text-align: center; margin: 24px 0 8px; }
.page-head h1 { margin: 0 0 8px; }
.page-head p { color: var(--ink-2); max-width: 36em; margin: 0 auto; }

.generator-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  margin-top: 32px;
}
.generator-grid .form-card { max-width: none; margin: 0; }
.generator-grid .card { display: flex; flex-direction: column; justify-content: center; }
.generator-grid .empty-state { flex: 1; }
.qr-result { display: flex; flex-direction: column; align-items: center; }
.qr-result .qr-img { max-width: 240px; }
.qr-result .btn { width: 100%; }
.encoded-url {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
  margin: 0 0 12px;
  max-width: 100%;
}
.qr-preview-status {
  color: var(--danger);
  font-size: var(--fs-sm);
  text-align: center;
  margin: 0;
}

/* --------------------------------------------------------------------------
   16. Pages legales & erreurs
   -------------------------------------------------------------------------- */
.legal { max-width: 720px; margin: 0 auto; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin-top: 32px; font-size: var(--fs-md); }
.legal p { color: var(--ink-2); }

.error-page { text-align: center; padding: 80px 0; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--line-strong);
  margin: 0 0 8px;
}
.error-page p { color: var(--ink-2); font-size: var(--fs-md); margin-bottom: 28px; }

/* Page cachee derriere le QR de demo du hero */
.secret-page { max-width: 640px; margin: 0 auto; }
.secret-page h1 { margin: 8px 0 20px; }
.secret-page p { margin-bottom: 16px; }
.secret-page .btn { margin-top: 12px; }

/* --------------------------------------------------------------------------
   17. Utilitaires
   -------------------------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: var(--fs-xs); }
.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrap-url { overflow-wrap: anywhere; word-break: break-word; }
.inline-form { display: inline; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   18. Responsive & preferences
   -------------------------------------------------------------------------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .hero-demo { order: 2; }
  .feature-wide { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .container { padding: 24px 16px 48px; }
  h1 { font-size: var(--fs-lg); }
  .hero h1 { font-size: var(--fs-xl); }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .pro-unlock { grid-template-columns: 1fr; }
  .home-pricing { grid-template-columns: 1fr; }
  .generator-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .demo-link { width: 40px; }

  /* Navigation mobile : panneau sous le header, ouvert via le burger */
  .nav-burger { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.btn):not(.plan-badge) { padding: 12px; }
  .site-nav > .btn { margin: 8px 0 0; }
  .site-nav > .plan-badge { align-self: flex-start; margin: 4px 12px; }
  .lang-switch { margin: 8px 0 0 12px; align-self: flex-start; }
}

@media (max-width: 480px) {
  .hero-demo { flex-direction: column; }
  .demo-link {
    width: 2px;
    height: 40px;
    margin: -6px 0;
    background-image: linear-gradient(180deg, var(--accent) 55%, transparent 45%);
    background-size: 2px 10px;
    background-repeat: repeat-y;
    animation-name: demo-dash-v;
  }
  .demo-link::after {
    right: -4px;
    top: auto;
    bottom: -2px;
    border: 5px solid transparent;
    border-top-color: var(--accent);
  }
}
@keyframes demo-dash-v {
  to { background-position: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .demo-url { opacity: 0; }
  .demo-url:first-child { opacity: 1; }
  .card:hover, .btn:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   16. Abonnement / resiliation
   -------------------------------------------------------------------------- */
.subscription-card { max-width: 40em; margin: 24px auto 0; }
.subscription-plan { font-size: var(--fs-lg); margin-top: 0; }
.subscription-renewal { color: var(--ink-2); }
.subscription-status { color: var(--warning-ink, var(--ink-2)); font-weight: 600; }
.subscription-cancel-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--danger);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cancel-card { max-width: 40em; margin: 24px auto 0; }
.cancel-card ul { margin: 8px 0 20px; padding-left: 20px; color: var(--ink-2); }
.cancel-card li { margin-bottom: 4px; }

.cancel-survey { border: 0; padding: 0; margin: 0 0 20px; }
.cancel-survey legend { font-weight: 600; margin-bottom: 8px; padding: 0; }

.cancel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
