/* ============================================================
   ArtiPro — design system
   Neutral zinc base + warm accent. Linear/Notion density.
   Theming via [data-theme] and [data-accent] on <html>.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Accent ramps (set by [data-accent]) ----------
   Each accent provides: --a-500 (primary), --a-600 (hover),
   --a-50/--a-100 (tint surfaces), --a-text (text on accent),
   --a-soft-fg (accent-colored text on tint surfaces). */

:root,
[data-accent="teal"] {
  --a-50:  oklch(0.97 0.03 195);
  --a-100: oklch(0.93 0.05 195);
  --a-200: oklch(0.85 0.09 195);
  --a-500: oklch(0.56 0.11 195);
  --a-600: oklch(0.46 0.10 195);
  --a-700: oklch(0.39 0.09 195);
  --a-text: oklch(0.99 0.01 195);
  --a-soft-fg: oklch(0.42 0.10 195);
  --a-ring: oklch(0.56 0.11 195 / 0.40);
}
[data-accent="amber"] {
  --a-50:  oklch(0.97 0.04 70);
  --a-100: oklch(0.93 0.08 68);
  --a-200: oklch(0.87 0.13 65);
  --a-500: oklch(0.78 0.185 62);
  --a-600: oklch(0.71 0.185 55);
  --a-700: oklch(0.58 0.16 50);
  --a-text: oklch(0.26 0.05 60);
  --a-soft-fg: oklch(0.55 0.165 52);
  --a-ring: oklch(0.78 0.185 62 / 0.40);
}
[data-accent="indigo"] {
  --a-50:  oklch(0.96 0.03 278);
  --a-100: oklch(0.92 0.06 278);
  --a-200: oklch(0.85 0.10 278);
  --a-500: oklch(0.56 0.21 274);
  --a-600: oklch(0.50 0.22 274);
  --a-700: oklch(0.43 0.20 274);
  --a-text: oklch(0.99 0.01 280);  /* white text on indigo button */
  --a-soft-fg: oklch(0.52 0.22 274);
  --a-ring: oklch(0.56 0.21 274 / 0.40);
}
[data-accent="emerald"] {
  --a-50:  oklch(0.96 0.04 165);
  --a-100: oklch(0.91 0.09 165);
  --a-200: oklch(0.84 0.13 165);
  --a-500: oklch(0.60 0.16 164);
  --a-600: oklch(0.53 0.15 164);
  --a-700: oklch(0.44 0.13 164);
  --a-text: oklch(0.99 0.01 165);
  --a-soft-fg: oklch(0.47 0.15 164);
  --a-ring: oklch(0.60 0.16 164 / 0.38);
}
[data-accent="rose"] {
  --a-50:  oklch(0.96 0.03 14);
  --a-100: oklch(0.92 0.06 14);
  --a-200: oklch(0.86 0.10 14);
  --a-500: oklch(0.62 0.23 18);
  --a-600: oklch(0.56 0.24 18);
  --a-700: oklch(0.48 0.22 18);
  --a-text: oklch(0.99 0.01 12);
  --a-soft-fg: oklch(0.55 0.23 18);
  --a-ring: oklch(0.62 0.23 18 / 0.38);
}

