/* YENA BUSINESS — design system v2
   Références : TeamHub (cartes blanches, menthe), CRM bleu immersif (fond animé), Nexora (sidebar claire),
   Order list (cartes de statut colorées), mode sombre type "Hello Barbara". Mobile d'abord.
   Thèmes : clair (défaut), sombre, ou automatique selon le téléphone. */

/* ---------------- Thèmes ---------------- */
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --primary: #16a34a;
  --primary-2: #22c55e;
  --primary-3: #4ade80;
  --primary-deep: #0d4a2c;
  --primary-ink: #ffffff;
  --lime: #c6f36b;
  --amber: #f59e0b;
  --orange: #fb923c;
  --violet: #8b5cf6;
  --sky: #38bdf8;
  --red: #ef4444;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --bg: #eef4f0;
  --bg-2: #e2ede6;
  --card: rgba(255, 255, 255, .82);
  --card-solid: #ffffff;
  --ink: #0f1c16;
  --ink-2: #33433b;
  --muted: #6a7a71;
  --line: #e2eae5;
  --soft: #f3f7f4;
  --field: #f6f9f7;
  --primary-soft: #dcf7e5;
  --primary-soft-ink: #0f6b34;
  --strong: #0f1c16;          /* boutons neutres forts, ligne "total" */
  --strong-ink: #ffffff;
  --rail: rgba(255, 255, 255, .86);
  --rail-ink: #46564d;
  --shadow: 0 1px 2px rgba(15, 28, 22, .04), 0 10px 30px rgba(15, 28, 22, .06);
  --shadow-lg: 0 24px 60px rgba(15, 28, 22, .14);
  --chart-bar: #d6e6dc;
  --chart-gp: #0f4f2e;
  --chart-grid: #e4ebe6;
  --ok-bg: #dcfce7; --ok-ink: #15803d;
  --warn-bg: #fef3c7; --warn-ink: #b45309;
  --bad-bg: #fee2e2; --bad-ink: #dc2626;
  --info-bg: #e0f2fe; --info-ink: #0369a1;
  --blob-1: #86efac; --blob-2: #bbf7d0; --blob-3: #a7f3d0; --blob-4: #d9f99d;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #080c0a;
  --bg-2: #0d1310;
  --card: rgba(20, 26, 23, .82);
  --card-solid: #141a17;
  --ink: #eaf2ec;
  --ink-2: #c4d2c9;
  --muted: #8fa097;
  --line: #233029;
  --soft: #1a221e;
  --field: #18201c;
  --primary-soft: rgba(34, 197, 94, .16);
  --primary-soft-ink: #86efac;
  --strong: #eaf2ec;
  --strong-ink: #0b100d;
  --rail: rgba(16, 21, 18, .9);
  --rail-ink: #a8b7ae;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --chart-bar: #26332c;
  --chart-gp: #c6f36b;
  --chart-grid: #1f2a24;
  --ok-bg: rgba(34, 197, 94, .16); --ok-ink: #86efac;
  --warn-bg: rgba(245, 158, 11, .16); --warn-ink: #fcd34d;
  --bad-bg: rgba(239, 68, 68, .16); --bad-ink: #fca5a5;
  --info-bg: rgba(56, 189, 248, .14); --info-ink: #7dd3fc;
  --blob-1: #14532d; --blob-2: #166534; --blob-3: #064e3b; --blob-4: #365314;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #080c0a; --bg-2: #0d1310; --card: rgba(20, 26, 23, .82); --card-solid: #141a17; --ink: #eaf2ec; --ink-2: #c4d2c9; --muted: #8fa097;
    --line: #233029; --soft: #1a221e; --field: #18201c; --primary-soft: rgba(34, 197, 94, .16); --primary-soft-ink: #86efac; --strong: #eaf2ec; --strong-ink: #0b100d;
    --rail: rgba(16, 21, 18, .9); --rail-ink: #a8b7ae; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    --chart-bar: #26332c; --chart-gp: #c6f36b; --chart-grid: #1f2a24;
    --ok-bg: rgba(34, 197, 94, .16); --ok-ink: #86efac; --warn-bg: rgba(245, 158, 11, .16); --warn-ink: #fcd34d; --bad-bg: rgba(239, 68, 68, .16); --bad-ink: #fca5a5; --info-bg: rgba(56, 189, 248, .14); --info-ink: #7dd3fc;
    --blob-1: #14532d; --blob-2: #166534; --blob-3: #064e3b; --blob-4: #365314;
    color-scheme: dark;
  }
}

