/* ==========================================================================
   Design system — jetons, base, mise en page, composants, utilitaires.
   Thème sombre par défaut ; [data-theme="light"] pour le thème clair.
   Aucune ressource externe : polices et icônes sont servies par l'application.
   ========================================================================== */

/* ---------- Polices (Inter variable, auto-hébergée, licence OFL) ---------- */
@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Jetons ---------- */
:root {
  color-scheme: dark;
  /* Surfaces */
  --bg: #0a0b0f;
  --bg-elev: #0e1016;
  --surface: #12141b;
  --surface-2: #171a22;
  --surface-3: #1e222c;
  --overlay: rgba(5, 6, 10, .62);
  --border: #242833;
  --border-strong: #313643;
  /* Texte */
  --text: #eef0f5;
  --text-2: #b7bdca;
  --muted: #8a91a1;
  --faint: #5d6474;
  /* Accent (surchargé par la marque blanche) */
  --accent: #1680f5;
  --accent-hover: color-mix(in srgb, var(--accent) 86%, white);
  --accent-press: color-mix(in srgb, var(--accent) 82%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 40%, transparent);
  --on-accent: #ffffff;
  /* Sémantique */
  --success: #2fd18a;
  --warning: #f5b544;
  --danger: #ff5d6c;
  --info: #4cc2ff;
  --success-soft: color-mix(in srgb, var(--success) 14%, transparent);
  --warning-soft: color-mix(in srgb, var(--warning) 14%, transparent);
  --danger-soft: color-mix(in srgb, var(--danger) 14%, transparent);
  --info-soft: color-mix(in srgb, var(--info) 14%, transparent);
  /* Opportunité (§7) */
  --opp-strong: var(--success);
  --opp-medium: var(--warning);
  --opp-weak: var(--muted);
  /* Rayons */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;
  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, .45);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 28px 70px -20px rgba(0, 0, 0, .7);
  --glow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  /* Espacements */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  /* Typographie */
  --font: "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14.5px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 36px;
  /* Mouvement */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 120ms; --dur: 200ms; --dur-slow: 360ms;
  /* Mise en page */
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 60px;
  --content-max: 1360px;
  --bottom-nav-h: 64px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --bg-elev: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eceef4;
  --overlay: rgba(20, 22, 32, .38);
  --border: #e3e6ee;
  --border-strong: #cfd4df;
  --text: #12151d;
  --text-2: #3a4150;
  --muted: #646b7b;
  --faint: #9aa1b0;
  --accent-hover: color-mix(in srgb, var(--accent) 88%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --success: #0fa36a;
  --warning: #c98a0c;
  --danger: #e03347;
  --info: #0a8fd1;
  --shadow-xs: 0 1px 2px rgba(18, 21, 29, .06);
  --shadow-sm: 0 2px 8px -2px rgba(18, 21, 29, .1);
  --shadow-md: 0 12px 30px -14px rgba(18, 21, 29, .2);
  --shadow-lg: 0 28px 60px -24px rgba(18, 21, 29, .28);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-base)/1.55 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; font-weight: 650; color: var(--text); }
h1 { font-size: var(--fs-2xl); letter-spacing: -.025em; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
h4 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: var(--r-xs); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); transition: top var(--dur) var(--ease); }
.skip-link:focus { top: var(--s-4); color: var(--on-accent); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- Mise en page de l'application ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  transition: grid-template-columns var(--dur-slow) var(--ease);
}
.app.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: var(--s-2);
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: var(--s-4) var(--s-3);
  overflow: hidden;
  z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-1) var(--s-2) var(--s-3); color: var(--text); min-height: 40px; }
.sidebar-brand:hover { color: var(--text); }
.sidebar-brand .logo-text { font-weight: 700; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.logo-mark { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; box-shadow: var(--glow); }
.sidebar-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; margin: 0 calc(var(--s-1) * -1); padding: 0 var(--s-1); }
.nav-group-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: var(--s-4) var(--s-3) var(--s-1); white-space: nowrap; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: var(--s-3);
  padding: 9px var(--s-3); border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
