/**
 * Thème Lotus Suite (aligné sur lotus-rh) — tokens et ajustements Mixta.
 */

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #f0ede8;
  --border: #e0dbd4;
  --text: #1a1714;
  --text-muted: #7a7268;
  --accent: #1a8f26;
  --accent-light: #d4eed8;
  --accent-dark: #125a1c;
  --green: #1a8f26;
  --green-bg: #e6f4e8;
  --red: #b83232;
  --red-bg: #fbeaea;
  --orange: #c4721a;
  --orange-bg: #fef0e0;
  --blue: #146b4d;
  --blue-bg: #dff5ed;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --sidebar-w: 280px;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

html.dark,
html.dark body,
.dark {
  --bg: #0e0d0b;
  --surface: #161412;
  --surface-2: #1e1c19;
  --border: #2a2722;
  --text: #f0ece6;
  --text-muted: #857e74;
  --accent: #23a84a;
  --accent-light: #152818;
  --accent-dark: #4fd67a;
  --green: #4fd67a;
  --green-bg: #0f2215;
  --red: #e06060;
  --red-bg: #2a1010;
  --orange: #e08830;
  --orange-bg: #2a1c08;
  --blue: #5ecf9a;
  --blue-bg: #0f2418;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

.sidebar {
  border-right: 1px solid color-mix(in srgb, var(--accent) 12%, var(--border));
}

.sidebar-logo-icon {
  background: var(--accent);
}

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.nav-item.active::before {
  background: var(--accent);
}

.btn.primary,
a.btn.primary,
button.btn.primary,
button[type="submit"],
button.primary {
  background: linear-gradient(165deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
  border-color: color-mix(in srgb, var(--accent-dark) 80%, #000) !important;
  color: #fff !important;
}

.kpi-card::before {
  background: linear-gradient(90deg, var(--accent), var(--green), var(--accent-dark));
}

.user-avatar {
  background: var(--accent);
}

.perm-matrix th,
.perm-matrix td {
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.perm-matrix th {
  text-align: left;
  background: var(--surface-2);
}

.perm-matrix td.center {
  text-align: center;
}

.perm-check {
  color: var(--accent);
  font-weight: 700;
}

.perm-cross {
  color: var(--text-muted);
  opacity: 0.45;
}

.chart-box {
  position: relative;
  height: 260px;
}

/* Barre d’onglets modules (style retail-smart) */
.module-tabs-bar {
  flex-shrink: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 12%, var(--border));
  background: var(--surface);
  padding: 0 12px;
}

.module-tabs-scroll {
  display: flex;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.module-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.module-tab:hover {
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent-light) 35%, transparent);
}

.module-tab.active {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
  background: color-mix(in srgb, var(--accent-light) 45%, transparent);
}

.module-tab-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.layout-no-sidebar .main {
  width: 100%;
}

.nav-module-title {
  color: var(--accent-dark);
  font-size: 11px;
}

.nav-hint.muted {
  color: var(--text-muted);
}

/* Compléments — voir mixta-premium.css pour le design principal */
.icon-btn {
  transition: transform 0.15s ease, background 0.15s, border-color 0.15s;
}

.icon-btn:active {
  transform: scale(0.96);
}

.dropdown-menu {
  border-radius: 14px;
  overflow: hidden;
}

.page-content {
  animation: mixta-page-in 0.35s ease both;
}

@keyframes mixta-page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