/* ---------------- Base ---------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 1.65rem; font-weight: 800; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.hide-sm { display: none; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.only-sm { display: block; }
.only-lg { display: none; }
@media (min-width: 720px) { .only-sm { display: none; } .only-lg { display: block; } }

/* ---------------- Fond immersif animé ---------------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(1200px 700px at 85% -10%, var(--bg-2), transparent 60%), var(--bg); }
.ambient i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.ambient i:nth-child(1) { width: 520px; height: 520px; background: var(--blob-1); top: -160px; right: -120px; animation: drift1 26s ease-in-out infinite; }
.ambient i:nth-child(2) { width: 420px; height: 420px; background: var(--blob-2); bottom: -140px; left: -120px; animation: drift2 32s ease-in-out infinite; }
.ambient i:nth-child(3) { width: 300px; height: 300px; background: var(--blob-3); top: 40%; left: 45%; animation: drift3 38s ease-in-out infinite; opacity: .35; }
.ambient i:nth-child(4) { width: 240px; height: 240px; background: var(--blob-4); top: 12%; left: 8%; animation: drift2 30s ease-in-out infinite reverse; opacity: .35; }
.ambient .grid { position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1.2px); background-size: 26px 26px; mask-image: radial-gradient(ellipse at 70% 10%, #000 0%, transparent 55%); opacity: .5; }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-80px, 60px) scale(1.12); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(90px, -50px) scale(.92); } }
@keyframes drift3 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-120px, -60px); } 66% { transform: translate(80px, 70px); } }

/* ---------------- Coque ---------------- */
.shell { min-height: 100vh; }
.rail { display: none; }
.main { padding: 14px 16px 108px; max-width: 1320px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.topbar .brand-sm { display: flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; }
.topbar .spacer { flex: 1; }
.topbar .search { display: none; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; display: grid; place-items: center; font-weight: 800; text-decoration: none; flex: none; font-size: .9rem; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--card-solid); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); text-decoration: none; cursor: pointer; flex: none; padding: 0; }
.icon-btn:hover { border-color: var(--primary-3); }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 35%, transparent); flex: none; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-toggle .i-sun { display: none; } :root:not([data-theme]) .theme-toggle .i-moon { display: block; } }

/* Barre d'onglets mobile */
.tabbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; background: var(--rail); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 24px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px; box-shadow: var(--shadow-lg); }
.tabbar a { display: grid; justify-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; padding: 6px 0; border-radius: 14px; }
.tabbar a.on { color: var(--primary); }
.tabbar a.plus { align-self: center; justify-self: center; width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; display: grid; place-items: center; margin-top: -30px; box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 45%, transparent); border: 4px solid var(--bg); }
.tabbar a.plus .icon { width: 26px; height: 26px; stroke-width: 2.4; }

