/* ==========================================================================
   C-Shift — Design system
   Tokens (light / dark), typography and UI components.
   Utilities come from Tailwind (see layouts/app.blade.php); every colour
   used by utilities is mapped onto the tokens below, so the whole interface
   switches theme through the .dark class on <html>.
   ========================================================================== */

:root {
    --bg: 246 247 249;
    --surface: 255 255 255;
    --surface-2: 241 244 248;
    --surface-3: 233 237 243;
    --line: 223 228 236;
    --line-strong: 203 211 223;
    --fg: 15 23 42;
    --fg-2: 51 65 85;
    --muted: 100 113 135;
    --primary: 22 107 166;        /* #166ba6 — brand blue, AA on white */
    --primary-hover: 17 88 139;
    --primary-soft: 231 242 250;
    --primary-fg: 255 255 255;
    --accent: 13 148 136;         /* teal (brand #12bfb1, darkened for contrast) */
    --accent-soft: 225 245 242;
    --success: 21 128 61;
    --success-soft: 226 245 233;
    --warning: 180 83 9;
    --warning-soft: 254 243 222;
    --danger: 190 18 60;
    --danger-soft: 253 232 237;
    --info: 37 99 235;
    --info-soft: 230 239 254;
    --ring: 22 107 166;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px -6px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 40px -12px rgba(15, 23, 42, .22);
    --radius: 10px;
    --radius-lg: 14px;
    color-scheme: light;
}

.dark {
    --bg: 10 14 21;
    --surface: 16 22 32;
    --surface-2: 22 29 42;
    --surface-3: 30 39 55;
    --line: 34 44 60;
    --line-strong: 48 60 80;
    --fg: 229 234 242;
    --fg-2: 196 205 219;
    --muted: 139 152 173;
    --primary: 74 163 222;
    --primary-hover: 110 184 234;
    --primary-soft: 19 41 60;
    --primary-fg: 7 18 30;
    --accent: 45 212 191;
    --accent-soft: 14 45 45;
    --success: 74 222 128;
    --success-soft: 16 44 30;
    --warning: 251 191 36;
    --warning-soft: 48 36 12;
    --danger: 251 113 133;
    --danger-soft: 52 18 28;
    --info: 96 165 250;
    --info-soft: 19 34 62;
    --ring: 74 163 222;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------------------------------------------------------------- reset (préflight) */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: rgb(var(--line)); }
