/**
 * po-theme-dark.css — overlays & panneaux (sidebar, modals, assistance)
 * Chargé automatiquement par po-theme.js
 */

/* ── PoUI : scrim, alert, sheet ── */
[data-theme="dark"] .po-scrim { background: rgba(0, 0, 0, 0.58); }

[data-theme="dark"] .po-alert-card {
  background: rgba(22, 28, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .po-alert-title { color: var(--po-ink); }
[data-theme="dark"] .po-alert-list { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .po-alert-list li { border-color: rgba(255, 255, 255, 0.08); color: var(--po-ink); }
[data-theme="dark"] .po-alert-actions { border-color: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .po-alert-btn { border-color: rgba(255, 255, 255, 0.1); color: var(--po-blue); }
[data-theme="dark"] .po-alert-btn:active { background: rgba(255, 255, 255, 0.06); }

[data-theme="dark"] .po-sheet {
  background: #161b28;
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .po-sheet-head { background: #161b28; }
[data-theme="dark"] .po-sheet-grabber { background: rgba(255, 255, 255, 0.22); }
[data-theme="dark"] .po-sheet-cancel { color: var(--po-blue); }
[data-theme="dark"] .po-sheet-title { color: var(--po-ink); }
[data-theme="dark"] .po-sheet-done { color: var(--po-blue); }
[data-theme="dark"] .po-sheet-field input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--po-ink);
}

/* ── Sidebar psb2 ── */
[data-theme="dark"] .psb-trigger:hover { background: rgba(255, 255, 255, 0.08); }

[data-theme="dark"] .psb2-scrim { background: rgba(0, 0, 0, 0.55); }

[data-theme="dark"] .psb2-rail {
  background: rgba(16, 24, 40, 0.97);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .psb2-close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--po-ink-2);
}
[data-theme="dark"] .psb2-close:hover { background: rgba(255, 255, 255, 0.14); }

[data-theme="dark"] .psb2-tab { color: var(--po-ink-3); }
[data-theme="dark"] .psb2-tab:hover { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .psb2-tab .apei,
[data-theme="dark"] .psb2-tab .bars2 i { color: var(--po-ink-2); }
[data-theme="dark"] .psb2-tab.active { background: rgba(106, 161, 245, 0.18); color: var(--po-blue); }
[data-theme="dark"] .psb2-tab.active .apei,
[data-theme="dark"] .psb2-tab.active .bars2 i { color: var(--po-blue); }
[data-theme="dark"] .psb2-tab .cnt { box-shadow: 0 0 0 2px rgba(16, 24, 40, 0.97); }

[data-theme="dark"] .psb2-content {
  background: rgba(13, 19, 32, 0.98);
}
[data-theme="dark"] .psb2-head strong { color: var(--po-ink); }
[data-theme="dark"] .psb2-search {
  background: rgba(255, 255, 255, 0.08);
  color: var(--po-ink-3);
}
[data-theme="dark"] .psb2-search input { color: var(--po-ink); }
[data-theme="dark"] .psb2-title { color: var(--po-ink-3); }

[data-theme="dark"] .psb2-row:hover { background: rgba(106, 161, 245, 0.1); }
[data-theme="dark"] .psb2-row .ico {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .psb2-row .ico .apei { color: var(--po-brand); }
[data-theme="dark"] .psb2-row .txt strong { color: var(--po-ink); }
[data-theme="dark"] .psb2-row .txt span { color: var(--po-ink-3); }
[data-theme="dark"] .psb2-row .chev { color: rgba(255, 255, 255, 0.25); }
[data-theme="dark"] .psb2-row.checked { background: rgba(106, 161, 245, 0.14); }

[data-theme="dark"] .psb2-sep { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .psb2-empty { color: var(--po-ink-3); }
[data-theme="dark"] .psb2-empty .apei { color: rgba(255, 255, 255, 0.2); }

[data-theme="dark"] .psb2-cta.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--po-ink);
}

[data-theme="dark"] .psb2-line { border-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .psb2-line .thumb {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .psb2-line .name,
[data-theme="dark"] .psb2-line .price { color: var(--po-ink); }
[data-theme="dark"] .psb2-line .meta { color: var(--po-ink-3); }

[data-theme="dark"] .psb2-qty { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .psb2-qty button { color: var(--po-ink); }
[data-theme="dark"] .psb2-qty button:hover { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .psb2-subtotal .lbl { color: var(--po-ink-3); }
[data-theme="dark"] .psb2-subtotal .val { color: var(--po-ink); }

[data-theme="dark"] .psb2-hello strong { color: var(--po-ink); }
[data-theme="dark"] .psb2-hello span,
[data-theme="dark"] .psb2-note { color: var(--po-ink-3); }

[data-theme="dark"] .psb2-msg.agent {
  background: rgba(255, 255, 255, 0.08);
  color: var(--po-ink);
}
[data-theme="dark"] .psb2-chat-input input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--po-ink);
}

[data-theme="dark"] .psb2-form input,
[data-theme="dark"] .psb2-form textarea,
[data-theme="dark"] .psb2-form select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--po-ink);
}
[data-theme="dark"] .psb2-form label { color: var(--po-ink-3); }

[data-theme="dark"] .psb2-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--po-ink-2);
}
[data-theme="dark"] .psb2-icon-btn:hover { background: rgba(106, 161, 245, 0.15); color: var(--po-blue); }
[data-theme="dark"] .psb2-preconfig p { color: var(--po-ink-2); }

/* ── Assistance flottante pos-* ── */
[data-theme="dark"] .pos-sheet {
  background: #161b28;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .pos-head h3 { color: var(--po-ink); }
[data-theme="dark"] .pos-close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--po-ink-2);
}
[data-theme="dark"] .pos-ctx {
  background: rgba(106, 161, 245, 0.14);
  color: var(--po-blue);
}
[data-theme="dark"] .pos-mode {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .pos-mode:hover {
  border-color: var(--po-blue);
  box-shadow: 0 5px 16px rgba(106, 161, 245, 0.18);
}
[data-theme="dark"] .pos-mode strong { color: var(--po-ink); }
[data-theme="dark"] .pos-mode span { color: var(--po-ink-3); }
[data-theme="dark"] .pos-mode em { background: rgba(255, 255, 255, 0.08); color: var(--po-ink-3); }

[data-theme="dark"] .pos-msg.agent {
  background: rgba(255, 255, 255, 0.08);
  color: var(--po-ink);
}
[data-theme="dark"] .pos-input input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--po-ink);
}

