/* ==========================================================================
   KALIX — Design system du site officiel
   Reprend la palette v35000 (fond blanc cassé, encre marine, or, bleu)
   et la centralise en variables. Aucune police externe : piles système.
   ========================================================================== */

:root {
  /* ===== Surfaces ===== */
  --paper: #F7F9FC;
  --paper-2: #F0F3F9;
  --white: #FFFFFF;
  --line: #E7EAF0;
  --line-strong: #D0D7E3;
  /* ===== Texte ===== */
  --ink: #172033;
  --ink-2: #2B3650;
  --muted: #566074;           /* 5,7:1 sur --paper-2 (le #667085 du cahier tombe à 4,5:1) */
  /* ===== Marque ===== */
  --brand: #5278F6;           /* bleu principal : fonds décoratifs, grands éléments (3,9:1 sur blanc) */
  --blue: #3158CF;            /* bleu foncé : texte, boutons, liens (6,1:1 sur blanc) */
  --blue-soft: #EAF0FF;
  --accent: #8B75E8;          /* violet d'accent : décor, halos */
  --accent-ink: #4B38A8;      /* violet foncé pour du texte (7,3:1 sur --accent-soft) */
  --accent-soft: #EEEAFD;
  /* alias conservés pour le code existant */
  --gold: var(--accent); --gold-soft: var(--accent-soft); --gold-ink: var(--accent-ink);
  --orange: #D99A36;
  --navy: #172033;
  /* ===== États ===== */
  --ok: #0F7A55;         --ok-soft: #E3F5EE;
  --warn: #8A5A00;       --warn-soft: #FBF1DC;
  --danger: #B93844;     --danger-soft: #FDECEE;
  --info: #3158CF;       --info-soft: #EAF0FF;
  /* ===== Séries de graphiques (ordre fixe) ===== */
  --c1: #3158CF; --c2: #7C5FE0; --c3: #1A8F6A; --c4: #C23B49; --c5: #B87A12; --c6: #0E7490;
  /* ===== Dégradés ===== */
  --grad-brand: linear-gradient(135deg, #3158CF 0%, #5278F6 55%, #8B75E8 100%);
  --grad-deep: linear-gradient(150deg, #2A4DBF 0%, #4B5BDC 55%, #6A55D6 100%);
  --grad-halo: radial-gradient(circle, rgba(82,120,246,.22), transparent 66%);

  /* ===== Typographie (piles système : aucune police tierce, aucun suivi) ===== */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-hero: clamp(2.5rem, 1.5rem + 4.4vw, 4.5rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem);
  --fs-h2: clamp(1.65rem, 1.2rem + 1.7vw, 2.6rem);
  --fs-h3: clamp(1.2rem, 1.05rem + .5vw, 1.55rem);
  --fs-lead: clamp(1.05rem, 1rem + .3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: .9rem;
  --fs-xs: .8rem;

  /* ===== Espaces (échelle de 4 px), formes, élévations ===== */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px; --sp-30: 120px;
  --radius-s: 10px; --radius: 16px; --radius-l: 24px;
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(23,32,51,.05), 0 8px 24px -14px rgba(23,32,51,.10);
  --shadow-2: 0 2px 4px rgba(23,32,51,.04), 0 22px 44px -22px rgba(23,32,51,.18);
  --shadow-3: 0 4px 8px rgba(23,32,51,.04), 0 30px 60px -24px rgba(49,88,207,.28);
  --shadow-4: 0 8px 16px rgba(23,32,51,.05), 0 44px 80px -28px rgba(49,88,207,.38);
  --shadow-gold: 0 18px 40px -18px rgba(49,88,207,.45);
  --container: 1240px;
  --header-h: 68px;

  /* ===== Mouvement (centralisé) ===== */
  --ease: cubic-bezier(.16,1,.3,1);
  --ease-inout: cubic-bezier(.65,0,.35,1);
  --dur-fast: 140ms; --dur-base: 220ms; --dur-slow: 360ms; --dur-reveal: 520ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-body)/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--gold-ink); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1, h2, .display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; }
h3, h4 { font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.02rem; }
small, .small { font-size: var(--fs-small); }
.muted { color: var(--muted); }
.num, .kpi-value, table td.n { font-variant-numeric: tabular-nums; }
code, kbd { font-family: var(--font-mono); font-size: .9em; background: var(--paper-2); padding: .1em .35em; border-radius: 5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Focus visible (clavier) */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

/* -------------------------------------------------- Fond lumineux */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient::before, .ambient::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
}
.ambient::before { width: 520px; height: 520px; top: -160px; left: 8%; background: radial-gradient(circle, rgba(82,120,246,.22), transparent 65%); }
.ambient::after { width: 620px; height: 620px; top: 30%; right: -180px; background: radial-gradient(circle, rgba(139,117,232,.18), transparent 65%); }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(23,32,51,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(23,32,51,.03) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent 70%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%); }
#cursor-glow { position: fixed; left: 0; top: 0; width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(82,120,246,.14) 0%, rgba(139,117,232,.06) 45%, transparent 70%);
  pointer-events: none; z-index: 1; opacity: 0; transition: opacity .4s; will-change: transform; }
