/* Sourcing Algérie Officiel — styles
   Palette « souk et balance » : vert pin profond, laiton des balances de marché, menthe du meilleur prix, flamme des winners. */
:root {
  --bg: #0C1F1A; --bg-2: #0F2620; --surface: #132E27; --surface-2: #19392F; --surface-3: #21463A;
  --line: rgba(232, 241, 236, .09); --line-2: rgba(232, 241, 236, .16);
  --text: #E8F1EC; --muted: #93AFA3; --faint: #6B8A7D;
  --brass: #E3A72F; --brass-ink: #2A1C02; --mint: #2FBF85; --flame: #EF5A3C; --sky: #5AA9F5; --danger: #EF4444;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -18px rgba(0,0,0,.7);
  --r-s: 8px; --r-m: 14px; --r-l: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --side: 252px; --top: 64px; --bottom: 68px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
}
:root[data-theme="light"] {
  --bg: #EEF3F0; --bg-2: #E5EDE8; --surface: #FFFFFF; --surface-2: #F4F8F5; --surface-3: #E6EFE9;
  --line: rgba(14, 38, 32, .08); --line-2: rgba(14, 38, 32, .15);
  --text: #0E2620; --muted: #567066; --faint: #82988F;
  --brass: #C98A12; --brass-ink: #FFFFFF; --mint: #12935F; --flame: #DD3F22; --sky: #2563EB;
  --shadow: 0 1px 2px rgba(14,38,32,.05), 0 10px 28px -16px rgba(14,38,32,.25);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + var(--sat)); }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; min-height: 100vh; min-height: 100dvh; }
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 6px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }
code { font-size: 12px; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }

/* ---------- boot ---------- */
.boot { min-height: 100dvh; display: grid; place-content: center; gap: 22px; justify-items: center; }
.boot img { animation: float 2.4s var(--ease) infinite; }
.boot-bar { width: 140px; height: 3px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; background: var(--brass); border-radius: 3px; animation: slide 1.1s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ---------- boutons ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s, opacity .2s; user-select: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brass); color: var(--brass-ink); box-shadow: 0 8px 20px -10px var(--brass); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost.danger, .danger { color: var(--danger); }
.btn-ghost.wa, .icon-btn.wa { color: #22C55E; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-sm .i { width: 17px; height: 17px; }
.btn-block { width: 100%; }
.btn.busy { pointer-events: none; color: transparent; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--brass-ink); border-top-color: transparent; animation: spin .7s linear infinite; }
.btn-ghost.busy::after { border-color: var(--text); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); transition: background .2s, color .2s, transform .2s var(--spring); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.lang-btn span { font-weight: 700; font-size: 15px; }
.link { color: var(--brass); font-size: 13px; font-weight: 500; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .6s var(--ease); pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- connexion ---------- */
.auth { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--sat)) 18px calc(24px + var(--sab)); overflow: hidden; }
.auth-bg { position: absolute; inset: 0; pointer-events: none; }
.auth-bg span { position: absolute; width: 46px; height: 46px; border-radius: 10px; background: var(--brass); opacity: .07;
  left: calc(var(--k) * 7.3%); top: 110%; transform: rotate(calc(var(--k) * 23deg)); animation: rise calc(14s + var(--k) * 1.3s) linear infinite; animation-delay: calc(var(--k) * -1.9s); }
.auth-bg span:nth-child(3n) { background: var(--mint); width: 30px; height: 30px; }
.auth-bg span:nth-child(4n) { background: var(--flame); width: 22px; height: 22px; border-radius: 50%; }
@keyframes rise { to { top: -12%; transform: rotate(calc(var(--k) * 23deg + 280deg)); } }
.auth-tools { position: absolute; top: calc(14px + var(--sat)); inset-inline-end: 14px; display: flex; gap: 4px; z-index: 2; }
.auth-card { position: relative; width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 30px 26px; display: grid; gap: 14px; box-shadow: var(--shadow); animation: pop .6s var(--spring) both; }
.auth-logo { display: grid; place-items: center; margin-top: -4px; }
.auth-logo img { animation: float 4s var(--ease) infinite; filter: drop-shadow(0 12px 18px rgba(0,0,0,.35)); }
.auth-brand { text-align: center; font-size: 22px; font-weight: 700; }
.auth-brand span { color: var(--brass); font-weight: 500; }
.auth-card h2 { font-size: 17px; margin-top: 6px; }
.auth-card .btn { margin-top: 6px; }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.err-box { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); padding: 10px 12px; border-radius: 10px; font-size: 14px; }