/* ---------- Light theme (default) ---------- */
:root {
  --bg:        oklch(0.945 0.006 260);   /* app canvas — Baalda's contrast level, our own neutral hue (260, matches --fg) */
  --surface:   oklch(1 0 0);             /* cards / panels */
  --surface-2: oklch(0.975 0.002 250);   /* nested fills, hover */
  --surface-3: oklch(0.955 0.003 250);   /* table headers */
  --border:    oklch(0.92 0.004 250);
  --border-strong: oklch(0.87 0.005 250);
  --fg:        oklch(0.22 0.01 260);     /* primary text */
  --fg-muted:  oklch(0.50 0.012 260);    /* secondary */
  --fg-faint:  oklch(0.56 0.012 260);     /* meta / placeholder */
  --shadow-sm: 0 1px 3px oklch(0.2 0.02 260 / 0.08), 0 2px 4px oklch(0.2 0.02 260 / 0.06);
  --shadow-md: 0 2px 4px oklch(0.2 0.02 260 / 0.07), 0 4px 12px oklch(0.2 0.02 260 / 0.09);
  --shadow-lg: 0 8px 28px oklch(0.2 0.02 260 / 0.14), 0 2px 6px oklch(0.2 0.02 260 / 0.08);

  --ok-50: oklch(0.94 0.06 160); --ok-500: oklch(0.60 0.16 162); --ok-fg: oklch(0.44 0.14 162);
  --warn-50: oklch(0.95 0.07 80); --warn-500: oklch(0.72 0.17 70); --warn-fg: oklch(0.50 0.14 60);
  --err-50: oklch(0.95 0.05 18); --err-500: oklch(0.60 0.23 22); --err-fg: oklch(0.53 0.22 22);
  --info-50: oklch(0.95 0.05 250); --info-500: oklch(0.57 0.18 255); --info-fg: oklch(0.48 0.17 255);

  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  color-scheme: light;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg:        oklch(0.17 0.005 260);
  --surface:   oklch(0.215 0.006 260);
  --surface-2: oklch(0.25 0.007 260);
  --surface-3: oklch(0.275 0.008 260);
  --border:    oklch(0.30 0.008 260);
  --border-strong: oklch(0.38 0.01 260);
  --fg:        oklch(0.95 0.004 260);
  --fg-muted:  oklch(0.70 0.01 260);
  --fg-faint:  oklch(0.55 0.01 260);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 2px 6px oklch(0 0 0 / 0.35), 0 6px 16px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 10px 34px oklch(0 0 0 / 0.5), 0 2px 8px oklch(0 0 0 / 0.4);

  --ok-50: oklch(0.33 0.07 162); --ok-500: oklch(0.70 0.16 162); --ok-fg: oklch(0.82 0.15 162);
  --warn-50: oklch(0.35 0.08 75); --warn-500: oklch(0.80 0.16 78); --warn-fg: oklch(0.86 0.14 80);
  --err-50: oklch(0.33 0.09 20); --err-500: oklch(0.68 0.22 22); --err-fg: oklch(0.82 0.18 22);
  --info-50: oklch(0.33 0.08 255); --info-500: oklch(0.68 0.17 255); --info-fg: oklch(0.83 0.14 255);

  color-scheme: dark;
}

/* tone: "soft" (default) vs "sharp" corners — set by [data-tone] */
:root { --r-xs: 5px; --r-sm: 7px; --r-md: 9px; --r-lg: 12px; --r-xl: 16px; }
[data-tone="sharp"] { --r-xs: 2px; --r-sm: 3px; --r-md: 4px; --r-lg: 5px; --r-xl: 7px; }

:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 48px;
  --control-h: 36px;
  --z-dropdown: 100; --z-sticky: 200; --z-drawer-backdrop: 300; --z-drawer: 310;
  --z-modal-backdrop: 400; --z-modal: 410; --z-toast: 500; --z-tooltip: 600;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { transition: background-color 0.2s ease; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02","cv03","cv04";
}
/* A very light halo of the active accent, top-left. --bg itself stays a flat
   color (it's reused as a text/border color elsewhere — color: var(--bg) —
   which can't take a gradient), so this layers on top of it here instead of
   redefining the token. Light theme only: dark wasn't part of this pass. */
:root:not([data-theme="dark"]) body {
  background: radial-gradient(120% 100% at 15% 0%, color-mix(in oklch, var(--a-500) 2%, transparent), transparent 55%), var(--bg);
}
#root { height: 100%; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.tnum { font-variant-numeric: tabular-nums; }

