/* Palette commune UL / DT. Chargée après les composants historiques.
   --green/blue/amber/red = information ; --action-* = commande interactive. */
:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface2: #f3f6f8;
  --text: #20313f;
  --muted: #596b7b;
  --line: #e1e7ec;
  --brand: #d71931;
  --red: #c7243b;
  --red-soft: #fcecef;
  --green: #147b5b;
  --green-soft: #e7f5ef;
  --inventory-ok-bg: #f2faf6;
  --inventory-gap-bg: #fffaef;
  --blue: #356c9c;
  --blue-soft: #eaf2fb;
  --amber: #8a5a0c;
  --amber-soft: #fff4df;
  --action-bg: #315f85;
  --action-text: #ffffff;
  --action-hover: #284f70;
  --action-shadow: #315f8512;
  --selection-line: #b5cbdc;
  --secondary-hover: #f7f9fb;
  --soft-hover: #e4edf5;
  --danger-hover: #f9e2e7;
  --danger-line: #e8abb5;
  --focus: #315f85;
  --active-bg: #edf3f8;
  --active-text: #315f85;
  --secondary-bg: #ffffff;
}
html[data-theme="dark"] {
  --bg: #141d25;
  --surface: #1e2a35;
  --surface2: #22323f;
  --text: #e6eef4;
  --muted: #aebdc9;
  --line: #3b4b59;
  --brand: #ff8392;
  --red: #ff8a9a;
  --red-soft: #442936;
  --green: #76d6b2;
  --green-soft: #1d3b34;
  --inventory-ok-bg: #20322e;
  --inventory-gap-bg: #302e26;
  --blue: #9bc7ef;
  --blue-soft: #213a50;
  --amber: #e8c37d;
  --amber-soft: #3c3320;
  --action-bg: #9fc3e4;
  --action-text: #122a37;
  --action-hover: #b6d2ec;
  --action-shadow: transparent;
  --selection-line: #526e85;
  --secondary-hover: #273744;
  --soft-hover: #314c62;
  --danger-hover: #51303e;
  --danger-line: #835263;
  --focus: #9fc3e4;
  --active-bg: #293f52;
  --active-text: #9fc3e4;
  --secondary-bg: #22323f;
}
html .btn.secondary,
html .icon-btn {
  background: var(--secondary-bg);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
html .btn.secondary:hover:not(:disabled),
html .icon-btn:hover:not(:disabled) {
  background: var(--secondary-hover);
  border-color: var(--line);
}
html .btn.soft {
  background: var(--active-bg);
  color: var(--active-text);
}
html .text-btn:hover {
  color: var(--active-text);
}
html .btn.danger,
html .btn.text-btn.danger,
html .icon-btn.danger-icon-v4 {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid var(--danger-line);
}
html .icon-btn:has(.icon[data-icon="trash"]) {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--danger-line);
}
html .input,
html textarea {
  border-color: var(--line);
}
html input[type="checkbox"],
html input[type="radio"] {
  accent-color: var(--action-bg);
}
html :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
html .input:focus,
html textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.local-brand,
.mobile-brand,
.login-brand {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.3px;
}
.local-brand > .icon,
.mobile-brand > .icon {
  color: var(--brand);
  width: 25px;
  height: 25px;
}
html .nav-link.active,
html .nav-link.active:hover,
html .mobile-nav :is(a, button).active {
  background: var(--active-bg);
  color: var(--active-text);
}
html .nav-link .badge-count {
  background: var(--blue-soft);
  color: var(--blue);
}
html .brand-unit .icon {
  color: var(--blue);
}
html .avatar {
  background: var(--blue-soft);
  color: var(--blue);
}
html .notification-dot {
  background: var(--red);
}
html .danger,
html .form-error {
  color: var(--red);
}
html .btn.card-action {
  background: var(--active-bg);
  color: var(--active-text);
}
html .form-section h3 > .icon {
  color: var(--blue);
}