.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(5, 15, 10, .45); display: none; }
.drawer.open { display: block; }
.drawer nav { position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 86vw); background: var(--card-solid); padding: 20px 14px; overflow-y: auto; }
.drawer .drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.nav-group { margin: 16px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.nav a, .nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--rail-ink); text-decoration: none; font: 600 .88rem var(--font); background: none; border: 0; width: 100%; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--soft); color: var(--ink); }
.nav a.on { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
.nav .soon { margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.promo { margin: 16px 4px 8px; border-radius: 20px; padding: 16px; background: linear-gradient(150deg, var(--primary-deep), var(--primary)); color: #fff; display: grid; gap: 8px; }
.promo p { font-size: .8rem; color: #d1fae5; }
.promo .btn { background: #fff; color: var(--primary-deep); min-height: 38px; font-size: .8rem; }

@media (min-width: 960px) {
  .hide-sm { display: initial; }
  .hide-lg { display: none !important; }
  .shell { display: grid; grid-template-columns: 260px 1fr; }
  .rail { display: flex; flex-direction: column; position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px; background: var(--rail); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px 12px; overflow-y: auto; box-shadow: var(--shadow); }
  .rail .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 4px 10px 10px; text-decoration: none; }
  .rail .brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
  .rail .bottom { margin-top: auto; }
  .main { padding: 22px 28px 40px; }
  .topbar .search { display: flex; align-items: center; gap: 8px; background: var(--card-solid); border: 1px solid var(--line); border-radius: 99px; padding: 0 16px; height: 44px; width: min(380px, 40vw); color: var(--muted); }
  .topbar .search input { border: 0; background: transparent; min-height: 0; padding: 0; outline: none !important; }
  .tabbar { display: none; }
}

/* ---------------- Cartes ---------------- */
.card { background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .chip-ico { width: 36px; height: 36px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-soft-ink); display: grid; place-items: center; flex: none; }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.kpi { background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 6px; min-width: 0; position: relative; overflow: hidden; }
.kpi .lbl { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi .lbl .chip-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary-soft-ink); flex: none; }
.kpi .val { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .sub { font-size: .75rem; color: var(--muted); }
/* "dark" = carte principale en dégradé vert (comme la carte bleue des références) */
.kpi.dark { background: linear-gradient(145deg, var(--primary-2), var(--primary) 55%, var(--primary-deep)); color: #fff; border-color: transparent; box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 35%, transparent); }
.kpi.dark::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.kpi.dark .lbl, .kpi.dark .sub { color: #dcfce7; }
.kpi.dark .lbl .chip-ico { background: rgba(255, 255, 255, .2); color: #fff; }
.kpi.lime { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.kpi.lime .lbl, .kpi.lime .sub { color: var(--primary-soft-ink); }
.kpi.lime .lbl .chip-ico { background: var(--card-solid); }

/* Cartes de statut (style "Order list") */
.status-cards { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .status-cards { grid-template-columns: repeat(4, 1fr); } }
.status-card { border-radius: 20px; overflow: hidden; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; display: block; }
.status-card .band { padding: 8px 14px; font-size: .8rem; font-weight: 700; color: #fff; }
.status-card .body { padding: 10px 14px 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.status-card .body b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.status-card .body span { font-size: .78rem; color: var(--muted); }
.status-card.ok .band { background: linear-gradient(90deg, #22c55e, #16a34a); }
.status-card.warn .band { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.status-card.bad .band { background: linear-gradient(90deg, #fb7185, #ef4444); }
.status-card.grey .band { background: linear-gradient(90deg, #94a3b8, #64748b); }

/* Héros : salutation + carte trésorerie */
.hero { background: linear-gradient(140deg, var(--primary-deep) 0%, #0f5c35 45%, var(--primary) 120%); border-radius: var(--r-xl); color: #fff; padding: 22px; position: relative; overflow: hidden; display: grid; gap: 18px; box-shadow: 0 20px 50px color-mix(in srgb, var(--primary-deep) 40%, transparent); }
.hero::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .05); top: -200px; right: -120px; }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(198, 243, 107, .45), transparent 70%); bottom: -90px; left: 30%; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 1.5rem; }
.hero .muted { color: #bfe7cf; }
.bankcard { background: linear-gradient(135deg, #5ee59a, #22c55e 55%, #16a34a); color: #052e16; border-radius: 22px; padding: 18px 20px; position: relative; box-shadow: 0 -10px 0 -4px var(--lime), 0 18px 40px rgba(0, 0, 0, .25); margin-top: 10px; overflow: hidden; }
.bankcard::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .18); right: -60px; bottom: -90px; }
.bankcard .lbl { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
.bankcard .big { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; position: relative; z-index: 1; }
.bankcard .row { display: flex; justify-content: space-between; align-items: end; margin-top: 14px; font-size: .8rem; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.bankcard .circles { position: absolute; top: 16px; right: 18px; display: flex; z-index: 1; }
.bankcard .circles i { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.bankcard .circles i + i { margin-left: -10px; background: rgba(255, 255, 255, .85); }
.hero-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hero-quick div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.hero-quick b { display: block; font-size: .95rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-quick span { font-size: .72rem; color: #bfe7cf; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.1fr 1fr; align-items: center; padding: 30px; } }

/* Pilules */
.pills { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card-solid); border: 1px solid var(--line); padding: 4px; border-radius: 99px; box-shadow: var(--shadow); }
.pills a { padding: 7px 14px; border-radius: 99px; font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; }
.pills a.on { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; }
.pills.light a.on { background: var(--primary-soft); color: var(--primary-soft-ink); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 14px; }
.toolbar .spacer { flex: 1; }
.toolbar > #custom-range { flex-basis: 100%; order: 10; margin-top: 0 !important; max-width: 520px; }
.toolbar > .scroll-x { max-width: 100%; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 99px; border: 1px solid transparent; font: 700 .88rem var(--font); cursor: pointer; text-decoration: none; background: var(--strong); color: var(--strong-ink); transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.lime { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.ghost { background: var(--card-solid); color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--bad-bg); color: var(--bad-ink); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .8rem; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Formulaires */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .lbl-t { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: .75rem; color: var(--muted); }
input, select, textarea { font: 500 .95rem var(--font); color: var(--ink); width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); transition: border .15s, box-shadow .15s; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-2) 18%, transparent); background: var(--card-solid); }
input[type=checkbox], input[type=radio] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pw-eye:hover { color: var(--primary); background: var(--soft); }
.pw-eye .i-eye-off { display: none; }
.pw-eye[aria-pressed="true"] .i-eye { display: none; }
.pw-eye[aria-pressed="true"] .i-eye-off { display: block; }
.row2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); font-size: .85rem; font-weight: 600; cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--primary-soft); color: var(--primary-soft-ink); border-color: var(--primary-2); }
.lines { display: grid; gap: 10px; }
.line-item { display: grid; gap: 8px; grid-template-columns: 1fr 90px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.line-item .full { grid-column: 1 / -1; }
.line-item .rm { background: none; border: 0; color: var(--bad-ink); font: 700 .8rem var(--font); cursor: pointer; justify-self: end; }
@media (min-width: 720px) { .line-item { grid-template-columns: 2fr 90px 150px auto; align-items: center; } .line-item .full { grid-column: auto; } }
.totals { background: linear-gradient(140deg, var(--primary-deep), #0f5c35); color: #fff; border-radius: 18px; padding: 14px 16px; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals .big { font-size: 1.25rem; font-weight: 800; color: var(--lime); }

/* Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--soft); }
th:first-child { border-top-left-radius: 12px; } th:last-child { border-top-right-radius: 12px; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 40%, transparent); }
td a { text-decoration: none; font-weight: 700; }
tr.cancelled td { color: var(--muted); text-decoration: line-through; }

/* Listes */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
.list-item .ava { width: 42px; height: 42px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; font-weight: 800; color: var(--primary-soft-ink); flex: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .grow span { font-size: .78rem; color: var(--muted); }
.amount-pos { color: var(--ok-ink); font-weight: 800; }
.amount-neg { color: var(--bad-ink); font-weight: 800; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }
.badge.dark { background: var(--info-bg); color: var(--info-ink); }
.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-soft-ink); font-weight: 700; }

/* Messages */
.flash { border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: .9rem; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.flash.success { background: var(--ok-bg); color: var(--ok-ink); }
.flash.error { background: var(--bad-bg); color: var(--bad-ink); }
.flash.info { background: var(--info-bg); color: var(--info-ink); }
.note { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: .84rem; color: var(--ink-2); }
.note.lime { background: var(--primary-soft); color: var(--primary-soft-ink); border-color: transparent; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }

/* Graphiques */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); font-weight: 600; }
.chart .c-grid { stroke: var(--chart-grid); }
.chart .c-bar { fill: var(--chart-bar); }
.chart .c-gp { fill: var(--chart-gp); }
.chart .c-track { stroke: var(--soft); }
.chart .val-pill rect { fill: var(--strong); }
.chart .val-pill text { fill: var(--strong-ink); font-weight: 800; }
.chart .c-center { fill: var(--ink); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw-primary { background: var(--primary-2); } .sw-gp { background: var(--chart-gp); } .sw-strong { background: var(--strong); } .sw-lime { background: var(--lime); } .sw-muted { background: var(--line); }
.bars-h { display: grid; gap: 12px; }
.bar-h .top { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; margin-bottom: 6px; font-weight: 600; }
.bar-h .track { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar-h .fill { height: 100%; border-radius: 99px; background: var(--primary-2); }
.bar-h .fill.lime { background: linear-gradient(90deg, var(--primary-3), var(--primary)); }
.bar-h .fill.dark { background: var(--chart-gp); }
.donut-wrap { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; }
.donut-legend { display: grid; gap: 8px; font-size: .84rem; min-width: 0; }
.donut-legend div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend b { margin-left: auto; white-space: nowrap; padding-left: 8px; }
@media (max-width: 520px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } .donut-legend { width: 100%; } }

/* Cascades */
.flow { display: grid; gap: 8px; }
.flow-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--soft); font-size: .88rem; font-weight: 500; }
.flow-row.total { background: var(--strong); color: var(--strong-ink); font-weight: 800; }
.flow-row.total.lime { background: var(--primary-soft); color: var(--primary-soft-ink); }
.flow-row .minus { color: var(--bad-ink); }
.flow-row.total .minus { color: inherit; }

.insight { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.insight:last-child { border-bottom: 0; }
.insight .dot { width: 28px; height: 28px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-ink); }
.insight.warn .dot { background: var(--warn-bg); color: var(--warn-ink); }
.insight.bad .dot { background: var(--bad-bg); color: var(--bad-ink); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
.kcol { background: color-mix(in srgb, var(--card) 60%, transparent); border: 1px dashed var(--line); border-radius: 22px; padding: 12px; min-height: 220px; scroll-snap-align: start; display: grid; align-content: start; gap: 10px; }
.kcol.over { border-color: var(--primary-2); background: var(--primary-soft); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .88rem; padding: 2px 4px; }
.kcard { background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); display: grid; gap: 6px; cursor: grab; }
.kcard select { min-height: 36px; padding: 4px 10px; font-size: .8rem; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-head .spacer { flex: 1; }
.page-head p { margin-top: 2px; }
.crumbs { font-size: .78rem; color: var(--muted); font-weight: 600; }

.receipt { max-width: 420px; margin: 0 auto; background: var(--card-solid); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* Guide en étapes (tuto) */
.steps { display: grid; gap: 12px; counter-reset: st; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.step .n { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.step p { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { font: 700 .85rem var(--font); padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--card-solid); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; border-color: transparent; }
.tabpanel[hidden] { display: none; }
.phone-mock { width: 200px; height: 360px; border-radius: 32px; border: 8px solid var(--strong); background: var(--bg); margin: 0 auto; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.phone-mock .notch { width: 80px; height: 18px; background: var(--strong); border-radius: 0 0 12px 12px; margin: 0 auto; }
.phone-mock .screen { padding: 14px 10px; display: grid; gap: 8px; }
.phone-mock .menu { background: var(--card-solid); border-radius: 12px; padding: 8px; font-size: .7rem; display: grid; gap: 6px; box-shadow: var(--shadow); }
.phone-mock .menu div { padding: 6px 8px; border-radius: 8px; }
.phone-mock .menu .hl { background: var(--primary-soft); color: var(--primary-soft-ink); font-weight: 700; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-2) 50%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

@media print {
  body { background: #fff; color: #000; }
  .ambient, .rail, .tabbar, .topbar, .no-print, .flash { display: none !important; }
  .shell { display: block; } .main { padding: 0; }
  .card, .kpi, .receipt { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; backdrop-filter: none; }
}

/* ---------------- Site public ---------------- */
.pub-nav { position: sticky; top: 10px; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; max-width: 1200px; margin: 10px auto 0; background: var(--rail); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow); width: calc(100% - 24px); }
.pub-nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; }
.pub-nav .spacer { flex: 1; }
.pub-nav .links { display: none; gap: 22px; font-size: .88rem; font-weight: 600; }
.pub-nav .links a { text-decoration: none; color: var(--ink-2); }
.pub-nav .links a:hover { color: var(--primary); }
@media (min-width: 980px) { .pub-nav .links { display: flex; } }
.pub { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.pub-hero { padding: 56px 0 24px; display: grid; gap: 34px; align-items: center; }
.pub-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--primary-soft-ink); background: var(--primary-soft); padding: 6px 12px; border-radius: 99px; }
.pub-hero h1 { font-size: clamp(2.2rem, 6.4vw, 4rem); line-height: 1.02; letter-spacing: -.045em; margin-top: 16px; }
.pub-hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--primary-2), var(--primary) 50%, #65a30d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pub-hero p.lead { color: var(--muted); font-size: 1.08rem; margin-top: 16px; max-width: 34rem; }
.pub-hero .btn-row { margin-top: 24px; }
.pub-hero .trust { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.pub-hero .trust span { display: inline-flex; gap: 6px; align-items: center; }
@media (min-width: 960px) { .pub-hero { grid-template-columns: 1fr 1.05fr; padding: 80px 0 40px; } }
.mock { background: var(--card); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 28px; padding: 14px; display: grid; gap: 10px; color: var(--ink); box-shadow: var(--shadow-lg); transform: perspective(1400px) rotateY(-8deg) rotateX(4deg); transition: transform .6s; }
.mock:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.float-chip { position: absolute; background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: .8rem; font-weight: 700; display: flex; gap: 8px; align-items: center; animation: bob 6s ease-in-out infinite; }
.float-chip .ico { width: 30px; height: 30px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-soft-ink); display: grid; place-items: center; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.pub-section { padding: 64px 0 8px; }
.pub-section > .kicker { font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.pub-section > h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); letter-spacing: -.035em; margin-top: 8px; }
.pub-section > p.lead { color: var(--muted); margin-top: 10px; max-width: 42rem; font-size: 1.02rem; }
.feature { background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 10px; align-content: start; transition: transform .2s; }
.feature:hover { transform: translateY(-3px); }
.feature .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-soft-ink); display: grid; place-items: center; }
.feature.dark { background: linear-gradient(150deg, var(--primary-deep), var(--primary)); color: #fff; border-color: transparent; }
.feature.dark p { color: #d1fae5; }
.feature.dark .ico { background: rgba(255, 255, 255, .18); color: #fff; }
.feature p { color: var(--muted); font-size: .92rem; }
.price { font-size: 2.3rem; font-weight: 800; letter-spacing: -.04em; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 10px; color: var(--muted); }
.pub-foot { margin-top: 64px; padding: 28px 16px 40px; text-align: center; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(100%, 460px); background: var(--card); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px 24px; box-shadow: var(--shadow-lg); }
.auth-card .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 18px; text-decoration: none; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.auth-top .brand { margin: 0; }
.prose { max-width: 760px; }
.prose h2 { margin: 22px 0 8px; }
.prose p, .prose li { color: var(--ink-2); margin-bottom: 8px; }

/* ---------------- Explication 3D animée du processus ---------------- */
.explainer { position: relative; border-radius: 32px; overflow: hidden; background: linear-gradient(160deg, #04140c, #0b3a22 55%, #14532d); color: #fff; box-shadow: var(--shadow-lg); margin-top: 24px; }
.explainer .stage { position: relative; height: 380px; perspective: 1100px; overflow: hidden; }
.explainer .floor { position: absolute; left: -20%; right: -20%; bottom: -40%; height: 90%; transform: rotateX(72deg); background-image: linear-gradient(rgba(198, 243, 107, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(198, 243, 107, .18) 1px, transparent 1px); background-size: 46px 46px; animation: floor 6s linear infinite; mask-image: linear-gradient(to top, #000 20%, transparent 85%); }
@keyframes floor { to { background-position: 0 46px; } }
.explainer .orb { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #d9f99d, #22c55e 55%, #14532d); box-shadow: 0 0 60px rgba(34, 197, 94, .6); animation: bob 7s ease-in-out infinite; }
.explainer .scene { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; }
.explainer .obj { position: absolute; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2, .8, .2, 1), opacity .7s; opacity: 0; }
.explainer[data-step="1"] .o1, .explainer[data-step="2"] .o2, .explainer[data-step="3"] .o3, .explainer[data-step="4"] .o4, .explainer[data-step="5"] .o5 { opacity: 1; }
/* Cube 3D (produit / stock) */
.cube { width: 110px; height: 110px; position: relative; transform-style: preserve-3d; animation: spin 9s linear infinite; }
.cube div { position: absolute; inset: 0; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .3); display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #052e16; background: linear-gradient(135deg, #bbf7d0, #4ade80); }
.cube .f1 { transform: translateZ(55px); } .cube .f2 { transform: rotateY(180deg) translateZ(55px); } .cube .f3 { transform: rotateY(90deg) translateZ(55px); background: linear-gradient(135deg, #86efac, #16a34a); }
.cube .f4 { transform: rotateY(-90deg) translateZ(55px); background: linear-gradient(135deg, #86efac, #16a34a); } .cube .f5 { transform: rotateX(90deg) translateZ(55px); background: #d9f99d; } .cube .f6 { transform: rotateX(-90deg) translateZ(55px); background: #15803d; }
@keyframes spin { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }
/* Pièces 3D */
.coin { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fef9c3, #facc15 50%, #a16207); border: 4px solid #fde68a; display: grid; place-items: center; font-weight: 800; color: #713f12; font-size: .7rem; box-shadow: 0 10px 30px rgba(250, 204, 21, .35); animation: flip 3s ease-in-out infinite; }
@keyframes flip { 0%, 100% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(180deg) translateY(-14px); } }
.coins-flow .coin { position: absolute; animation: flowc 2.6s ease-in-out infinite; }
.coins-flow .coin:nth-child(2) { animation-delay: .5s; } .coins-flow .coin:nth-child(3) { animation-delay: 1s; }
@keyframes flowc { 0% { transform: translate(-150px, 30px) rotateY(0) scale(.7); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(150px, -20px) rotateY(540deg) scale(1); opacity: 0; } }
/* Panneaux flottants */
.panel3d { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 18px; padding: 12px 14px; min-width: 150px; box-shadow: 0 20px 40px rgba(0, 0, 0, .35); }
.panel3d small { display: block; color: #bbf7d0; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.panel3d b { font-size: 1.25rem; letter-spacing: -.02em; }
.panel3d.lime { background: linear-gradient(135deg, #d9f99d, #4ade80); color: #052e16; border-color: transparent; }
.panel3d.lime small { color: #14532d; }
.panel3d.red small { color: #fecaca; }
.bars3d { display: flex; gap: 10px; align-items: flex-end; height: 140px; transform: rotateX(18deg) rotateY(-24deg); transform-style: preserve-3d; }
.bars3d span { width: 34px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #d9f99d, #16a34a); box-shadow: 8px 0 0 #0f5c35; animation: grow 2.4s ease-in-out infinite alternate; transform-origin: bottom; }
.bars3d span:nth-child(2) { animation-delay: .3s; } .bars3d span:nth-child(3) { animation-delay: .6s; } .bars3d span:nth-child(4) { animation-delay: .9s; }
@keyframes grow { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
.split { display: flex; gap: 40px; align-items: center; }
.split .wall { width: 4px; height: 160px; border-radius: 4px; background: linear-gradient(#bbf7d0, transparent); box-shadow: 0 0 20px rgba(187, 247, 208, .6); }
.explainer .caption { position: relative; padding: 20px 22px 22px; display: grid; gap: 12px; background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent); }
.explainer .caption .t { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.explainer .caption p { color: #c8e9d4; max-width: 46rem; }
.explainer .ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.explainer .ctrl button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.explainer .dots { display: flex; gap: 6px; flex: 1; min-width: 160px; }
.explainer .dots button { flex: 1; height: 6px; width: auto; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .2); padding: 0; overflow: hidden; position: relative; }
.explainer .dots button.on::after, .explainer .dots button.done::after { content: ""; position: absolute; inset: 0; background: var(--lime); transform-origin: left; }
.explainer .dots button.on::after { animation: prog var(--dur, 6s) linear forwards; }
.explainer.paused .dots button.on::after { animation-play-state: paused; }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.explainer .step-label { position: absolute; top: 18px; left: 20px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); z-index: 2; }
.explainer .i-pause { display: block; } .explainer .i-play { display: none; }
.explainer.paused .i-pause { display: none; } .explainer.paused .i-play { display: block; }
@media (min-width: 900px) { .explainer .stage { height: 440px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------------- Abonnements ---------------- */
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: stretch; }
.plan { background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start; position: relative; }
.plan.hl { background: linear-gradient(160deg, var(--primary-deep), #0f5c35 60%, var(--primary)); color: #fff; border-color: transparent; box-shadow: 0 24px 50px color-mix(in srgb, var(--primary-deep) 40%, transparent); }
.plan.hl .muted, .plan.hl li { color: #d1fae5; }
.plan .ribbon { position: absolute; top: 16px; right: 16px; font-size: .7rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--lime); color: #14532d; }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.plan .price small { font-size: .85rem; font-weight: 600; letter-spacing: 0; opacity: .75; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.plan li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.plan li .icon { color: var(--primary-2); margin-top: 2px; }
.plan.hl li .icon { color: var(--lime); }
.plan .save { font-size: .76rem; font-weight: 700; color: var(--primary-soft-ink); background: var(--primary-soft); padding: 3px 9px; border-radius: 99px; width: fit-content; }
.plan.hl .save { background: rgba(255, 255, 255, .15); color: var(--lime); }
.plan.hl .btn.lime { background: #fff; color: var(--primary-deep); }
.sub-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-radius: 18px; padding: 12px 16px; margin-bottom: 14px; font-size: .88rem; font-weight: 600; }
.sub-banner.warn { background: var(--warn-bg); color: var(--warn-ink); }
.sub-banner.bad { background: var(--bad-bg); color: var(--bad-ink); }
.sub-banner .btn { margin-left: auto; }
.code-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--soft); border: 1px dashed var(--primary-3); border-radius: 16px; padding: 12px 14px; }
.code-box b { font-size: 1.3rem; letter-spacing: .12em; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* =====================================================================
   Identité Yena : bleu nuit #07162A + vert citron #CDFB31 (logo officiel)
   ===================================================================== */
:root {
  --navy: #07162a; --navy-2: #0f2540; --navy-3: #16365a;
  --lime: #cdfb31; --lime-hover: #c0f01c; --on-lime: #07162a;
  --primary: #4d7c0f; --primary-2: #84cc16; --primary-3: #bef264; --primary-deep: #07162a;
  --primary-soft: #ecfccb; --primary-soft-ink: #3f6212;
  --strong: #07162a; --strong-ink: #ffffff;
  --bg: #f1f5ef; --bg-2: #e5edd9;
  --chart-gp: #07162a;
  --accent-text: #4d7c0f;
  --blob-1: #d9f99d; --blob-2: #bbf7d0; --blob-3: #e2e8f0; --blob-4: #ecfccb;
}
:root[data-theme="dark"] {
  --bg: #050b14; --bg-2: #0a1524; --card: rgba(13, 23, 37, .84); --card-solid: #0d1725; --ink: #eef3f8; --ink-2: #c6d1de; --muted: #8b9bb0;
  --line: #1b2a3e; --soft: #122033; --field: #101c2d; --rail: rgba(9, 17, 29, .9); --rail-ink: #a9b7c8;
  --primary: #a3e635; --primary-2: #a3e635; --primary-3: #cdfb31; --primary-soft: rgba(205, 251, 49, .12); --primary-soft-ink: #d9f99d;
  --strong: #eef3f8; --strong-ink: #07162a; --chart-bar: #1b2a3e; --chart-gp: #cdfb31; --chart-grid: #172437; --accent-text: #cdfb31;
  --blob-1: #0f2540; --blob-2: #1a2f10; --blob-3: #0b1d33; --blob-4: #243b0a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #050b14; --bg-2: #0a1524; --card: rgba(13, 23, 37, .84); --card-solid: #0d1725; --ink: #eef3f8; --ink-2: #c6d1de; --muted: #8b9bb0;
    --line: #1b2a3e; --soft: #122033; --field: #101c2d; --rail: rgba(9, 17, 29, .9); --rail-ink: #a9b7c8;
    --primary: #a3e635; --primary-2: #a3e635; --primary-3: #cdfb31; --primary-soft: rgba(205, 251, 49, .12); --primary-soft-ink: #d9f99d;
    --strong: #eef3f8; --strong-ink: #07162a; --chart-bar: #1b2a3e; --chart-gp: #cdfb31; --chart-grid: #172437; --accent-text: #cdfb31;
    --blob-1: #0f2540; --blob-2: #1a2f10; --blob-3: #0b1d33; --blob-4: #243b0a;
  }
}

/* Logos */
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { height: 34px; width: auto; display: block; }
.brand-logo .on-dark { display: none; }
:root[data-theme="dark"] .brand-logo .on-light { display: none; }
:root[data-theme="dark"] .brand-logo .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand-logo .on-light { display: none; }
  :root:not([data-theme]) .brand-logo .on-dark { display: block; }
}
img.logo-mark { width: 38px; height: 38px; border-radius: 11px; background: none; box-shadow: 0 6px 16px rgba(7, 22, 42, .25); display: block; }
.rail .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.rail .brand .brand-logo img { height: 36px; }
.pub-nav .brand-logo img { height: 30px; }
.auth-card .brand-logo img { height: 34px; }

/* Actions principales : citron + bleu nuit (comme l'icône) */
.btn.lime { background: var(--lime); color: var(--on-lime); box-shadow: 0 8px 22px rgba(205, 251, 49, .35); }
.btn.lime:hover { background: var(--lime-hover); }
.nav a.on { background: var(--navy); color: var(--lime); box-shadow: 0 8px 20px rgba(7, 22, 42, .25); }
.pills a.on, .tabs button[aria-selected="true"] { background: var(--navy); color: var(--lime); }
:root[data-theme="dark"] .nav a.on, :root[data-theme="dark"] .pills a.on, :root[data-theme="dark"] .tabs button[aria-selected="true"] { background: var(--lime); color: var(--navy); }
.avatar { background: var(--lime); color: var(--navy); }
.tabbar a.on { color: var(--primary); }
.tabbar a.plus { background: var(--lime); color: var(--navy); box-shadow: 0 10px 24px rgba(205, 251, 49, .45); }
.step .n { background: var(--navy); color: var(--lime); }
:root[data-theme="dark"] .step .n { background: var(--lime); color: var(--navy); }

/* Surfaces fortes en bleu nuit */
.hero { background: radial-gradient(520px 260px at 92% 0%, rgba(205, 251, 49, .16), transparent 65%), linear-gradient(140deg, #07162a 0%, #0f2540 60%, #16365a 120%); box-shadow: 0 20px 50px rgba(7, 22, 42, .35); }
.hero .muted, .hero-quick span { color: #a9b8cc; }
.hero::after { background: radial-gradient(circle at 30% 30%, rgba(205, 251, 49, .35), transparent 70%); }
.bankcard { background: linear-gradient(135deg, #e3ff7a, #cdfb31 50%, #a9de12); color: var(--navy); box-shadow: 0 -10px 0 -4px #2b4a70, 0 18px 40px rgba(0, 0, 0, .25); }
.kpi.dark { background: linear-gradient(145deg, #16365a, #07162a); box-shadow: 0 14px 34px rgba(7, 22, 42, .3); }
.kpi.dark .lbl, .kpi.dark .sub { color: #a9b8cc; }
.kpi.dark .lbl .chip-ico { background: rgba(205, 251, 49, .16); color: var(--lime); }
:root[data-theme="dark"] .kpi.dark { background: linear-gradient(145deg, #1c3a5e, #0f2540); border: 1px solid #22416a; }
.kpi.lime { background: var(--primary-soft); }
.totals { background: linear-gradient(140deg, #07162a, #0f2540); }
.plan.hl { background: linear-gradient(160deg, #07162a, #0f2540 60%, #16365a); box-shadow: 0 24px 50px rgba(7, 22, 42, .35); }
.plan.hl .muted, .plan.hl li { color: #c6d1de; }
.plan.hl .btn.lime { background: var(--lime); color: var(--navy); }
:root[data-theme="dark"] .plan.hl { border: 1px solid #22416a; }
.feature.dark, .promo { background: linear-gradient(150deg, #07162a, #16365a); }
.feature.dark p, .promo p { color: #a9b8cc; }
.feature.dark .ico { background: rgba(205, 251, 49, .16); color: var(--lime); }
.promo .btn { background: var(--lime); color: var(--navy); }
.pub-hero h1 em { background: none; color: var(--accent-text); -webkit-text-fill-color: currentColor; }
.pub-section > .kicker { color: var(--accent-text); }

/* Explication 3D aux couleurs de la marque */
.explainer { background: linear-gradient(160deg, #030911, #07162a 55%, #0f2540); }
.explainer .orb { background: radial-gradient(circle at 30% 30%, #f1ffc2, #cdfb31 55%, #4d7c0f); box-shadow: 0 0 60px rgba(205, 251, 49, .5); }
.explainer .caption p { color: #b9c7d8; }
.cube div { color: var(--navy); background: linear-gradient(135deg, #eaff9c, #cdfb31); }
.cube .f3, .cube .f4 { background: linear-gradient(135deg, #bde52c, #8fbf0a); }
.cube .f5 { background: #e3ff7a; } .cube .f6 { background: #6b8f05; }
.panel3d small { color: #cbd8e6; }
.panel3d.lime { background: linear-gradient(135deg, #e3ff7a, #cdfb31); color: var(--navy); }
.panel3d.lime small { color: #3f6212; }
.bars3d span { background: linear-gradient(180deg, #e3ff7a, #84cc16); box-shadow: 8px 0 0 #3f6212; }
.split .wall { background: linear-gradient(#cdfb31, transparent); box-shadow: 0 0 20px rgba(205, 251, 49, .5); }
