/* ============================================================================
   Teampulse by Art of Dev — Design System (theme.css)
   Premium corporate SaaS B2B theme. Dependency-free, no build step.
   Shared by the public landing and the application shell.
   ----------------------------------------------------------------------------
   Sections:
     1. Design tokens (colors, type, spacing, radius, shadow, motion)
     2. Reset & base elements
     3. Typography helpers
     4. Layout primitives (container, grid, stack, cluster)
     5. Components (buttons, cards, badges, inputs, tables, modal, toast…)
     6. App shell (sidebar, topbar, content)
     7. Utilities
   ============================================================================ */

/* 1. ───────────────────────────── Design tokens ───────────────────────── */
:root {
  /* Brand — "pulse" identity: deep indigo + energetic teal/violet accents */
  --brand-900: #0b1020;
  --brand-800: #121a33;
  --brand-700: #1b2547;
  --brand-600: #283466;
  --brand-500: #3a4a8c;

  --accent: #6366f1;        /* indigo  — primary action */
  --accent-2: #14b8a6;      /* teal    — energy / positive */
  --accent-3: #a855f7;      /* violet  — culture / social */
  --accent-warm: #f59e0b;   /* amber   — campaigns / highlight */
  --accent-rose: #f43f5e;   /* rose    — alerts / pulse */

  --accent-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 60%, #14b8a6 130%);
  --pulse-grad: linear-gradient(120deg, #818cf8, #a855f7 40%, #2dd4bf);

  /* Light corporate surface (default app + landing) */
  --bg: #f5f7fb;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --line: #e4e8f0;
  --line-strong: #d2d9e6;

  --text: #141a2e;
  --text-soft: #475069;
  --text-mut: #717a93;
  --text-faint: #98a1b8;
  --on-accent: #ffffff;

  /* Status */
  --ok: #16a34a;
  --ok-bg: #e8f7ee;
  --warn: #d97706;
  --warn-bg: #fdf3e3;
  --err: #e11d48;
  --err-bg: #fdeaee;
  --info: #2563eb;
  --info-bg: #e8f0fe;

  /* Type */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.825rem;
  --fs-base: 0.925rem;
  --fs-md: 1.05rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.6rem;
  --fs-2xl: 2.1rem;
  --fs-3xl: 2.9rem;
  --fs-4xl: 3.8rem;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px; --s-10: 72px; --s-12: 96px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-2xl: 30px; --r-full: 999px;

  /* Shadow — soft, layered, premium */
  --sh-1: 0 1px 2px rgba(16,24,46,.06), 0 1px 3px rgba(16,24,46,.04);
  --sh-2: 0 4px 14px rgba(16,24,46,.07), 0 2px 6px rgba(16,24,46,.05);
  --sh-3: 0 14px 40px rgba(16,24,46,.12), 0 6px 14px rgba(16,24,46,.06);
  --sh-glow: 0 10px 40px rgba(99,102,241,.28);

  --maxw: 1240px;
  --side-w: 256px;
  --motion: 180ms cubic-bezier(.2,.7,.3,1);
}

/* Optional dark surface for the app shell — enabled via [data-theme="dark"] */
[data-theme="dark"] {
  --bg: #0b1020;
  --bg-soft: #0e1428;
  --surface: #141b34;
  --surface-2: #18203c;
  --surface-3: #1d264a;
  --line: #26304f;
  --line-strong: #324063;
  --text: #eef1fb;
  --text-soft: #b9c2dc;
  --text-mut: #8a95b6;
  --text-faint: #6b769b;
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 6px 18px rgba(0,0,0,.45);
  --sh-3: 0 18px 50px rgba(0,0,0,.55);
}

/* 2. ───────────────────────────── Reset & base ────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(99,102,241,.22); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--bg); }

/* 3. ───────────────────────────── Typography ──────────────────────────── */
h1,h2,h3,h4 { line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.lead { font-size: var(--fs-md); color: var(--text-soft); }
.muted { color: var(--text-mut); }
.faint { color: var(--text-faint); }
.mono { font-family: var(--mono); }
.gradient-text {
  background: var(--accent-grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}

/* 4. ───────────────────────────── Layout ──────────────────────────────── */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s-6); }
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-7); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.row { display: flex; gap: var(--s-4); }
.row.between { justify-content: space-between; align-items: center; }
.row.center { align-items: center; }
.grid { display: grid; gap: var(--s-5); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.auto-sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.spacer { flex: 1; }
.hide { display: none !important; }

/* 5. ───────────────────────────── Components ──────────────────────────── */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 10px 18px; border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-sm);
  border: 1px solid transparent; transition: transform var(--motion), box-shadow var(--motion), background var(--motion), border-color var(--motion);
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: var(--sh-glow); }
.btn-primary:hover { box-shadow: 0 14px 48px rgba(99,102,241,.4); transform: translateY(-1px); }
.btn-solid { background: var(--text); color: var(--surface); }
.btn-solid:hover { background: #000; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--sh-1); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-soft { background: rgba(99,102,241,.1); color: var(--accent); }
.btn-soft:hover { background: rgba(99,102,241,.18); }
.btn-danger { background: var(--err-bg); color: var(--err); }
.btn-danger:hover { background: #fbd5dd; }
.btn-sm { padding: 6px 12px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { padding: 14px 26px; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-icon { padding: 9px; border-radius: var(--r-sm); }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); transition: box-shadow var(--motion), transform var(--motion), border-color var(--motion);
}
.card-pad { padding: var(--s-6); }
.card-pad-sm { padding: var(--s-5); }
.card.hover:hover { box-shadow: var(--sh-3); transform: translateY(-3px); border-color: var(--line-strong); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.card-title { font-size: var(--fs-md); font-weight: 700; }

/* Stat / KPI */
.stat { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); position: relative; overflow: hidden; }
.stat .label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-mut); font-weight: 600; }
.stat .value { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.stat .delta { font-size: var(--fs-xs); font-weight: 600; margin-top: 6px; display: inline-flex; gap: 4px; align-items: center; }
.stat .delta.up { color: var(--ok); }
.stat .delta.down { color: var(--err); }
.stat .spark { position: absolute; right: 0; bottom: 0; opacity: .9; }
.stat .corner-ico { position: absolute; top: var(--s-5); right: var(--s-5); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(99,102,241,.1); color: var(--accent); }

/* Badges & tags */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; background: var(--surface-3); color: var(--text-soft); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.accent { background: rgba(99,102,241,.12); color: var(--accent); border-color: transparent; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; padding: 4px 11px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; background: var(--surface-3); color: var(--text-soft); border: 1px solid var(--line); cursor: default; }
.tag.pick { cursor: pointer; transition: all var(--motion); }
.tag.pick:hover { border-color: var(--accent); color: var(--accent); }
.tag.active { background: rgba(99,102,241,.14); color: var(--accent); border-color: transparent; }

/* Category pills with color accents */
.cat { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Avatars */
.avatar { --sz: 40px; width: var(--sz); height: var(--sz); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--sz) * .38); color: #fff; flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.avatar.sm { --sz: 30px; }
.avatar.lg { --sz: 64px; }
.avatar.xl { --sz: 92px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 0 0 2px var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* Inputs */
.field { display: block; }
.field > .lbl { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; color: var(--text-soft); }
.field .hint { font-size: var(--fs-xs); color: var(--text-mut); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 13px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); font-size: var(--fs-sm); transition: border-color var(--motion), box-shadow var(--motion);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.textarea { resize: vertical; min-height: 92px; }
.input-lg { padding: 14px 16px; font-size: var(--fs-md); }
.switch { position: relative; width: 44px; height: 25px; border-radius: 999px; background: var(--line-strong); transition: background var(--motion); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--motion); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(19px); }
.switch.disabled { opacity: .45; pointer-events: none; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-mut); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr.click { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }

/* Progress */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--accent-grad); }
.ring { --p: 0; --sz: 116px; width: var(--sz); height: var(--sz); border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0);
  display: grid; place-items: center; }
