/* themes.css — Light, dark, sepia + named themes via data-theme on <html> */

[data-theme="light"] {
  --bg:          #f3f5f8;
  --surface:     #ffffff;
  --surface-2:   #eef1f5;
  --border:      #dde2e9;
  --text:        #1c2430;
  --text-2:      #5d6b7e;
  --accent:      #2563eb;
  --accent-soft: #e3edff;
  --positive:    #16a34a;
  --negative:    #dc2626;
  --warning:     #d97706;
  --highlight:     #fff3b0;  /* selected-row highlight (yellow) — exp charge/décharge */
  --highlight-bar: #ef9f27;
  --purple:      #7c3aed;
  --info:        #2563eb;
  --teal:        #0891b2;
  --qu-gratuit-bl:     #4f46e5;
  --qu-gratuit-bc:     #0891b2;
  --qu-echantillon-bl: #db2777;
  --qu-echantillon-bc: #9a3412;
  --chart-grid:  #e5e9f0;
  --sidebar-bg:  #ffffff;
  --sidebar-fg:  #1c2430;
  --sidebar-fg2: #5d6b7e;
  --sidebar-active-bg: #e3edff;
  --sidebar-active-fg: #2563eb;
  --top-bg:      #ffffff;
  --top-fg:      #1c2430;
  --shadow:      0 1px 4px rgba(0,0,0,.09);
}

[data-theme="dark"] {
  --km-tone-exp: #2dd4bf;
  --km-tone-livraison: #fb923c;
  --km-gratuit-bg: #3D3300;
  --km-gratuit-border: #C9A200;
  --km-gratuit-fg: #FFE680;
  --km-back-bg: #4A1B0C;
  --km-back-fg: #F5C4B3;
  --km-back-border: #D85A30;
  --bg:          #12161d;
  --surface:     #1a212b;
  --surface-2:   #232c39;
  --border:      #2d3845;
  --text:        #e6ebf2;
  --text-2:      #8b99ab;
  --accent:      #4f8cff;
  --accent-soft: #1d2c47;
  --positive:    #34d399;
  --negative:    #f87171;
  --warning:     #fbbf24;
  --highlight:     #4a3d0f;  /* selected-row highlight (yellow) — exp charge/décharge */
  --highlight-bar: #fbbf24;
  --purple:      #a78bfa;
  --info:        #4f8cff;
  --teal:        #22d3ee;
  --qu-gratuit-bl:     #818cf8;
  --qu-gratuit-bc:     #22d3ee;
  --qu-echantillon-bl: #f472b6;
  --qu-echantillon-bc: #d97b52;
  --chart-grid:  #283340;
  --sidebar-bg:  #111827;
  --sidebar-fg:  #94a3b8;
  --sidebar-fg2: #475569;
  --sidebar-active-bg: rgba(255,255,255,.08);
  --sidebar-active-fg: #e6ebf2;
  --top-bg:      #111827;
  --top-fg:      #e6ebf2;
  --shadow:      0 1px 4px rgba(0,0,0,.4);
}

[data-theme="sepia"] {
  --bg:          #f1e8d8;
  --surface:     #faf4e8;
  --surface-2:   #ece1cc;
  --border:      #d9cbb0;
  --text:        #3e3122;
  --text-2:      #7d6e55;
  --accent:      #9a6b2f;
  --accent-soft: #efe0c5;
  --positive:    #5c7a3f;
  --negative:    #a8442e;
  --warning:     #b07b1e;
  --highlight:     #fff3b0;  /* selected-row highlight (yellow) — exp charge/décharge */
  --highlight-bar: #ef9f27;
  --purple:      #7c5cb0;
  --info:        #3b6ea5;
  --teal:        #3f7d7d;
  --qu-gratuit-bl:     #6b5b95;
  --qu-gratuit-bc:     #3f7d7d;
  --qu-echantillon-bl: #a3486a;
  --qu-echantillon-bc: #7a4a2a;
  --chart-grid:  #e2d6bd;
  --sidebar-bg:  #292118;
  --sidebar-fg:  #c4a882;
  --sidebar-fg2: #7d6e55;
  --sidebar-active-bg: rgba(255,255,255,.1);
  --sidebar-active-fg: #faf4e8;
  --top-bg:      #3e3122;
  --top-fg:      #faf4e8;
  --shadow:      0 1px 4px rgba(0,0,0,.12);
}

/* Light theme topbar/sidebar overrides — white bg needs solid borders not rgba overlays */
[data-theme="light"] .km-topbar,
[data-theme="light"] .km-sidebar {
  border-color: var(--border);
}
[data-theme="light"] .km-sidebar-header,
[data-theme="light"] .km-sidebar-footer { border-color: var(--border); }
[data-theme="light"] .km-nav-item:hover { background: var(--surface-2); }
[data-theme="light"] .km-search-bar {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
[data-theme="light"] .km-search-bar input { color: var(--text); }
[data-theme="light"] .km-search-bar input::placeholder { color: var(--km-placeholder); }
[data-theme="light"] .km-topbar-bc-current { color: var(--text-2); }
[data-theme="light"] .km-icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
}
[data-theme="light"] .km-icon-btn:hover { background: var(--surface-2); color: var(--text); }
[data-theme="light"] .km-theme-pills {
  background: var(--surface-2);
  border: 1px solid var(--border);
}
[data-theme="light"] .km-theme-pill { color: var(--text-2); }
[data-theme="light"] .km-theme-pill.active { background: var(--surface); color: var(--text); box-shadow: var(--km-shadow); }