button.nav-item { width: 100%; border: 0; background: transparent; font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
button.nav-item:hover { background: var(--surface-2); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav-item[aria-current="page"] .icon { color: var(--accent); }
.nav-item .nav-badge { margin-left: auto; }
.sidebar-footer { display: flex; flex-direction: column; gap: var(--s-2); border-top: 1px solid var(--border); padding-top: var(--s-3); }
.app.is-collapsed .nav-label, .app.is-collapsed .nav-group-label, .app.is-collapsed .logo-text, .app.is-collapsed .ws-label, .app.is-collapsed .nav-badge { opacity: 0; pointer-events: none; width: 0; }
.app.is-collapsed .nav-group-label { height: 8px; padding: 0; }
.app.is-collapsed .nav-item, .app.is-collapsed .ws-switch { justify-content: center; padding-inline: 0; }
.app.is-collapsed .collapse-btn .icon { transform: rotate(180deg); }
.collapse-btn .icon { transition: transform var(--dur) var(--ease); }

.ws-switch { display: flex; align-items: center; gap: var(--s-2); width: 100%; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; transition: border-color var(--dur-fast); }
.ws-switch:hover { border-color: var(--border-strong); }
.ws-avatar { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.ws-label { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ws-label strong { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-label small { font-size: 11px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 var(--s-6);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-spacer { flex: 1; }
.btn.menu-btn { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: var(--s-1); min-width: 0; font-size: var(--fs-sm); color: var(--muted); list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: var(--s-1); white-space: nowrap; }
.breadcrumbs li:not(:last-child) { overflow: hidden; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs li:last-child { min-width: 0; }
.breadcrumbs [aria-current="page"] { display: block; min-width: 0; color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs .icon { width: 14px; height: 14px; color: var(--faint); }
.search-trigger {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-width: 260px; height: 38px; padding: 0 var(--s-2) 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger span { flex: 1; text-align: left; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font: 600 11px/1 var(--font); }

.content { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--s-8) var(--s-6) var(--s-16); display: flex; flex-direction: column; gap: var(--s-6); }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-header .subtitle { color: var(--muted); margin-top: var(--s-2); max-width: 70ch; }
.page-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }

.sidebar-backdrop { display: none; }

.bottom-nav { display: none; }

/* ---------- Grilles et piles ---------- */
.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-2); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.span-2 { grid-column: span 2; }
.grid-detail { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-border: var(--border);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 38px; padding: 0 var(--s-4);
  border: 1px solid var(--btn-border); border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1; white-space: nowrap;
  cursor: pointer; user-select: none; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur-fast);
}
.btn:hover { background: var(--surface-3); color: var(--btn-fg); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-border: transparent; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:active { background: var(--accent-press); }
.btn-secondary { --btn-bg: var(--surface); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--text-2); }
.btn-danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-border: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { --btn-bg: var(--success); --btn-fg: #06291a; --btn-border: transparent; }
.btn-success:hover { background: color-mix(in srgb, var(--success) 88%, white); color: #06291a; }
.btn-sm { height: 32px; padding: 0 var(--s-3); font-size: var(--fs-xs); border-radius: var(--r-xs); }
.btn-lg { height: 46px; padding: 0 var(--s-6); font-size: var(--fs-md); border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) transparent; animation: spin .7s linear infinite; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.btn-group .btn + .btn { margin-left: -1px; }
.btn-group .btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); border-color: var(--accent-line); z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.label .optional { font-weight: 400; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.textarea { height: auto; min-height: 110px; padding: var(--s-3); resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.input-lg { height: 48px; font-size: var(--fs-md); }
.help { font-size: var(--fs-xs); color: var(--muted); }
.help.cost-note { color: var(--warning); }
.error-text { font-size: var(--fs-xs); color: var(--danger); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 0; }
.input-group > :first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group > :last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group > * + * { margin-left: -1px; }
.input-addon { display: inline-flex; align-items: center; padding: 0 var(--s-3); border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-actions { display: flex; justify-content: flex-end; gap: var(--s-2); flex-wrap: wrap; padding-top: var(--s-2); }
.check { display: inline-flex; align-items: flex-start; gap: var(--s-2); cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); }
.switch input { appearance: none; width: 38px; height: 22px; margin: 0; border-radius: var(--r-full); background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; cursor: pointer; transition: background var(--dur) var(--ease); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform var(--dur) var(--ease), background var(--dur); }
.switch input:checked { background: var(--accent); border-color: transparent; }
.switch input:checked::after { transform: translateX(16px); background: #fff; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-body { padding: var(--s-5); }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.card-title { font-size: var(--fs-md); font-weight: 650; display: flex; align-items: center; gap: var(--s-2); }
.card-subtitle { font-size: var(--fs-sm); color: var(--muted); }
.card-footer { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--s-2); }
.card-interactive { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur); cursor: pointer; color: inherit; }
.card-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); color: inherit; }
.card-glass { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--accent)), var(--surface)); }

/* Indicateur clé */
.stat { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); }
.stat-label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.stat-value { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; }
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }
.stat-foot { font-size: var(--fs-xs); color: var(--faint); }

