/* =========================================================
   Abou Services — système de design
   Bleu électrique + bleu nuit + argent, repris du logo.
   ========================================================= */

:root {
  --brand: #0b6cf0;
  --brand-600: #0757c7;
  --brand-50: #eaf2ff;
  --brand-100: #d4e5ff;
  --navy: #0a2556;
  --navy-900: #061535;
  --silver: #a7b0bc;

  --bg: #f2f5fa;
  --bg-grad: radial-gradient(1200px 500px at 85% -10%, rgba(11,108,240,.07), transparent 60%), #f2f5fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --border: #e2e8f1;
  --border-strong: #cfd8e5;
  --text: #0c1a33;
  --text-2: #4a5b76;
  --text-3: #8392aa;

  --green: #12a150;  --green-bg: #e6f7ee;
  --amber: #c27803;  --amber-bg: #fff4dc;
  --red: #dc2f3d;    --red-bg: #fdecee;
  --violet: #7353e5; --violet-bg: #f0ecff;
  --cyan: #0891b2;   --cyan-bg: #e2f6fb;

  --sidebar-bg: #071937;
  --sidebar-text: #b9c6dc;
  --sidebar-muted: #6b7f9f;
  --sidebar-active: rgba(11,108,240,.18);

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(12,26,51,.06);
  --shadow: 0 1px 2px rgba(12,26,51,.05), 0 4px 16px rgba(12,26,51,.06);
  --shadow-lg: 0 12px 48px rgba(6,21,53,.18);
  --ring: 0 0 0 3px rgba(11,108,240,.22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Rajdhani', 'Inter', sans-serif;
  --sidebar-w: 256px;
  --topbar-h: 64px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #3b8bff;
  --brand-600: #2a76ea;
  --brand-50: rgba(59,139,255,.12);
  --brand-100: rgba(59,139,255,.22);
  --bg: #060c18;
  --bg-grad: radial-gradient(1200px 500px at 85% -10%, rgba(59,139,255,.10), transparent 60%), #060c18;
  --surface: #0d1628;
  --surface-2: #111c32;
  --surface-3: #16233d;
  --border: #1d2a45;
  --border-strong: #2a3a5c;
  --text: #e7eefa;
  --text-2: #a4b3cc;
  --text-3: #6e7f9d;
  --green: #34d27b;  --green-bg: rgba(52,210,123,.12);
  --amber: #f5b83d;  --amber-bg: rgba(245,184,61,.13);
  --red: #ff5f6d;    --red-bg: rgba(255,95,109,.13);
  --violet: #a08bff; --violet-bg: rgba(160,139,255,.14);
  --cyan: #38c6e6;   --cyan-bg: rgba(56,198,230,.13);
  --sidebar-bg: #040a16;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 18px rgba(0,0,0,.25);
  --shadow-lg: 0 16px 60px rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--bg-grad); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.ti { line-height: 1; }
::selection { background: var(--brand-100); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; gap: 22px; justify-items: center;
  background: #061535; transition: opacity .45s ease, visibility .45s; }
.splash.out { opacity: 0; visibility: hidden; }
.splash-mark { width: 120px; filter: drop-shadow(0 10px 40px rgba(11,108,240,.45)); animation: pop .8s cubic-bezier(.2,.9,.3,1.3); }
.splash-mark { content: url(../img/mark-dark.png); }
.splash-name { display: flex; flex-direction: column; align-items: center; margin-top: -6px; font-family: Rajdhani, Inter, sans-serif; line-height: 1; color: #fff; }
.splash-name b { font-size: 46px; font-weight: 700; letter-spacing: .18em; padding-left: .18em;
  background: linear-gradient(90deg, #fff 0%, #cfe2ff 40%, #fff 50%, #cfe2ff 60%, #fff 100%); background-size: 250% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: splashUp .7s .15s cubic-bezier(.16,1,.3,1) backwards, splashSheen 2.4s .9s linear infinite; }
.splash-name span { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 15px; font-weight: 600; letter-spacing: .55em; padding-left: .55em; color: #8fb8ff;
  animation: splashUp .7s .3s cubic-bezier(.16,1,.3,1) backwards; }
.splash-name span::before, .splash-name span::after { content: ''; width: 26px; height: 1px; background: currentColor; opacity: .7; }
.splash-tag { font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.55); margin-top: -8px; animation: splashUp .7s .45s cubic-bezier(.16,1,.3,1) backwards; }
@keyframes splashUp { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }
@keyframes splashSheen { to { background-position: -250% center; } }
.splash-bar { width: 140px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, #0b6cf0, #7fb5ff); animation: slide 1.1s ease-in-out infinite; border-radius: 3px; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.shell.collapsed { --sidebar-w: 76px; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.04);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent;
  background-image: radial-gradient(400px 260px at 0% 0%, rgba(11,108,240,.22), transparent 70%),
                    radial-gradient(300px 300px at 100% 100%, rgba(11,108,240,.10), transparent 70%);
}
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.sb-brand img { width: 42px; height: auto; flex: none; }
.sb-brand .name { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: #fff; letter-spacing: .06em; line-height: 1; }
.sb-brand .sub { font-size: 10.5px; letter-spacing: .32em; color: var(--silver); text-transform: uppercase; margin-top: 3px; }
.sb-group { padding: 10px 12px 2px; }
.sb-title { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sidebar-muted); padding: 8px 10px 6px; white-space: nowrap; }
.sb-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--sidebar-text);
  font-weight: 500; font-size: 13.5px; white-space: nowrap; position: relative; transition: background .15s, color .15s;
}
.sb-link:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.sb-link .ti { font-size: 19px; flex: none; width: 22px; text-align: center; }
.sb-link.active { background: var(--sidebar-active); color: #fff; }
.sb-link.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #3b8bff; box-shadow: 0 0 12px #3b8bff; }
.sb-link.active .ti { color: #63a4ff; }
.sb-link .count { margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 20px; background: rgba(255,95,109,.18); color: #ff8a94; }
.sb-link.soon { opacity: .55; }
.sb-link .soon-tag { margin-left: auto; font-size: 9.5px; font-weight: 600; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.07); color: var(--silver); text-transform: uppercase; }
.sb-foot { margin-top: auto; padding: 14px; }
.sb-card { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); font-size: 12px; color: var(--sidebar-muted); }
.sb-card b { color: #fff; font-weight: 600; }
.shell.collapsed .sb-brand .txt, .shell.collapsed .sb-title, .shell.collapsed .sb-link span, .shell.collapsed .sb-link .count,
.shell.collapsed .sb-link .soon-tag, .shell.collapsed .sb-foot { display: none; }
.shell.collapsed .sb-link { justify-content: center; }
.shell.collapsed .sb-brand { justify-content: center; padding-inline: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.search-trigger {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); cursor: pointer; font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.search-trigger:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.search-trigger .ti { font-size: 18px; }
.search-trigger { min-width: 0; }
.search-trigger span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger kbd { margin-left: auto; }
kbd { white-space: nowrap; font-family: var(--font); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3); }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 20px; position: relative; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 30px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.user-chip:hover { box-shadow: var(--shadow-sm); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; color: #fff;
  background: linear-gradient(135deg, #0b6cf0, #0a2556); flex: none; }
.user-chip .who { text-align: left; line-height: 1.15; }
.user-chip .who b { font-size: 13px; font-weight: 600; display: block; }
.user-chip .who small { font-size: 11px; color: var(--text-3); }

.content { padding: 26px 28px 60px; width: 100%; max-width: 1560px; margin: 0 auto; }
.view-enter { animation: viewIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .titles { flex: 1; min-width: 240px; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--brand); }
.page-head h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: .01em; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- boutons ---------- */
.btn {
  --b: var(--surface); --c: var(--text); --bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 9px;
  border: 1px solid var(--bd); background: var(--b); color: var(--c); font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: transform .08s, box-shadow .15s, background .15s, border-color .15s; text-decoration: none !important;
}
.btn .ti { font-size: 18px; }
.btn:hover { box-shadow: var(--shadow-sm); border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { --b: linear-gradient(180deg, #2a83ff, #0b6cf0); --c: #fff; --bd: #0a62da; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 14px rgba(11,108,240,.3); }
.btn-primary:hover { --b: linear-gradient(180deg, #3b8dff, #0a62da); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 20px rgba(11,108,240,.42); border-color: #0757c7; }
.btn-navy { --b: var(--navy); --c: #fff; --bd: var(--navy); }
.btn-ghost { --b: transparent; --bd: transparent; --c: var(--text-2); }
.btn-ghost:hover { --b: var(--surface-3); box-shadow: none; border-color: transparent; }
.btn-danger { --b: var(--red); --c: #fff; --bd: var(--red); }
.btn-soft-danger { --c: var(--red); }
.btn-soft-danger:hover { --b: var(--red-bg); border-color: var(--red); }
.btn-success { --b: var(--green); --c: #fff; --bd: var(--green); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm .ti { font-size: 16px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn-icon { width: 34px; padding: 0; }
.btn-block { width: 100%; }
.btn.loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.3) rgba(255,255,255,.3); animation: spin .7s linear infinite; }
.btn:not(.btn-primary):not(.btn-danger):not(.btn-success).loading::after { border-color: var(--brand) var(--border) var(--border); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 9px; }
.card-head h3 .ti { color: var(--brand); font-size: 19px; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.card-body { padding: 20px; }
.card-body.tight { padding: 8px 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace; font-size: .92em; letter-spacing: -.01em; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none !important; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; border: 0; }

/* ---------- KPI ---------- */
.kpi {
  position: relative; overflow: hidden; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 10px 30px rgba(11,108,240,.08); }
.kpi .k-top { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.kpi .k-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: var(--brand-50); color: var(--brand); }
.kpi .k-val { font-family: var(--font-display); font-size: 31px; font-weight: 700; margin-top: 12px; letter-spacing: .01em; line-height: 1.05; }
.kpi .k-val small { font-size: 15px; color: var(--text-3); font-weight: 600; margin-left: 4px; }
.kpi .k-foot { margin-top: 6px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi .k-spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 52px; opacity: .9; pointer-events: none; }
.kpi.hero { background: linear-gradient(135deg, #0b6cf0 0%, #0a3d9a 55%, #0a2556 100%); border-color: transparent; color: #fff; }
.kpi.hero .k-top { color: rgba(255,255,255,.8); }
.kpi.hero .k-ico { background: rgba(255,255,255,.16); color: #fff; }
.kpi.hero .k-val small, .kpi.hero .k-foot { color: rgba(255,255,255,.72); }
.kpi.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.tone-green .k-ico { background: var(--green-bg); color: var(--green); }
.tone-amber .k-ico { background: var(--amber-bg); color: var(--amber); }
.tone-red .k-ico { background: var(--red-bg); color: var(--red); }
.tone-violet .k-ico { background: var(--violet-bg); color: var(--violet); }
.tone-cyan .k-ico { background: var(--cyan-bg); color: var(--cyan); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); }
.badge .ti { font-size: 13px; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--green-bg); color: var(--green); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-blue { background: var(--brand-50); color: var(--brand); }
.b-violet { background: var(--violet-bg); color: var(--violet); }
.b-cyan { background: var(--cyan-bg); color: var(--cyan); }
.b-navy { background: var(--navy); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.cat-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* ---------- formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field > label .req { color: var(--red); }
.field .hint { font-size: 11.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238392aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 9px 0 0 9px; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 9px 9px 0; background: var(--surface-2); color: var(--text-3); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.input-group .btn { border-radius: 0 9px 9px 0; height: 40px; border-left: 0; }
.input-icon { position: relative; }
.input-icon > .ti { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 18px; pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.c-12 { grid-column: span 12; } .c-8 { grid-column: span 8; } .c-6 { grid-column: span 6; } .c-4 { grid-column: span 4; } .c-3 { grid-column: span 3; } .c-9 { grid-column: span 9; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 20px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(17px); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
input[type="checkbox"].cb { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; margin: 0; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border); gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button .ti { font-size: 16px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- onglets ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; border: 0; background: none; font: inherit; font-weight: 600; font-size: 13.5px;
  color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab .ti { font-size: 18px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab .badge { height: 19px; padding: 0 7px; }

/* ---------- barre de filtres ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .input-icon { flex: 1; min-width: 220px; max-width: 420px; }
.toolbar .select { width: auto; min-width: 150px; height: 38px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 30px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .chip.on { background: var(--brand); border-color: var(--brand); }
.chip .n { font-size: 11px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.chip.on .n { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3);
  padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table th .ti { font-size: 13px; vertical-align: -1px; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.selected { background: var(--brand-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.actions { width: 1%; white-space: nowrap; text-align: right; }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.table .cell-main b { font-weight: 600; display: block; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 0; }
.qty-in { color: var(--green); font-weight: 600; }
.qty-out { color: var(--red); font-weight: 600; }

.thumb { width: 44px; height: 44px; border-radius: 10px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ti { font-size: 22px; }
.thumb.sm { width: 34px; height: 34px; border-radius: 8px; }
.thumb.sm .ti { font-size: 17px; }
.thumb.lg { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; }
.thumb.lg .ti { font-size: 80px; opacity: .85; }

.stock-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.stock-pill.low i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.stock-pill.out i { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.stock-pill.out { color: var(--red); }

.pager { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; }
.pager .pages button { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; }
.pager .pages button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pages button:disabled { opacity: .4; cursor: default; }

/* ---------- grille de produits ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 16px; }
.prod { position: relative; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
.prod:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.prod .ph { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--surface-2); position: relative; overflow: hidden; }
.prod .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prod:hover .ph img { transform: scale(1.05); }
.prod .ph .ti { font-size: 54px; opacity: .9; }
.prod .ph .badge { position: absolute; top: 10px; left: 10px; }
.prod .ph .serial { position: absolute; top: 10px; right: 10px; }
.prod .pb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.prod .ref { font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: .03em; }
.prod .des { font-weight: 600; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.prod .pf { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.prod .price { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--brand); line-height: 1; }
.prod .price small { font-size: 12px; color: var(--text-3); }

/* ---------- listes ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--border); }
.li:last-child { border-bottom: 0; }
.li.link { cursor: pointer; transition: background .12s; }
.li.link:hover { background: var(--surface-2); }
.li .main { flex: 1; min-width: 0; }
.li .main b { font-weight: 600; display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .main small { color: var(--text-3); font-size: 12px; }
.mv-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex: none; }
.mv-entree, .mv-initial { background: var(--green-bg); color: var(--green); }
.mv-sortie { background: var(--red-bg); color: var(--red); }
.mv-transfert { background: var(--brand-50); color: var(--brand); }
.mv-ajustement, .mv-inventaire { background: var(--violet-bg); color: var(--violet); }
.mv-annulation { background: var(--amber-bg); color: var(--amber); }

.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .e-ico { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 16px; display: grid; place-items: center; font-size: 34px; color: var(--brand); background: var(--brand-50); }
.empty h3 { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; max-width: 420px; }

.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 0; }
.kv > div { padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { padding-right: 12px; }
.kv > div:nth-child(odd) { color: var(--text-3); font-weight: 500; }
.kv > div:nth-child(even) { font-weight: 500; text-align: right; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }

/* ---------- graphiques ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--text-3); font-size: 11px; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.legend { display: flex; flex-direction: column; gap: 9px; }
.legend .lg { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend .lg .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .lg b { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-track { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #0b6cf0, #5aa2ff); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.chart-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--navy-900); color: #fff; padding: 8px 11px; border-radius: 9px; font-size: 12px; box-shadow: var(--shadow-lg); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.chart-tip b { display: block; font-size: 13px; }

/* ---------- modales ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(4,12,28,.55); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .2s; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); animation: modalIn .28s cubic-bezier(.2,.9,.3,1.15); display: flex; flex-direction: column; max-height: none; }
.modal.lg { max-width: 820px; }
.modal.xl { max-width: 1080px; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 17px; font-weight: 700; flex: 1; display: flex; align-items: center; gap: 10px; }
.modal-head h2 .h-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 19px; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 18px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.confirm-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; margin-bottom: 14px; background: var(--red-bg); color: var(--red); }
.confirm-ico.info { background: var(--brand-50); color: var(--brand); }

.menu { position: fixed; z-index: 70; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); animation: modalIn .16s; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 11px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; font-size: 13.5px; text-decoration: none !important; }
.menu button:hover, .menu a:hover { background: var(--surface-3); }
.menu .ti { font-size: 18px; color: var(--text-2); }
.menu .sep { height: 1px; background: var(--border); margin: 5px 0; }
.menu .danger, .menu .danger .ti { color: var(--red); }
.menu .head { padding: 8px 11px 10px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }

/* ---------- palette de commandes ---------- */
.palette { width: 100%; max-width: 640px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; animation: modalIn .22s; }
.palette .p-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.palette .p-input .ti { font-size: 22px; color: var(--brand); }
.palette .p-input input { flex: 1; height: 60px; border: 0; background: none; font: inherit; font-size: 17px; color: var(--text); outline: none; }
.palette .p-res { max-height: 56vh; overflow-y: auto; padding: 8px; }
.palette .p-sec { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding: 10px 12px 6px; }
.palette .p-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette .p-item.on { background: var(--brand-50); }
.palette .p-item .main { flex: 1; min-width: 0; }
.palette .p-item .main b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .p-item .main small { color: var(--text-3); font-size: 12px; }
.palette .p-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 95; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 13px 16px; border-radius: 13px; background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2); font-size: 13.5px; }
.toast .ti { font-size: 21px; }
.toast.ok .ti { color: #4ade80; }
.toast.err .ti { color: #ff7b86; }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- connexion ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.auth-visual { position: relative; overflow: hidden; background: #061535; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-visual > * { position: relative; }
.auth-visual .brand-row { display: flex; align-items: center; gap: 14px; }
.auth-visual .brand-row img { width: 56px; }
.auth-visual .brand-row .name { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: .08em; line-height: 1; }
.auth-visual .brand-row .sub { font-size: 11px; letter-spacing: .4em; color: var(--silver); margin-top: 4px; }
.auth-visual h2 { font-family: var(--font-display); font-size: clamp(34px, 3.6vw, 52px); font-weight: 700; line-height: 1.02; max-width: 560px; letter-spacing: .005em; }
.auth-visual h2 span { background: linear-gradient(90deg, #5aa2ff, #b8d6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-visual .lead { color: #a9bad6; max-width: 480px; font-size: 15px; margin-top: 16px; }
.auth-feats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.auth-feats span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 30px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #d5e2f7; backdrop-filter: blur(6px); }
.auth-feats .ti { color: #5aa2ff; font-size: 17px; }
.auth-visual .foot { font-size: 12px; color: #6f83a6; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg-grad); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .logo-big { width: 190px; display: block; margin: 0 auto 26px; }
.auth-box h1 { font-size: 24px; font-weight: 700; text-align: center; }
.auth-box > p { text-align: center; color: var(--text-2); margin: 6px 0 26px; }
.auth-box form { display: flex; flex-direction: column; gap: 16px; }
.auth-err { padding: 11px 14px; border-radius: 10px; background: var(--red-bg); color: var(--red); font-size: 13px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* ---------- fiche article ---------- */
.art-hero { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding: 22px; }
.art-hero .meta { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.art-hero h2 { font-size: 24px; font-weight: 700; line-height: 1.2; }
.price-row { display: flex; gap: 12px; flex-wrap: wrap; }
.price-box { flex: 1; min-width: 130px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.price-box .l { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.price-box .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 2px; }
.price-box.main { background: linear-gradient(135deg, #0b6cf0, #0a2f7a); border-color: transparent; color: #fff; }
.price-box.main .l { color: rgba(255,255,255,.75); }
.depot-bar { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.spec { padding: 11px 13px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.spec .k { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.spec .v { font-weight: 600; margin-top: 2px; }
.barcode-box { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; background: #fff; border-radius: 12px; border: 1px solid var(--border); color: #000; }
.barcode-box svg { max-width: 100%; height: 64px; }

.img-drop { position: relative; aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--border-strong); display: grid; place-items: center; text-align: center; color: var(--text-3); cursor: pointer; overflow: hidden; background: var(--surface-2); transition: border-color .15s, background .15s; }
.img-drop:hover, .img-drop.drag { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-drop .ti { font-size: 38px; }
.img-drop .rm { position: absolute; top: 8px; right: 8px; z-index: 2; }

.form-section { padding: 20px 22px; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: 0; }
.form-section > h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; }
.form-section > h4 .ti { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 17px; }
.margin-box { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: 12.5px; }
.margin-box b { font-size: 14px; }
.spec-row { display: grid; grid-template-columns: 1fr 1.4fr 34px; gap: 8px; margin-bottom: 8px; }
.sticky-foot { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------- opération de stock ---------- */
.op-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.op-type { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: all .15s; text-decoration: none !important; color: var(--text); }
.op-type:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.op-type .mv-ico { width: 42px; height: 42px; font-size: 21px; border-radius: 12px; }
.op-type b { display: block; font-size: 14px; }
.op-type small { color: var(--text-3); font-size: 12px; }
.op-type.on { border-color: var(--brand); box-shadow: var(--ring); }
.picker { position: relative; }
.picker-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 380px; overflow-y: auto; padding: 6px; }
.picker-res .p-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.picker-res .p-item.on, .picker-res .p-item:hover { background: var(--brand-50); }
.picker-res .p-item .main { flex: 1; min-width: 0; }
.picker-res .p-item b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-res .p-item small { color: var(--text-3); }
.lines td { vertical-align: top; }
.lines .input { height: 36px; }
.serial-box { margin-top: 8px; }
.serial-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.serial-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 7px; background: var(--brand-50); color: var(--brand); font-size: 12px; font-weight: 600; font-family: ui-monospace, Consolas, monospace; }
.serial-chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 2px; font-size: 14px; display: grid; }
.serial-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow-y: auto; padding: 8px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); }
.serial-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-family: ui-monospace, Consolas, monospace; cursor: pointer; }
.serial-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.op-summary { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.op-summary .s b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.1; }
.op-summary .s small { color: var(--text-3); font-size: 12px; }

/* ---------- inventaire ---------- */
.inv-progress { height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.inv-progress span { display: block; height: 100%; background: linear-gradient(90deg, #12a150, #4ade80); border-radius: 10px; transition: width .4s; }
.count-input { width: 110px; text-align: center; font-weight: 700; font-size: 15px; }
tr.counted td { background: color-mix(in srgb, var(--green-bg) 55%, transparent); }
tr.diff td { background: color-mix(in srgb, var(--amber-bg) 70%, transparent); }
.flash { animation: flash 1s; }
@keyframes flash { 0%, 30% { background: var(--brand-100); } }

/* ---------- divers ---------- */
.feature-soon { text-align: center; padding: 70px 20px; }
.feature-soon .big-ico { width: 96px; height: 96px; border-radius: 28px; margin: 0 auto 22px; display: grid; place-items: center; font-size: 46px; color: #fff; background: linear-gradient(135deg, #0b6cf0, #0a2556); box-shadow: 0 18px 50px rgba(11,108,240,.35); }
.roadmap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 30px; text-align: left; }
.roadmap .step { padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.roadmap .step.done { border-color: var(--green); background: var(--green-bg); }
.roadmap .step.next { border-color: var(--brand); box-shadow: var(--ring); }
.roadmap .step .n { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--brand); line-height: 1; }
.roadmap .step.done .n { color: var(--green); }
.roadmap .step b { display: block; margin: 6px 0 4px; }
.roadmap .step small { color: var(--text-2); }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatches button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.color-swatches button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 170px; overflow-y: auto; padding: 4px; }
.icon-pick button { height: 40px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 19px; cursor: pointer; display: grid; place-items: center; }
.icon-pick button.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: box-shadow .15s, transform .15s; }
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.cat-card .ci { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: #fff; flex: none; }
.tiers-card { display: flex; gap: 16px; align-items: center; padding: 22px; }
.tiers-card .big-av { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-family: var(--font-display); font-size: 26px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #0b6cf0, #0a2556); flex: none; }
.tiers-card .big-av.frs { background: linear-gradient(135deg, #12a150, #0a5c33); }
.contact-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.contact-line .ti { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 16px; flex: none; }
.scan-video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 4/3; object-fit: cover; }
.scan-frame { position: relative; }
.scan-frame::after { content: ''; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: #ff3b4f; box-shadow: 0 0 12px #ff3b4f; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
.drop-zone { border: 2px dashed var(--border-strong); border-radius: 14px; padding: 34px; text-align: center; cursor: pointer; transition: all .15s; }
.drop-zone:hover, .drop-zone.drag { border-color: var(--brand); background: var(--brand-50); }
.drop-zone .ti { font-size: 40px; color: var(--brand); }

.mobile-only { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: minmax(0, 1fr); }
  .roadmap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .g-main, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .art-hero { grid-template-columns: 200px 1fr; }
  .op-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 270px; transform: translateX(-100%); transition: transform .25s ease; }
  .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 40; background: rgba(4,12,28,.5); }
  .shell.collapsed { --sidebar-w: 0; }
  .mobile-only { display: inline-grid; }
  .desktop-only { display: none !important; }
  .topbar { padding: 0 14px; gap: 8px; }
  .search-trigger kbd, .user-chip .who { display: none; }
  .content { padding: 18px 16px 50px; }
  .g-2, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .card-head { flex-wrap: wrap; }
  .tiers-card, .tiers-card .row { flex-wrap: wrap; }
  .page-actions { width: 100%; }
  .user-chip { padding-right: 4px; }
  .user-chip > .ti { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > * { grid-column: span 1 !important; }
  .art-hero { grid-template-columns: 1fr; }
  .art-hero .thumb.lg { max-width: 260px; margin: 0 auto; }
  .page-head h1 { font-size: 25px; }
  .roadmap { grid-template-columns: 1fr 1fr; }
  .op-types { grid-template-columns: 1fr 1fr; }
  .kpi .k-val { font-size: 27px; }
}
@media (max-width: 520px) {
  .op-types, .roadmap { grid-template-columns: 1fr; }
  .toolbar .select { flex: 1; min-width: 0; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
  .prod .price { font-size: 17px; }
}

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

/* ---------- éditeur de documents ---------- */
.doc-lines td { padding: 10px 8px; }
.doc-lines th { padding: 11px 8px; }
.doc-lines .input { padding: 0 8px; font-size: 13.5px; }
.doc-lines .l-up, .doc-lines .l-rm { width: 28px; }
.doc-lines .mono { white-space: nowrap; }
.doc-lines .tiny { white-space: nowrap; }
.table td.mono { white-space: nowrap; }

/* ---------- caisse (point de vente) ---------- */
.content.pos-mode { max-width: none; padding: 16px 18px 18px; }
.pos { display: flex; flex-direction: column; gap: 14px; height: calc(100vh - var(--topbar-h) - 34px); min-height: 560px; }
.pos-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #0a2556, #0b4fb8); color: #fff; box-shadow: var(--shadow); }
.pos-bar .sess { display: flex; align-items: center; gap: 10px; }
.pos-bar .sess .dot { width: 10px; height: 10px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } }
.pos-bar b { font-family: var(--font-display); font-size: 18px; letter-spacing: .03em; }
.pos-bar small { color: rgba(255,255,255,.7); font-size: 12px; }
.pos-bar .stat { padding: 4px 12px; border-left: 1px solid rgba(255,255,255,.15); line-height: 1.2; }
.pos-bar .stat b { display: block; font-size: 17px; }
.pos-bar .btn { --b: rgba(255,255,255,.1); --c: #fff; --bd: rgba(255,255,255,.18); }
.pos-bar .btn:hover { --b: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); }
.pos-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; }
.pos-left { min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.pos-search { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); }
.pos-search .input { height: 48px; font-size: 16px; padding-left: 44px; border-radius: 12px; }
.pos-search .input-icon > .ti { font-size: 22px; left: 14px; }
.pos-cats { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.pos-cats .chip { flex: none; height: 36px; }
.pos-grid { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; gap: 10px; align-content: start; }
.tile { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: inherit; padding: 0;
  transition: transform .12s, box-shadow .15s, border-color .15s; user-select: none; }
.tile:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(11,108,240,.16); }
.tile:active { transform: scale(.97); }
.tile .im { flex: none; aspect-ratio: 16/11; display: grid; place-items: center; background: var(--surface-2); overflow: hidden; }
.tile .im img { width: 100%; height: 100%; object-fit: cover; }
.tile .im .ti { font-size: 38px; }
.tile .tx { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tile .nm { font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 31px; }
.tile .pr { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--brand); margin-top: auto; }
.tile .st { position: absolute; top: 6px; right: 6px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: rgba(6,21,53,.72); color: #fff; }
.tile .st.out { background: var(--red); }
.tile.out { opacity: .55; }
.tile .sn { position: absolute; top: 6px; left: 6px; font-size: 10px; padding: 2px 6px; border-radius: 8px; background: var(--navy); color: #fff; }
.pos-ticket { min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.pos-client { padding: 12px; border-bottom: 1px solid var(--border); }
.pos-lines { flex: 1; min-height: 0; overflow-y: auto; }
.pl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); animation: viewIn .2s; }
.pl .nm { font-weight: 600; font-size: 13px; line-height: 1.3; }
.pl .meta { font-size: 11.5px; color: var(--text-3); }
.pl .tot { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl .qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.pl .qty button { width: 30px; height: 30px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.pl .qty button:hover { background: var(--brand-50); color: var(--brand); }
.pl .qty span { min-width: 34px; text-align: center; font-weight: 700; }
.pl .acts { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.pos-totals { padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.pos-totals .row { justify-content: space-between; font-size: 13px; color: var(--text-2); }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.pos-total span { font-weight: 600; }
.pos-total b { font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--text); }
.pos-actions { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.btn-pay { height: 58px; font-size: 18px; border-radius: 14px; }
.pay-total { text-align: center; padding: 6px 0 16px; }
.pay-total .l { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; }
.pay-total .v { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.05; }
.pay-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pay-mode { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--text); }
.pay-mode .ti { font-size: 24px; color: var(--text-2); }
.pay-mode.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand); box-shadow: var(--ring); }
.pay-mode.on .ti { color: var(--brand); }
.pay-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pay-quick button { flex: 1; min-width: 74px; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); font: inherit; font-weight: 700; cursor: pointer; color: var(--text); }
.pay-quick button:hover { border-color: var(--brand); color: var(--brand); }
.pay-amount .input { height: 56px; font-size: 26px; font-weight: 700; text-align: right; font-family: var(--font-display); }
.pay-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pay-sum div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.pay-sum .l { font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pay-sum .v { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.pay-sum .change { background: var(--green-bg); border-color: var(--green); }
.pay-sum .change .v { color: var(--green); }
.pay-sum .due { background: var(--amber-bg); border-color: var(--amber); }
.pay-sum .due .v { color: var(--amber); }
.done-ico { width: 84px; height: 84px; border-radius: 50%; margin: 6px auto 14px; display: grid; place-items: center; font-size: 46px; color: #fff; background: linear-gradient(135deg, #12a150, #0a7a3c); box-shadow: 0 12px 40px rgba(18,161,80,.35); animation: pop .5s cubic-bezier(.2,.9,.3,1.4); }
.cash-count { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cash-count label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: 13px; }
.cash-count label span { flex: 1; }
.cash-count .input { width: 64px; height: 34px; text-align: center; }
.pos-open { max-width: 560px; margin: 4vh auto; text-align: center; }
.pos-open .big-ico { width: 96px; height: 96px; border-radius: 28px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 48px; color: #fff; background: linear-gradient(135deg, #0b6cf0, #0a2556); box-shadow: 0 18px 50px rgba(11,108,240,.35); }
@media (max-width: 1100px) { .pos-main { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 860px) {
  .pos { height: auto; }
  .pos-main { grid-template-columns: 1fr; }
  .pos-left { height: 60vh; }
  .pos-bar .stat { display: none; }
}

/* ---------- assistant IA ---------- */
.orb { width: 30px; height: 30px; border-radius: 50%; flex: none; background: radial-gradient(circle at 30% 30%, #b8d6ff, #3b8bff 45%, #0a2556 80%); box-shadow: 0 0 18px rgba(59,139,255,.55), inset 0 0 8px rgba(255,255,255,.5); position: relative; }
.orb.sm { width: 26px; height: 26px; }
.orb.lg { width: 64px; height: 64px; margin: 0 auto 12px; display: block; animation: orbPulse 3s ease-in-out infinite; }
.orb.spin { animation: orbSpin 1.2s linear infinite; }
@keyframes orbPulse { 50% { box-shadow: 0 0 36px rgba(59,139,255,.8), inset 0 0 10px rgba(255,255,255,.6); transform: scale(1.04); } }
@keyframes orbSpin { to { filter: hue-rotate(360deg); transform: rotate(360deg); } }
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 55; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(135deg, #0b6cf0, #0a2556); color: #fff; font-size: 26px; box-shadow: 0 10px 30px rgba(11,108,240,.45); transition: transform .2s; }
.ai-fab:hover { transform: translateY(-3px) scale(1.04); }
.ai-fab .orb { position: absolute; inset: -4px; width: auto; height: auto; background: none; box-shadow: 0 0 0 2px rgba(59,139,255,.35); animation: orbPulse 3s infinite; }
.ai-fab.hide { display: none; }
.ai-panel { position: fixed; right: 18px; bottom: 18px; z-index: 56; width: 430px; max-width: calc(100vw - 24px); height: min(720px, calc(100vh - 36px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); transform: translateY(20px) scale(.96); opacity: 0; visibility: hidden; transition: all .22s cubic-bezier(.2,.9,.3,1.1); }
.ai-panel.open { transform: none; opacity: 1; visibility: visible; }
.ai-panel.wide { width: 760px; height: calc(100vh - 36px); }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, rgba(11,108,240,.08), transparent); border-radius: 20px 20px 0 0; }
.ai-head b { display: block; font-size: 15px; }
.ai-head .ai-title { font-family: Rajdhani, Inter, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: .03em; line-height: 1; }
.ai-head .ai-title span { background: linear-gradient(90deg, var(--brand), #7c3aed, var(--brand)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: aiTitle 6s linear infinite; }
@keyframes aiTitle { to { background-position: 200% center; } }
.ai-head small { color: var(--text-3); font-size: 11.5px; }
.ai-head .icon-btn { width: 34px; height: 34px; font-size: 18px; }
.ai-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ai-hello { text-align: center; padding: 10px 4px; }
.ai-hello h3 { font-size: 19px; }
.ai-hello p { color: var(--text-2); font-size: 13.5px; margin: 6px 0 14px; }
.ai-sugs { display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 12px; }
.ai-sug { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.ai-sug .ti { color: var(--brand); }
.ai-sug:hover { border-color: var(--brand); background: var(--brand-50); }
.ai-msg { display: flex; gap: 8px; align-items: flex-start; }
.ai-msg.me { flex-direction: column; align-items: flex-end; }
.ai-msg .bubble { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; }
.ai-msg.me .bubble { background: linear-gradient(135deg, #2a83ff, #0b6cf0); color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; }
.ai-msg.bot .bubble { background: var(--surface-2); border: 1px solid var(--border); border-top-left-radius: 5px; flex: 1; max-width: calc(100% - 34px); }
.ai-msg.bot .bubble.err { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.ai-thumb { max-width: 160px; border-radius: 12px; border: 1px solid var(--border); }
.ai-md p { margin: 0 0 4px; } .ai-md ul, .ai-md ol { margin: 4px 0 6px; padding-left: 20px; } .ai-md li { margin: 2px 0; }
.ai-md h4 { font-size: 14px; margin: 8px 0 4px; } .ai-md .ai-gap { height: 6px; }
.ai-md code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.ai-md .table-wrap { margin: 6px 0; border: 1px solid var(--border); border-radius: 10px; }
.ai-table { font-size: 12.5px; } .ai-table th, .ai-table td { padding: 6px 9px; }
.ai-steps { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ai-steps span { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2px 8px; }
.ai-steps .ti { color: var(--green); font-size: 12px; }
.ai-draft { margin-top: 10px; padding: 10px; border-radius: 12px; border: 1.5px dashed var(--brand); background: var(--brand-50); }
.ai-tools { display: flex; justify-content: flex-end; margin-top: 4px; }
.ai-typing { display: flex; gap: 4px; padding: 4px 0 6px; } .ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: typing 1.2s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.ai-foot { padding: 10px 12px 10px; border-top: 1px solid var(--border); }
.ai-compose { display: flex; gap: 6px; align-items: flex-end; padding: 5px; border: 1px solid var(--border-strong); border-radius: 15px; background: var(--surface); }
.ai-compose:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.ai-compose textarea { flex: 1; border: 0; outline: none; resize: none; background: none; font: inherit; font-size: 14px; color: var(--text); padding: 9px 4px; max-height: 140px; }
.ai-compose .icon-btn { width: 40px; height: 40px; }
.ai-img { position: relative; display: inline-block; margin-bottom: 8px; }
.ai-img img { height: 64px; border-radius: 10px; border: 1px solid var(--border); }
.ai-img button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 14px; }
.ai-legal { font-size: 10.5px; color: var(--text-3); text-align: center; margin-top: 6px; }
@media (max-width: 600px) { .ai-panel, .ai-panel.wide { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; } .ai-fab { right: 14px; bottom: 14px; } }
@media print { .ai-fab, .ai-panel { display: none !important; } }
body:has(.pos) .ai-fab { bottom: auto; top: 74px; right: 16px; width: 44px; height: 44px; font-size: 20px; }

/* ---------- assistant : micro et voix ---------- */
.ai-head .icon-btn.on { color: var(--brand); background: var(--brand-50); }
.ai-mic { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); font-size: 20px; cursor: pointer; display: grid; place-items: center; flex: none; transition: all .15s; }
.ai-mic:hover { color: var(--brand); border-color: var(--brand); }
.ai-mic .ring { position: absolute; inset: -4px; border-radius: 15px; border: 2px solid #ff3b4f; opacity: 0; pointer-events: none; }
.ai-mic.on { background: #ff3b4f; border-color: #ff3b4f; color: #fff; }
.ai-mic.on .ring { animation: micRing 1.2s ease-out infinite; }
@keyframes micRing { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
.ai-compose.listening { border-color: #ff3b4f; box-shadow: 0 0 0 3px rgba(255,59,79,.18); }
.ai-auto { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 6px 6px 8px 12px; border-radius: 10px; background: var(--brand-50); color: var(--brand); font-size: 12.5px; font-weight: 600; overflow: hidden; }
.ai-auto span { flex: 1; }
.ai-auto i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--brand); width: 100%; transform-origin: left; animation: autoBar 1.6s linear forwards; }
@keyframes autoBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ai-big-mic { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px auto 6px; padding: 14px 22px; border: 0; border-radius: 18px; background: none; cursor: pointer; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; }
.ai-big-mic .ti { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #fff; background: linear-gradient(135deg, #2a83ff, #0a2556); box-shadow: 0 10px 30px rgba(11,108,240,.4); transition: transform .15s; }
.ai-big-mic:hover .ti { transform: scale(1.06); }
.orb.talk { animation: orbTalk .5s ease-in-out infinite alternate; }
@keyframes orbTalk { to { transform: scale(1.18); box-shadow: 0 0 26px rgba(59,139,255,.9), inset 0 0 8px rgba(255,255,255,.6); } }
.ai-tools .btn.on { color: var(--brand); background: var(--brand-50); }
input[type=range] { width: 100%; accent-color: var(--brand); }

/* ---------- connexion : IA à la une ---------- */
.auth-hero { max-width: 600px; }
.ai-pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; margin-bottom: 18px; border-radius: 30px; background: rgba(59,139,255,.14); border: 1px solid rgba(110,170,255,.35); color: #cfe2ff; font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
.ai-pill .orb { width: 22px; height: 22px; animation: orbPulse 3s infinite; }
.ai-show { margin-top: 24px; max-width: 500px; border-radius: 18px; background: rgba(10,30,70,.55); border: 1px solid rgba(120,170,255,.22); box-shadow: 0 20px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter: blur(14px); overflow: hidden; min-height: 248px; transition: opacity .35s, transform .35s; }
.ai-show.sh-out { opacity: 0; transform: translateY(6px); }
.sh-head { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.sh-head em { margin-left: auto; font-style: normal; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #8fb0e0; padding: 2px 8px; border: 1px solid rgba(143,176,224,.35); border-radius: 20px; }
.sh-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.sh-me { align-self: flex-end; max-width: 85%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, #2a83ff, #0b6cf0); color: #fff; min-height: 38px; }
.sh-typed::after { content: '▍'; opacity: .7; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sh-mic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ff3b4f; font-size: 13px; box-shadow: 0 0 0 0 rgba(255,59,79,.6); animation: micPulse 1.2s infinite; }
.sh-mic.off { animation: none; background: rgba(255,255,255,.2); }
@keyframes micPulse { 70% { box-shadow: 0 0 0 8px rgba(255,59,79,0); } }
.sh-photo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.2); font-size: 17px; }
.sh-bot { max-width: 92%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); color: #dbe7fb; animation: viewIn .35s; }
.sh-steps { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.sh-steps span { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #9fb4d6; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 2px 8px; }
.sh-steps span .ti-loader-2 { animation: spin 1s linear infinite; }
.sh-steps span.done { color: #8ee6b0; border-color: rgba(142,230,176,.35); }
.sh-ans p { margin: 3px 0; animation: viewIn .3s; } .sh-ans b { color: #fff; }
.sh-card { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 11px; border-radius: 11px; border: 1.5px dashed rgba(110,170,255,.55); background: rgba(59,139,255,.12); animation: viewIn .35s; }
.sh-card > .ti:first-child { font-size: 20px; color: #7fb5ff; } .sh-card div { flex: 1; } .sh-card b { display: block; color: #fff; font-size: 12.5px; } .sh-card small { color: #9fb4d6; font-size: 11px; }
.auth-ai { display: none; align-items: center; gap: 10px; margin: -8px 0 20px; padding: 10px 12px; border-radius: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); }
.auth-ai div { flex: 1; min-width: 0; } .auth-ai b { display: block; font-size: 13px; } .auth-ai small { display: block; color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-ai > .ti { color: var(--brand); font-size: 20px; }
@media (max-width: 1080px) { .auth-ai { display: flex; } }
@media (max-height: 820px) { .auth-visual .lead { display: none; } .ai-show { margin-top: 14px; } }

/* ---------- accueil : carte assistant IA ---------- */
.ai-home { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; padding: 24px; border-radius: 20px; color: #fff;
  background: radial-gradient(600px 300px at 10% 0%, rgba(90,162,255,.35), transparent 60%), linear-gradient(135deg, #0a2556, #0b4fb8 60%, #0b6cf0); box-shadow: 0 18px 50px rgba(11,79,184,.3); }
.ai-home::after { content: ''; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%); pointer-events: none; }
.ai-home-l { display: flex; gap: 18px; align-items: flex-start; position: relative; z-index: 1; }
.ai-home-l .orb.lg { flex: none; margin: 4px 0 0; width: 58px; height: 58px; }
.ai-home h2 { font-family: var(--font-display); font-size: 27px; font-weight: 700; margin: 10px 0 6px; line-height: 1.1; }
.ai-home p { margin: 0 0 16px; color: rgba(255,255,255,.82); max-width: 520px; }
.ai-pill.sm { margin: 0; padding: 4px 11px; font-size: 12px; gap: 6px; }
.ai-talk { --b: #fff; --c: #0a2556; --bd: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.ai-talk .ti { color: #ff3b4f; }
.ai-ghost { --b: rgba(255,255,255,.12); --c: #fff; --bd: rgba(255,255,255,.25); }
.ai-ghost:hover { --b: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
.ai-home-r { display: grid; gap: 8px; align-content: center; position: relative; z-index: 1; }
.ai-q { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 13px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; transition: all .15s; backdrop-filter: blur(6px); }
.ai-q span { flex: 1; } .ai-q .ti:first-child { color: #9ec7ff; } .ai-q .ti:last-child { opacity: .5; }
.ai-q:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); transform: translateX(3px); }
@media (max-width: 1080px) { .ai-home { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .ai-home { padding: 18px; } .ai-home-l .orb.lg { display: none; } .ai-home h2 { font-size: 22px; } }

/* ---------- notifications ---------- */
.bell-n { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.bell-n.urgent { background: var(--red); animation: pop .4s; }
.notif-panel { width: 380px; max-width: calc(100vw - 16px); padding: 6px; max-height: 70vh; overflow-y: auto; }
.np-item { display: flex !important; align-items: center; gap: 11px; padding: 10px !important; border-radius: 10px; }
.np-item b { display: block; font-size: 13px; } .np-item small { display: block; color: var(--text-3); font-size: 12px; line-height: 1.35; white-space: normal; }
.np-item > .ti:last-child { color: var(--text-3); font-size: 16px; }

/* ---------- mouvement (assets/js/motion.js) ---------- */
.m-rise { animation: mRise .62s cubic-bezier(.16,1,.3,1) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes mRise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.m-row { animation: mRow .45s cubic-bezier(.16,1,.3,1) backwards; animation-delay: calc(80ms + var(--i, 0) * 28ms); }
@keyframes mRow { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.m-count { font-variant-numeric: tabular-nums; animation: mGlow 1.3s ease-out; }
@keyframes mGlow { 0% { text-shadow: 0 0 0 transparent; } 35% { text-shadow: 0 0 18px rgba(59,139,255,.45); } 100% { text-shadow: 0 0 0 transparent; } }

/* halo qui suit la souris */
.kpi, .card, .tile, .prod, .cat-card { --mx: 50%; --my: -200px; }
.kpi::before, .tile::before, .prod::before, .cat-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(59,139,255,.13), transparent 65%);
}
.kpi:hover::before, .tile:hover::before, .prod:hover::before, .cat-card:hover::before { opacity: 1; }
.kpi, .prod, .tile, .cat-card { isolation: isolate; }
.cat-card { position: relative; }
.card { transition: box-shadow .25s, border-color .25s; }
.card:hover { border-color: color-mix(in srgb, var(--brand) 22%, var(--border)); }
.kpi { transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s, border-color .35s; }
.kpi:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); box-shadow: var(--shadow), 0 18px 40px -12px rgba(11,108,240,.28); }
.kpi .k-ico { transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.kpi:hover .k-ico { transform: rotate(-8deg) scale(1.12); }
.kpi.hero { background-size: 160% 160%; animation: mHero 9s ease-in-out infinite alternate; }
@keyframes mHero { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.kpi.hero::before { z-index: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%); background-size: 250% 100%; opacity: 1; animation: mSheen 5.5s ease-in-out infinite; }
@keyframes mSheen { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }

/* onglets : curseur glissant */
.tabs.has-ink { position: relative; }
.tabs.has-ink .tab.on { border-bottom-color: transparent; }
.tab-ink { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; border-radius: 3px 3px 0 0; pointer-events: none;
  background: linear-gradient(90deg, #3b8bff, var(--brand), #7c3aed); box-shadow: 0 -2px 12px rgba(11,108,240,.45);
  transition: transform .5s cubic-bezier(.65,0,.15,1.2), width .5s cubic-bezier(.65,0,.15,1.2); }
.tab { transition: color .2s; }
.tab .ti { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.tab:hover .ti, .tab.on .ti { transform: translateY(-1px) scale(1.1); }
.seg button { transition: background .2s, color .2s, box-shadow .2s; }

/* onde au clic */
.m-waved { overflow: hidden; }
.m-wave { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .16; transform: scale(0); animation: mWave .6s cubic-bezier(.16,1,.3,1) forwards; }
.btn-primary .m-wave, .btn-navy .m-wave, .btn-danger .m-wave, .btn-success .m-wave { background: #fff; opacity: .3; }
@keyframes mWave { to { transform: scale(1); opacity: 0; } }

/* titres de page, menu, badges */
.page-head h1 { position: relative; }
.page-head h1::after { content: ''; display: block; height: 3px; width: 46px; margin-top: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand), #7c3aed);
  transform-origin: left; animation: mLine .8s .15s cubic-bezier(.16,1,.3,1) backwards; }
@keyframes mLine { from { transform: scaleX(0); opacity: 0; } }
.sb-link { transition: background .2s, color .2s, padding-left .25s cubic-bezier(.16,1,.3,1); }
.sb-link:not(.active):hover { padding-left: 16px; }
.sb-link .ti { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.sb-link:hover .ti { transform: scale(1.14); }
.sb-link.active::before { animation: mBar .45s cubic-bezier(.16,1,.3,1); }
@keyframes mBar { from { transform: scaleY(0); opacity: 0; } }
.badge { transition: transform .2s; }
tr:hover .badge, .card:hover .badge { transform: translateY(-1px); }
.table tbody tr { transition: background .15s, box-shadow .15s; }
.table tbody tr:hover { box-shadow: inset 3px 0 0 var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .m-rise, .m-row, .kpi.hero, .kpi.hero::before, .page-head h1::after, .ai-head .ai-title span { animation: none !important; }
}
/* ---------- taxes du document (TVA, centimes additionnels) ---------- */
.tax-box { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.tax-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  background: var(--surface-2); transition: border-color .2s, background .2s, box-shadow .2s; }
.tax-row:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.tax-row.on { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--brand-50); box-shadow: 0 4px 14px -8px rgba(11,108,240,.5); }
.tax-row.off { opacity: .55; cursor: not-allowed; }
.tax-row b { display: block; font-size: 13.5px; }
.tax-row small { color: var(--text-3); font-size: 11.5px; }
.tax-row .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tax-row.on .v { color: var(--brand); }
/* ---------- facturation certifiée DGID ---------- */
.sfec-qr { width: 108px; height: 108px; image-rendering: pixelated; border-radius: 8px; border: 1px solid var(--border); background: #fff; padding: 4px; flex: none; }
.sfec-card .card-head .badge { margin-left: auto; }
/* carte « Situation » de la facturation certifiée */
.sfec-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sfec-stat { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.sfec-stat .v { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1; }
.sfec-stat .l { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--text-3); line-height: 1.35; }
.sfec-stat .l .ti { font-size: 15px; flex: none; }
.sfec-stat.ok .v { color: var(--green); } .sfec-stat.warn .v { color: var(--amber); } .sfec-stat.warn { background: var(--amber-bg); border-color: transparent; }
.sfec-server { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-3); font-size: 12px; min-width: 0; }
.sfec-server .l { display: flex; gap: 6px; align-items: center; color: var(--text-3); font-weight: 600; }
.sfec-server .mono { overflow-wrap: anywhere; color: var(--text); }
/* =========================================================
   Finitions « signature » : connexion, accueil, mouvement
   ========================================================= */

/* --- connexion : aurores, scène inclinable, badges flottants --- */
.aurora { position: absolute; inset: -20%; pointer-events: none; filter: blur(60px); opacity: .75; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: auroraDrift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 46%; height: 46%; left: 6%; top: 8%; background: radial-gradient(circle, rgba(11,108,240,.75), transparent 65%); }
.aurora i:nth-child(2) { width: 40%; height: 40%; right: 4%; top: 30%; background: radial-gradient(circle, rgba(124,58,237,.55), transparent 65%); animation-duration: 22s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 50%; height: 44%; left: 24%; bottom: 0; background: radial-gradient(circle, rgba(6,182,212,.45), transparent 65%); animation-duration: 26s; animation-delay: -12s; }
@keyframes auroraDrift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6%, -5%) scale(1.12); } 100% { transform: translate(-5%, 6%) scale(.94); } }
.show-stage { position: relative; max-width: 500px; margin-top: 24px; perspective: 1100px; --rx: 0deg; --ry: 0deg; }
.show-stage .ai-show { margin-top: 0; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .35s; transform-style: preserve-3d; }
.show-stage .ai-show.sh-out { opacity: 0; }
.float-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 9px 13px 9px 9px; border-radius: 14px; z-index: 2;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 14px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); color: #fff; animation: chipFloat 6s ease-in-out infinite, chipIn .8s cubic-bezier(.16,1,.3,1) backwards; }
.float-chip b { display: block; font-size: 13px; line-height: 1.2; } .float-chip small { display: block; font-size: 11px; color: #a9bad6; }
.fc-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: rgba(59,139,255,.25); color: #8fc0ff; flex: none; }
.fc-ico.ok { background: rgba(52,210,123,.22); color: #5ee49a; } .fc-ico.up { background: rgba(245,184,61,.22); color: #ffd27a; }
.float-chip.c1 { right: -54px; top: 18px; animation-delay: 0s, .5s; }
.float-chip.c2 { left: 22px; bottom: -30px; animation-delay: -2s, .7s; }
.float-chip.c3 { right: -46px; top: 46%; animation-delay: -4s, .9s; }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes chipIn { from { opacity: 0; transform: translateY(16px) scale(.92); } }
@media (max-width: 1280px) { .float-chip.c1 { right: -10px; } .float-chip.c3 { right: -8px; } }
.show-stage { margin-bottom: 30px; }

/* --- connexion : formulaire --- */
.auth-form { position: relative; overflow: hidden; }
.auth-form::before { content: ''; position: absolute; width: 520px; height: 520px; right: -180px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(11,108,240,.12), transparent 65%); pointer-events: none; }
.auth-form::after { content: ''; position: absolute; width: 420px; height: 420px; left: -160px; bottom: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.08), transparent 65%); pointer-events: none; }
.auth-box { position: relative; z-index: 1; padding: 34px 34px 22px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent); box-shadow: 0 30px 80px -30px rgba(6,21,53,.28), inset 0 1px 0 rgba(255,255,255,.5);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: boxIn .7s cubic-bezier(.16,1,.3,1); max-width: 430px; }
@keyframes boxIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.auth-box .logo-big { width: 170px; margin-bottom: 14px; }
.auth-clock { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-3); margin: 0 0 18px; }
.auth-clock b { color: var(--text); font-variant-numeric: tabular-nums; }
.auth-clock .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(18,161,80,.5); animation: livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(18,161,80,.45); } 70% { box-shadow: 0 0 0 8px rgba(18,161,80,0); } 100% { box-shadow: 0 0 0 0 rgba(18,161,80,0); } }
.auth-box .input { height: 44px; background: var(--surface); }
.auth-box .input:focus { box-shadow: 0 0 0 4px rgba(11,108,240,.14); }
.caps { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--amber); font-weight: 600; margin-top: 2px; }
.auth-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-3); }
.auth-trust span { display: inline-flex; align-items: center; gap: 5px; } .auth-trust .ti { color: var(--brand); font-size: 15px; }

/* --- bouton principal avec reflet --- */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }

/* --- accueil après connexion --- */
.welcome { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; color: #fff;
  background: radial-gradient(900px 500px at 30% 20%, rgba(11,108,240,.45), transparent 60%), radial-gradient(700px 500px at 80% 90%, rgba(124,58,237,.35), transparent 60%), #061535;
  transition: opacity .55s ease, transform .55s ease; }
.welcome.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
.welcome .w-in { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.welcome .orb.lg { width: 74px; height: 74px; animation: pop .7s cubic-bezier(.2,.9,.3,1.3); }
.welcome .w-hello { font-family: var(--font-display); font-size: clamp(34px, 5vw, 54px); font-weight: 700; letter-spacing: .01em; animation: splashUp .7s .1s cubic-bezier(.16,1,.3,1) backwards; }
.welcome .w-sub { color: #a9bad6; font-size: 14px; animation: splashUp .7s .25s cubic-bezier(.16,1,.3,1) backwards; }
.welcome .w-bar { width: 180px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.welcome .w-bar span { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, #3b8bff, #a78bfa); animation: slide 1.1s ease-in-out infinite; }

@media (max-width: 900px) { .auth-box { padding: 26px 20px 18px; background: var(--surface); backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .aurora i, .float-chip, .btn-shine::after, .auth-clock .dot { animation: none !important; } }
/* --- accueil : bandeau « en direct » --- */
.day-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ds-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 30px; font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); text-decoration: none !important; transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, border-color .25s;
  animation: chipIn .6s cubic-bezier(.16,1,.3,1) backwards; }
.ds-chip:nth-child(2) { animation-delay: .08s; } .ds-chip:nth-child(3) { animation-delay: .16s; } .ds-chip:nth-child(4) { animation-delay: .24s; }
a.ds-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.ds-chip .ti { font-size: 16px; color: var(--brand); }
.ds-chip b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.ds-chip em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 11.5px; padding: 2px 7px; border-radius: 20px; }
.ds-chip em .ti { font-size: 13px; color: inherit; }
.ds-chip em.up { color: var(--green); background: var(--green-bg); } .ds-chip em.down { color: var(--red); background: var(--red-bg); }
.ds-chip.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livePulse 2s infinite; }
.ds-chip.warn { border-color: color-mix(in srgb, var(--amber) 35%, var(--border)); } .ds-chip.warn .ti { color: var(--amber); }
.ds-chip.ok .ti { color: var(--green); }
/* --- menu latéral : pastille glissante --- */
.sidebar.has-ink .sb-link.active { background: transparent; }
.sidebar.has-ink .sb-link.active::before { display: none; }
.sb-link { z-index: 1; }
.sb-ink { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 9px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(11,108,240,.32), rgba(11,108,240,.12)); box-shadow: inset 0 0 0 1px rgba(99,164,255,.18), 0 8px 24px -10px rgba(11,108,240,.6);
  transition: transform .45s cubic-bezier(.65,0,.15,1.15), height .3s, width .3s, opacity .2s; }
.sb-ink::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #3b8bff; box-shadow: 0 0 14px #3b8bff; }
.shell.collapsed .sb-ink::before { left: -12px; }

/* --- barre du haut : ombre au défilement --- */
.topbar { transition: box-shadow .25s, border-color .25s; }
body.scrolled .topbar { box-shadow: 0 8px 24px -12px rgba(12,26,51,.18); }

/* --- notifications : barre de durée --- */
.toast { position: relative; overflow: hidden; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.08); }
.toast .t-life { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; background: linear-gradient(90deg, #3b8bff, #a78bfa); animation: tLife var(--life, 3200ms) linear forwards; opacity: .85; }
.toast.err .t-life { background: linear-gradient(90deg, #ff5f6d, #ffa36b); }
@keyframes tLife { to { transform: scaleX(0); } }

/* --- boutons principaux : reflet au survol --- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before { content: ''; position: absolute; top: 0; bottom: 0; left: -75%; width: 50%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); transition: left .6s cubic-bezier(.16,1,.3,1); }
.btn-primary:hover::before { left: 130%; }

/* --- barres de défilement discrètes --- */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-3) 40%, transparent); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--text-3) 65%, transparent); }
.page-head + .day-strip { margin: -8px 0 20px; }
@media (max-width: 900px) { .auth-form { padding: 22px 14px; } .auth-box { border-radius: 20px; } }