/* ---------- champs ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field-label em { color: var(--flame); font-style: normal; }
.field small { color: var(--faint); font-size: 12px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s; font-size: 16px; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 22%, transparent); }
input:disabled { opacity: .6; }
input[type=color] { width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); padding: 4px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 34px; }
[dir=rtl] select { background-position: 13px 20px, 18px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field-check { display: flex; align-items: end; padding-bottom: 8px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 8px; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks legend { width: 100%; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; cursor: pointer; transition: all .2s var(--ease); }
.check span .i { width: 16px; height: 16px; }
.check input:checked + span { background: color-mix(in srgb, var(--brass) 18%, transparent); border-color: var(--brass); color: var(--text); }
.check input:focus-visible + span { outline: 2px solid var(--brass); }
.perms.dim { opacity: .4; pointer-events: none; }
.roles { display: grid; gap: 8px; }
.role-opt input { position: absolute; opacity: 0; }
.role-opt span { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; transition: all .2s; }
.role-opt small { color: var(--muted); font-size: 12.5px; }
.role-opt input:checked + span { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 12%, transparent); }
.role-opt input:disabled + span { opacity: .4; cursor: not-allowed; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick legend { width: 100%; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; }
.icon-pick input:checked + span { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 18%, transparent); color: var(--brass); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; min-height: 44px; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.track { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .25s; flex: none; }
.knob { position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .3s var(--spring); }
.switch input:checked + .track { background: var(--mint); }
.switch input:checked + .track .knob { transform: translateX(18px); }
[dir=rtl] .switch input:checked + .track .knob { transform: translateX(-18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ---------- coquille ---------- */
.shell { min-height: 100dvh; }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); background: var(--bg-2); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; padding: calc(18px + var(--sat)) 14px 16px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { flex: none; border-radius: 10px; transition: transform .5s var(--spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: 12px; color: var(--brass); font-weight: 500; }
.side-nav { display: grid; gap: 4px; margin-top: 28px; }
.nav-item { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 14.5px; transition: color .2s, background .2s; }
.nav-item:hover { color: var(--text); background: var(--surface); }
.side-nav .nav-item.active { color: var(--text); background: var(--surface-2); }
.side-nav .nav-item.active::before { content: ''; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--brass); animation: grow .35s var(--spring); }
.side-nav .nav-item.active .i { color: var(--brass); }
.nav-item[data-nav="winners"] .i { color: var(--flame); }
@keyframes grow { from { transform: scaleY(0); } }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.me > div:last-child { display: grid; min-width: 0; }
.me strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: 12px; }
.me.big .avatar { width: 54px; height: 54px; font-size: 18px; }
.me.big > div:last-child { gap: 3px; justify-items: start; }
.avatar { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 600; font-size: 14px;
  background: linear-gradient(135deg, var(--brass), #B97F14); color: var(--brass-ink); }
.avatar.off { filter: grayscale(1); opacity: .5; }

.main { margin-inline-start: var(--side); min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 20; height: calc(var(--top) + var(--sat)); padding: var(--sat) 28px 0; display: flex; align-items: center; gap: 14px;
  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(--line); }
.top-brand { display: none; }
.page-title { font-size: 19px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 2px; }
.view { padding: 24px 28px 48px; max-width: 1400px; outline: none; }
.view-in > *, .tabc.view-in > * { animation: rise-in .5s var(--ease) both; }
.stagger > * { animation: rise-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
.bottom-nav { display: none; }

/* ---------- squelettes ---------- */
.skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.skel-kpi { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.skel { height: 120px; border-radius: var(--r-m); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
.skel-card { height: 250px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* ---------- bandeaux & panneaux ---------- */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--sky) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sky) 30%, transparent); }
.banner .i { color: var(--sky); margin-top: 1px; }
.banner.ok { background: color-mix(in srgb, var(--mint) 12%, transparent); border-color: color-mix(in srgb, var(--mint) 35%, transparent); margin: 14px 0 0; }
.banner.ok .i { color: var(--mint); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel > header h3 { font-size: 15px; }
.panel-flat { box-shadow: none; background: var(--surface-2); margin-top: 16px; }
.empty, .empty-mini { text-align: center; color: var(--muted); }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 56px 20px; list-style: none; }
.empty .i { width: 42px; height: 42px; color: var(--faint); stroke-width: 1.4; }
.empty-mini { padding: 24px 8px; font-size: 14px; list-style: none; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.sec-head h3 { font-size: 16px; }

/* ---------- prix & badges ---------- */
.price { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 600; white-space: nowrap; }
.price .cur { font-size: .72em; color: var(--muted); font-weight: 500; }
.price.lg { font-size: 20px; }
.price.xl { font-size: 30px; font-weight: 700; color: var(--mint); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-in_stock { color: var(--mint); background: color-mix(in srgb, var(--mint) 14%, transparent); }
.pill-low { color: var(--brass); background: color-mix(in srgb, var(--brass) 14%, transparent); }
.pill-on_order { color: var(--sky); background: color-mix(in srgb, var(--sky) 14%, transparent); }
.pill-out { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.pill-in_stock::before { animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.tag-demo { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-weight: 500; }
.cat-label { display: inline-flex; font-size: 12px; font-weight: 500; color: var(--c); }
.type-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--c); padding: 4px 10px 4px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.type-badge .i { width: 15px; height: 15px; }
.verified-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mint); }
.verified-pill .i { width: 15px; height: 15px; }
.verified { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--mint); color: #fff; vertical-align: -3px; }
.verified .i { width: 11px; height: 11px; stroke-width: 3; }
.stars { display: inline-flex; gap: 1px; }
.stars .i { width: 14px; height: 14px; color: var(--faint); }
.stars .i.on { color: var(--brass); fill: var(--brass); }
.best-tag { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--mint); padding: 3px 8px; border-radius: 6px; animation: pulse-mint 2.2s infinite; }
.best-tag.sm { font-size: 10px; padding: 2px 6px; margin-top: 3px; }
@keyframes pulse-mint { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint) 55%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.diff { font-size: 12px; color: var(--muted); }
.save { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--mint); background: color-mix(in srgb, var(--mint) 13%, transparent); padding: 2px 7px; border-radius: 6px; }
.save .i { width: 13px; height: 13px; stroke-width: 2.4; }
.lvl { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.lvl .i { width: 14px; height: 14px; }
.lvl-winner { color: #fff; background: linear-gradient(135deg, var(--flame), #F59E0B); }
.lvl-winner .i { fill: #FDE68A; stroke: #fff; animation: flicker 1.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.18) rotate(4deg); } }
.lvl-promising { color: var(--brass); background: color-mix(in srgb, var(--brass) 16%, transparent); }
.lvl-watch { color: var(--muted); background: var(--surface-3); }
.trend { display: inline-flex; align-items: center; gap: 4px; }
.trend .i { width: 16px; height: 16px; }
.trend-up { color: var(--mint); } .trend-down { color: var(--danger); } .trend-stable { color: var(--muted); }
[dir=rtl] .trend .i, [dir=rtl] .tick-pct .i { transform: scaleX(-1); }
.sat-low { color: var(--mint); } .sat-medium { color: var(--brass); } .sat-high { color: var(--danger); }
.role { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.role-admin { background: color-mix(in srgb, var(--brass) 18%, transparent); color: var(--brass); }
.role-manager { background: color-mix(in srgb, var(--sky) 16%, transparent); color: var(--sky); }

/* ---------- tableau de bord ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--r-l); padding: 26px 26px 0; margin-bottom: 18px;
  background: radial-gradient(120% 140% at 0% 0%, #1E6B4C 0%, #123D30 45%, #0D2A22 100%); color: #F2F8F4; display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; }
:root[data-theme="light"] .hero { background: radial-gradient(120% 140% at 0% 0%, #23855D 0%, #17573F 50%, #11422F 100%); }
[dir=rtl] .hero { background-position: right; }
.hero::after { content: ''; position: absolute; inset-inline-end: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, #E3A72F 45%, transparent), transparent 70%); animation: glow 6s ease-in-out infinite; pointer-events: none; }
@keyframes glow { 50% { transform: translate(-30px, 30px) scale(1.15); opacity: .7; } }
.hero-text h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
.hero-text p { color: rgba(242, 248, 244, .75); margin-top: 6px; }
.hero-meta { display: flex; gap: 26px; align-items: end; z-index: 1; }
.hero-meta div { display: grid; }
.hero-meta b { font-size: 28px; font-weight: 700; color: #F4C25B; font-variant-numeric: tabular-nums; }
.hero-meta span { font-size: 12.5px; color: rgba(242, 248, 244, .7); max-width: 140px; }
.ticker { grid-column: 1 / -1; display: flex; align-items: center; margin: 0 -26px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.18); }
.ticker-label { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 12px 16px; font-size: 12.5px; font-weight: 600; color: #F4C25B; background: rgba(0,0,0,.25); z-index: 1; }
.ticker-label .i { width: 16px; height: 16px; }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-move { display: flex; width: max-content; animation: marquee 38s linear infinite; }
[dir=rtl] .ticker-move { animation-name: marquee-rtl; }
.ticker:hover .ticker-move { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
.tick { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; white-space: nowrap; font-size: 13.5px; border-inline-end: 1px solid rgba(255,255,255,.08); }
.tick .price .cur { color: rgba(242,248,244,.6); }
.tick-name { color: rgba(242,248,244,.85); }
.tick-pct { display: inline-flex; align-items: center; gap: 2px; color: #6EE7B7; font-weight: 600; font-size: 12.5px; }
.tick-pct .i { width: 14px; height: 14px; stroke-width: 2.4; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s var(--ease), border-color .25s; }
.kpi:hover { transform: translateY(-3px); border-color: var(--line-2); }
.kpi-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brass); margin-bottom: 8px; }
.kpi:nth-child(2) .kpi-ic { color: var(--sky); } .kpi:nth-child(3) .kpi-ic { color: var(--flame); } .kpi:nth-child(4) .kpi-ic { color: var(--mint); }
.kpi b { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi > span:last-child { color: var(--muted); font-size: 13px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.chart-line { width: 100%; height: 180px; display: block; overflow: visible; }
.chart-line .grid { stroke: var(--line); stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.chart-line .stroke { fill: none; stroke: var(--brass); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) .2s forwards; }
.chart-line .area { opacity: 0; animation: fade .8s ease 1s forwards; }
.chart-line .dot { fill: none; stroke: var(--brass); stroke-width: 11; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0; animation: fade .3s ease 1.6s forwards; }
.chart-ax { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); padding: 2px 14px 0; font-variant-numeric: tabular-nums; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes pulse-dot { 50% { transform: scale(1.4); } }
.donut { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut svg { width: 140px; height: 140px; flex: none; }
.donut .arc { stroke-dashoffset: 0; animation: arc-in 1s var(--ease) both; animation-delay: var(--d); }
@keyframes arc-in { from { stroke-dasharray: 0 999; } }
.donut-n { font-size: 24px; font-weight: 700; fill: var(--text); }
.donut-l { font-size: 10px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; min-width: 140px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li span { flex: 1; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto; align-items: center; gap: 10px; }
.bar-label { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.bar-label .i { width: 15px; height: 15px; }
.bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 8px; transform-origin: left; animation: bar-in 1s var(--ease) both .3s; }
[dir=rtl] .bar i { transform-origin: right; }
@keyframes bar-in { from { transform: scaleX(0); } }
.mini-win, .recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mini-win li { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 12px; cursor: pointer; }
.mini-win li:hover, .recent li:hover { background: var(--surface-2); }
.mini-win li > div:last-child { display: grid; gap: 3px; min-width: 0; }
.mini-win strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-win small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.recent li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 8px; border-radius: 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.recent li:last-child { border-bottom: 0; }
.recent li > div:first-child { display: grid; min-width: 0; gap: 2px; }
.recent strong { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.recent .end { display: grid; justify-items: end; }

.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.ring-fg { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dashoffset: var(--c); animation: ring-fill 1.3s var(--ease) .2s forwards; }
@keyframes ring-fill { to { stroke-dashoffset: var(--v); } }
.ring b { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---------- barre d'outils & filtres ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.search { position: relative; flex: 1; display: flex; align-items: center; }
.search .i { position: absolute; inset-inline-start: 14px; color: var(--faint); pointer-events: none; }
.search input { padding-inline-start: 44px !important; border-radius: 14px !important; background: var(--surface) !important; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { position: relative; overflow: hidden; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 38px; border-radius: 99px; font-size: 13.5px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: all .25s var(--ease); scroll-snap-align: start; }
.chip .i { width: 16px; height: 16px; color: var(--c, var(--muted)); }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.on .i { color: inherit; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.filters select { width: auto; min-width: 170px; min-height: 42px; background-color: var(--surface); font-size: 14px; }
.count { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.more-wrap { display: grid; place-items: center; margin-top: 18px; }

/* ---------- cartes produit ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pcard { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; box-shadow: var(--shadow); }
.pcard:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 22px 40px -24px rgba(0,0,0,.6); }
.pcard:hover .thumb > .i { transform: scale(1.12) rotate(-6deg); }
.thumb { position: relative; flex: none; width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 40%, transparent), transparent 60%), color-mix(in srgb, var(--c) 14%, var(--surface-2)); color: var(--c); }
.thumb > .i { width: 46px; height: 46px; stroke-width: 1.3; transition: transform .5s var(--spring); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.thumb-lg { width: 96px; height: 96px; aspect-ratio: auto; border-radius: 18px; flex: none; }
.thumb-lg > .i { width: 40px; height: 40px; }
.pcard-body { padding: 14px 16px 16px; display: grid; gap: 8px; flex: 1; align-content: start; }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard h3 { font-size: 15.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-price { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.pcard-price small { width: 100%; font-size: 11.5px; color: var(--muted); }
.pcard-price .price { color: var(--mint); }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--muted); }
.pcard-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pcard-meta .i { width: 14px; height: 14px; }
.pcard .pill { justify-self: start; }

/* ---------- feuilles ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(3, 12, 9, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s; }
.sheet { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(520px, 100%); background: var(--bg-2); border-inline-start: 1px solid var(--line);
  display: flex; flex-direction: column; transform: translateX(105%); transition: transform .38s var(--ease); box-shadow: -30px 0 60px -30px rgba(0,0,0,.6); }
[dir=rtl] .sheet { transform: translateX(-105%); }
.sheet-wide { width: min(720px, 100%); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(16px + var(--sat)) 20px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px calc(14px + var(--sab)); border-top: 1px solid var(--line); background: var(--bg-2); }
.sheet-foot .danger { margin-inline-end: auto; }
.confirm-text { font-size: 15px; }

.pd-head { display: flex; gap: 16px; align-items: center; }
.pd-title { font-size: 20px; margin-top: 4px; }
.pd-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-top: 18px; }
.stat { display: grid; gap: 2px; align-content: start; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.stat small { color: var(--muted); font-size: 12px; }
.stat b { font-size: 26px; font-weight: 700; }
.stat .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-best { background: color-mix(in srgb, var(--mint) 10%, var(--surface)); border-color: color-mix(in srgb, var(--mint) 30%, transparent); }
.range { display: inline-flex; gap: 4px; font-weight: 600; font-size: 16px; direction: ltr; }
.pd-winner { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--flame) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--flame) 25%, transparent); }
.pd-winner > div { flex: 1; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pd-winner .lvl { justify-self: start; }
.pd-desc { margin-top: 14px; color: var(--muted); font-size: 14px; white-space: pre-line; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.offers { display: grid; gap: 10px; }
.offer { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.offer-best { border-color: color-mix(in srgb, var(--mint) 45%, transparent); background: color-mix(in srgb, var(--mint) 6%, var(--surface)); }
.offer-out { opacity: .55; }
.offer-src { display: flex; gap: 10px; align-items: center; min-width: 0; }
.offer-src > div { display: grid; min-width: 0; }
.offer-src strong { font-size: 14.5px; }
.offer-src small { color: var(--muted); font-size: 12px; }
.src-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.src-ic .i { width: 18px; height: 18px; }
.offer-price { display: grid; justify-items: end; gap: 3px; align-content: start; }
.offer-best .offer-price .price { color: var(--mint); }
.offer-meta { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.offer-meta div { min-width: 0; }
.offer-meta dt { font-size: 11.5px; color: var(--faint); }
.offer-meta dd { margin: 2px 0 0; font-size: 13px; font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.offer-meta dd .i { width: 15px; height: 15px; color: var(--muted); }
.offer-notes { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.offer-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- fournisseurs ---------- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.scard { position: relative; overflow: hidden; display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; transition: transform .3s var(--ease), border-color .3s; box-shadow: var(--shadow); }
.scard::before { content: ''; position: absolute; inset-inline-start: 0; inset-block: 0; width: 3px; background: var(--c); transform: scaleY(.3); transition: transform .4s var(--ease); }
.scard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.scard:hover::before { transform: scaleY(1); }
.scard header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scard header .verified-pill { margin-inline-start: auto; }
.scard h3 { font-size: 16px; }
.scard-loc { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.scard-loc .i { width: 15px; height: 15px; }
.scard-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.scard-cats span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.scard-cats .i { width: 13px; height: 13px; color: var(--c); }
.scard footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; }
.scard-act { display: flex; gap: 2px; }
.scard-act .icon-btn { width: 36px; height: 36px; }
.src-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.info-list { display: grid; gap: 0; margin: 16px 0 0; }
.info-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info-list dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.info-list dt .i { width: 16px; height: 16px; }
.info-list dd { margin: 0; font-size: 14px; }

/* ---------- winners ---------- */
.win-intro { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: start; margin-bottom: 18px; padding: 18px; border-radius: var(--r-m);
  background: linear-gradient(120deg, color-mix(in srgb, var(--flame) 12%, var(--surface)), var(--surface) 60%); border: 1px solid var(--line); }
.win-intro p { max-width: 62ch; }
.how { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.how summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--brass); list-style: none; min-height: 32px; }
.how summary::-webkit-details-marker { display: none; }
.how summary .i { width: 16px; height: 16px; }
.how ul { margin: 8px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.spy { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; max-width: 380px; }
.spy small { width: 100%; text-align: end; color: var(--muted); font-size: 12px; }
.wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wcard { position: relative; display: grid; grid-template-columns: auto auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: transform .3s var(--ease), border-color .3s; box-shadow: var(--shadow); overflow: hidden; }
.wcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.lvl-bg-winner { border-color: color-mix(in srgb, var(--flame) 35%, transparent); }
.lvl-bg-winner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--flame) 10%, transparent) 50%, transparent 70%); background-size: 250% 100%; animation: sheen 4s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.rank { font-size: 22px; font-weight: 700; color: var(--faint); width: 30px; text-align: center; }
.wcard:nth-child(1) .rank { color: var(--brass); }
.wmain { display: grid; gap: 8px; min-width: 0; }
.wtop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plats { display: inline-flex; gap: 4px; color: var(--muted); margin-inline-start: auto; }
.plats .i { width: 16px; height: 16px; }
.wcard h3 { font-size: 16px; }
.wstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.wstats dt { font-size: 11.5px; color: var(--faint); }
.wstats dd { margin: 1px 0 0; font-size: 13.5px; font-weight: 600; }
.wstats dd.good { color: var(--mint); }
.wstats .price { font-size: 13.5px; }
.score-bars { display: flex; gap: 3px; height: 5px; }
.score-bars span { flex: 1; background: var(--surface-3); border-radius: 4px; overflow: hidden; position: relative; }
.score-bars span::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--w) * 3.3); max-width: 100%; background: var(--brass); border-radius: 4px; animation: bar-in 1s var(--ease) both .5s; transform-origin: left; }
.score-bars span:nth-child(1)::after { width: calc(var(--w) * 3.33); }
.score-bars span:nth-child(2)::after, .score-bars span:nth-child(3)::after { width: calc(var(--w) * 5); }
.score-bars span:nth-child(4)::after, .score-bars span:nth-child(5)::after { width: calc(var(--w) * 6.67); }
.wact { display: flex; flex-direction: column; gap: 4px; z-index: 1; }