/* ---------- Badges, pastilles, puces ---------- */
.badge {
  --b-bg: var(--surface-3); --b-fg: var(--text-2);
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: var(--r-full);
  background: var(--b-bg); color: var(--b-fg);
  font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.badge-accent { --b-bg: var(--accent-soft); --b-fg: var(--accent-hover); }
.badge-success { --b-bg: var(--success-soft); --b-fg: var(--success); }
.badge-warning { --b-bg: var(--warning-soft); --b-fg: var(--warning); }
.badge-danger { --b-bg: var(--danger-soft); --b-fg: var(--danger); }
.badge-info { --b-bg: var(--info-soft); --b-fg: var(--info); }
.badge-outline { --b-bg: transparent; border: 1px solid var(--border-strong); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.score-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 4px; border-radius: var(--r-full); font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--text); }
.score-pill b { display: grid; place-items: center; min-width: 34px; height: 20px; padding: 0 6px; border-radius: var(--r-full); color: #0a0b0f; font-size: 12px; }
.score-pill.strong b { background: var(--opp-strong); }
.score-pill.medium b { background: var(--opp-medium); }
.score-pill.weak b { background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.score-pill.low-confidence { outline: 1px dashed var(--border-strong); outline-offset: 1px; }
.score-pill .conf { font-size: 11px; font-weight: 600; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: all var(--dur-fast) var(--ease); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.chip .count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--info))); color: #fff; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }

/* ---------- Bandeaux et alertes ---------- */
.alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); font-size: var(--fs-sm); color: var(--text-2); }
.alert .icon { margin-top: 1px; }
.alert strong { color: var(--text); }
.alert-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.alert-success .icon { color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.alert-warning .icon { color: var(--warning); }
.alert-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.alert-danger .icon { color: var(--danger); }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.alert-info .icon { color: var(--info); }
.banner { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-6); font-size: var(--fs-sm); font-weight: 500; border-bottom: 1px solid; }
.banner-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.banner-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.banner-info { background: var(--accent-soft); color: var(--text-2); border-color: var(--accent-line); }

/* ---------- Tableaux ---------- */
.table-card { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--surface); padding: 10px var(--s-4);
  border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.table td { padding: 12px var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.table td.primary, .table td strong { color: var(--text); }
.table td.primary { min-width: 15rem; }
.table tbody tr { transition: background var(--dur-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-link { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: var(--text); }
.table th[data-sort]::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border: 4px solid transparent; border-top-color: var(--faint); border-bottom: 0; opacity: .5; }
.table th[aria-sort="ascending"]::after { border-top: 0; border-bottom: 4px solid var(--accent); opacity: 1; }
.table th[aria-sort="descending"]::after { border-top-color: var(--accent); opacity: 1; }
.table.density-compact td { padding-top: 6px; padding-bottom: 6px; }
.table.density-compact th { padding-top: 7px; padding-bottom: 7px; }
.table.density-comfortable td { padding-top: 16px; padding-bottom: 16px; }
.table .col-hidden { display: none; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.pagination { display: flex; gap: var(--s-1); }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: var(--s-3) var(--s-3); background: none; border: 0; color: var(--muted); font-weight: 550; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; display: inline-flex; gap: var(--s-2); align-items: center; transition: color var(--dur-fast); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--s-2); right: var(--s-2); bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab-panel { padding-top: var(--s-5); animation: fade-in var(--dur) var(--ease); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
/* Variante formulaire : boutons radio (choix envoyé avec le formulaire, navigation clavier native). */
.segmented label { position: relative; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 550; cursor: pointer; }
.segmented label input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Modales, tiroirs, palette de commandes ---------- */
dialog { color: var(--text); }
.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.modal:not([open]) { display: none; }
.modal[open] { animation: pop-in var(--dur-slow) var(--ease); }
.modal::backdrop, .drawer::backdrop, .cmdk::backdrop { background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in var(--dur) var(--ease); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-3); }
.modal-body { padding: 0 var(--s-5) var(--s-5); overflow-y: auto; color: var(--text-2); }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); background: var(--surface-2); }
.modal-lg { width: min(860px, calc(100vw - 32px)); }

