/* ═══════════════════════════════════════════════════════════════════════════
   Klartè Trade — Design System CSS
   Thème clair · Police : Plus Jakarta Sans + IBM Plex Mono
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  /* Couleurs principales */
  --navy:         #0F2040;
  --coral:        #E85D04;
  --golden:       #F5A623;
  --cream:        #FDF6EE;

  /* Surfaces */
  --bg-page:      #f5f4f1;
  --bg-card:      #ffffff;
  --bg-sidebar:   #0F2040;
  --bg-hover:     #f0efe9;

  /* Bordures */
  --border:       0.5px solid #e5e3de;
  --border-color: #e5e3de;

  /* Texte */
  --text-primary:   #0F2040;
  --text-secondary: #4a5568;
  --text-muted:     #94a3b8;
  --text-on-dark:   #ffffff;

  /* Sémantique */
  --green:       #16a34a;
  --green-light: rgba(22, 163, 74, 0.08);
  --red:         #E85D04;
  --red-light:   rgba(232, 93, 4, 0.08);
  --blue:        #2563eb;

  /* Formes */
  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;

  /* Ombres */
  --shadow-sm:   0 1px 3px rgba(15,32,64,0.06);
  --shadow-md:   0 4px 16px rgba(15,32,64,0.10);
  --shadow-lg:   0 8px 32px rgba(15,32,64,0.16);

  /* Polices */
  --font-ui:     'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:   'IBM Plex Mono', monospace;

  /* Layout */
  --sidebar-w:   240px;
}

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

html { font-size: 14px; }

body {
  font-family: var(--font-ui);
  background:  var(--bg-page);
  color:       var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--coral); text-decoration: none; }
button { cursor: pointer; font-family: var(--font-ui); }
input, textarea, select { font-family: var(--font-ui); }
img { max-width: 100%; display: block; }

/* Chiffres : IBM Plex Mono avec zéro barré désactivé */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "zero" 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — Sidebar + Main
   ═══════════════════════════════════════════════════════════════════════════ */

.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width:      var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  display:    flex;
  flex-direction: column;
  position:   fixed;
  top: 0; left: 0;
  height:     100vh;
  z-index:    200;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-logo span { color: var(--coral); }

.sidebar-tagline {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 8px;
  margin: 12px 0 6px;
}