.ring::before { content: ""; position: absolute; width: calc(var(--sz) - 22px); height: calc(var(--sz) - 22px); border-radius: 50%; background: var(--surface); }
.ring .ring-val { position: relative; font-weight: 800; font-size: var(--fs-xl); }

/* Empty / placeholder (used sparingly, never a "dead" page) */
.empty { text-align: center; padding: var(--s-9) var(--s-6); color: var(--text-mut); }
.empty .ico { width: 46px; height: 46px; margin: 0 auto var(--s-4); color: var(--text-faint); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,16,32,.55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 80; padding: var(--s-5); opacity: 0; animation: fade .2s forwards; }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; transform: translateY(8px) scale(.98); animation: pop .22s forwards; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: var(--s-6); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s-3); padding: var(--s-5) var(--s-6); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
@keyframes fade { to { opacity: 1; } }
@keyframes pop { to { transform: none; } }

/* Toast */
#toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-md); box-shadow: var(--sh-3); font-size: var(--fs-sm); font-weight: 500; min-width: 260px; max-width: 380px; animation: toastIn .25s cubic-bezier(.2,.8,.2,1); }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast .ico { width: 18px; height: 18px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

/* Tabs / segmented */
.tabs { display: inline-flex; background: var(--surface-3); padding: 4px; border-radius: var(--r-md); gap: 2px; }
.tabs button { padding: 7px 15px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; color: var(--text-mut); transition: all var(--motion); }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }

/* Section sub-nav (admin) */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: var(--s-6); }
.subnav a { padding: 10px 14px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-mut); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--motion); }
.subnav a:hover { color: var(--text); }
.subnav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-7); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head .sub { color: var(--text-mut); margin-top: 4px; }

/* Bars chart (CSS only) */
.barchart { display: flex; align-items: flex-end; gap: 10px; height: 160px; }
.barchart .bar { flex: 1; background: var(--accent-grad); border-radius: 8px 8px 4px 4px; min-height: 6px; position: relative; transition: height .5s cubic-bezier(.2,.8,.2,1); opacity: .92; }
.barchart .bar:hover { opacity: 1; }
.barchart .bar span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: var(--fs-xs); font-weight: 700; color: var(--text-soft); }
.barchart .bar small { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-mut); white-space: nowrap; }

/* Donut legend list */
.legend { display: grid; gap: 10px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.legend .swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend .val { margin-left: auto; font-weight: 700; }

/* Notice / banner */
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); background: var(--info-bg); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.notice .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* 6. ───────────────────────────── App shell ───────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--brand-900); color: #cdd5ee; display: flex; flex-direction: column; padding: var(--s-5) var(--s-4); overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px var(--s-5); }
.sidebar .brand .mark { width: 34px; height: 34px; flex: none; }
.sidebar .brand b { color: #fff; font-size: var(--fs-md); letter-spacing: -.02em; }
.sidebar .brand small { display: block; font-size: 10px; color: #8a93bd; letter-spacing: .04em; }
.nav-group { margin-top: var(--s-5); }
.nav-group .gl { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #6b76a3; font-weight: 700; padding: 0 10px var(--s-2); }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-md); color: #aeb7da; font-weight: 500; font-size: var(--fs-sm); transition: background var(--motion), color var(--motion); position: relative; }
.nav-item .ico { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(99,102,241,.32), rgba(168,85,247,.18)); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 3px; border-radius: 4px; background: var(--pulse-grad); }
.nav-item .pill { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.12); }
.nav-item .lock { margin-left: auto; opacity: .55; }
.sidebar .side-foot { margin-top: auto; padding-top: var(--s-5); }
.sidebar .side-foot .who { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md); background: rgba(255,255,255,.05); }
.sidebar .side-foot .who b { color: #fff; font-size: var(--fs-sm); display: block; }
.sidebar .side-foot .who small { color: #8a93bd; font-size: var(--fs-xs); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--s-4); padding: 13px var(--s-7); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.searchbar { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-full); padding: 8px 15px; flex: 1; max-width: 420px; color: var(--text-mut); }
.searchbar input { border: none; background: none; flex: 1; font-size: var(--fs-sm); }
.searchbar input:focus { outline: none; }
.icon-btn { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--text-soft); border: 1px solid var(--line); background: var(--surface); transition: all var(--motion); position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-rose); border: 2px solid var(--surface); }
.content { padding: var(--s-7); max-width: 1320px; width: 100%; margin-inline: auto; }

/* Demo watermark + banner */
.demo-banner { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 7px var(--s-5); font-size: var(--fs-xs); font-weight: 600; color: #fff; background: var(--accent-grad); }
.demo-banner .dotpulse { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 50% { box-shadow: 0 0 0 6px rgba(255,255,255,0); } }
.watermark { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 30; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); pointer-events: none; opacity: .6; }

/* Language switcher (FR | EN pill) */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.lang-switch .ls-globe { display: grid; place-items: center; width: 24px; height: 24px; color: var(--text-mut); }
.lang-switch .ls-btn { padding: 4px 11px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .03em; color: var(--text-mut); transition: all var(--motion); }
.lang-switch .ls-btn:hover { color: var(--text); }
.lang-switch .ls-btn.active { background: var(--accent-grad); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.35); }
.topbar .lang-switch { background: var(--surface); }

/* 7. ───────────────────────────── Utilities ───────────────────────────── */
.tc { text-align: center; } .tr { text-align: right; }
.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)}.mt-8{margin-top:var(--s-8)}
.mb-2{margin-bottom:var(--s-2)}.mb-4{margin-bottom:var(--s-4)}.mb-6{margin-bottom:var(--s-6)}
.fw-700{font-weight:700}.fw-600{font-weight:600}
.fs-sm{font-size:var(--fs-sm)}.fs-xs{font-size:var(--fs-xs)}.fs-lg{font-size:var(--fs-lg)}.fs-xl{font-size:var(--fs-xl)}
.w-full{width:100%} .nowrap{white-space:nowrap} .pointer{cursor:pointer}
.rounded{border-radius:var(--r-lg)} .of-hidden{overflow:hidden}
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .6s forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1080px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 90; width: 280px; transform: translateX(-100%); transition: transform var(--motion); }
  .sidebar.open { transform: none; }
  .topbar .menu-btn { display: grid; }
  .content { padding: var(--s-5); }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto; }
}