.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(480px, 100vw);
  padding: 0; border: 0; border-left: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.drawer:not([open]) { display: none; }
.drawer[open] { animation: slide-in-right var(--dur-slow) var(--ease); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5); border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s-5); }
.drawer-footer { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); display: flex; gap: var(--s-2); justify-content: flex-end; }

.cmdk {
  width: min(640px, calc(100vw - 24px)); margin-top: 12vh; padding: 0;
  border: 1px solid var(--border-strong); border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden;
}
.cmdk:not([open]) { display: none; }
.cmdk[open] { animation: pop-in var(--dur) var(--ease); }
.cmdk-input-row { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); border-bottom: 1px solid var(--border); }
.cmdk-input-row .icon { color: var(--muted); }
.cmdk-input { flex: 1; height: 56px; border: 0; background: transparent; font-size: var(--fs-md); outline: none; }
.cmdk-results { max-height: min(440px, 60vh); overflow-y: auto; padding: var(--s-2); }
.cmdk-group { padding: var(--s-2) var(--s-3) var(--s-1); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.cmdk-item { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-3); border-radius: var(--r-sm); color: var(--text-2); cursor: pointer; }
.cmdk-item .icon { color: var(--muted); }
.cmdk-item small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.cmdk-item[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.cmdk-item[aria-selected="true"] .icon { color: var(--accent); }
.cmdk-empty { padding: var(--s-8) var(--s-4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.cmdk-footer { display: flex; gap: var(--s-4); padding: var(--s-2) var(--s-4); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--muted); background: var(--surface-2); }
.cmdk-footer span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Menus déroulants ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; min-width: 220px;
  padding: var(--s-1); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform-origin: top right; animation: pop-in var(--dur) var(--ease);
}
.menu.menu-up { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; transform-origin: bottom left; }
.menu.menu-left { left: 0; right: auto; transform-origin: top left; }
.menu-item { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: 9px var(--s-3); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font-size: var(--fs-sm); text-align: left; cursor: pointer; text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.menu-item[aria-checked="true"] { color: var(--text); }
.menu-item[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--accent); font-weight: 700; }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; margin: var(--s-1) 0; background: var(--border); }
.menu-label { padding: var(--s-2) var(--s-3) var(--s-1); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }

/* ---------- Notifications (toasts) ---------- */
.toast-region { position: fixed; z-index: 90; right: var(--s-5); bottom: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  color: var(--text); font-size: var(--fs-sm);
  animation: toast-in var(--dur-slow) var(--ease);
}
.toast.is-leaving { animation: toast-out var(--dur) var(--ease) forwards; }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: var(--success); }
.toast-error .icon { color: var(--danger); }
.toast-warning .icon { color: var(--warning); }
.toast-info .icon { color: var(--info); }
.toast-close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; line-height: 0; }
.toast-close:hover { color: var(--text); }