.nav-item {
  display:     flex;
  align-items: center;
  gap:         10px;
  padding:     10px 12px;
  border-radius: var(--radius-sm);
  color:       rgba(255,255,255,0.60);
  font-size:   13px;
  font-weight: 500;
  transition:  all 0.15s;
  cursor:      pointer;
  border:      none;
  background:  transparent;
  width:       100%;
  text-align:  left;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.nav-item.active {
  background: rgba(232, 93, 4, 0.15);
  color: var(--coral);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

/* Badge compte dans la sidebar */
.sidebar-account {
  padding: 16px 20px;
  border-top: 0.5px solid rgba(255,255,255,0.08);
  font-size: 12px;
}

.badge-demo {
  display: inline-block;
  background: rgba(245,166,35,0.15);
  color: var(--golden);
  border: 0.5px solid rgba(245,166,35,0.35);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-name {
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
  font-size: 11px;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  background: var(--bg-card);
  border-bottom: var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.header-left .last-sync {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Content area ────────────────────────────────────────────────────────── */
.content {
  padding: 24px 28px;
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display:     inline-flex;
  align-items: center;
  gap:         6px;
  padding:     8px 16px;
  border-radius: var(--radius-sm);
  border:      none;
  font-size:   13px;
  font-weight: 600;
  transition:  all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--coral);
  color: #fff;
}
.btn-primary:hover { background: #c94e03; transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-ghost {
  background: transparent;
  border: var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); background: rgba(232,93,4,0.04); }

.btn-sm {
  padding:   5px 12px;
  font-size: 12px;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Icône spin pour le bouton sync ──────────────────────────────────────── */
.btn.syncing .btn-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   FILTRES
   ═══════════════════════════════════════════════════════════════════════════ */

.filters {
  display:   flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.filter-group {
  display:     flex;
  background:  var(--bg-card);
  border:      var(--border);
  border-radius: var(--radius-sm);
  overflow:    hidden;
}

.filter-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
  border-right: var(--border);
}
.filter-btn:last-child { border-right: none; }
.filter-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.filter-btn.active {
  background: var(--navy);
  color: #fff;
}

.filter-separator {
  width: 1px;
  background: var(--border-color);
  margin: 0 4px;
  align-self: stretch;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KPIs
   ═══════════════════════════════════════════════════════════════════════════ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 3px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); }

/* Variantes couleur border-left */
.kpi-card.kpi-coral  { border-left-color: var(--coral); }
.kpi-card.kpi-green  { border-left-color: var(--green); }
.kpi-card.kpi-golden { border-left-color: var(--golden); }
.kpi-card.kpi-navy   { border-left-color: var(--navy); }
.kpi-card.kpi-blue   { border-left-color: var(--blue); }

.kpi-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  color: var(--text-primary);
  line-height: 1.1;
}

.kpi-value.positive { color: var(--green); }
.kpi-value.negative { color: var(--coral); }

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION COURBE P/L
   ═══════════════════════════════════════════════════════════════════════════ */

.section-card {
  background:    var(--bg-card);
  border:        var(--border);
  border-radius: var(--radius);
  padding:       20px 24px;
  margin-bottom: 20px;
  box-shadow:    var(--shadow-sm);
}

.section-header {
  display:     flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size:   13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.chart-container {
  position: relative;
  height:   200px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LISTE DES POSITIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.positions-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       13px;
}

.positions-table thead th {
  text-align:  left;
  padding:     10px 14px;
  font-size:   10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:       var(--text-muted);
  border-bottom: var(--border);
  white-space: nowrap;
}

.positions-table tbody tr {
  border-bottom: var(--border);
  transition:    background 0.12s;
  cursor:        pointer;
}
.positions-table tbody tr:hover { background: var(--bg-hover); }
.positions-table tbody tr:last-child { border-bottom: none; }

.positions-table td {
  padding: 11px 14px;
  vertical-align: middle;
}

/* Colonne symbole */
.td-symbol {
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Colonne direction */
.badge-buy {
  background: rgba(22,163,74,0.10);
  color: var(--green);
  border: 0.5px solid rgba(22,163,74,0.25);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-sell {
  background: rgba(232,93,4,0.10);
  color: var(--coral);
  border: 0.5px solid rgba(232,93,4,0.25);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Colonne P/L */
.pnl-positive {
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
}
.pnl-negative {
  color: var(--coral);
  font-family: var(--font-mono);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
}

/* Colonne RR */
.td-rr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  font-feature-settings: "tnum" 1;
}

/* Colonne date */
.td-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Statut open — badge pulsant */
.badge-open {
  display:     inline-flex;
  align-items: center;
  gap:         5px;
  background:  rgba(37,99,235,0.08);
  color:       var(--blue);
  border:      0.5px solid rgba(37,99,235,0.25);
  font-size:   10px;
  font-weight: 700;
  padding:     2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-open::before {
  content: '';
  width:   6px;
  height:  6px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.badge-closed {
  font-size:   10px;
  font-weight: 600;
  color:       var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badge strategy */
.badge-strategy {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-strategy.yes {
  background: rgba(22,163,74,0.10);
  color: var(--green);
}
.badge-strategy.no {
  background: rgba(232,93,4,0.08);
  color: var(--coral);
}

/* Screenshot count */
.td-screenshots {
  font-size: 11px;
  color: var(--text-muted);
}
.td-screenshots span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ÉTATS VIDES / LOADING
   ═══════════════════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* Skeleton loading */
.skeleton {
  background:         linear-gradient(90deg, #ece9e3 25%, #f5f4f1 50%, #ece9e3 75%);
  background-size:    400% 100%;
  animation:          skeleton-shimmer 1.4s ease infinite;
  border-radius:      6px;
}
@keyframes skeleton-shimmer {
  from { background-position: 100% 0; }
  to   { background-position:   0% 0; }
}
.skeleton-row { height: 44px; margin-bottom: 8px; }
.skeleton-kpi { height: 70px; border-radius: var(--radius); }
.skeleton-chart { height: 200px; border-radius: var(--radius); }

/* ═══════════════════════════════════════════════════════════════════════════
   VUE DÉTAIL — PANEL LATÉRAL (slide depuis la droite)
   ═══════════════════════════════════════════════════════════════════════════ */

.detail-overlay {
  position:   fixed;
  inset:      0;
  background: rgba(15,32,64,0.30);
  backdrop-filter: blur(2px);
  z-index:    300;
  opacity:    0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.detail-overlay.open {
  opacity:        1;
  pointer-events: all;
}

.detail-panel {
  position:   fixed;
  top: 0; right: 0;
  width:      min(680px, 100vw);
  height:     100vh;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  z-index:    301;
  display:    flex;
  flex-direction: column;
  transform:  translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}
.detail-panel.open { transform: translateX(0); }

/* Header du panel */
.detail-header {
  display:     flex;
  align-items: center;
  justify-content: space-between;
  padding:     20px 24px;
  border-bottom: var(--border);
  position:    sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.detail-symbol {
  font-size:   22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color:       var(--text-primary);
  letter-spacing: -0.5px;
}

.detail-meta {
  display:     flex;
  align-items: center;
  gap:         8px;
  margin-top:  4px;
}

.btn-close-panel {
  width:       36px;
  height:      36px;
  border-radius: 50%;
  border:      var(--border);
  background:  transparent;
  font-size:   18px;
  color:       var(--text-secondary);
  display:     flex;
  align-items: center;
  justify-content: center;
  transition:  all 0.15s;
}
.btn-close-panel:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Corps du panel */
.detail-body { padding: 24px; flex: 1; }

/* Grille 2 colonnes pour les champs */
.detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.field-item {
  background: var(--bg-page);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.field-item label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.field-item .field-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-feature-settings: "tnum" 1;
}
.field-item .field-val.positive { color: var(--green); }
.field-item .field-val.negative { color: var(--coral); }

/* ── Section annotations ─────────────────────────────────────────────────── */
.detail-section {
  margin-bottom: 24px;
}

.detail-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: var(--border);
}

/* Toggle stratégie respectée */
.strategy-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-page);
  border: var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.strategy-toggle:hover { border-color: var(--green); }
.strategy-toggle.active {
  background: rgba(22,163,74,0.06);
  border-color: rgba(22,163,74,0.35);
}

.toggle-switch {
  width:  42px;
  height: 24px;
  background: var(--border-color);
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width:   18px;
  height:  18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.strategy-toggle.active .toggle-switch { background: var(--green); }
.strategy-toggle.active .toggle-switch::after { transform: translateX(18px); }

.toggle-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.toggle-sub   { font-size: 11px; color: var(--text-muted); }

/* Setup tag */
.setup-tag-input {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tag-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: var(--border);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.tag-btn:hover { border-color: var(--navy); color: var(--navy); }
.tag-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Note textarea */
.note-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-page);
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s;
}
.note-textarea:focus { outline: none; border-color: var(--navy); }

/* Bouton save annotations */
.btn-save-meta {
  width: 100%;
  margin-top: 8px;
}

/* ── Section screenshots ─────────────────────────────────────────────────── */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.screenshot-thumb {
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: var(--border);
  transition: box-shadow 0.15s;
}
.screenshot-thumb:hover { box-shadow: var(--shadow-md); }
.screenshot-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.screenshot-thumb:hover img { transform: scale(1.04); }

.screenshot-delete {
  position: absolute;
  top: 5px; right: 5px;
  width:  26px; height: 26px;
  border-radius: 50%;
  background: rgba(232,93,4,0.85);
  color: #fff;
  border: none;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.screenshot-thumb:hover .screenshot-delete { opacity: 1; }

/* Zone de drop */
.upload-zone {
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--navy);
  background: rgba(15,32,64,0.03);
}
.upload-zone input[type=file] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}
.upload-icon { font-size: 24px; margin-bottom: 6px; opacity: 0.4; }
.upload-text { font-size: 12px; color: var(--text-muted); }
.upload-text strong { color: var(--navy); }

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════════════════ */

.lightbox {
  position:   fixed;
  inset:      0;
  background: rgba(0,0,0,0.90);
  z-index:    500;
  display:    flex;
  align-items: center;
  justify-content: center;
  opacity:    0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox img {
  max-width:  92vw;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — HAMBURGER MENU + SIDEBAR COLLAPSE
   ═══════════════════════════════════════════════════════════════════════════ */

.mobile-header {
  display: none;
  background: var(--bg-sidebar);
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
}
.mobile-brand { font-size: 16px; font-weight: 800; color: #fff; }
.mobile-brand span { color: var(--coral); }

.hamburger {
  width: 36px; height: 36px;
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xs);
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.hamburger:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tablette ≤ 1024px : sidebar se rétracte */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile ≤ 768px */
@media (max-width: 768px) {
  /* Sidebar masquée par défaut, slide depuis la gauche */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop.open { display: block; }

  .mobile-header { display: flex; }

  .main { margin-left: 0; }

  .header { padding: 12px 16px; }
  .content { padding: 16px; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .detail-panel { width: 100vw; }

  /* Table → cards sur mobile */
  .positions-table thead { display: none; }
  .positions-table tbody tr {
    display: block;
    margin-bottom: 10px;
    border: var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    background: var(--bg-card);
  }
  .positions-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border: none;
  }
  .positions-table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
  }

  .detail-fields { grid-template-columns: 1fr; }
  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Très petit mobile ≤ 480px */
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 18px; }
  .filters { gap: 6px; }
  .filter-btn { padding: 5px 10px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITAIRES
   ═══════════════════════════════════════════════════════════════════════════ */

.text-muted   { color: var(--text-muted); }
.text-success { color: var(--green); }
.text-danger  { color: var(--coral); }
.text-right   { text-align: right; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }

/* Animation d'entrée */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.3s ease both; }

/* Scrollbar discrète */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c5c3bb; }

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--coral); }