::selection { background: var(--a-200); color: var(--fg); }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 2px solid var(--bg); transition: background 0.15s; }
*::-webkit-scrollbar-thumb:hover { background: var(--a-500); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Type scale ---------- */
.t-display { font-size: 28px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
.t-h1 { font-size: 21px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.t-h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
.t-h3 { font-size: 14px; font-weight: 600; }
.t-body { font-size: 14px; font-weight: 400; }
.t-label { font-size: 13px; font-weight: 500; }
.t-meta { font-size: 12px; font-weight: 500; color: var(--fg-muted); }
/* Section title inside panels/drawers. Sentence case, reads as a heading (was an uppercase 11px eyebrow). */
.t-eyebrow { font-size: 13.5px; font-weight: 650; color: var(--fg); }
.t-data { font-size: 32px; font-weight: 700; font-family: var(--font-sans); letter-spacing: -0.015em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- auth gate ---------- */
.app-loading {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted); font-size: 13.5px;
}
/* ---------- sign-in (split brand / form) ---------- */
.signin { height: 100%; display: flex; background: var(--bg); }

.signin-brand {
  flex: 1.05; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 4vw, 46px);
  background: linear-gradient(150deg, var(--a-700), var(--a-500));
  color: var(--a-text);
}
.signin-brand-title {
  font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 31px); font-weight: 700;
  line-height: 1.15; letter-spacing: -0.025em; text-wrap: balance;
}
.signin-proof {
  margin-top: 8px; max-width: 290px; padding: 14px; border-radius: var(--r-lg);
  background: color-mix(in oklch, white 14%, transparent);
  border: 1px solid color-mix(in oklch, white 22%, transparent);
}
.signin-proof-bars { display: flex; gap: 5px; align-items: flex-end; height: 26px; margin-top: 11px; }
.signin-proof-bars span { flex: 1; border-radius: 2px; background: color-mix(in oklch, white 45%, transparent); }
.signin-proof-bars span.peak { background: color-mix(in oklch, white 82%, transparent); }

.signin-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: var(--surface);
}
.signin-form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 22px; }

.g-logo {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#EA4335 0 25%, #FBBC05 0 50%, #34A853 0 75%, #4285F4 0);
}
.signin-error {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 13px; border-radius: var(--r-sm); font-size: 12.5px; line-height: 1.45;
  background: var(--err-50); color: var(--err-fg);
  border: 1px solid color-mix(in oklch, var(--err-500) 35%, transparent);
}

@media (max-width: 720px) {
  .signin-brand { display: none; }
  .signin-panel { padding: 24px; }
}

/* ---------- focus ring ---------- */
.focusable:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--a-ring);
}

/* utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.p-3 { padding: var(--space-3); } .p-4 { padding: var(--space-4); } .p-5 { padding: var(--space-5); } .p-6 { padding: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); } .px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); } .py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.grow { flex: 1; } .wrap { flex-wrap: wrap; }
.muted { color: var(--fg-muted); } .faint { color: var(--fg-faint); }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 0.32s cubic-bezier(0.2,0.7,0.2,1) both; }
.fade-in { animation: fadeIn 0.25s ease both; }
.pop-in { animation: popIn 0.16s cubic-bezier(0.2,0.7,0.2,1) both; }

@keyframes priceFlash { 0% { color: var(--a-soft-fg); } 100% { color: var(--fg-muted); } }
.price-flash { animation: priceFlash 0.65s ease both; }

.btn-spin { width: 14px; height: 14px; border-radius: 99px; border: 2px solid currentColor; border-top-color: transparent; animation: spin .6s linear infinite; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-spin { animation-duration: 1.6s; } }

.skeleton { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.dash-row { transition: background .16s ease; }
.dash-row:hover { background: var(--surface-2); }
.cat-row:hover { background: var(--surface-2); }

/* ---------- Slide-over drawer (shared primitive) ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: var(--z-drawer-backdrop);
  background: oklch(0.2 0.02 260 / 0.45); backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end;
}
.drawer {
  height: 100%; background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  z-index: var(--z-drawer);
  animation: drawerIn 0.34s cubic-bezier(0.22,1,0.36,1) both;
}
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.drawer-body { padding: var(--space-5); overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: var(--space-4); }
.drawer-foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0; }

/* ---------- Centered modal (shared primitive) ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: var(--z-modal-backdrop); background: oklch(0.2 0.02 260 / 0.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.modal { z-index: var(--z-modal); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: 90vh; animation: popIn .16s cubic-bezier(0.2,0.7,0.2,1) both; }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-body { padding: var(--space-5); overflow-y: auto; flex: 1; }
.modal-foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0; }

/* Mobile shell (sidebar drawer + topbar) is handled in app.jsx via the `narrow` state,
   because inline styles on the sidebar would override a CSS display rule here. */

/* Print: only the quote document reaches the page. Never express the page
   height in millimetres in here — see the .print-doc rule. */