/* ---------- États vides, chargement ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-3); padding: var(--s-12) var(--s-6); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty h3 { font-size: var(--fs-md); }
.empty p { color: var(--muted); max-width: 46ch; font-size: var(--fs-sm); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--r-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 7%, transparent), transparent); animation: shimmer 1.4s infinite; }
.skeleton-text { height: 12px; margin: 8px 0; }
.skeleton-title { height: 20px; width: 55%; }
.skeleton-block { height: 120px; border-radius: var(--r-md); }
.skeleton-circle { border-radius: 50%; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--dur-slow) var(--ease); }
.progress.success > span { background: var(--success); }
.progress.warning > span { background: var(--warning); }
.progress.danger > span { background: var(--danger); }

/* Jauge circulaire (santé du véhicule, budget) : --value de 0 à 100 */
.gauge { --value: 0; --tone: var(--accent); position: relative; width: 132px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--tone) calc(var(--value) * 1%), var(--surface-3) 0); }
.gauge::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.gauge > * { position: relative; text-align: center; }
.gauge strong { display: block; font-size: var(--fs-2xl); font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.gauge small { color: var(--muted); font-size: var(--fs-xs); }
.gauge.success { --tone: var(--success); }
.gauge.warning { --tone: var(--warning); }
.gauge.danger { --tone: var(--danger); }

/* ---------- Carte cliquable et panneau dépliable ---------- */
.card-link { transition: border-color var(--dur-fast), transform var(--dur-fast); }
.card-link:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.disclosure > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; font-size: var(--fs-sm); color: var(--accent-hover); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure[open] > summary { margin-bottom: var(--s-4); }

/* ---------- Chronologie ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--border); border-radius: 2px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); padding-bottom: var(--s-5); }
.timeline-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-strong); }
.timeline-dot .icon { width: 12px; height: 12px; }
.timeline-item.is-accent .timeline-dot { border-color: var(--accent); color: var(--accent); }
.timeline-item.is-success .timeline-dot { border-color: var(--success); color: var(--success); }
.timeline-title { font-weight: 600; color: var(--text); font-size: var(--fs-sm); }
.timeline-meta { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Cartes d'annonces ---------- */
.ad-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: inherit; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur); }
.ad-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); color: inherit; }
.ad-photo { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); overflow: hidden; }
.ad-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.ad-card:hover .ad-photo img { transform: scale(1.04); }
.ad-photo .no-photo { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.ad-photo .no-photo .icon { width: 34px; height: 34px; }
.ad-photo-top { position: absolute; top: var(--s-2); left: var(--s-2); right: var(--s-2); display: flex; justify-content: space-between; gap: var(--s-2); }
.ad-photo-top .badge { backdrop-filter: blur(8px); background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text); }
.ad-photo-count { position: absolute; bottom: var(--s-2); right: var(--s-2); display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text); backdrop-filter: blur(8px); }
.ad-body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); }
.ad-title { font-weight: 650; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-price { display: flex; align-items: baseline; gap: var(--s-2); font-size: var(--fs-xl); font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ad-price s { font-size: var(--fs-sm); color: var(--faint); font-weight: 500; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 6px var(--s-3); font-size: var(--fs-xs); color: var(--muted); }
.ad-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ad-meta .icon { width: 13px; height: 13px; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: var(--s-4); overflow-x: auto; padding-bottom: var(--s-3); scroll-snap-type: x proximity; }
.kanban-col { display: flex; flex-direction: column; gap: var(--s-2); min-height: 200px; padding: var(--s-3); border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--border); scroll-snap-align: start; transition: border-color var(--dur), background var(--dur); }
.kanban-col.is-drop-target { border-color: var(--accent); background: var(--accent-soft); }
.kanban-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-1) var(--s-1) var(--s-2); }
.kanban-head h3 { font-size: var(--fs-sm); display: flex; align-items: center; gap: var(--s-2); }
.kanban-head .sum { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.kanban-card { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); cursor: grab; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur); }
.kanban-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.kanban-card.is-dragging { opacity: .45; transform: rotate(1.5deg); cursor: grabbing; }
.kanban-card-title { font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.kanban-card-meta { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Barre d'actions mobile (appel, SMS, WhatsApp en un tap) ---------- */
.action-bar { position: sticky; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-2); padding: var(--s-3); padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.action-bar .btn { height: 48px; flex-direction: column; gap: 3px; font-size: 11px; }

/* ---------- Divers ---------- */
.divider { height: 1px; background: var(--border); margin: var(--s-4) 0; }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { content: attr(data-tooltip); position: absolute; z-index: 60; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: var(--r-xs); background: var(--text); color: var(--bg); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; pointer-events: none; animation: fade-in var(--dur-fast) var(--ease); }
.swatch { height: 56px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.chart-box { position: relative; height: 260px; }
.code-block { font-family: var(--mono); font-size: var(--fs-xs); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--s-3); overflow-x: auto; color: var(--text-2); white-space: pre; }

/* ---------- Écrans d'authentification ---------- */
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--s-4); background: radial-gradient(1100px 520px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: var(--s-8) var(--s-6); animation: rise var(--dur-slow) var(--ease); }
.auth-card h1 { text-align: center; font-size: var(--fs-xl); }
.auth-card .sub { text-align: center; color: var(--muted); margin: var(--s-2) 0 var(--s-6); font-size: var(--fs-sm); }
.auth-lock { width: 46px; height: 46px; margin: 0 auto var(--s-5); border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.auth-foot { text-align: center; margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--muted); }
.code-input { font-size: 28px; letter-spacing: .35em; text-align: center; font-family: var(--mono); height: 58px; }
.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.codes-grid li { font-family: var(--mono); font-size: var(--fs-md); letter-spacing: .08em; text-align: center; padding: var(--s-3); border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- Utilitaires ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.text-2 { color: var(--text-2); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-lg { font-size: var(--fs-lg); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); }
.w-full { width: 100%; }
.flex-1 { flex: 1 1 auto; min-width: 0; }
.show-mobile { display: none; }

/* ---------- Animations ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slide-in-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes slide-in-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
.reveal { animation: rise var(--dur-slow) var(--ease) both; }
.reveal:nth-child(2) { animation-delay: 40ms; } .reveal:nth-child(3) { animation-delay: 80ms; } .reveal:nth-child(4) { animation-delay: 120ms; } .reveal:nth-child(5) { animation-delay: 160ms; } .reveal:nth-child(n+6) { animation-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ---------- Adaptation tablette et mobile (mobile-first pour l'usage à une main) ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-detail { grid-template-columns: minmax(0, 1fr); }
  .search-trigger { min-width: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
}
@media (max-width: 860px) {
  .app, .app.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform var(--dur-slow) var(--ease); box-shadow: var(--shadow-lg); }
  .app.is-sidebar-open .sidebar { transform: none; }
  .app.is-collapsed .nav-label, .app.is-collapsed .nav-group-label, .app.is-collapsed .logo-text, .app.is-collapsed .ws-label, .app.is-collapsed .nav-badge { opacity: 1; width: auto; pointer-events: auto; }
  .app.is-collapsed .nav-item, .app.is-collapsed .ws-switch { justify-content: flex-start; padding-inline: var(--s-3); }
  .collapse-btn { display: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); display: block; }
  .app.is-sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 0 var(--s-4); }
  .breadcrumbs li:not(:last-child) { display: none; }
  .content { padding: var(--s-5) var(--s-4) calc(var(--bottom-nav-h) + var(--s-8)); gap: var(--s-5); }
  .bottom-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg-elev) 88%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-top: 1px solid var(--border); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 10.5px; font-weight: 600; background: none; border: 0; cursor: pointer; }
  .bottom-nav [aria-current="page"] { color: var(--accent); }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .toast-region { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(var(--bottom-nav-h) + var(--s-3) + env(safe-area-inset-bottom)); }
  .drawer { width: 100vw; max-width: 100vw; height: auto; max-height: 88dvh; margin: auto 0 0; border-left: 0; border-top: 1px solid var(--border); border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .drawer[open] { animation: slide-in-up var(--dur-slow) var(--ease); }
  .modal { width: calc(100vw - 16px); margin-bottom: 8px; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial; }
}
@media (max-width: 640px) {
  .table td.primary { min-width: 9rem; }
  .breadcrumbs li:not(:first-child):not(:last-child) { display: none; }
  h1 { font-size: var(--fs-xl); }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .page-header { align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .stat-value { font-size: var(--fs-xl); }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: var(--s-2); }
  .card-body { padding: var(--s-4); }
  .table-wrap { margin: 0; }
}

/* ---------- Assistant IA, base de connaissances ---------- */
.fieldset-plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset-plain > legend { padding: 0; margin-bottom: var(--s-2); }
.select-sm { height: 34px; padding-top: 0; padding-bottom: 0; font-size: var(--fs-sm); background-position: calc(100% - 18px) 14px, calc(100% - 13px) 14px; width: auto; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; line-height: 1.55; }
.disclosure-static { padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.list-rows > li { padding: var(--s-3) var(--s-5); }
.list-rows > li:hover { background: var(--surface-2); }
.list > li.is-current { background: var(--accent-soft); border-radius: var(--r-sm); padding-left: var(--s-2); padding-right: var(--s-2); }
.ai-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.grid-assistant { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.chat { display: flex; flex-direction: column; gap: var(--s-3); min-height: 0; height: 100%; }
.chat-card .chat-log { max-height: min(62vh, 640px); }
.chat-log { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-3); padding-right: 2px; overscroll-behavior: contain; }
.chat-empty { text-align: center; color: var(--muted); padding: var(--s-6) var(--s-4); }
.chat-empty .empty-icon { margin: 0 auto var(--s-3); }
.chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.chat-msg.is-user { align-self: flex-end; align-items: flex-end; }
.chat-msg.is-assistant { align-self: flex-start; }
.chat-bubble { white-space: pre-wrap; overflow-wrap: anywhere; padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-sm); line-height: 1.55; color: var(--text); }
.chat-msg.is-user .chat-bubble { background: var(--accent-soft); border-color: var(--accent-line); border-bottom-right-radius: var(--r-sm); }
.chat-msg.is-assistant .chat-bubble { border-bottom-left-radius: var(--r-sm); }
.chat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: 12px; color: var(--muted); }
.chat-meta form { display: inline; }
.chat-meta .btn-sm { height: 26px; padding: 0 8px; font-size: 12px; }
.chat-confirm { align-items: flex-start; }
.chat-form { display: flex; flex-direction: column; gap: var(--s-2); }
.chat-form .textarea { min-height: 64px; resize: vertical; }
.chat-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.chat-actions .select { flex: 0 1 auto; min-width: 0; }
.chat-actions .btn { flex: none; }
.ai-drawer .drawer-body { display: flex; flex-direction: column; padding: var(--s-4); overflow-x: hidden; }
.ai-drawer[open] { height: 100dvh; }
.ai-drawer .drawer-header { padding: var(--s-4) var(--s-5); }
.ai-fab {
  position: fixed; z-index: 25; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: var(--r-full); border: 1px solid var(--accent-line);
  background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent), var(--shadow-lg);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.ai-fab:hover { transform: translateY(-2px) scale(1.03); }
.ai-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ai-fab .icon { width: 22px; height: 22px; }
/* Notifications au-dessus du bouton de l'assistant (jamais masquées). */
body:has(.ai-fab) .toast-region { bottom: calc(var(--s-5) + 64px); }
@media (max-width: 860px) {
  .grid-assistant { grid-template-columns: minmax(0, 1fr); }
  .ai-fab { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 14px); right: 14px; width: 48px; height: 48px; }
  body:has(.ai-fab) .toast-region { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 72px); }
}
@media (max-width: 640px) {
  .chat-msg { max-width: 100%; }
  .ai-drawer[open] { height: 88dvh; }
  .list-rows > li { padding: var(--s-3) var(--s-4); }
  .ai-actions form { width: 100%; }
}
@media print { .ai-fab, .ai-drawer { display: none !important; } }