html { line-height: 1.5; tab-size: 4; }
body { margin: 0; line-height: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p, blockquote, dl, dd, figure, pre, hr { margin: 0; }
ol, ul, menu { list-style: none; margin: 0; padding: 0; }
hr { height: 0; color: inherit; border-top-width: 1px; }
b, strong { font-weight: 650; }
code, kbd, samp, pre { font-size: 1em; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; }
button, select { text-transform: none; }
button, [type='button'], [type='reset'], [type='submit'] { -webkit-appearance: button; background-color: transparent; background-image: none; }
button, [role="button"] { cursor: pointer; }
:disabled { cursor: default; }
img, svg, video, canvas { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { opacity: 1; }
[hidden] { display: none; }

/* ---------------------------------------------------------------- base */
html { -webkit-text-size-adjust: 100%; }
body {
    background: rgb(var(--bg));
    color: rgb(var(--fg));
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
::selection { background: rgb(var(--primary) / .18); }
[x-cloak] { display: none !important; }
.font-mono, code, kbd, pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgb(var(--ring)); outline-offset: 2px; border-radius: 6px; }
.tabular { font-variant-numeric: tabular-nums; }

h1, h2, h3, h4 { letter-spacing: -0.015em; color: rgb(var(--fg)); }
.eyebrow {
    font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: rgb(var(--primary));
}
.text-balance { text-wrap: balance; }

/* ---------------------------------------------------------------- layout */
.container-app { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container-app { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container-app { padding-inline: 2rem; } }
.container-narrow { max-width: 760px; }

.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgb(var(--surface) / .85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgb(var(--line));
}
.nav-link {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .75rem; border-radius: 8px;
    font-size: .875rem; font-weight: 500; color: rgb(var(--fg-2));
    transition: background .15s, color .15s;
}
.nav-link:hover { background: rgb(var(--surface-2)); color: rgb(var(--fg)); }
.nav-link.is-active { color: rgb(var(--primary)); background: rgb(var(--primary-soft)); }

.brand-mark {
    width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
    background: linear-gradient(135deg, #1d7fbf 0%, #12bfb1 100%);
    color: #fff; box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
}

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    height: 2.5rem; padding: 0 1rem; border-radius: var(--radius);
    font-size: .875rem; font-weight: 600; line-height: 1; white-space: nowrap;
    border: 1px solid transparent; cursor: pointer; user-select: none;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn-sm { height: 2rem; padding: 0 .75rem; font-size: .8125rem; border-radius: 8px; }
.btn-lg { height: 3rem; padding: 0 1.4rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-icon { width: 2.5rem; padding: 0; }
.btn-sm.btn-icon { width: 2rem; }

.btn-primary { background: rgb(var(--primary)); color: rgb(var(--primary-fg)); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: rgb(var(--primary-hover)); }
.btn-secondary { background: rgb(var(--surface)); color: rgb(var(--fg)); border-color: rgb(var(--line-strong)); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: rgb(var(--surface-2)); }
.btn-ghost { background: transparent; color: rgb(var(--fg-2)); }
.btn-ghost:hover { background: rgb(var(--surface-2)); color: rgb(var(--fg)); }
.btn-danger { background: rgb(var(--danger)); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-danger-ghost { background: transparent; color: rgb(var(--danger)); }
.btn-danger-ghost:hover { background: rgb(var(--danger-soft)); }
.btn-success { background: rgb(var(--success)); color: #fff; }
.dark .btn-danger, .dark .btn-success { color: rgb(var(--bg)); }

/* ---------------------------------------------------------------- cards */
.card {
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.25rem; }
@media (min-width: 640px) { .card-pad { padding: 1.5rem; } }
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.25rem; border-bottom: 1px solid rgb(var(--line));
}
@media (min-width: 640px) { .card-header { padding: 1rem 1.5rem; } }
.card-title { font-size: .975rem; font-weight: 650; }
.card-subtitle { font-size: .8125rem; color: rgb(var(--muted)); margin-top: .15rem; }
.card-footer { padding: .9rem 1.25rem; border-top: 1px solid rgb(var(--line)); background: rgb(var(--surface-2) / .5); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-hover { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-hover:hover { border-color: rgb(var(--line-strong)); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- forms */
.label { display: block; font-size: .8125rem; font-weight: 600; color: rgb(var(--fg-2)); margin-bottom: .4rem; }
.hint { font-size: .75rem; color: rgb(var(--muted)); margin-top: .35rem; line-height: 1.45; }
.field-error { font-size: .75rem; color: rgb(var(--danger)); margin-top: .35rem; font-weight: 500; }
.input, .select, .textarea {
    width: 100%; height: 2.5rem; padding: 0 .8rem;
    background: rgb(var(--surface)); color: rgb(var(--fg));
    border: 1px solid rgb(var(--line-strong)); border-radius: var(--radius);
    font-size: .875rem; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: .65rem .8rem; line-height: 1.5; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: rgb(var(--muted) / .8); }
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: rgb(var(--primary)); box-shadow: 0 0 0 3px rgb(var(--primary) / .15);
}
.input.is-invalid, .textarea.is-invalid { border-color: rgb(var(--danger)); }
.select {
    appearance: none; padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364718a'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .6rem center; background-size: 1.1rem;
}
.input-sm, .select-sm { height: 2rem; font-size: .8125rem; }
.checkbox {
    width: 1rem; height: 1rem; border-radius: 4px; accent-color: rgb(var(--primary));
}
.input-group { position: relative; }
.input-group > svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: rgb(var(--muted)); pointer-events: none; }
.input-group > .input { padding-left: 2.25rem; }

/* segmented control */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: rgb(var(--surface-2)); border: 1px solid rgb(var(--line)); border-radius: 10px; }
.segmented button, .segmented a {
    padding: .4rem .85rem; font-size: .8125rem; font-weight: 600; border-radius: 7px; color: rgb(var(--muted));
    transition: background .15s, color .15s;
}
.segmented .is-active { background: rgb(var(--surface)); color: rgb(var(--fg)); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- badges */
.badge {
    display: inline-flex; align-items: center; gap: .35rem; height: 1.4rem; padding: 0 .55rem;
    border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap;
    background: rgb(var(--surface-3)); color: rgb(var(--fg-2));
}
.badge-dot::before { content: ''; width: .4rem; height: .4rem; border-radius: 99px; background: currentColor; }
.badge-success { background: rgb(var(--success-soft)); color: rgb(var(--success)); }
.badge-warning { background: rgb(var(--warning-soft)); color: rgb(var(--warning)); }
.badge-danger  { background: rgb(var(--danger-soft)); color: rgb(var(--danger)); }
.badge-info    { background: rgb(var(--info-soft)); color: rgb(var(--info)); }
.badge-primary { background: rgb(var(--primary-soft)); color: rgb(var(--primary)); }
.badge-accent  { background: rgb(var(--accent-soft)); color: rgb(var(--accent)); }
.badge-outline { background: transparent; border: 1px solid rgb(var(--line-strong)); }
.chip {
    display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 6px;
    font-size: .72rem; font-weight: 600; font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: rgb(var(--surface-2)); border: 1px solid rgb(var(--line)); color: rgb(var(--fg-2));
}

/* ---------------------------------------------------------------- alerts */
.alert { display: flex; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius); font-size: .875rem; line-height: 1.5; border: 1px solid; }
.alert svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.alert-success { background: rgb(var(--success-soft)); border-color: rgb(var(--success) / .25); color: rgb(var(--fg)); }
.alert-success svg { color: rgb(var(--success)); }
.alert-danger { background: rgb(var(--danger-soft)); border-color: rgb(var(--danger) / .25); color: rgb(var(--fg)); }
.alert-danger svg { color: rgb(var(--danger)); }
.alert-warning { background: rgb(var(--warning-soft)); border-color: rgb(var(--warning) / .25); color: rgb(var(--fg)); }
.alert-warning svg { color: rgb(var(--warning)); }
.alert-info { background: rgb(var(--info-soft)); border-color: rgb(var(--info) / .25); color: rgb(var(--fg)); }
.alert-info svg { color: rgb(var(--info)); }

/* toasts */
.toast-stack { position: fixed; top: 4.5rem; right: 1rem; z-index: 70; display: flex; flex-direction: column; gap: .6rem; width: min(380px, calc(100vw - 2rem)); }
.toast { box-shadow: var(--shadow-lg); background: rgb(var(--surface)); }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8125rem; }
.table th {
    text-align: left; font-weight: 600; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
    color: rgb(var(--muted)); padding: .7rem 1rem; background: rgb(var(--surface-2) / .6);
    border-bottom: 1px solid rgb(var(--line)); white-space: nowrap;
}
.table td { padding: .8rem 1rem; border-bottom: 1px solid rgb(var(--line)); color: rgb(var(--fg-2)); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: rgb(var(--surface-2) / .5); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-compact td, .table-compact th { padding: .5rem .75rem; }
.empty-state { padding: 3rem 1rem; text-align: center; color: rgb(var(--muted)); font-size: .875rem; }
.empty-state svg { width: 2.25rem; height: 2.25rem; margin: 0 auto .75rem; color: rgb(var(--line-strong)); }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid rgb(var(--line)); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
    display: inline-flex; align-items: center; gap: .45rem; padding: .7rem .9rem; margin-bottom: -1px;
    font-size: .875rem; font-weight: 550; color: rgb(var(--muted)); border-bottom: 2px solid transparent; white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.tab:hover { color: rgb(var(--fg)); }
.tab.is-active { color: rgb(var(--primary)); border-bottom-color: rgb(var(--primary)); }
.tab .count { font-size: .7rem; padding: .05rem .4rem; border-radius: 99px; background: rgb(var(--surface-3)); color: rgb(var(--fg-2)); }

/* side navigation (admin / account) */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav button {
    display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .7rem; border-radius: 8px;
    font-size: .875rem; font-weight: 500; color: rgb(var(--fg-2)); text-align: left; transition: background .12s, color .12s;
}
.side-nav a:hover, .side-nav button:hover { background: rgb(var(--surface-2)); color: rgb(var(--fg)); }
.side-nav .is-active { background: rgb(var(--primary-soft)); color: rgb(var(--primary)); font-weight: 600; }
.side-nav svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; opacity: .85; }
.side-nav .count { margin-left: auto; font-size: .7rem; font-weight: 600; padding: .05rem .45rem; border-radius: 99px; background: rgb(var(--warning-soft)); color: rgb(var(--warning)); }
.side-nav-title { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--muted)); padding: .9rem .7rem .35rem; }

/* ---------------------------------------------------------------- KPI */
.kpi { padding: 1.1rem 1.25rem; }
.kpi-label { font-size: .78rem; font-weight: 550; color: rgb(var(--muted)); display: flex; align-items: center; gap: .4rem; }
.kpi-value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-top: .35rem; font-variant-numeric: tabular-nums; color: rgb(var(--fg)); }
.kpi-meta { font-size: .75rem; color: rgb(var(--muted)); margin-top: .25rem; }
.kpi-icon { width: 2rem; height: 2rem; border-radius: 8px; display: grid; place-items: center; background: rgb(var(--primary-soft)); color: rgb(var(--primary)); }
.kpi-icon svg { width: 1rem; height: 1rem; }

/* ---------------------------------------------------------------- progress */
.progress { height: .5rem; border-radius: 99px; background: rgb(var(--surface-3)); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: rgb(var(--primary)); transition: width .5s ease; }
.progress.is-indeterminate > span { width: 35% !important; animation: indeterminate 1.3s ease-in-out infinite; }
@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.meter { height: .375rem; border-radius: 99px; background: rgb(var(--surface-3)); overflow: hidden; }
.meter > span { display: block; height: 100%; background: rgb(var(--primary)); border-radius: 99px; }
.meter.is-warning > span { background: rgb(var(--warning)); }
.meter.is-danger > span { background: rgb(var(--danger)); }

/* steps (conversion pipeline) */
.steps { display: grid; gap: .5rem; }
.step { display: flex; align-items: center; gap: .65rem; font-size: .8125rem; color: rgb(var(--muted)); }
.step-dot { width: 1.25rem; height: 1.25rem; border-radius: 99px; border: 2px solid rgb(var(--line-strong)); display: grid; place-items: center; flex-shrink: 0; }
.step.is-done { color: rgb(var(--fg-2)); }
.step.is-done .step-dot { background: rgb(var(--success)); border-color: rgb(var(--success)); color: #fff; }
.step.is-current { color: rgb(var(--fg)); font-weight: 600; }
.step.is-current .step-dot { border-color: rgb(var(--primary)); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 1rem; height: 1rem; border-radius: 99px; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; display: inline-block; }

/* ---------------------------------------------------------------- dropzone */
.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 2.25rem 1.25rem; border: 1.5px dashed rgb(var(--line-strong)); border-radius: var(--radius-lg);
    background: rgb(var(--surface-2) / .45); transition: border-color .15s, background .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.is-dragging { border-color: rgb(var(--primary)); background: rgb(var(--primary-soft) / .6); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); color: rgb(var(--primary)); box-shadow: var(--shadow-sm); margin-bottom: .9rem; }
.dropzone-icon svg { width: 1.35rem; height: 1.35rem; }

.file-pill { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border: 1px solid rgb(var(--line)); border-radius: var(--radius); background: rgb(var(--surface)); }
.file-ext { width: 2.6rem; height: 2.6rem; border-radius: 9px; display: grid; place-items: center; font-size: .66rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; background: rgb(var(--primary-soft)); color: rgb(var(--primary)); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }

/* target cards (radio tiles) */
.tile {
    display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; border-radius: var(--radius);
    border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); cursor: pointer; text-align: left;
    transition: border-color .12s, box-shadow .12s, background .12s;
}
.tile:hover { border-color: rgb(var(--line-strong)); }
.tile.is-selected { border-color: rgb(var(--primary)); box-shadow: 0 0 0 1px rgb(var(--primary)); background: rgb(var(--primary-soft) / .5); }
.tile-title { font-size: .85rem; font-weight: 650; color: rgb(var(--fg)); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tile-sub { font-size: .72rem; color: rgb(var(--muted)); }

/* ---------------------------------------------------------------- modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgb(8 12 20 / .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { width: 100%; max-width: 32rem; max-height: calc(100vh - 2rem); overflow: auto; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-lg { max-width: 44rem; }

/* dropdown */
.dropdown { position: absolute; right: 0; margin-top: .5rem; min-width: 14rem; z-index: 50; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .35rem; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .65rem; border-radius: 7px; font-size: .85rem; color: rgb(var(--fg-2)); text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: rgb(var(--surface-2)); color: rgb(var(--fg)); }
.dropdown svg { width: 1rem; height: 1rem; color: rgb(var(--muted)); }
.dropdown hr { border: 0; border-top: 1px solid rgb(var(--line)); margin: .35rem 0; }

.avatar-lg { width: 3.25rem !important; height: 3.25rem !important; font-size: 1.15rem !important; }
.user-link { color: inherit; text-decoration: none; }
.user-link:hover { color: rgb(var(--primary)); text-decoration: underline; }
.avatar { width: 2rem; height: 2rem; border-radius: 99px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: rgb(var(--primary-soft)); color: rgb(var(--primary)); flex-shrink: 0; }

/* ---------------------------------------------------------------- misc */
.divider { border-top: 1px solid rgb(var(--line)); }
.kbd { font-size: .7rem; padding: .1rem .35rem; border: 1px solid rgb(var(--line-strong)); border-bottom-width: 2px; border-radius: 5px; }
.code-block { font-family: 'JetBrains Mono', monospace; font-size: .75rem; line-height: 1.6; background: rgb(var(--surface-2)); border: 1px solid rgb(var(--line)); border-radius: var(--radius); padding: .9rem 1rem; overflow-x: auto; color: rgb(var(--fg-2)); white-space: pre; }
.link { color: rgb(var(--primary)); font-weight: 550; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.dot-grid {
    background-image: radial-gradient(rgb(var(--line-strong) / .55) 1px, transparent 1px);
    background-size: 22px 22px;
}
.hero-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 50% 0%, rgb(var(--primary) / .10), transparent 70%); }
.feature-icon { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: rgb(var(--primary-soft)); color: rgb(var(--primary)); }
.feature-icon svg { width: 1.2rem; height: 1.2rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .875rem; color: rgb(var(--fg-2)); line-height: 1.45; }
.check-list li svg { width: 1rem; height: 1rem; color: rgb(var(--success)); margin-top: .15rem; flex-shrink: 0; }
.check-list li + li { margin-top: .6rem; }

/* legal / long-form content */
.prose-legal { font-size: .95rem; line-height: 1.75; color: rgb(var(--fg-2)); }
.prose-legal h2 { font-size: 1.1rem; font-weight: 650; margin: 2rem 0 .6rem; color: rgb(var(--fg)); }
.prose-legal p + p { margin-top: .75rem; }
.prose-legal ul { list-style: disc; padding-left: 1.25rem; margin-top: .5rem; }
.prose-legal li + li { margin-top: .3rem; }

/* bar chart (pure CSS) */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 9rem; }
.bars > div { flex: 1; min-width: 3px; background: rgb(var(--primary) / .85); border-radius: 3px 3px 0 0; position: relative; transition: background .1s; }
.bars > div:hover { background: rgb(var(--primary)); }
.bars > div.is-zero { background: rgb(var(--surface-3)); min-height: 2px; }
.bars-labels { display: flex; justify-content: space-between; font-size: .68rem; color: rgb(var(--muted)); margin-top: .4rem; }

