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

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #222222;
  --border: #2e2e2e;
  --border2: #3a3a3a;
  --text: #f0f0f0;
  --muted: #888;
  --accent: #00e5a0;
  --accent-dim: rgba(0,229,160,0.12);
  --danger: #ff5c5c;
  --warning: #f5a623;
  --warning-dim: rgba(245,166,35,0.12);
  --radius: 10px;
  --radius-lg: 14px;
  font-family: 'Inter', -apple-system, sans-serif;
}

body { background: var(--bg); color: var(--text); font-size: 14px; min-height: 100vh; }

/* ── AUTH ── */
.auth-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem; background: var(--bg); }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-brand { text-align: center; margin-bottom: 2rem; }
.brand-icon { width: 52px; height: 52px; background: var(--accent); color: #000; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto 12px; }
.brand-name { font-size: 22px; font-weight: 700; color: var(--text); }
.brand-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; }
.tab-row { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 4px; margin-bottom: 1.5rem; }
.tab { flex: 1; padding: 8px; border: none; background: transparent; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--muted); font-family: inherit; transition: all 0.15s; }
.tab.active { background: var(--surface2); color: var(--text); font-weight: 600; }
.field { margin-bottom: 14px; }
.field label, .field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-size: 14px; font-family: inherit; transition: border-color 0.15s; outline: none; }
.field input:focus, .field select:focus { border-color: var(--accent); }
.field select option { background: var(--surface2); }
.btn-primary { width: 100%; padding: 11px; background: var(--accent); color: #000; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.15s; letter-spacing: 0.01em; }
.btn-primary:hover { opacity: 0.88; }
.error-msg { color: var(--danger); font-size: 12px; margin-top: 10px; text-align: center; min-height: 18px; }

/* ── LAYOUT ── */
.main { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ── */
.sidebar { width: 220px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 0; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 16px 16px; font-size: 16px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border); }
.brand-icon-sm { width: 28px; height: 28px; background: var(--accent); color: #000; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: none; background: transparent; border-radius: var(--radius); font-size: 13px; cursor: pointer; color: var(--muted); font-family: inherit; text-align: left; transition: all 0.15s; }
.nav-btn:hover { background: var(--surface2); color: var(--text); }
.nav-btn.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-pill { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); overflow: hidden; }
.user-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.logout-btn { background: none; border: 1px solid var(--border2); color: var(--muted); cursor: pointer; padding: 5px 9px; border-radius: 8px; font-size: 14px; transition: all 0.15s; flex-shrink: 0; }
.logout-btn:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }

/* ── APP BODY ── */
.app-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.topbar-title { font-size: 16px; font-weight: 600; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; }
.add-btn-top { padding: 8px 16px; background: var(--accent); color: #000; border: none; border-radius: var(--radius); font-size: 13px; cursor: pointer; font-weight: 700; font-family: inherit; transition: opacity 0.15s; flex-shrink: 0; }
.add-btn-top:hover { opacity: 0.88; }
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── TOPBAR SEARCH ── */
.topbar-search { position: relative; flex: 1; max-width: 360px; margin: 0 16px; }
.topbar-search input { width: 100%; padding: 8px 12px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-size: 13px; font-family: inherit; outline: none; }
.topbar-search input:focus { border-color: var(--accent); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-lg); max-height: 360px; overflow-y: auto; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.search-result-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface2); }
.search-result-name { font-weight: 600; color: var(--text); }
.search-result-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── WEEKLY SUMMARY ── */
.weekly-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.weekly-title { font-size: 13px; color: var(--muted); }
.weekly-val { font-size: 20px; font-weight: 700; }

/* ── BULK ACTIONS ── */
.bulk-bar { display: flex; align-items: center; gap: 10px; background: var(--accent-dim); border: 1px solid var(--accent); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.bulk-bar select { padding: 6px 10px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-family: inherit; font-size: 12px; }
#vendusSort { padding: 7px 10px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-family: inherit; font-size: 12px; cursor: pointer; }

/* ── DÉPENSES ── */
.expense-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.expense-form-row input { flex: 1; min-width: 140px; padding: 9px 12px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-size: 14px; font-family: inherit; box-sizing: border-box; }
.expense-form-row button { flex-shrink: 0; }
.bulk-bar .btn-confirm { width: auto; padding: 6px 16px; }
.article-select-checkbox { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; margin-right: 4px; }

/* ── RÉPUTATION VENDEUR ── */
.reputation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.reputation-stat { background: var(--surface2); border-radius: var(--radius); padding: 10px; text-align: center; }
.reputation-val { font-size: 18px; font-weight: 700; color: var(--accent); }
.reputation-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── HISTORIQUE VUES/FAVORIS ── */
.history-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12px; }
.history-date { width: 80px; color: var(--muted); flex-shrink: 0; }
.history-bar-wrap { flex: 1; background: var(--surface2); border-radius: 4px; overflow: hidden; height: 8px; }
.history-bar-fill { height: 100%; background: var(--accent); }
.history-vals { width: 90px; text-align: right; color: var(--text); flex-shrink: 0; }