/* ---------- CRM : pipeline, fiche prospect, tableau de bord ---------- */
.kanban-list { display: flex; flex-direction: column; gap: var(--s-2); flex: 1; min-height: 64px; }
.kanban-card { position: relative; }
.kanban-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kanban-card.is-overdue { border-left: 3px solid var(--danger); }
.kanban-card-title { display: block; text-decoration: none; }
.kanban-card-title:hover { color: var(--accent-hover); }
.kanban-card-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.kanban-move { margin-top: var(--s-2); }
.kanban-move > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.kanban-move > summary::-webkit-details-marker { display: none; }
.kanban-move > summary:hover { color: var(--text); }
.kanban-move-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--s-2); }
.kanban-empty { margin: 0; padding: var(--s-4) var(--s-2); text-align: center; font-size: var(--fs-xs); color: var(--faint); border: 1px dashed var(--border); border-radius: var(--r-md); }
.kanban-drop-marker { height: 3px; border-radius: 2px; background: var(--accent); }
.kanban-col[data-stage="lost"] .kanban-card { opacity: .8; }
.stage-track { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.stage-track li { flex: 1 1 auto; text-align: center; padding: 6px 10px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.stage-track li.is-done { color: var(--text-2); background: var(--accent-soft); border-color: transparent; }
.stage-track li.is-current { color: #fff; background: var(--accent); border-color: var(--accent); }
.stage-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: var(--s-3); align-items: end; }
.stage-form .form-actions { margin: 0; }
.mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.mini-stats .stat-value { font-size: var(--fs-xl); }
.link-ext { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.check-row .input { height: 34px; }
.check-item { padding-bottom: var(--s-3); border-bottom: 1px solid var(--border); }
.check-item:last-of-type { border-bottom: 0; }
.check-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s-2); margin-top: var(--s-2); }
.signal-list { margin: 0; padding-left: 1.1rem; color: var(--text-2); }
.signal-list li + li { margin-top: 4px; }
.list > li.is-done { opacity: .6; }
@media (max-width: 860px) {
  .stage-form { grid-template-columns: minmax(0, 1fr); }
  .action-bar.show-mobile { display: grid; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); margin: 0 calc(-1 * var(--s-4)); }
  body:has(.action-bar.show-mobile) .ai-fab { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 84px); }
}
@media (max-width: 640px) {
  .check-row { grid-template-columns: minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .kpi-grid .stat { padding: var(--s-4); }
  .kpi-grid .stat-value { font-size: var(--fs-xl); }
}
@media print { .kanban-move, .action-bar { display: none !important; } }

/* ---------- Impression ---------- */
@media print {
  .sidebar, .topbar, .bottom-nav, .toast-region, .page-actions, .action-bar, .no-print { display: none !important; }
  .app { display: block; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ---------- Rapports PDF (étape 11) ---------- */
.report-menu { width: min(320px, calc(100vw - 32px)); padding: var(--s-3); }
.report-menu .check { font-size: var(--fs-sm); }

/* ---------- Réglages, équipe, administration (étape 12) ---------- */
a.tab { text-decoration: none; }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: var(--s-2); right: var(--s-2); bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.logo-img { border-radius: 9px; object-fit: contain; background: var(--surface-2); flex: none; }
.brand-preview { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px dashed var(--border-strong); border-radius: var(--r-md); }
.brand-preview img, .brand-preview svg { width: 48px; height: 48px; }
.invite-link { display: flex; gap: var(--s-2); align-items: stretch; }
.invite-link input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs); }
.quota-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.quota-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.quota-bar.is-full > span { background: var(--danger); }
.plan-card.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.backup-codes code { display: block; padding: var(--s-2); text-align: center; border-radius: var(--r-sm); background: var(--surface-2); }
.input[type="file"] { padding: 5px 6px; height: auto; color: var(--muted); }
.input[type="file"]::file-selector-button { margin-right: var(--s-3); padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: var(--s-2); }

/* Santé du système (étape 13) */
.stack-xs { display: flex; flex-direction: column; gap: 2px; }
.min-w-0 { min-width: 0; }
.break-word { overflow-wrap: anywhere; }
.mt-3 { margin-top: var(--s-3); }
.check-fix { display: flex; align-items: flex-start; gap: var(--s-1, 4px); color: var(--text); }
.check-fix .icon { flex: none; margin-top: 1px; }
.webhook-url { display: flex; gap: var(--s-2); align-items: center; }
.webhook-url .input { flex: 1; min-width: 0; font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--fs-xs); }
.steps { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------- Application installée (PWA, 2026-10-25) */
/* iOS agrandit la page quand on touche un champ de moins de 16 px : 16 px sur écran tactile. */
@media (pointer: coarse) {
  html[data-pwa] .input, html[data-pwa] .select, html[data-pwa] .textarea, html[data-pwa] .cmdk-input, html[data-pwa] input:not([type="checkbox"]):not([type="radio"]), html[data-pwa] select, html[data-pwa] textarea { font-size: 16px; }
}
html[data-pwa] { -webkit-tap-highlight-color: transparent; }
html[data-pwa] .bottom-nav, html[data-pwa] .sidebar, html[data-pwa] .topbar { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Paysage sur iPhone : contenu hors de l'encoche. */
.topbar { padding-left: max(var(--s-6), env(safe-area-inset-left)); padding-right: max(var(--s-6), env(safe-area-inset-right)); }
@media (max-width: 860px) {
  .topbar { padding-left: max(var(--s-4), env(safe-area-inset-left)); padding-right: max(var(--s-4), env(safe-area-inset-right)); }
  .content { padding-left: max(var(--s-4), env(safe-area-inset-left)); padding-right: max(var(--s-4), env(safe-area-inset-right)); }
}
/* Mode installé : la barre d'état est translucide, la barre du haut descend sous l'heure et l'encoche. */
.pwa-only { display: none !important; }
@media (display-mode: standalone) {
  .pwa-only { display: inline-flex !important; }
  .topbar { padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); }
  .sidebar { padding-top: calc(18px + env(safe-area-inset-top)); }
  .browser-only { display: none !important; }
}
.pwa-install__steps { display: grid; gap: var(--s-3); margin: 0; padding-left: 20px; }
.pwa-install__steps li { padding-left: 4px; }
.pwa-install [data-pwa-platform] { display: none; }
.pwa-install[data-platform="ios"] [data-pwa-platform~="ios"], .pwa-install[data-platform="mac"] [data-pwa-platform~="mac"], .pwa-install[data-platform="other"] [data-pwa-platform~="other"],
.pwa-install[data-platform="installed"] [data-pwa-platform~="installed"] { display: block; }