/* print (invoices) */
@media print {
    .site-header, .site-footer, .no-print, .toast-stack, #cookie-banner { display: none !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; border-color: #ddd !important; }
}

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

/* ---------------------------------------------------------------- hero (page d'accueil) */
.hero-aurora {
    position: absolute; top: -20%; right: -10%; width: 60%; height: 140%; pointer-events: none;
    background:
        radial-gradient(40% 35% at 55% 40%, rgb(var(--primary) / .22), transparent 70%),
        radial-gradient(35% 30% at 75% 65%, rgb(var(--accent) / .20), transparent 70%),
        radial-gradient(30% 30% at 40% 75%, rgb(56 189 248 / .12), transparent 70%);
    filter: blur(20px);
}
.hero-visual { position: relative; padding: 1.5rem 1rem 2.5rem 2rem; }
.hero-window {
    position: relative; background: rgb(var(--surface) / .92); backdrop-filter: blur(6px);
    border: 1px solid rgb(var(--line)); border-radius: 16px; box-shadow: var(--shadow-lg);
    transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); transform-origin: left center;
}
.hero-window-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border-bottom: 1px solid rgb(var(--line)); }
.hero-window-bar span { width: .6rem; height: .6rem; border-radius: 99px; background: rgb(var(--line-strong)); }
.hero-window-bar span:nth-child(1) { background: #f87171; }
.hero-window-bar span:nth-child(2) { background: #fbbf24; }
.hero-window-bar span:nth-child(3) { background: #34d399; }
.hero-window-bar p { margin-left: .5rem; font-size: .7rem; font-family: 'JetBrains Mono', monospace; color: rgb(var(--muted)); }
.hero-arrow { width: 1.9rem; height: 1.9rem; border-radius: 99px; display: grid; place-items: center; background: rgb(var(--primary-soft)); color: rgb(var(--primary)); }
.hero-ext-target { background: rgb(var(--accent-soft)) !important; color: rgb(var(--accent)) !important; }
.hero-progress { width: 100%; background: linear-gradient(90deg, rgb(var(--primary)), rgb(var(--accent))) !important; animation: hero-fill 2.4s ease-out both; }
@keyframes hero-fill { from { width: 8%; } to { width: 100%; } }
.hero-code {
    font-family: 'JetBrains Mono', monospace; font-size: .7rem; line-height: 1.65; white-space: pre; overflow: hidden;
    background: rgb(var(--surface-2)); border: 1px solid rgb(var(--line)); border-radius: 10px; padding: .85rem 1rem; color: rgb(var(--fg-2));
}
.hero-code .k { color: rgb(var(--primary)); font-weight: 600; }
.hero-code .t { color: rgb(var(--accent)); }
.hero-code .i { color: rgb(var(--fg)); }
.hero-code .s { color: rgb(var(--success)); }
.hero-float {
    position: absolute; display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem;
    background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 12px; box-shadow: var(--shadow-lg);
    animation: hero-bob 6s ease-in-out infinite;
}
.hero-float-1 { left: -.5rem; bottom: .25rem; }
.hero-float-2 { right: -1rem; top: -1.6rem; animation-delay: -3s; }
@keyframes hero-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.badge-wrap { height: auto; min-height: 1.4rem; white-space: normal; padding-top: .2rem; padding-bottom: .2rem; line-height: 1.35; }

/* ---------------------------------------------------------------- numbered dot (étapes, devis) */
.num-dot { width: 1.6rem; height: 1.6rem; border-radius: 99px; display: grid; place-items: center; flex-shrink: 0; font-size: .75rem; font-weight: 700; background: rgb(var(--primary-soft)); color: rgb(var(--primary)); }
.quote-timeline { display: grid; gap: 0; }
.quote-timeline li { display: flex; gap: .75rem; position: relative; padding-bottom: 1.1rem; }
.quote-timeline li:last-child { padding-bottom: 0; }
.quote-timeline li:not(:last-child)::after { content: ''; position: absolute; left: calc(.8rem - 1px); top: 1.7rem; bottom: .15rem; width: 2px; background: rgb(var(--line)); }
.quote-timeline li.is-done .num-dot { background: rgb(var(--success)); color: #fff; }
.quote-timeline li.is-todo .num-dot { background: rgb(var(--surface-3)); color: rgb(var(--muted)); }
.select-all { user-select: all; -webkit-user-select: all; }

/* ---------------------------------------------------------------- essai gratuit */
.trial-banner { background: linear-gradient(135deg, rgb(var(--primary-soft) / .75), rgb(var(--surface)) 65%); border-color: rgb(var(--primary) / .25); }

/* Interrupteur on/off (Administration › Paiements) */
.switch { position: relative; width: 2.6rem; height: 1.5rem; border-radius: 99px; background: rgb(var(--line)); border: 0; padding: 0; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.switch span { position: absolute; top: .1875rem; left: .1875rem; width: 1.125rem; height: 1.125rem; border-radius: 99px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch.is-on { background: rgb(var(--success)); }
.switch.is-on span { transform: translateX(1.1rem); }
.switch:disabled { opacity: .45; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid rgb(var(--primary)); outline-offset: 2px; }