/* ── DÉTAIL ARTICLE ── */
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 13px; border-bottom: 1px solid var(--border); text-align: left; }
.detail-row:last-child { border-bottom: none; }
.detail-row-label { color: var(--muted); }
.detail-row-val { color: var(--text); font-weight: 600; text-align: right; }
.badge-clickable { cursor: pointer; }
.badge-clickable:hover { opacity: 0.8; }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }

/* ── KPI ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.kpi-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.kpi-val { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-val.green { color: var(--accent); }
.kpi-val.red { color: var(--danger); }
.kpi-clickable { cursor: pointer; }
.kpi-clickable:hover { opacity: 0.85; }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── DASHBOARD COLS ── */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-header h2 { font-size: 15px; font-weight: 600; color: var(--text); }
.count-label { font-size: 13px; color: var(--muted); }

/* ── ARTICLE CARDS ── */
.article-list { display: flex; flex-direction: column; gap: 8px; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; display: flex; align-items: center; gap: 14px; transition: border-color 0.15s; cursor: pointer; }
.article-card:hover { border-color: var(--accent); }
.article-photo { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.article-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.hof-rank { font-size: 24px; flex-shrink: 0; }
.article-info { flex: 1; min-width: 0; }
.article-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.article-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.article-right { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.article-profit { font-size: 15px; font-weight: 700; }
.profit-neutral { color: var(--muted); }
.profit-pos { color: var(--accent); }
.profit-neg { color: var(--danger); }

/* ── HISTORIQUE ── */
.ledger-month { margin-bottom: 22px; }
.ledger-month-header { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: capitalize; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.ledger-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ledger-row:last-child { border-bottom: none; }
.ledger-date { color: var(--muted); flex-shrink: 0; width: 78px; }
.ledger-label { flex: 1; min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-amount { font-weight: 700; flex-shrink: 0; }

/* ── STOCK UNIFIÉ (grille de tuiles) ── */
.stockall-section { margin-bottom: 26px; }
.stockall-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.stockall-header select { margin-left: auto; }
.stockall-empty { font-size: 12px; color: var(--muted); }
.article-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 900px) { .article-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
.article-tile { cursor: pointer; }
.tile-photo { position: relative; aspect-ratio: 1; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; transition: border-color 0.15s; }
.article-tile:hover .tile-photo { border-color: var(--accent); }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-name { font-size: 12px; color: var(--text); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-price { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile-checkbox-wrap { position: absolute; top: 4px; left: 4px; }
.tile-select-checkbox { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.tile-dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; }
.tile-trend { position: absolute; bottom: 26px; left: 4px; font-size: 12px; }
.tile-move-btn { position: absolute; bottom: 0; left: 0; right: 0; padding: 5px 4px; border: none; border-radius: 0 0 var(--radius) var(--radius); background: rgba(0,0,0,0.65); color: #fff; font-size: 10.5px; font-family: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-move-btn:hover { background: var(--accent); color: #000; }
.article-actions { display: flex; gap: 4px; }
.btn-edit { padding: 4px 10px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 6px; font-size: 11px; color: var(--muted); cursor: pointer; font-family: inherit; transition: all 0.15s; }
.btn-edit:hover { color: var(--text); border-color: var(--accent); }

/* ── BADGES ── */
.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; display: inline-block; font-weight: 500; }
.badge-stock { background: var(--warning-dim); color: var(--warning); }
.badge-expedition { background: rgba(100,100,255,0.12); color: #8b9eff; }
.badge-vendu { background: var(--accent-dim); color: var(--accent); }
.badge-vinted { background: rgba(30,140,255,0.12); color: #60a5fa; }
.badge-ebay { background: rgba(255,120,0,0.12); color: #fb923c; }
.badge-leboncoin { background: rgba(245,166,35,0.12); color: var(--warning); }
.badge-autre { background: var(--surface2); color: var(--muted); }

/* ── FILTERS ── */
.page-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pf-btn { padding: 5px 14px; border: 1px solid var(--border2); border-radius: 20px; background: transparent; font-size: 12px; cursor: pointer; color: var(--muted); font-family: inherit; transition: all 0.15s; }
.pf-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }

/* ── CHART ── */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.chart-card.big { margin-top: 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; }
.bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--accent); min-height: 4px; transition: height 0.4s; }
.bar.negative { background: var(--danger); opacity: 0.6; }
.chart-labels { display: flex; gap: 8px; margin-top: 8px; }
.chart-label { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }
.chart-label strong { display: block; color: var(--accent); font-size: 11px; }

/* ── GOAL ── */
.goal-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; }
.goal-big { font-size: 48px; font-weight: 700; color: var(--accent); line-height: 1; }
.goal-label { font-size: 13px; color: var(--muted); margin-top: 6px; margin-bottom: 20px; }
.progress-track { height: 8px; background: var(--surface2); border-radius: 10px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 10px; transition: width 0.5s cubic-bezier(.4,0,.2,1); }
.goal-limits { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.goal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.goal-row { display: flex; gap: 8px; margin-top: 8px; }
.goal-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-size: 14px; font-family: inherit; outline: none; }
.goal-row input:focus { border-color: var(--accent); }

/* ── MODAL ── */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(4px); }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-lg); width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; z-index: 1001; position: relative; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .field.full { grid-column: 1 / -1; }
.modal-actions { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }
.btn-cancel { flex: 1; padding: 10px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); font-size: 13px; cursor: pointer; color: var(--muted); font-family: inherit; transition: all 0.15s; }
.btn-cancel:hover { color: var(--text); }
.btn-confirm { flex: 1; padding: 10px; background: var(--accent); color: #000; border: none; border-radius: var(--radius); font-size: 13px; cursor: pointer; font-weight: 700; font-family: inherit; transition: opacity 0.15s; }
.btn-confirm:hover { opacity: 0.88; }
.btn-confirm:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── PHOTO ── */
.photo-upload-area { border: 2px dashed var(--border2); border-radius: 10px; height: 110px; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: border-color 0.15s; text-align: center; font-size: 13px; color: var(--muted); }
.photo-upload-area:hover { border-color: var(--accent); }

/* ── INFO BANNER ── */
.info-banner { background: rgba(100,100,255,0.08); border: 1px solid rgba(100,100,255,0.2); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; color: #8b9eff; margin-bottom: 16px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: 14px; }
.empty-icon { font-size: 36px; margin-bottom: 10px; }

/* ── MOBILE ── */
@media (max-width: 700px) {
  .sidebar { position: fixed; left: -220px; top: 0; bottom: 0; z-index: 200; transition: left 0.25s; }
  .sidebar.open { left: 0; }
  .mobile-menu-btn { display: block; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
}

/* ── EXTRA ── */
.btn-danger { flex: 1; padding: 10px; background: var(--danger); color: #fff; border: none; border-radius: var(--radius); font-size: 13px; cursor: pointer; font-weight: 700; font-family: inherit; }
.btn-danger:hover { opacity: 0.88; }
.checklist-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; }
.checklist-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--accent); }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.checklist-item label { font-size: 13px; color: var(--text); cursor: pointer; flex: 1; }
.checklist-item label.done { text-decoration: line-through; color: var(--muted); }
.sell-time { font-size: 11px; color: var(--muted); font-style: italic; margin-top: 2px; }

/* ── THEME LIGHT ── */
[data-theme="light"] {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface2: #f0f0ee;
  --border: #e5e5e3;
  --border2: #d0d0ce;
  --text: #1a1a18;
  --muted: #666;
  --accent: #00c48a;
  --accent-dim: rgba(0,196,138,0.1);
  --danger: #e24b4a;
  --warning: #b45309;
  --warning-dim: rgba(180,83,9,0.1);
}

/* ── AUTH LOGO ── */
.auth-logo { width: 180px; height: auto; margin: 0 auto 8px; display: block; }
.sidebar-logo { width: 100px; height: auto; display: block; }

/* ── FORGOT BTN ── */
.btn-forgot { width: 100%; background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; margin-top: 10px; font-family: inherit; text-decoration: underline; }
.btn-forgot:hover { color: var(--text); }

/* ── SUCCESS MSG ── */
.success-msg { color: var(--accent); font-size: 12px; margin-top: 10px; text-align: center; min-height: 18px; }

/* ── SETTINGS ── */
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.settings-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; font-weight: 500; color: var(--text); }
.setting-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.theme-toggle { display: flex; gap: 6px; }
.theme-btn { padding: 7px 14px; border: 1px solid var(--border2); border-radius: var(--radius); background: transparent; font-size: 13px; cursor: pointer; color: var(--muted); font-family: inherit; transition: all 0.15s; white-space: nowrap; }
.theme-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* ── CALCULATEUR RAPIDE ── */
#quickCalcCard { margin-bottom: 20px; }
.dash-topbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.quick-calc-row { display: flex; gap: 14px; }
.quick-calc-field { flex: 1; }
.quick-calc-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.quick-calc-field input { width: 100%; padding: 9px 12px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-size: 14px; font-family: inherit; box-sizing: border-box; }
.quick-calc-result { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.quick-calc-stat { flex: 1; min-width: 100px; }
.quick-calc-stat-label { font-size: 11px; color: var(--muted); }
.quick-calc-stat-val { font-size: 18px; font-weight: 700; margin-top: 2px; }
.market-price-row { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.market-price-row input { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-size: 14px; font-family: inherit; box-sizing: border-box; }
.market-price-row button { flex-shrink: 0; white-space: nowrap; }
.market-price-stats { display: flex; gap: 20px; margin-top: 12px; flex-wrap: wrap; }

/* ── SIDEBAR BRAND LIGHT ── */
.sidebar-brand { padding: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }

/* ── COACH ── */
.coach-card { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 20px; }
.coach-msg { font-size: 13px; color: var(--text); padding: 6px 0; border-bottom: 1px solid var(--border); }
.coach-msg:last-child { border-bottom: none; }

/* ── REPLAY ── */
.replay-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; cursor: pointer; transition: border-color 0.15s; }
.replay-card:hover { border-color: var(--accent); }
.replay-header { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.replay-headinfo { flex: 1; min-width: 0; }
.replay-photo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.replay-name { font-size: 15px; font-weight: 700; }
.replay-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.replay-profit { font-size: 18px; font-weight: 700; flex-shrink: 0; }
.replay-flow { display: flex; align-items: center; gap: 14px; background: var(--surface2); border-radius: var(--radius); padding: 12px 16px; }
.replay-flow-step { flex: 1; text-align: center; }
.replay-flow-label { font-size: 11px; color: var(--muted); }
.replay-flow-val { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 2px; }
.replay-flow-date { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.replay-flow-arrow { font-size: 16px; color: var(--muted); flex-shrink: 0; }
.replay-shipping { margin-top: 10px; }

.modal select, .modal input { pointer-events: auto !important; position: relative; z-index: 1002; }

/* ── CALENDAR ── */
.calendar-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; text-align: center; }
.calendar-date { font-size: 18px; font-weight: 700; color: var(--text); text-transform: capitalize; }
.calendar-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.task-group { margin-bottom: 20px; }
.task-group-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.task-count-badge { background: var(--accent); color: #000; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 700; }

/* ── TEXTAREA ── */
.field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface2); color: var(--text); font-size: 14px; font-family: inherit; resize: vertical; outline: none; }
.field textarea:focus { border-color: var(--accent); }

/* ── FAVORIS / REPUBLISH CARD ── */
.fav-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 14px; }
.fav-copy-btn { padding: 7px 14px; background: var(--accent); color: #000; border: none; border-radius: var(--radius); font-size: 12px; cursor: pointer; font-weight: 600; font-family: inherit; flex-shrink: 0; }

/* ── MESSAGES VINTED ── */
.msg-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 14px; }
.msg-card.unread { border-color: var(--accent); background: var(--accent-dim); }
.msg-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); flex-shrink: 0; font-size: 15px; }
.msg-info { flex: 1; min-width: 0; }
.msg-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg-article { font-size: 11px; color: var(--accent); font-weight: 600; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.msg-card.offer { border-color: #f5a623; background: rgba(245,166,35,0.08); }
.offer-badge { background: #f5a623; color: #1a1a1a; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.msg-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.nav-badge { background: var(--accent); color: #000; font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 6px; margin-left: auto; }

/* ── SYNC STATUS BANNER ── */
.sync-banner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.sync-banner-text { font-size: 13px; color: var(--muted); }
.sync-banner-text strong { color: var(--text); }
.sync-banner.sync-banner-warning { background: #f59e0b1a; border-color: #f59e0b; }
.sync-banner.sync-banner-warning .sync-banner-text, .sync-banner.sync-banner-warning .sync-banner-text strong { color: #f59e0b; }
.fav-copy-btn:hover { opacity: 0.88; }

/* ── LANDING PAGE (thème clair dédié, indépendant du thème sombre/clair de l'app) ── */
.landing {
  --l-bg: #f5f5f3;
  --l-surface: #ffffff;
  --l-border: #e5e5e3;
  --l-text: #1a1a18;
  --l-muted: #666;
  --l-accent: #00c48a;
  --l-accent-dim: rgba(0,196,138,0.1);
  --l-danger: #c23d3c;
  --l-danger-dim: rgba(194,61,60,0.08);
  background: var(--l-bg); min-height: 100vh; padding: 0 24px; color: var(--l-text);
}
.landing-header { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.landing-logo { height: 34px; width: auto; }
.landing-header-actions { display: flex; align-items: center; gap: 10px; }
.landing .btn-ghost { padding: 10px 18px; background: transparent; border: 1px solid var(--l-border); color: var(--l-text); border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; white-space: nowrap; }
.landing .btn-ghost:hover { border-color: var(--l-accent); color: var(--l-accent); }
.landing .btn-primary { background: var(--l-accent); color: #fff; }
.btn-inline { width: auto; }
.btn-lg { padding: 13px 24px; font-size: 14px; }

.landing-hero { max-width: 780px; margin: 0 auto; text-align: center; padding: 60px 0 70px; }
.landing-hero h1 { font-size: 40px; font-weight: 700; line-height: 1.2; color: var(--l-text); margin-bottom: 18px; }
.landing-sub { font-size: 16px; color: var(--l-muted); line-height: 1.6; max-width: 600px; margin: 0 auto 32px; }

.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 32px; text-align: left; }
.compare-card { border-radius: var(--radius-lg); padding: 20px; }
.compare-before { background: var(--l-danger-dim); }
.compare-after { background: var(--l-accent-dim); }
.compare-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 10px; }
.compare-before .compare-label { color: var(--l-danger); }
.compare-after .compare-label { color: var(--l-accent); }
.compare-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.compare-card li { font-size: 13px; color: var(--l-text); line-height: 1.4; padding-left: 20px; position: relative; }
.compare-before li::before { content: "✕"; position: absolute; left: 0; color: var(--l-danger); font-weight: 700; }
.compare-after li::before { content: "✓"; position: absolute; left: 0; color: var(--l-accent); font-weight: 700; }

.landing-cta-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.landing-features { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 70px; }
.feature-card { background: var(--l-surface); border: 1px solid var(--l-border); border-radius: var(--radius-lg); padding: 22px; transition: border-color 0.15s; }
.feature-card:hover { border-color: var(--l-accent); }
.feature-icon { font-size: 26px; margin-bottom: 12px; }
.feature-title { font-size: 15px; font-weight: 700; color: var(--l-text); margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--l-muted); line-height: 1.55; }

.landing-steps { max-width: 900px; margin: 0 auto; text-align: center; padding-bottom: 70px; }
.landing-steps h2 { font-size: 24px; font-weight: 700; margin-bottom: 32px; color: var(--l-text); }
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { padding: 0 10px; }
.step-num { width: 40px; height: 40px; background: var(--l-accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; margin: 0 auto 14px; }
.step-title { font-size: 14px; font-weight: 700; color: var(--l-text); margin-bottom: 4px; }
.step-desc { font-size: 12px; color: var(--l-muted); }

.landing-footer { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 24px 0 40px; border-top: 1px solid var(--l-border); font-size: 12px; color: var(--l-muted); }
.landing-footer a { color: var(--l-muted); }
.landing-footer a:hover { color: var(--l-accent); }

.btn-back-landing { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; margin-bottom: 18px; font-family: inherit; }
.btn-back-landing:hover { color: var(--text); }

@media (max-width: 900px) {
  .landing-features { grid-template-columns: repeat(2, 1fr); }
  .steps-row { grid-template-columns: 1fr; gap: 28px; }
  .landing-hero h1 { font-size: 30px; }
  .compare-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .landing-features { grid-template-columns: 1fr; }
  .landing-header-actions .btn-ghost { display: none; }
}