/* ── Lifecycle / dashboard (classes communes) ── */
[data-theme="dark"] .lc-card,
[data-theme="dark"] .lc-panel,
[data-theme="dark"] .lc-tile {
  background: var(--po-card);
  border-color: var(--po-card-border);
  color: var(--po-ink);
}
[data-theme="dark"] .lc-sidebar {
  background: rgba(16, 24, 40, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .lc-nav a { color: var(--po-ink-2); }
[data-theme="dark"] .lc-nav a.active,
[data-theme="dark"] .lc-nav a:hover { color: var(--po-ink); background: rgba(255, 255, 255, 0.06); }

/* ── Configurateur UX4 ── */
[data-theme="dark"] .cfg-ux-phase-btn .phase-num {
  background: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .cfg-ux-phase-btn.active .phase-num:not(.is-check):not(.is-warn) {
  background: var(--po-blue);
}
[data-theme="dark"] .cfg-ux-flow-node.clickable:hover {
  background: rgba(106, 161, 245, 0.1);
}
[data-theme="dark"] .cfg-ux-option:hover:not(.disabled) {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}
[data-theme="dark"] .cfg-ux-option.selected.mode-tile {
  box-shadow: 0 0 0 1px var(--po-blue), 0 12px 32px rgba(106, 161, 245, 0.18);
}
[data-theme="dark"] .cfg-ux-option.selected.mode-row {
  background: rgba(106, 161, 245, 0.08);
  border-color: rgba(106, 161, 245, 0.4);
}
[data-theme="dark"] .opt-sel-mark { border-color: rgba(255, 255, 255, 0.18); }
[data-theme="dark"] .cfg-ux-compare .hl { background: rgba(106, 161, 245, 0.12); }
[data-theme="dark"] .cfg-ux-restore-banner {
  background: rgba(106, 161, 245, 0.12);
  border-color: rgba(106, 161, 245, 0.25);
}
[data-theme="dark"] .cfg-ux-profile-chip.needs-attention {
  background: rgba(106, 161, 245, 0.1);
  border-color: rgba(106, 161, 245, 0.35);
}
[data-theme="dark"] .cfg-ux-insight.highlight {
  background: linear-gradient(135deg, rgba(106, 161, 245, 0.1), rgba(76, 217, 100, 0.08));
  border-color: rgba(106, 161, 245, 0.25);
}
[data-theme="dark"] .cfg-ux-preset.recommended {
  background: rgba(106, 161, 245, 0.1);
  border-color: rgba(106, 161, 245, 0.35);
}
[data-theme="dark"] .cfg-ux-preset.upsell {
  background: rgba(88, 86, 214, 0.12);
  border-color: rgba(88, 86, 214, 0.3);
}
[data-theme="dark"] .cfg-ux-option.for-you {
  background: rgba(76, 217, 100, 0.08);
  border-color: rgba(76, 217, 100, 0.35);
}

[data-theme="dark"] .cfg-ux-schema-band {
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .cfg-schema-pipe-flow {
  filter: drop-shadow(0 0 8px rgba(106, 161, 245, 0.4));
}
[data-theme="dark"] .cfg-schema-node.is-active .cfg-schema-node-card {
  box-shadow: 0 0 0 1px var(--po-blue), 0 12px 36px rgba(106, 161, 245, 0.22);
}

/* ── Homepage inline blocks ── */
[data-theme="dark"] .po-client-row .tag {
  background: rgba(76, 217, 100, 0.16);
  color: #4cd964;
}
[data-theme="dark"] .po-client-row .tag.blue {
  background: rgba(106, 161, 245, 0.18);
  color: var(--po-blue);
}
[data-theme="dark"] .po-tier-card.spark .tier-badge { background: rgba(255, 149, 0, 0.18); color: #ffb340; }
[data-theme="dark"] .po-tier-card.craft .tier-badge { background: rgba(106, 161, 245, 0.18); color: var(--po-blue); }
[data-theme="dark"] .po-tier-card.flow .tier-badge { background: rgba(76, 217, 100, 0.16); color: #4cd964; }

/* ── Recherche / panier / checkout cartes ── */
[data-theme="dark"] .po-search-card,
[data-theme="dark"] .cart-line,
[data-theme="dark"] .checkout-card,
[data-theme="dark"] .compare-card,
[data-theme="dark"] .pg-card,
[data-theme="dark"] .pg-reco-card,
[data-theme="dark"] .pg-confirm-tile,
[data-theme="dark"] .pg-result-card,
[data-theme="dark"] .pg-wl-card,
[data-theme="dark"] .pg-cmp-scroll,
[data-theme="dark"] .pg-search-bar,
[data-theme="dark"] .pg-filter,
[data-theme="dark"] .pg-sum-toggle {
  background: var(--po-card);
  border-color: var(--po-card-border);
}