@page { size: A4; margin: 10mm; }
@media print {
  html, body { width: auto !important; height: 100% !important; margin: 0 !important; background: #fff !important; }

  /* `visibility: hidden` on the app shell still leaves it occupying a full
     viewport of layout — that was the blank leading page. #root has to leave
     the print flow entirely; only the portal hosting the print-doc stays.
     Inside that portal the chrome (preview header, buttons) is hidden with
     visibility, so the print-doc keeps its own internal layout intact. */
  body > * { display: none !important; }
  body > .modal-overlay, body > .print-host { display: block !important; }
  .modal-overlay *, .print-host * { visibility: hidden; }
  .print-doc, .print-doc * { visibility: visible; }
  /* Hidden chrome (preview header row) still took ~50px at the top of page 1,
     which pushed the CGV onto page 2. Remove everything off the print-doc path. */
  :is(.modal-overlay, .print-host) *:not(.print-doc):not(.print-doc *):not(:has(.print-doc)) { display: none !important; }

  /* The print-doc always sits inside a fixed overlay (Modal, or the client
     drawer's preview panel). A `position: absolute; width: 100%` print-doc
     resolves against that fixed ancestor — i.e. the viewport (~1400px) — not
     the A4 page box (~794px), so the printer scaled the whole page down. Put
     every host back into normal document flow instead; the page box then sets
     the width and multi-page breaks work on their own. `!important` is what
     lets these beat the components' inline styles. */
  .modal-overlay, .modal, .modal-body, .print-host, .print-host > * {
    position: static !important; inset: auto !important;
    width: auto !important; max-width: none !important;
    /* height: 100% down the whole chain so the print-doc's own `min-height:
       100%` has something definite to resolve against — see below. */
    height: 100% !important; max-height: none !important;
    overflow: visible !important; display: block !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    background: #fff !important; box-shadow: none !important;
    backdrop-filter: none !important;
  }
  .print-doc {
    /* One page tall so the CGV's `margin-top: auto` pins it to the page bottom.
       % resolves against the real printable area (browser-dependent). The real
       page-2 overflow was the hidden preview header (now display:none); the
       3mm keeps a rounding buffer. */
    position: static !important; width: auto !important; min-height: calc(100% - 3mm) !important;
    margin: 0 !important; padding: 0 !important;
    border-radius: 0 !important; box-shadow: none !important;
  }
  .print-doc tr { break-inside: avoid; }
  /* The CGV block is one unit — never split it across two pages. */
  .print-foot { break-inside: avoid; }
}

/* Contact rows in the client drawer: the whole row is the call / write action. */
.contact-row { transition: background 0.15s; }
a.contact-row:hover, button.contact-row:hover { background: var(--surface-2); }

/* Services library: soft-chip resting state has no border (Request 3), just a
   hover tint so it doesn't disappear entirely when not active. */
.cat-chip:hover { background: color-mix(in oklch, var(--fg) 5%, transparent) !important; }

/* Preview panel scales the A4 page with `zoom`; printing must use the real size. */
@media print { .fit-doc { zoom: 1 !important; } }

/* Guided quote flow: a finished step slides into the right column. */
@keyframes slideInRight { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.slide-in { animation: slideInRight .32s cubic-bezier(0.2,0.7,0.2,1) both; }
@media (prefers-reduced-motion: reduce) { .slide-in { animation: none; } }

/* ---------- Subtle motion layer ---------- */
/* Drawer content settles just after the panel slides in. */
.drawer-body > * { animation: fadeUp .36s .08s cubic-bezier(0.2,0.7,0.2,1) both; }
/* Page change: a short rise-and-fade. */
.route-in { animation: fadeUp .28s cubic-bezier(0.2,0.7,0.2,1) both; view-transition-name: page; }
/* Page change: old page slips out, new one glides in (direction follows navigation). */
@supports (view-transition-name: a) {
  .route-in { animation: none; }
  ::view-transition-group(page) { animation-duration: .38s; animation-timing-function: cubic-bezier(.22,1,.36,1); }
  ::view-transition-old(page) { animation: vtOut .22s cubic-bezier(.4,0,1,1) both; }
  ::view-transition-new(page) { animation: vtIn .38s cubic-bezier(.22,1,.36,1) both; }
  :root[data-nav="back"]::view-transition-old(page) { animation-name: vtOutBack; }
  :root[data-nav="back"]::view-transition-new(page) { animation-name: vtInBack; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
/* Phone: no View Transition (show() skips it): snapshots of the fixed, backdrop-blurred tab bar
   flicker on iOS. A light CSS fade on the page content only. */
@media (max-width: 767px) { .route-in { animation: fadeIn .18s ease-out both; } }
@keyframes vtOut { to { opacity: 0; transform: translateX(-24px) scale(.985); filter: blur(2px); } }
@keyframes vtIn { from { opacity: 0; transform: translateX(32px) scale(.985); filter: blur(3px); } }
@keyframes vtOutBack { to { opacity: 0; transform: translateX(24px) scale(.985); filter: blur(2px); } }
@keyframes vtInBack { from { opacity: 0; transform: translateX(-32px) scale(.985); filter: blur(3px); } }
/* Every button gives a light press. */
button:not(:disabled):active { transform: scale(0.98); }
button { transition-property: background, border-color, color, box-shadow, transform; transition-duration: .14s; }
@media (prefers-reduced-motion: reduce) {
  .drawer-body > *, .route-in { animation: none; }
  button:not(:disabled):active { transform: none; }
}

/* Phone: one swipeable row of chips instead of a tall wrapped block. */
.chip-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px 2px; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll > * { flex-shrink: 0; white-space: nowrap; }


/* Kanban: cards lift on hover with an ease-out-quint; "À relancer" breathes softly. */
.kcard { transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .22s cubic-bezier(.22,1,.36,1), border-color .18s, opacity .18s; }
.kcard:active { transform: scale(0.985) !important; }
.relance-pulse::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 99px; background: currentColor; vertical-align: 1px; animation: relancePulse 2.4s ease-in-out infinite; }
@keyframes relancePulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.kcol-drop { animation: kcolDrop .5s cubic-bezier(.22,1,.36,1); }
@keyframes kcolDrop { 0% { transform: scale(1); } 40% { transform: scale(1.012); } 100% { transform: scale(1); } }
/* Invoice just marked paid: short green pop as it lands in Payées. */
.kcard-paid { animation: kcardPaid .4s cubic-bezier(.22,1,.36,1); }
@keyframes kcardPaid {
  0% { transform: scale(.94); box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok-fg) 0%, transparent); }
  45% { transform: scale(1.035); box-shadow: 0 0 0 4px color-mix(in oklch, var(--ok-fg) 22%, transparent), 0 8px 22px -8px color-mix(in oklch, var(--ok-fg) 55%, transparent); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok-fg) 0%, transparent); }
}
/* Mobile kanban column body: collapses via grid rows, never via height. */
.kcol-body { display: grid; transition: grid-template-rows .28s cubic-bezier(.22,1,.36,1); }
.kcol-inner { transition: opacity .2s ease; }
.kcol-chev { transition: transform .22s cubic-bezier(.22,1,.36,1); }
@media (prefers-reduced-motion: reduce) {
  .kcol-body, .kcol-inner, .kcol-chev { transition: none; }
  .kcard, .kcard * { transition: none !important; transform: none !important; }
  .relance-pulse::before, .kcol-drop, .kcard-paid { animation: none; }
}

/* Installed app (standalone): keep content clear of the notch / status bar.
   The bottom inset is already handled by the mobile tab bar and main padding. */
@media (display-mode: standalone) {
  #root { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
}

/* Frosted raised panel: one level only (panels on the page canvas). Content inside stays solid. */
.frost {
  background: color-mix(in oklch, var(--surface) 60%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid color-mix(in oklch, var(--surface) 70%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in oklch, white 70%, transparent), 0 8px 24px -12px color-mix(in oklch, var(--fg) 22%, transparent);
  border-radius: var(--r-lg);
}

/* Mon entreprise: titled field groups inside the frost panel, hairline between them. */
.settings-section + .settings-section { border-top: 1px solid color-mix(in oklch, var(--fg) 8%, transparent); padding-top: 28px; }

/* iOS install guide: arrow nudging toward Safari's button. */
.ios-install-arrow svg { animation: iosArrow 1.1s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes iosArrow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .ios-install-arrow svg { animation: none; } }

/* iOS Safari inflates text inside transform-scaled blocks (A4 previews): keep sizes as authored. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