/* ---------- admin ---------- */
.tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; overflow: hidden; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 42px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .25s; }
.tab .i { width: 17px; height: 17px; }
.tab.on { color: var(--brass-ink); }
.tab-ink { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 10px; background: var(--brass); transition: transform .4s var(--spring), width .4s var(--spring); }
.ulist, .clist { display: grid; gap: 8px; }
.urow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .25s, transform .25s var(--ease); }
.urow:hover, .crow:hover { border-color: var(--line-2); transform: translateX(3px); }
[dir=rtl] .urow:hover, [dir=rtl] .crow:hover { transform: translateX(-3px); }
.umain { display: grid; min-width: 0; }
.umain small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.umeta { display: grid; justify-items: end; gap: 2px; }
.umeta small { color: var(--faint); font-size: 11.5px; }
.clist { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.crow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: start; transition: border-color .25s, transform .25s var(--ease); }
.crow > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.crow small { color: var(--muted); font-size: 12.5px; }
.cic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); flex: none; }
.import-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; padding: 22px; border-radius: 14px; border: 2px dashed var(--line-2); transition: all .25s; }
.import-zone > .i { width: 30px; height: 30px; color: var(--brass); }
.import-zone.over { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 8%, transparent); transform: scale(1.01); }
.import-zone p { width: 100%; }
#imp-go { margin-top: 14px; }
.table-wrap { overflow-x: auto; margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 12px; text-align: start; white-space: nowrap; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; background: var(--surface-2); }
.log { list-style: none; margin: 0; padding: 0; display: grid; }
.log li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log li > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.log small { width: 100%; color: var(--faint); font-size: 12px; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass); margin-top: 7px; flex: none; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, transparent); display: grid; gap: 14px; justify-items: start; }
.danger-zone > header { margin: 0; }

