/* ==========================================================================
   Influa TN — design system
   ========================================================================== */

:root {
  --brand: #e70013;
  --brand-600: #c4000f;
  --brand-700: #9c000c;
  --brand-50: #fff1f2;
  --brand-100: #ffe0e3;
  --gold: #f5b700;

  --ink: #111318;
  --ink-2: #353a46;
  --muted: #687083;
  --line: #e6e4df;
  --line-strong: #d6d3cc;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #faf9f6;

  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #a15c07;
  --warn-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --info: #1d4ed8;
  --info-bg: #e0e9ff;
  --neutral-bg: #efede8;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, 0.05);
  --shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 8px 24px rgba(17, 19, 24, 0.06);
  --shadow-lg: 0 2px 4px rgba(17, 19, 24, 0.05), 0 24px 60px rgba(17, 19, 24, 0.12);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3f2ee;
    --ink-2: #d6d4cd;
    --muted: #9ba1b0;
    --line: #2a2d35;
    --line-strong: #3a3e48;
    --bg: #0e1014;
    --surface: #16181e;
    --surface-2: #1b1e25;
    --brand-50: #2a0c10;
    --brand-100: #3d1217;
    --ok-bg: #0f2e1b;
    --warn-bg: #3a2a08;
    --danger-bg: #3a1212;
    --info-bg: #142247;
    --neutral-bg: #23262e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #f3f2ee;
  --ink-2: #d6d4cd;
  --muted: #9ba1b0;
  --line: #2a2d35;
  --line-strong: #3a3e48;
  --bg: #0e1014;
  --surface: #16181e;
  --surface-2: #1b1e25;
  --brand-50: #2a0c10;
  --brand-100: #3d1217;
  --ok-bg: #0f2e1b;
  --warn-bg: #3a2a08;
  --danger-bg: #3a1212;
  --info-bg: #142247;
  --neutral-bg: #23262e;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; outline: none; padding-top: 32px; padding-bottom: 72px; }
main:focus, main:focus-visible { outline: none; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
details summary { cursor: pointer; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.hide-sm { display: inline; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.hint { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.icon { flex: none; vertical-align: middle; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin: 0 0 8px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--brand); font-weight: 800; }
.brand--light { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex: 1; }
.nav-link { color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px; }
.nav-link:hover { background: var(--neutral-bg); text-decoration: none; color: var(--ink); }
.nav-link.is-active { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--neutral-bg); text-decoration: none; }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.menu-toggle { display: none; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; }

/* ---------- Avatars & badges ---------- */
.avatar {
  --h: 0;
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 30) 75% 38%));
  color: #fff; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.avatar--sm { width: 30px; height: 30px; font-size: 0.72rem; }
.avatar--md { width: 40px; height: 40px; }
.avatar--lg { width: 52px; height: 52px; font-size: 1rem; }
.avatar--xl { width: 88px; height: 88px; font-size: 1.6rem; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--neutral-bg); color: var(--ink-2); }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--neutral { background: var(--neutral-bg); color: var(--muted); }
.verified { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; font-weight: 700; color: var(--ok); background: var(--ok-bg); padding: 3px 8px; border-radius: 999px; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--brand-600); background: var(--brand-50); padding: 3px 10px; border-radius: 999px; }
.platform, .chip-static { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--ink-2); background: var(--neutral-bg); padding: 3px 9px; border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 18px -8px rgba(231, 0, 19, 0.6); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover:not(:disabled) { border-color: var(--ink); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--neutral-bg); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(0.92); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-bg); }
.btn-light { background: #fff; color: var(--brand-600); }
.btn-light:hover:not(:disabled) { background: #fff; color: var(--brand-700); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline-light:hover:not(:disabled) { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.85rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.head-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-actions { justify-content: flex-end; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin 0.7s linear infinite; opacity: 0.85; }
.spinner--lg { width: 36px; height: 36px; border-width: 3px; color: var(--brand); }
.page-loading { display: grid; place-items: center; min-height: 40vh; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toasts & dialogs ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; font-size: 0.92rem; animation: rise 0.25s ease; border-left: 4px solid var(--brand); }
.toast--success { border-left-color: var(--ok); }
.toast--error { border-left-color: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all 0.35s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 12, 16, 0.5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 150; animation: fade 0.15s ease; }
.modal { width: min(480px, 100%); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px; }
.modal h2 { margin-bottom: 10px; }
.modal-body p { color: var(--ink-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 0; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-inner h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.footer-inner a { display: block; color: var(--ink-2); padding: 3px 0; font-size: 0.95rem; }
.footer-inner p { margin-top: 12px; max-width: 360px; font-size: 0.95rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: 0.85rem; color: var(--muted); }

/* ---------- Cards, alerts, stats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 1.1rem; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 0.95rem; border: 1px solid transparent; }
.alert strong { color: inherit; }
.alert--ok { background: var(--ok-bg); color: var(--ok); }
.alert--warn { background: var(--warn-bg); color: var(--warn); }
.alert--danger { background: var(--danger-bg); color: var(--danger); }
.alert--info { background: var(--info-bg); color: var(--info); }
.alert .icon { margin-top: 2px; }
.alert > div { color: var(--ink); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 0.9rem; position: relative; transition: transform 0.15s, box-shadow 0.15s; }
.stat-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card strong { font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; margin-top: 8px; }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; margin: 0 -8px; border-radius: 10px; color: var(--ink); border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--surface-2); text-decoration: none; }
.mini-row.is-unread strong { color: var(--brand-600); }
.mini-main { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.mini-main strong { font-size: 0.95rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Hero & landing ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 24px 0 56px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--brand); background: linear-gradient(transparent 62%, var(--gold) 62%, var(--gold) 92%, transparent 92%); padding: 0 2px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-proof { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-size: 0.92rem; }
.hero-proof li { display: inline-flex; align-items: center; gap: 6px; }
.hero-proof .icon { color: var(--ok); }
.hero-visual { position: relative; min-height: 420px; }
.hero-blob { position: absolute; inset: 6% 4% 4% 10%; border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%; background: radial-gradient(circle at 30% 30%, var(--brand) 0%, var(--brand-600) 55%, #6b0009 100%); opacity: 0.95; filter: saturate(1.05); }
.hero-blob::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 75% 20%, rgba(255,255,255,0.35), transparent 40%); }
.mock-card { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(340px, 84%); background: var(--surface); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.mock-card .verified { grid-column: 1 / -1; justify-self: start; }
.mock-card strong { display: block; }
.mock-stats { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mock-stats span { font-size: 0.75rem; font-weight: 700; background: var(--neutral-bg); color: var(--ink-2); border-radius: 8px; padding: 3px 7px; }
.float-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: 0.88rem; min-width: 220px; }
.float-card strong { display: block; font-size: 0.9rem; }
.float-card--top { top: 4%; right: 0; }
.float-card--mid { bottom: 6%; left: 0; }
.float-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.float-icon--ok { background: var(--ok-bg); color: var(--ok); }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.stats-strip > div { padding: 24px; text-align: center; border-right: 1px solid var(--line); }
.stats-strip > div:last-child { border-right: 0; }
.stats-strip strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: var(--brand); }
.stats-strip span { font-size: 0.9rem; color: var(--muted); }

.section { padding: 48px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .eyebrow { margin-bottom: 6px; }
.niche-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.niche { padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 0.92rem; transition: all 0.15s; }
.niche:hover { border-color: var(--brand); color: var(--brand-600); text-decoration: none; transform: translateY(-1px); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }
.inf-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); box-shadow: var(--shadow-sm); transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; position: relative; }
.inf-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); text-decoration: none; }
.inf-card-top { display: flex; gap: 14px; align-items: center; }
.inf-card-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.inf-card-id strong { font-size: 1.02rem; }
.inf-card-id .muted { font-size: 0.88rem; }
.inf-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.inf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 12px 0; border-block: 1px dashed var(--line-strong); }
.inf-stats div { text-align: left; }
.inf-stats dt { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.inf-stats dd { margin: 2px 0 0; font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }
.inf-stats small { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.inf-bio { color: var(--ink-2); font-size: 0.9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inf-cta { margin-top: auto; color: var(--brand-600); font-weight: 700; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.steps h3 { margin-top: 14px; }
.steps p { color: var(--muted); margin: 0; }
.step-num { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: var(--surface); font-weight: 800; }

.contract-teaser { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 48px; }
.contract-teaser h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.doc-preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.doc-line { height: 9px; border-radius: 6px; background: var(--line-strong); width: 100%; }
.doc-line.short { width: 60%; }
.doc-line--title { height: 14px; width: 45%; background: var(--ink); margin-top: 12px; opacity: 0.85; }
.doc-line--title:first-child { margin-top: 0; }

.cta-band { margin-top: 56px; background: linear-gradient(120deg, var(--brand) 0%, var(--brand-700) 100%); color: #fff; border-radius: 24px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { opacity: 0.9; margin: 0; }
.cta-band .hero-cta { margin: 0; }

.page-intro { padding: 16px 0 8px; max-width: 760px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-card h3 { margin-top: 14px; }
.how-card p { color: var(--muted); margin: 0; }
.how-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.clause-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.clause { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.clause h3 { font-size: 0.98rem; }
.clause p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.faq summary { font-weight: 700; color: var(--ink); }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Catalogue ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: 6px; }
.page-head p.muted { margin: 4px 0 0; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

.browse { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { margin: 0; font-size: 1.1rem; }
.results-bar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.sort { display: inline-flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.sort .select { width: auto; min-width: 200px; }
.results .center { margin-top: 28px; }

.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > .label, .field > legend.label { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); padding: 0; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.field-error { margin: 0; font-size: 0.82rem; color: var(--danger); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field--full { grid-column: 1 / -1; }
fieldset.field { border: 0; }
legend.label { padding: 0; margin-bottom: 4px; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 0.92rem; }
.switch-row strong { display: block; color: var(--ink); }
.switch { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; margin-top: 2px; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.2s; }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(18px); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.check--legal { color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.check-grid .check { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.check-grid .check:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.check-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: center; }
.check-list .icon { color: var(--ok); }
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.option-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; background: var(--surface); transition: border-color 0.15s, background 0.15s; }
.option-card:hover { border-color: var(--muted); }
.option-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.option-card input { accent-color: var(--brand); margin-top: 3px; }
.option-card strong { display: block; font-size: 0.92rem; }
.option-card small { color: var(--muted); font-size: 0.8rem; line-height: 1.45; display: block; margin-top: 3px; }
.form-section-title { font-size: 1rem; margin: 8px 0 -4px; }

/* ---------- Profile ---------- */
.profile-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.profile-main h2 { font-size: 1.05rem; margin-top: 28px; }
.profile-main h2:first-of-type { margin-top: 0; }
.profile-head { display: flex; gap: 20px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.profile-head h1 { font-size: 1.8rem; margin-bottom: 4px; }
.profile-head p { margin-bottom: 8px; }
.prose { color: var(--ink-2); font-size: 1.02rem; white-space: pre-line; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.stat-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat-tile span { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-tile strong { display: block; font-size: 1.2rem; margin-top: 6px; letter-spacing: -0.01em; }
.profile-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.profile-side h3 { margin: 6px 0 0; font-size: 1.1rem; }
.profile-side .badge { align-self: flex-start; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 480px) 1fr; gap: 56px; align-items: center; min-height: 60vh; }
.auth--wide { grid-template-columns: minmax(0, 760px); justify-content: center; }
.auth-card { display: flex; flex-direction: column; gap: 16px; padding: 36px; }
.auth-card--wide { gap: 20px; }
.auth-card h1 { margin: 0; }
.auth-card p.muted { margin: 0; }
.auth-aside { background: linear-gradient(160deg, var(--brand-50), var(--surface)); border: 1px solid var(--line); border-radius: 24px; padding: 40px; }
.auth-aside h2 { font-size: 1.6rem; margin-bottom: 24px; }
.demo-box { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px 16px; font-size: 0.9rem; }
.demo-box ul { margin: 10px 0; padding-left: 18px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-option { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--ink); transition: all 0.15s; }
.role-option .icon { color: var(--brand); margin-bottom: 6px; }
.role-option span { font-size: 0.85rem; color: var(--muted); }
.role-option.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); background: var(--brand-50); }

/* ---------- Messagerie ---------- */
.inbox { display: grid; grid-template-columns: 340px 1fr; gap: 20px; height: calc(100vh - 170px); min-height: 520px; }
.inbox-list { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.inbox-list .card-head { padding: 20px 20px 12px; margin: 0; }
.inbox-list h1 { font-size: 1.25rem; margin: 0; }
.inbox-scroll { overflow-y: auto; flex: 1; padding: 0 8px 8px; }
.inbox-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--ink); }
.inbox-item:hover { background: var(--surface-2); text-decoration: none; }
.inbox-item.is-active { background: var(--brand-50); }
.inbox-item.is-unread .mini-main strong { color: var(--ink); font-weight: 800; }
.inbox-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.inbox-thread { padding: 0; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.thread-placeholder { flex: 1; display: grid; place-items: center; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.thread-head .mini-main { gap: 0; }
.thread-head .muted { font-size: 0.85rem; }
.back-link { display: none; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--neutral-bg); color: var(--ink); }
.back-link .icon { transform: rotate(180deg); }
.thread-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.thread-empty { margin: auto; text-align: center; max-width: 320px; }
.bubble { align-self: flex-start; max-width: min(78%, 520px); background: var(--surface); border: 1px solid var(--line); padding: 10px 14px; border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow-sm); }
.bubble.is-mine { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 16px 16px 4px 16px; }
.bubble p { margin: 0; white-space: pre-wrap; word-wrap: break-word; font-size: 0.95rem; }
.bubble time { display: block; font-size: 0.7rem; opacity: 0.65; margin-top: 4px; }
.composer { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); align-items: flex-end; background: var(--surface); }
.composer .textarea { min-height: 44px; max-height: 140px; padding: 11px 14px; }
.composer .btn { min-height: 44px; }

/* ---------- Notifications ---------- */
.notif-list { padding: 8px; }
.notif { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; color: var(--ink); border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.is-unread { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; flex: none; }
.notif.is-unread .notif-dot { background: var(--brand); }
.notif .mini-main strong { font-size: 0.98rem; }

/* ---------- Contrats : liste & onglets ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; scrollbar-width: thin; }
.tab { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 0.9rem; white-space: nowrap; border: 1px solid transparent; }
.tab:hover { background: var(--neutral-bg); text-decoration: none; color: var(--ink); }
.tab.is-active { background: var(--ink); color: var(--surface); }
.contract-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.contract-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; }
.contract-row:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow-sm); text-decoration: none; }
.contract-main { display: flex; flex-direction: column; min-width: 0; }
.contract-main strong { font-size: 1rem; }
.contract-main .muted { font-size: 0.88rem; }
.contract-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.92rem; }
.contract-meta .muted { font-size: 0.82rem; }

/* ---------- Éditeur de contrat ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); gap: 28px; align-items: start; }
.editor-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form-block header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.form-block header h2 { margin: 0; font-size: 1.1rem; }
.step-badge { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-weight: 800; font-size: 0.9rem; flex: none; }
.party-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.party-card .icon { color: var(--brand); }
.party-card div { display: flex; flex-direction: column; }
.form-actions--sticky { position: sticky; bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: 14px 0; margin-top: 4px; border-top: 1px solid var(--line); z-index: 5; }
.editor-preview { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 120px); }
.preview-head { display: flex; justify-content: space-between; align-items: center; }
.contract-paper--preview { max-height: calc(100vh - 200px); overflow-y: auto; padding: 28px; font-size: 0.9rem; }
.contract-paper--preview .doc-section h3 { font-size: 0.92rem; }
.contract-paper--preview .doc-section p, .contract-paper--preview .doc-section li { font-size: 0.86rem; }

/* ---------- Document contractuel ---------- */
.contract-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.contract-paper { padding: 48px 52px; font-family: "Charter", "Georgia", "Iowan Old Style", "Times New Roman", serif; }
.paper-head { border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 30px; }
.paper-head h2 { font-size: 1.45rem; font-family: var(--font); letter-spacing: -0.01em; margin-bottom: 6px; }
.paper-head p { margin: 0; font-family: var(--font); font-size: 0.9rem; }
.doc-section { margin-bottom: 26px; }
.doc-section h3 { font-family: var(--font); font-size: 0.98rem; text-transform: none; color: var(--ink); border-left: 3px solid var(--brand); padding-left: 10px; margin-bottom: 10px; }
.doc-section p { font-size: 0.98rem; line-height: 1.72; color: var(--ink-2); margin-bottom: 8px; text-align: justify; hyphens: auto; }
.doc-section ul { margin: 6px 0 10px; padding-left: 4px; list-style: none; }
.doc-section li { position: relative; padding-left: 18px; margin-bottom: 6px; font-size: 0.98rem; line-height: 1.6; color: var(--ink-2); }
.doc-section li::before { content: "▸"; position: absolute; left: 0; color: var(--brand); font-size: 0.85em; top: 1px; }
.doc-signatures { margin-top: 36px; padding-top: 26px; border-top: 1px dashed var(--line-strong); }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-family: var(--font); }
.sig-block { border: 1px solid var(--line-strong); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 4px; min-height: 150px; background: var(--surface-2); }
.sig-block.is-signed { border-color: var(--ok); background: var(--ok-bg); }
.sig-block strong { font-size: 1rem; margin-top: 6px; }
.sig-stamp { margin-top: auto; color: var(--ok); font-weight: 700; font-size: 0.86rem; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sig-stamp span { font-weight: 500; color: var(--ink-2); font-size: 0.8rem; }
.sig-pending { margin-top: auto; color: var(--muted); font-style: italic; font-size: 0.88rem; }
.stepper { list-style: none; display: flex; padding: 0; margin: 0 0 20px; gap: 0; overflow-x: auto; }
.stepper li { flex: 1; min-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); font-weight: 600; position: relative; text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--line-strong); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--brand); }
.stepper li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); color: var(--muted); position: relative; z-index: 1; font-size: 0.8rem; }
.stepper li.is-done span { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper li.is-current { color: var(--ink); }
.stepper li.is-current span { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.integrity { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; font-size: 0.92rem; color: var(--ink-2); }
.integrity .icon { color: var(--muted); margin-top: 2px; }
.integrity--ok { background: var(--ok-bg); border-color: transparent; color: var(--ink); }
.integrity--ok .icon { color: var(--ok); }
.integrity--bad { background: var(--danger-bg); border-color: transparent; color: var(--ink); }
.integrity--bad .icon { color: var(--danger); }
.contract-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 92px; }
.contract-side h3 { font-size: 1rem; margin-bottom: 14px; }
.actions-card .stack { gap: 10px; }
.sign-form { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.sign-form h3 { margin: 0; }
.recap { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.recap div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; border-bottom: 1px dashed var(--line); padding-bottom: 10px; }
.recap div:last-child { border-bottom: 0; padding-bottom: 0; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; font-weight: 600; text-align: right; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; display: flex; flex-direction: column; font-size: 0.9rem; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--surface); }
.timeline .muted { font-size: 0.8rem; }
.party-card--plain { border: 0; }

/* ---------- Tableaux (admin) ---------- */
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table-person { display: flex; align-items: center; gap: 12px; }
.table-person div { display: flex; flex-direction: column; }
.table-person .small { font-size: 0.8rem; }
.table-card .table td:first-child { min-width: 220px; }
.table-card .empty { border: 0; margin: 0; }
.table-card .table td .empty, .table-card .table td .empty-icon { display: none; }

/* ---------- Dialogue vide & erreurs ---------- */
.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty h2, .empty h3 { margin: 0; font-size: 1.1rem; }
.empty p { margin: 0 0 8px; max-width: 420px; }
.empty-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.table .empty { border: 0; padding: 32px; }
.table .empty-icon { display: grid; }
.table-card .table .empty { display: flex; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .filters-head, .filters > .btn, .filters > .field:nth-child(n) { min-width: 0; }
  .filters > .btn, .filters-head { grid-column: 1 / -1; }
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; max-height: none; }
  .contract-paper--preview { max-height: none; }
  .contract-layout { grid-template-columns: 1fr; }
  .contract-side { position: static; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { min-height: 360px; }
  .contract-teaser { grid-template-columns: 1fr; padding: 32px; }
  .auth { grid-template-columns: 1fr; gap: 24px; }
  .auth-aside { display: none; }
  .inbox { grid-template-columns: 300px 1fr; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px 16px 16px; margin: 0; display: none; box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav-link { padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
  .header-inner { position: relative; }
  .site-header .header-actions .btn-primary, .site-header .header-actions a.btn-ghost[href="#/connexion"] { display: none; }
  .user-name, .hide-sm { display: none; }
  .user-chip { padding: 4px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip > div:nth-child(2) { border-right: 0; }
  .stats-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps, .how-grid, .clause-grid { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
  .inbox { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .inbox-list { min-height: 60vh; }
  .inbox.is-thread .inbox-list { display: none; }
  .inbox:not(.is-thread) .inbox-thread { display: none; }
  .inbox.is-thread .inbox-thread { min-height: 70vh; }
  .back-link { display: inline-grid; }
  .bubble { max-width: 88%; }
  .contract-row { grid-template-columns: 1fr; gap: 10px; }
  .contract-meta { align-items: flex-start; flex-direction: row; gap: 12px; }
  .contract-status { order: 2; }
  .contract-paper { padding: 28px 22px; }
  .sig-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .role-switch { grid-template-columns: 1fr; }
  .cta-band { padding: 28px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  main { padding-top: 20px; }
  .container { width: min(100% - 32px, var(--container)); }
  .hero { padding-top: 8px; }
  .hero-cta .btn { width: 100%; }
  .hero-visual { min-height: 320px; }
  .float-card { min-width: 0; padding: 10px; font-size: 0.8rem; }
  .float-card--top { right: -4px; top: 0; }
  .float-card--mid { left: -4px; bottom: 0; }
  .mock-card { width: 92%; padding: 16px; }
  .stats-strip strong { font-size: 1.45rem; }
  .stats-strip > div { padding: 16px 12px; }
  .stat-card strong { font-size: 1.6rem; }
  .niche { font-size: 0.85rem; padding: 8px 13px; }
  .grid-cards { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .page-head .head-actions { width: 100%; }
  .page-head .head-actions .btn { flex: 1; }
  .auth-card { padding: 24px; }
  .modal { padding: 22px; }
  .cta-band .hero-cta { width: 100%; }
  .cta-band .hero-cta .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }
  .form-actions--sticky { position: static; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .composer { padding: 10px; }
  .toasts { left: 16px; right: 16px; max-width: none; }
  .thread-head { flex-wrap: wrap; }
  .thread-head > .btn { margin-left: auto; }
  .tabs { margin-inline: -16px; padding-inline: 16px; }
  .table th, .table td { padding: 12px 12px; }
  .stepper li { min-width: 90px; font-size: 0.74rem; }
}

/* ---------- Impression : le contrat seul, propre ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .no-print, .toasts { display: none !important; }
  main { padding: 0; }
  .container { width: 100%; }
  .contract-layout { display: block; }
  .contract-paper { box-shadow: none; border: 0; padding: 0; font-size: 11pt; }
  .doc-section p, .doc-section li, .doc-section h3, .paper-head h2, .paper-head p { color: #000 !important; }
  .doc-section h3 { border-left-color: #000; }
  .sig-block, .sig-block.is-signed { background: #fff !important; border-color: #000; min-height: 90px; }
  .sig-stamp { color: #000 !important; }
  .doc-section { break-inside: auto; }
  .doc-signatures { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

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

@keyframes pulse-soft { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.is-loading { animation: pulse-soft 1.2s infinite; }
.muted-box { background: var(--surface-2); }

/* ---------- Back-office : vérification & métriques ---------- */
.check-items { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.check-items li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.check-items .check { align-items: flex-start; }
.check-items .hint { margin-top: 2px; }
.verify-box { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.metric-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.metric-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-size: 0.92rem; }
.table-card code { font-size: 0.85em; background: var(--neutral-bg); padding: 1px 5px; border-radius: 6px; }

/* ---------- Statistiques ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding-top: 8px; overflow-x: auto; }
.bar-col { flex: 1 0 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 18px; }
.bar { display: block; width: 100%; height: var(--v); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--brand), var(--brand-600)); }
.bar-col small { font-size: 0.68rem; color: var(--muted); }
.funnel { display: flex; flex-direction: column; gap: 14px; }
.funnel-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 12px; align-items: center; font-size: 0.9rem; }
.funnel-track { height: 12px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.funnel-bar { height: 100%; width: var(--w); border-radius: inherit; background: var(--brand); }
.funnel-row strong { font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }
@media (max-width: 560px) { .funnel-row { grid-template-columns: 1fr auto; } .funnel-track { grid-column: 1 / -1; grid-row: 2; } }