/* ── Sky Blue ── */
[data-theme="sky-blue"] {
  --bg:          #f0f6ff;
  --surface:     #ffffff;
  --surface-2:   #e4eeff;
  --border:      #c7daf7;
  --text:        #0f1f3d;
  --text-2:      #3d5a8a;
  --accent:      #2563eb;
  --accent-soft: #dbeafe;
  --positive:    #16a34a;
  --negative:    #dc2626;
  --warning:     #d97706;
  --highlight:     #fff3b0;  /* selected-row highlight (yellow) — exp charge/décharge */
  --highlight-bar: #ef9f27;
  --purple:      #7c3aed;
  --info:        #2563eb;
  --teal:        #0891b2;
  --qu-gratuit-bl:     #4f46e5;
  --qu-gratuit-bc:     #0891b2;
  --qu-echantillon-bl: #db2777;
  --qu-echantillon-bc: #9a3412;
  --chart-grid:  #d0e2ff;
  --sidebar-bg:  #1e3a5f;
  --sidebar-fg:  #93c5fd;
  --sidebar-fg2: #60a5fa;
  --sidebar-active-bg: rgba(96,165,250,.18);
  --sidebar-active-fg: #bfdbfe;
  --top-bg:      #1e3a5f;
  --top-fg:      #dbeafe;
  --shadow:      0 1px 4px rgba(30,58,95,.12);
}

/* ── Slate Pro ── */
[data-theme="slate-pro"] {
  --bg:          #f9fafb;
  --surface:     #ffffff;
  --surface-2:   #f3f4f6;
  --border:      #e5e7eb;
  --text:        #111827;
  --text-2:      #6b7280;
  --accent:      #10b981;
  --accent-soft: #d1fae5;
  --positive:    #10b981;
  --negative:    #ef4444;
  --warning:     #f59e0b;
  --highlight:     #fff3b0;  /* selected-row highlight (yellow) — exp charge/décharge */
  --highlight-bar: #ef9f27;
  --purple:      #8b5cf6;
  --info:        #2563eb;
  --teal:        #0e7490;
  --qu-gratuit-bl:     #4f46e5;
  --qu-gratuit-bc:     #0e7490;
  --qu-echantillon-bl: #db2777;
  --qu-echantillon-bc: #9a3412;
  --chart-grid:  #e5e7eb;
  --sidebar-bg:  #1f2937;
  --sidebar-fg:  #9ca3af;
  --sidebar-fg2: #6b7280;
  --sidebar-active-bg: rgba(110,231,183,.12);
  --sidebar-active-fg: #6ee7b7;
  --top-bg:      #1f2937;
  --top-fg:      #f9fafb;
  --shadow:      0 1px 4px rgba(0,0,0,.08);
}

/* ── Warm Linen ── */
[data-theme="warm-linen"] {
  --bg:          #faf7f2;
  --surface:     #fffdf7;
  --surface-2:   #f2ede3;
  --border:      #e0d5be;
  --text:        #2c2010;
  --text-2:      #7a6545;
  --accent:      #d97706;
  --accent-soft: #fef3c7;
  --positive:    #65a30d;
  --negative:    #b91c1c;
  --warning:     #d97706;
  --highlight:     #fff3b0;  /* selected-row highlight (yellow) — exp charge/décharge */
  --highlight-bar: #ef9f27;
  --purple:      #7c3aed;
  --info:        #2563eb;
  --teal:        #0e7490;
  --qu-gratuit-bl:     #5b4fc4;
  --qu-gratuit-bc:     #0e7490;
  --qu-echantillon-bl: #be185d;
  --qu-echantillon-bc: #7c2d12;
  --chart-grid:  #e8dfc8;
  --sidebar-bg:  #292118;
  --sidebar-fg:  #c4a882;
  --sidebar-fg2: #8a7055;
  --sidebar-active-bg: rgba(251,191,36,.14);
  --sidebar-active-fg: #fbbf24;
  --top-bg:      #292118;
  --top-fg:      #faf7f2;
  --shadow:      0 1px 4px rgba(41,33,24,.12);
}

/* ── Indigo Cloud ── */
[data-theme="indigo-cloud"] {
  --bg:          #f5f4ff;
  --surface:     #ffffff;
  --surface-2:   #ebe9ff;
  --border:      #d4d0fb;
  --text:        #1e1b4b;
  --text-2:      #4338ca;
  --accent:      #6366f1;
  --accent-soft: #e0e7ff;
  --positive:    #16a34a;
  --negative:    #dc2626;
  --warning:     #d97706;
  --highlight:     #fff3b0;  /* selected-row highlight (yellow) — exp charge/décharge */
  --highlight-bar: #ef9f27;
  --purple:      #c026d3;
  --info:        #2563eb;
  --teal:        #0e7490;
  --qu-gratuit-bl:     #4338ca;
  --qu-gratuit-bc:     #0e7490;
  --qu-echantillon-bl: #db2777;
  --qu-echantillon-bc: #9a3412;
  --chart-grid:  #ddd6fe;
  --sidebar-bg:  #312e81;
  --sidebar-fg:  #a5b4fc;
  --sidebar-fg2: #818cf8;
  --sidebar-active-bg: rgba(165,180,252,.15);
  --sidebar-active-fg: #c7d2fe;
  --top-bg:      #312e81;
  --top-fg:      #e0e7ff;
  --shadow:      0 1px 4px rgba(49,46,129,.12);
}