body.has-glow #cursor-glow { opacity: 1; }

.page { position: relative; z-index: 2; }

/* -------------------------------------------------- Conteneurs */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.container-narrow { max-width: 820px; }
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.35)); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 var(--fs-xs)/1.4 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.6; }
.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* -------------------------------------------------- En-tête */
.site-header { position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: rgba(247,249,252,.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(11,16,32,.35); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: .06em; font-size: 1.02rem; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; font-family: var(--font-sans); font-size: 1.1rem; font-weight: 800; letter-spacing: 0;
  box-shadow: 0 8px 18px -8px rgba(49,88,207,.65), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-word { display: inline-flex; align-items: baseline; gap: 6px; }
.brand-sub { font-weight: 600; color: var(--muted); letter-spacing: .12em; font-size: .78rem; }
.nav-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { display: block; padding: 8px 11px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .92rem; font-weight: 500; transition: background .2s, color .2s; }
.nav-menu a:hover { background: rgba(11,16,32,.05); color: var(--ink); }
.nav-menu a[aria-current="page"] { color: var(--gold-ink); background: var(--gold-soft); font-weight: 650; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--white); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .3s var(--ease), background .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav-actions .nav-cta { display: none; }
  .nav-panel { position: fixed; top: var(--header-h); left: 0; right: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); background: var(--paper); padding: 20px clamp(16px, 4vw, 32px) 40px; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s; border-top: 1px solid var(--line); }
  .nav-panel.open { transform: none; opacity: 1; visibility: visible; transition: opacity .25s, transform .3s var(--ease); }
  .nav-menu { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-menu a { padding: 14px 14px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-panel .nav-cta-mobile { display: flex; margin-top: 20px; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 1181px) { .nav-cta-mobile { display: none; } }

/* -------------------------------------------------- Boutons */
.btn { --bg: var(--white); --fg: var(--ink); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 11px 20px;
  font: 650 .95rem/1.2 var(--font-sans); color: var(--fg); background: var(--bg); border: 1px solid var(--bd); border-radius: 12px;
  text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, background .2s, border-color .2s, color .2s; position: relative; -webkit-tap-highlight-color: transparent; }
.btn:hover { transform: translateY(-1px); color: var(--fg); border-color: var(--gold); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { --bg: linear-gradient(140deg, #3F66E3, #2C4FC4); --fg: #fff; --bd: transparent; background: var(--bg); box-shadow: var(--shadow-gold); }
.btn-primary:hover { color: #fff; box-shadow: 0 22px 44px -18px rgba(49,88,207,.55); border-color: transparent; }
.btn-dark { --bg: var(--navy); --fg: #fff; --bd: var(--navy); }
.btn-dark:hover { color: #fff; }
.btn-ghost { --bg: transparent; --bd: transparent; }
.btn-ghost:hover { background: rgba(11,16,32,.05); box-shadow: none; }
.btn-sm { min-height: 36px; padding: 7px 13px; font-size: .86rem; border-radius: 9px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn-danger { --fg: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: none; vertical-align: -4px; }

/* -------------------------------------------------- Cartes */
.card { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(18px, 2.4vw, 30px); box-shadow: var(--shadow-1); position: relative; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { color: inherit; }
.card-hover:hover, .card-link:hover .card, a.card:hover { box-shadow: var(--shadow-2); border-color: rgba(82,120,246,.5); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-flat { box-shadow: none; background: var(--white); }
.card-dark { background: var(--grad-deep); color: #EEF2FF; border-color: transparent; }
.card-dark h2, .card-dark h3 { color: #fff; }
.card-dark .muted { color: #DCE4FF; }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); margin-bottom: 16px; }
.feature-icon .icon { width: 24px; height: 24px; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }
.tilt-shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.55), transparent 45%); }
[data-tilt]:hover .tilt-shine { opacity: 1; }

/* -------------------------------------------------- Badges de statut */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 650 .76rem/1.3 var(--font-sans); letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(15,122,71,.18); }
.badge-dev { color: var(--warn); background: var(--warn-soft); border-color: rgba(143,86,0,.2); }
.badge-plan { color: var(--info); background: var(--info-soft); border-color: rgba(49,88,207,.2); }
.badge-na { color: var(--muted); background: var(--paper-2); border-color: var(--line); }
.badge-exp { color: var(--accent-ink); background: var(--accent-soft); border-color: rgba(75,56,168,.2); }
.badge-fict { color: #8A5A00; background: var(--warn-soft); border-color: rgba(138,90,0,.25); }

/* -------------------------------------------------- Alertes / encarts */
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
.callout .icon { margin-top: 2px; }
.callout p:last-child { margin: 0; }
.callout-info { background: var(--info-soft); border-color: rgba(49,88,207,.2); color: #1B3A86; }
.callout-warn { background: var(--warn-soft); border-color: rgba(143,86,0,.22); color: #5E3A00; }
.callout-ok { background: var(--ok-soft); border-color: rgba(15,122,71,.2); color: #0B5232; }
.callout-danger { background: var(--danger-soft); border-color: rgba(185,56,68,.2); color: #7A1A12; }
.callout strong { color: inherit; }

/* -------------------------------------------------- Héros */
.hero { padding: clamp(48px, 8vw, 110px) 0 clamp(40px, 6vw, 80px); position: relative; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.04; margin-bottom: .35em; }
.hero h1 em { font-style: normal; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
@supports not (background-clip: text) { .hero h1 em { color: var(--blue); background: none; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: var(--fs-small); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.page-hero { padding: clamp(40px, 6vw, 84px) 0 clamp(20px, 3vw, 36px); }
.page-hero h1 { max-width: 900px; }
.page-hero .lead { max-width: 760px; }
.breadcrumb { font-size: var(--fs-small); color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }

/* Maquette de console (héros) */
.console { border-radius: 22px; background: linear-gradient(170deg, #fff, #F3F6FD); border: 1px solid var(--line); box-shadow: var(--shadow-2); overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.7); font-size: .8rem; color: var(--muted); }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: #D9DFEB; display: inline-block; }
.console-body { padding: clamp(16px, 2.5vw, 24px); display: grid; gap: 14px; }
.console-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 420px) { .console-kpis { grid-template-columns: 1fr; } }

/* -------------------------------------------------- KPI */
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.kpi-label { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 650; }
.kpi-value { font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); font-weight: 750; color: var(--ink); margin-top: 4px; line-height: 1.2; overflow-wrap: anywhere; }
.kpi-hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.kpi.pos .kpi-value { color: var(--ok); }
.kpi.neg .kpi-value { color: var(--danger); }
.kpi.main { background: var(--grad-deep); border-color: transparent; }
.kpi.main .kpi-label, .kpi.main .kpi-hint { color: #E3E9FF; }
.kpi.main .kpi-value { color: #fff; }

/* -------------------------------------------------- Formulaires */
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.field .help { font-size: var(--fs-xs); color: var(--muted); }
.field .error { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 9px 12px; font: 500 1rem/1.3 var(--font-sans); color: var(--ink);
  background: var(--white); border: 1px solid var(--line-strong); border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.input:hover { border-color: #AEB8CC; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,88,207,.18); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(185,56,68,.12); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .unit { position: absolute; right: 12px; font-size: .85rem; color: var(--muted); pointer-events: none; }
input[type="range"] { width: 100%; accent-color: var(--gold); height: 28px; margin: 0; }
.check { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
.search { position: relative; }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 42px; }

/* -------------------------------------------------- Onglets */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tab { appearance: none; border: 0; background: none; padding: 11px 14px; font: 600 .92rem var(--font-sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--gold-ink); border-bottom-color: var(--gold); }
.tabpanel { padding-top: 18px; }
.tabpanel[hidden] { display: none; }

/* -------------------------------------------------- Accordéon (details) */
.accordion { display: grid; gap: 10px; }
.accordion details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.accordion details[open] { border-color: rgba(82,120,246,.45); box-shadow: var(--shadow-1); }
.accordion summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 650; position: relative; min-height: 44px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease); }
.accordion details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.accordion .acc-body { padding: 0 18px 18px; color: var(--ink-2); }
.accordion .acc-body p:last-child { margin: 0; }

/* -------------------------------------------------- Tableaux */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table caption { text-align: left; padding: 12px 14px; font-weight: 650; color: var(--ink-2); caption-side: top; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--paper); font-weight: 700; position: sticky; top: 0; }
.table td.n, .table th.n { text-align: right; white-space: nowrap; }
.table tbody tr:hover { background: #F7F9FF; }
.table tr:last-child td { border-bottom: 0; }
.table .neg { color: var(--danger); }
.table .pos { color: var(--ok); }
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table-stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 14px; text-align: right; }
  .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
}

/* -------------------------------------------------- Barres de progression */
.progress { height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3158CF, #7C8DF6); width: 0; transition: width .8s var(--ease); }
.progress.over > span { background: repeating-linear-gradient(45deg, var(--danger), var(--danger) 6px, #D04436 6px, #D04436 12px); }

/* -------------------------------------------------- Modale (dialog) */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-l); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 40px 80px -20px rgba(11,16,32,.45); background: var(--white); color: var(--ink); }
dialog.modal::backdrop { background: rgba(11,16,32,.45); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.3rem; margin: 0; }
.modal-body { padding: 20px 22px; display: grid; gap: 14px; overflow-y: auto; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* -------------------------------------------------- Toasts */
.toasts { position: fixed; z-index: 3000; right: 16px; bottom: 16px; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-2); font-size: .92rem; display: flex; gap: 10px; align-items: center; animation: toastIn .35s var(--ease); }
.toast.ok { background: #0B5232; } .toast.err { background: #7A1A12; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* -------------------------------------------------- Listes éditoriales */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2385560A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: step; position: relative; padding-left: 48px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 700; font-size: .9rem; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.dl dt { font-weight: 650; color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: 8px; } }
.todo { background: #FFF6D6; border: 1px dashed #B87A12; padding: 0 .3em; border-radius: 4px; color: #5E3A00; font-weight: 600; }

/* -------------------------------------------------- Pied de page */
.site-footer { position: relative; z-index: 2; margin-top: 40px; background: linear-gradient(180deg, var(--paper-2), #E9EEF8); color: var(--muted); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h2 { font: 700 .78rem/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .93rem; }
.footer-brand .brand { color: var(--ink); }
.footer-brand p { margin-top: 14px; max-width: 340px; font-size: .92rem; }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .84rem; }

/* -------------------------------------------------- Animations d'apparition */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; } .reveal[data-delay="2"] { transition-delay: .16s; } .reveal[data-delay="3"] { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* -------------------------------------------------- Graphiques SVG */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { font: 500 11px var(--font-sans); fill: var(--muted); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .zero-line { stroke: var(--line-strong); stroke-width: 1.2; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .84rem; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.chart-legend i.dash { background-image: linear-gradient(90deg, currentColor 50%, transparent 50%) !important; background-size: 6px 4px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--navy); color: #fff; padding: 8px 11px; border-radius: 9px; font-size: .8rem; line-height: 1.45; box-shadow: var(--shadow-2); white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .15s; }
.chart-tip.show { opacity: 1; }
.chart-title { font-weight: 650; font-size: .95rem; margin-bottom: 8px; }

/* -------------------------------------------------- Divers */
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip { appearance: none; border: 1px solid var(--line-strong); background: var(--white); color: var(--ink-2); padding: 7px 13px; border-radius: 99px; font: 600 .85rem var(--font-sans); cursor: pointer; min-height: 36px; transition: all .2s; }
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.platform-card { display: grid; gap: 12px; align-content: start; }
.platform-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.status-legend { display: flex; flex-wrap: wrap; gap: 10px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 26px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--paper); }
.split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.sticky-aside { position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 900px) { .sticky-aside { position: static; } }
.toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: .92rem; }
.toc a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); }
.toc a:hover { background: rgba(11,16,32,.05); }
mark { background: #DDE6FF; color: inherit; border-radius: 3px; padding: 0 2px; }

/* -------------------------------------------------- Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  #cursor-glow { display: none; }
}
body.motion-off *, body.motion-off *::before, body.motion-off *::after { animation: none !important; transition: none !important; }
body.motion-off .reveal { opacity: 1; transform: none; }
body.motion-off #cursor-glow { display: none; }

/* Mobile : effets allégés */
@media (max-width: 760px), (pointer: coarse) {
  .ambient::before, .ambient::after { filter: blur(40px); opacity: .4; }
  .grain { display: none; }
}

/* -------------------------------------------------- Impression / PDF */
@media print {
  .site-header, .site-footer, .ambient, .grain, #cursor-glow, .no-print, .toasts, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, .kpi, .table-wrap { box-shadow: none !important; border-color: #bbb !important; break-inside: avoid; }
  a { color: #000; }
  .print-only { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
.print-only { display: none; }

/* -------------------------------------------------- Séries graphiques (couleurs + motifs) */
:root { --c7: #9A3412; --c8: #475569; }
.s-s1 { stroke: var(--c1); } .s-s2 { stroke: var(--c2); } .s-s3 { stroke: var(--c3); } .s-s4 { stroke: var(--c4); }
.s-s5 { stroke: var(--c5); } .s-s6 { stroke: var(--c6); } .s-s7 { stroke: var(--c7); } .s-s8 { stroke: var(--c8); }
.chart path[class^="s-s"] { stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart path.dashed { stroke-dasharray: 6 5; stroke-width: 2; }
.f-s1 { fill: var(--c1); } .f-s2 { fill: var(--c2); } .f-s3 { fill: var(--c3); } .f-s4 { fill: var(--c4); }
.f-s5 { fill: var(--c5); } .f-s6 { fill: var(--c6); } .f-s7 { fill: var(--c7); } .f-s8 { fill: var(--c8); }
.chart rect.f-neg { fill: var(--c4); }
.bg-s1 { --c: var(--c1); } .bg-s2 { --c: var(--c2); } .bg-s3 { --c: var(--c3); } .bg-s4 { --c: var(--c4); }
.bg-s5 { --c: var(--c5); } .bg-s6 { --c: var(--c6); } .bg-s7 { --c: var(--c7); } .bg-s8 { --c: var(--c8); }
.chart-legend i { background: var(--c); }
.chart-legend i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.chart .area-s1 { fill: var(--c1); opacity: .08; }
.chart .guide { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart .slice { stroke: #fff; stroke-width: 2; transition: opacity .2s; }
.chart .slice:hover { opacity: .85; }
.chart .donut-total { font: 750 18px var(--font-sans); fill: var(--ink); }
.chart .donut-sub { font: 500 12px var(--font-sans); fill: var(--muted); }
.chart-data summary { cursor: pointer; color: var(--blue); margin-top: 8px; }

/* -------------------------------------------------- Laboratoire */
.lab-toolbar { display: grid; grid-template-columns: 1fr 260px auto; gap: 12px; align-items: end; }
@media (max-width: 860px) { .lab-toolbar { grid-template-columns: 1fr; } }
.lab-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 22px; }
.sim-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.sim-card h3 { font-family: var(--font-sans); font-size: 1.06rem; margin: 0; padding-right: 40px; }
.sim-card h3 a { color: var(--ink); text-decoration: none; }
.sim-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sim-card:hover { border-color: rgba(82,120,246,.5); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.sim-card:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.sim-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.sim-card .cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.sim-card .tag { font-size: .72rem; font-weight: 650; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; }
.fav-btn { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 1.2rem; color: var(--line-strong); display: grid; place-items: center; }
.fav-btn:hover { border-color: var(--line); background: var(--white); }
.fav-btn[aria-pressed="true"] { color: var(--gold); }
.lab-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.lab-head h2 { margin: 6px 0; }
.lab-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .lab-layout { grid-template-columns: minmax(0, 1fr); } }
.lab-layout > *, .lab-form > *, .field { min-width: 0; }
.lab-form { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
@media (max-width: 980px) { .lab-form { position: static; max-height: none; } }
.lab-form .field-row { display: grid; gap: 6px; }
.lab-form details.more > summary { cursor: pointer; font-weight: 650; color: var(--blue); padding: 6px 0; min-height: 36px; }
.lab-form details.more[open] > summary { margin-bottom: 10px; }
.lab-form details.more > .stack { display: grid; gap: 16px; }
.rows-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0; min-width: 0; }
.rows-edit legend { font-weight: 650; font-size: .92rem; padding: 0 6px; color: var(--ink-2); }
.row-edit { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin-bottom: 8px; position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-edit .cell { display: grid; gap: 3px; min-width: 0; }
.row-edit .cell.wide { grid-column: 1 / -1; }
.row-edit .cell label { font-size: .74rem; font-weight: 600; color: var(--muted); }
.row-edit .input { min-height: 40px; padding: 7px 9px; font-size: .95rem; }
.row-edit .row-del { grid-column: 1 / -1; justify-self: end; }
.scen-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); margin-bottom: 18px; }
.scen-bar .label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-right: 4px; }
.lab-summary { font-size: 1.08rem; font-weight: 600; color: var(--ink); margin: 0 0 14px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin-bottom: 18px; }
.chart-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); margin-bottom: 10px; }
.chart-card { padding: 16px; }
.heat { border-collapse: collapse; font-size: .82rem; }
.heat td, .heat th { padding: 8px; text-align: right; border: 1px solid #fff; white-space: nowrap; }
.heat .h0 { background: #FCE8E6; } .heat .h1 { background: #FBF0DA; } .heat .h2 { background: #F1F3F8; } .heat .h3 { background: #E2F3EA; } .heat .h4 { background: #C9EAD7; }
.lab-disclaimer { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 18px; }
@media print {
  .lab-form, .scen-bar, .tabs, #lab-catalog, .lab-head .no-print { display: none !important; }
  .lab-layout { display: block; }
  .print-keep[hidden] { display: block !important; }
  .chart-data { display: none; }
}

/* -------------------------------------------------- Démonstration */
.demo-banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: var(--radius); background: repeating-linear-gradient(135deg, var(--accent-soft), var(--accent-soft) 12px, #E6E0FB 12px, #E6E0FB 24px); border: 1px solid rgba(75,56,168,.3); color: #3A2A8A; margin-bottom: 16px; }
.demo-banner strong { letter-spacing: .04em; }
.demo-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 640px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--white); box-shadow: var(--shadow-2); overflow: hidden; }
.demo-shell > * { min-width: 0; }
.demo-side { background: linear-gradient(180deg, #FFFFFF, #F3F6FD); color: var(--ink-2); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.demo-side .brand { color: var(--ink); padding: 4px 8px 16px; font-size: .95rem; }
.demo-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.demo-nav button { width: 100%; text-align: left; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); font: 550 .92rem var(--font-sans); cursor: pointer; min-height: 44px; }
.demo-nav button:hover { background: rgba(49,88,207,.07); color: var(--blue); }
.demo-nav button[aria-current="true"] { background: var(--blue-soft); color: var(--blue); }
.demo-nav .icon { width: 18px; height: 18px; }
.demo-main { padding: clamp(14px, 2.4vw, 26px); min-width: 0; background: var(--paper); }
.demo-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.demo-top h2 { margin: 0; font-size: 1.5rem; }
.demo-search { min-width: min(100%, 260px); flex: 1; max-width: 380px; }
.demo-list { display: grid; gap: 8px; }
.demo-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 11px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.demo-item .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .85rem; }
.demo-item .meta { font-size: .8rem; color: var(--muted); }
.demo-item .amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.demo-item .amt.pos { color: var(--ok); } .demo-item .amt.neg { color: var(--ink); }
.demo-item .acts { display: flex; gap: 4px; }
@media (max-width: 560px) { .demo-item { grid-template-columns: auto 1fr auto; } .demo-item .acts { grid-column: 1 / -1; justify-content: flex-end; } }
.demo-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; margin-bottom: 14px; }
.acc-color { width: 12px; height: 12px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 6px; }
.c-blue { background: #3158CF; } .c-gold { background: #B87A12; } .c-green { background: #0F7A47; } .c-red { background: #B42318; } .c-violet { background: #6B4FBB; } .c-teal { background: #0E7490; } .c-slate { background: #475569; }
@media (max-width: 860px) {
  .demo-shell { grid-template-columns: 1fr; }
  .demo-side { padding: 10px; }
  .demo-side .brand { display: none; }
  .demo-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .demo-nav button { white-space: nowrap; }
}
.tour-pop { position: fixed; z-index: 2500; max-width: min(340px, calc(100vw - 24px)); background: var(--navy); color: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.tour-pop h3 { color: #fff; font-size: 1.05rem; margin: 0 0 6px; }
.tour-pop p { color: #D6DBE4; font-size: .92rem; margin: 0 0 12px; }
.tour-pop .btn { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.tour-hl { outline: 3px solid var(--brand) !important; outline-offset: 4px; border-radius: 10px; position: relative; z-index: 2400; }
.console .console-kpis .kpi-value { font-size: clamp(.98rem, .85rem + .45vw, 1.2rem); white-space: nowrap; }
.console .console-kpis .kpi { padding: 12px; }
[tabindex="-1"]:focus:not(:focus-visible), h2[tabindex="-1"]:focus { outline: none; }
.site-footer .brand-sub { color: var(--muted); }

/* ==========================================================================
   KALIX — composants ajoutés pour le site de présentation
   ========================================================================== */

/* Mise en page à deux colonnes */
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.split-2-rev > :first-child { order: 0; }
@media (max-width: 900px) { .split-2 { grid-template-columns: minmax(0, 1fr); } }

/* Boutons sur fond coloré */
.btn-light { --bg: #fff; --fg: var(--blue); --bd: transparent; background: #fff; color: var(--blue); }
.btn-light:hover { color: #1F3FA8; box-shadow: 0 18px 36px -18px rgba(0,0,0,.45); }
.btn-outline-light { --bg: transparent; --fg: #fff; --bd: rgba(255,255,255,.65); background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }

/* Héros : cartes flottantes */
.hero-visual { position: relative; }
.float-card { position: absolute; display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-3); font-size: .9rem; }
.float-card .feature-icon { margin: 0; width: 40px; height: 40px; }
.float-card-a { left: -34px; bottom: -58px; animation: float 8s ease-in-out infinite; }
.float-card-b { right: -14px; top: -20px; animation: float 9s ease-in-out -3s infinite; }
@media (max-width: 1100px) { .float-card-a { left: -8px; } .float-card-b { right: -4px; } }
@media (max-width: 640px) { .float-card { display: none; } }

/* Aperçu à onglets */
.preview .tabs { margin-bottom: 16px; }
.preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: center; }
@media (max-width: 800px) { .preview-grid { grid-template-columns: minmax(0, 1fr); } }
.mini-chart { margin: 0; }
.mini-chart svg { width: 100%; height: auto; display: block; }

/* Schémas de flux */
.flow { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; justify-content: center; }
.flow-step { flex: 1 1 140px; min-width: 130px; display: grid; gap: 4px; align-content: start; justify-items: start; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.flow-step .feature-icon { margin-bottom: 8px; }
.flow-step-soft { background: var(--accent-soft); border-color: rgba(75,56,168,.25); }
.flow-step-dashed { background: transparent; border: 2px dashed var(--line-strong); box-shadow: none; }
.flow-arrow { align-self: center; color: var(--blue); display: grid; place-items: center; }
.flow-arrow .icon { width: 22px; height: 22px; }
@media (max-width: 700px) { .flow-arrow { transform: rotate(90deg); flex-basis: 100%; height: 22px; } }
.schema { margin: 0; }
.schema figcaption h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Listes */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F7A55' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.values li { display: flex; gap: 14px; align-items: center; }
.values .feature-icon { margin: 0; flex: none; }

/* Notions (page Découvrir) */
.concept { display: grid; gap: 4px; align-content: start; }
.concept-art { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; min-height: 96px; display: grid; gap: 8px; align-content: center; }
.mini-row { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.mini-row > span:nth-child(2), .mini-row > span:only-of-type { flex: 1; }
.mini-row b { margin-left: auto; }
.dot-c { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.num.pos, b.pos { color: var(--ok); } .num.neg, b.neg { color: var(--danger); }
.concept-art .kpi { box-shadow: none; }

/* Fiches de fonctionnalités */
.toc-inline ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.toc-inline a { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; transition: border-color .2s, color .2s, background .2s; }
.toc-inline a:hover { border-color: var(--brand); color: var(--blue); background: var(--blue-soft); }
.legend-status { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 12px 28px; }
.legend-status li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: start; }
.legend-status li .badge { justify-self: start; }
@media (max-width: 520px) { .legend-status li { grid-template-columns: 1fr; gap: 4px; } }
.fiches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.fiche { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); transition: box-shadow var(--dur-base) var(--ease), border-color var(--dur-base); scroll-margin-top: calc(var(--header-h) + 20px); }
.fiche:hover { box-shadow: var(--shadow-2); }
.fiche[open] { border-color: rgba(82,120,246,.5); box-shadow: var(--shadow-2); }
.fiche:target { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(82,120,246,.25); }
.fiche summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; min-height: 44px; }
.fiche summary::-webkit-details-marker { display: none; }
.fiche summary::after { content: ""; margin-left: auto; flex: none; width: 10px; height: 10px; margin-top: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--dur-base) var(--ease); }
.fiche[open] summary::after { transform: rotate(-135deg); margin-top: 12px; }
.fiche .feature-icon { margin: 0; flex: none; }
.fiche-head { display: grid; gap: 4px; min-width: 0; }
.fiche-name { font-weight: 700; display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fiche-short { color: var(--muted); font-size: .95rem; }
.fiche-body { padding: 0 18px 18px 78px; border-top: 1px dashed var(--line); margin-top: 0; }
.fiche-body dl { margin: 14px 0 0; display: grid; gap: 4px; }
.fiche-body dt { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-top: 10px; }
.fiche-body dd { margin: 0; color: var(--ink-2); }
.fiche-link { margin: 14px 0 0; font-weight: 600; }
@media (max-width: 520px) { .fiche-body { padding-left: 18px; } }

/* Compatibilité */
.device-card { display: grid; align-content: start; }
.device-art { background: linear-gradient(160deg, var(--blue-soft), var(--accent-soft)); border-radius: var(--radius); padding: 12px; margin-bottom: 18px; display: grid; place-items: center; height: 170px; }
.device-art svg { height: 100%; width: auto; max-width: 100%; }
.spec { margin: 14px 0 0; display: grid; gap: 2px; font-size: .94rem; }
.spec dt { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-top: 12px; }
.spec dd { margin: 0; color: var(--ink-2); }
.spec ul { margin: 0; padding-left: 1.1em; }
.device-mini { display: grid; gap: 10px; justify-items: start; padding: 16px; }
.device-mini-art { width: 100%; height: 84px; background: linear-gradient(160deg, var(--blue-soft), var(--accent-soft)); border-radius: 12px; display: grid; place-items: center; padding: 6px; }
.device-mini-art svg { height: 100%; width: auto; }
.dl-card { display: grid; gap: 4px; align-content: start; }

/* Bandeaux d'appel à l'action */
.final-cta { text-align: center; background: var(--grad-deep); color: #EEF2FF; border-radius: var(--radius-l); padding: clamp(36px, 6vw, 72px) clamp(20px, 4vw, 48px); position: relative; overflow: hidden; box-shadow: var(--shadow-4); }
.final-cta::before, .final-cta::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.final-cta::before { width: 360px; height: 360px; right: -90px; top: -150px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); }
.final-cta::after { width: 300px; height: 300px; left: -80px; bottom: -150px; background: radial-gradient(circle, rgba(139,117,232,.55), transparent 70%); }
.final-cta > * { position: relative; z-index: 1; }
.final-cta h2 { color: #fff; max-width: 680px; margin-inline: auto; }
.final-cta .lead { color: #EEF2FF; max-width: 600px; margin-inline: auto; }
.final-cta a:not(.btn) { color: #fff; }
.sim-cta { padding: clamp(28px, 5vw, 56px); }
.sim-cta .lead { max-width: 720px; }

/* Démonstration IA illustrative */
.ia-demo { display: grid; gap: 16px; }
.ia-questions { display: flex; flex-wrap: wrap; gap: 8px; }
.ia-thread { display: grid; gap: 12px; }
.ia-bubble { max-width: 640px; padding: 14px 16px; border-radius: 16px; }
.ia-user { justify-self: end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.ia-bot { justify-self: start; background: var(--paper-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; display: grid; gap: 8px; }
.ia-bot p { margin: 0 0 8px; }

/* Accueil du simulateur */
.sim-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
@media (max-width: 900px) { .sim-intro { grid-template-columns: minmax(0, 1fr); } }
.sim-intro[hidden], #demo-app[hidden] { display: none; }
.error-text { color: var(--danger); font-weight: 600; }

/* Recherche : bouton d'effacement */
.search-clear { position: absolute; right: 6px; bottom: 5px; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.search-clear:hover { background: var(--paper-2); color: var(--ink); }
.search-clear[hidden] { display: none; }
.search .input[type="search"]::-webkit-search-cancel-button { display: none; }
.search .input { padding-right: 44px; }


/* ---- Maquettes conceptuelles (ordinateur + mobile) ---- */
.concept-wrap { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: end; }
.concept-fig { margin: 0; }
.frame-laptop { border-radius: 16px 16px 6px 6px; border: 10px solid #1B2438; border-bottom-width: 14px; background: #fff; box-shadow: var(--shadow-2); overflow: hidden; }
.frame-laptop-base { height: 12px; margin: 0 -3%; background: linear-gradient(#D5DBEA, #A9B3C9); border-radius: 0 0 16px 16px; }
.frame-phone { max-width: 280px; margin-inline: auto; border-radius: 36px; border: 9px solid #1B2438; background: #fff; box-shadow: var(--shadow-2); overflow: hidden; position: relative; }
.frame-phone::before { content: ""; position: absolute; top: 7px; left: 50%; width: 64px; height: 7px; margin-left: -32px; border-radius: 6px; background: #1B2438; z-index: 1; }
.screen { padding: 16px; display: grid; gap: 12px; font-size: .86rem; background: var(--paper); }
.frame-phone .screen { padding: 30px 14px 18px; min-height: 380px; align-content: start; }
.screen-title { font-size: 1rem; }
.screen-side { grid-template-columns: 138px minmax(0, 1fr); gap: 16px; padding: 0; }
.screen-nav { display: grid; align-content: start; gap: 4px; padding: 16px 10px; background: #fff; border-right: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.screen-nav span { padding: 7px 10px; border-radius: 9px; }
.screen-nav .on { background: var(--blue-soft); color: var(--blue); }
.screen-nav .screen-logo { display: flex; align-items: center; gap: 8px; padding: 0 6px 12px; color: var(--ink); font-weight: 800; letter-spacing: .08em; }
.screen-logo .brand-mark { width: 22px; height: 22px; border-radius: 7px; }
.screen-main { padding: 16px 16px 18px 0; display: grid; gap: 12px; }
.screen-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.screen-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.screen-list li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pos-text { color: var(--ok); font-weight: 700; } .neg-text { color: var(--danger); font-weight: 700; }
@media (max-width: 860px) {
  .concept-wrap { grid-template-columns: 1fr; }
  .screen-side { grid-template-columns: 1fr; } .screen-nav { display: none; } .screen-main { padding: 14px; }
  .screen-cols { grid-template-columns: 1fr; }
  .frame-laptop { border-width: 7px; border-bottom-width: 10px; }
}

/* ---- Sélecteur de langue ---- */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; font-size: .85rem; cursor: pointer; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::marker { content: ""; }
.lang-switch summary:hover { border-color: var(--brand); }
.lang-switch summary .icon { width: 18px; height: 18px; }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 176px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); }
.lang-switch a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-weight: 600; text-decoration: none; }
.lang-switch a:hover { background: var(--blue-soft); color: var(--blue); }
.lang-switch a[aria-current] { background: var(--blue-soft); color: var(--blue); }
.screen-list .num { white-space: nowrap; }

html[lang="fr"] .lang-note { display: none; }