/* ---------- paramètres ---------- */
.settings { display: grid; gap: 16px; max-width: 720px; }
.settings .panel > header:not(:first-child) { margin-top: 18px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 9px; font-size: 14px; color: var(--muted); transition: all .25s var(--ease); min-height: 40px; }
.seg button .i { width: 16px; height: 16px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.more-list { display: grid; gap: 6px; }
.more-item { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: 15px; width: 100%; text-align: start; }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 200; inset-inline: 0; bottom: calc(20px + var(--sab)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500; max-width: 440px;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); opacity: 0; transform: translateY(20px) scale(.95); transition: all .35s var(--spring); }
.toast.in { opacity: 1; transform: none; }
.toast .i { width: 18px; height: 18px; color: var(--mint); flex: none; }
.toast-err .i { color: var(--flame); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid .span-2 { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin: 0; padding-bottom: calc(var(--bottom) + var(--sab)); }
  .topbar { padding-inline: 14px; height: calc(58px + var(--sat)); }
  .top-brand { display: block; }
  .top-brand .brand-text strong { font-size: 14px; }
  .page-title { display: none; }
  .top-actions { margin-inline-start: auto; }
  .view { padding: 16px 14px 28px; }
  .bottom-nav { position: fixed; z-index: 40; inset-inline: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--bottom) + var(--sab)); padding: 6px 6px var(--sab); background: color-mix(in srgb, var(--bg-2) 88%, transparent);
    backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-top: 1px solid var(--line); }
  .bottom-nav .nav-item { flex-direction: column; justify-content: center; gap: 3px; padding: 4px 2px; font-size: 11px; border-radius: 12px; text-align: center; }
  .bottom-nav .nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bottom-nav .nav-item .i { width: 22px; height: 22px; transition: transform .35s var(--spring); }
  .bottom-nav .nav-item.active { color: var(--brass); background: none; }
  .bottom-nav .nav-item.active .i { transform: translateY(-2px) scale(1.12); }
  .bottom-nav .nav-item.active::after { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brass); animation: grow-x .35s var(--spring); }
  @keyframes grow-x { from { transform: scaleX(0); } }
  #toasts { bottom: calc(var(--bottom) + 12px + var(--sab)); }

  .sheet, [dir=rtl] .sheet { inset: auto 0 0 0; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; border: 0; border-top: 1px solid var(--line-2); transform: translateY(105%); box-shadow: 0 -20px 50px -20px rgba(0,0,0,.6); }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 8px auto 0; flex: none; }
  .sheet-head { padding: 8px 16px 12px; }
  .sheet-body { padding: 16px; }
  .sheet-foot { padding: 12px 16px calc(12px + var(--sab)); }
  .sheet-foot .btn { flex: 1; }
  .sheet-foot .danger { flex: 0 0 auto; }

  .hero { padding: 20px 18px 0; grid-template-columns: 1fr; border-radius: 18px; }
  .ticker { margin: 0 -18px; }
  .hero-meta { gap: 20px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 24px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .toolbar .btn span { display: none; }
  .toolbar .btn { width: 46px; padding: 0; flex: none; min-height: 46px; }
  .filters select { flex: 1 1 40%; min-width: 0; }
  .filters .switch { flex: 1 1 100%; min-height: 36px; }
  .count { width: 100%; margin: 0; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard-body { padding: 10px 12px 12px; gap: 6px; }
  .pcard h3 { font-size: 14px; }
  .price.lg { font-size: 17px; }
  .pcard-meta span:nth-child(3) { display: none; }
  .thumb > .i { width: 36px; height: 36px; }
  .sgrid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pd-stats { grid-template-columns: 1fr 1fr; }
  .pd-stats .stat-best { grid-column: 1 / -1; }
  .offer-meta { grid-template-columns: 1fr 1fr; }
  .info-list > div { grid-template-columns: 1fr; gap: 2px; }
  .win-intro { grid-template-columns: 1fr; }
  .spy { justify-content: flex-start; max-width: none; }
  .spy small { text-align: start; }
  .wcard { grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px; }
  .wcard .rank { position: absolute; top: 8px; inset-inline-start: 8px; font-size: 13px; width: auto; }
  .wcard .ring { grid-row: 1; }
  .wstats { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; }
  .wmain { display: contents; }
  .wtop, .wcard h3 { grid-column: 2; }
  .wcard h3 { grid-row: 2; align-self: start; }
  .wcard .ring { grid-row: 1 / span 2; }
  .wact { grid-row: 1 / span 2; grid-column: 3; }
  .score-bars { grid-column: 1 / -1; }
  .urow { grid-template-columns: auto 1fr auto; }
  .umeta { grid-column: 2 / -1; justify-items: start; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .brand-text strong { font-size: 13px; }
}
@media (hover: none) { .pcard:hover, .scard:hover, .wcard:hover, .kpi:hover { transform: none; } }

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