/* ============================================================
   DON DE DIEU — Premium Design System v3 (Dark Mode)
   Layout: Topbar + Content + Bottom Nav (App style)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900&display=swap');

:root {
  --primary:        #10b981;
  --primary-dark:   #059669;
  --primary-light:  #34d399;
  --primary-bg:     rgba(16,185,129,0.12);
  --primary-glow:   0 0 24px rgba(16,185,129,0.30);

  --danger:   #ef4444;
  --warning:  #f59e0b;
  --info:     #3b82f6;
  --purple:   #8b5cf6;
  --success:  #10b981;

  /* Dark Surfaces */
  --bg:        #080c18;
  --bg-card:   #0f172a;
  --bg-card2:  #111827;
  --bg-topbar: #0c1220;

  /* Text */
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --text-light: #475569;

  /* Borders */
  --border:       rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.04);

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);

  /* Radii */
  --r-sm:  6px;
  --r:     12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 28px;

  /* Transition */
  --ease:   cubic-bezier(0.4,0,0.2,1);
  --t:      all 0.22s var(--ease);
  --t-fast: all 0.14s ease;

  /* Layout */
  --topbar-h:    64px;
  --bottomnav-h: 74px;
  --sidebar-w:   240px;

  /* Surfaces */
  --surface:   #0f172a;
  --surface-2: #111827;
}

/* ============================================================
   BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 15px;          /* base pour rem */
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  overflow-x: hidden;
  padding-bottom: var(--bottomnav-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Paragraphes */
p { margin: 0 0 .75rem; }

a { text-decoration: none !important; color: inherit; }
img { max-width: 100%; }

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Brand */
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.topbar-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  object-fit: cover;
  border: 2px solid var(--primary);
  padding: 2px;
}

.topbar-brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1;
}

.topbar-brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-top: 1px;
}

/* Divider */
.topbar-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* Page indicator */
.topbar-page {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-page-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

/* Actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Cart btn */
.topbar-cart {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--t);
  cursor: pointer;
  font-size: 15px;
}

.topbar-cart:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-topbar);
}

.cart-badge.pulse { animation: badgePulse 0.45s var(--ease); }

@keyframes badgePulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.55); }
}

/* User btn */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: var(--t);
  position: relative;
}

.topbar-user:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
}

.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid var(--border);
}

.topbar-user-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.topbar-user-role { font-size: 11.5px; color: var(--text-muted); }

/* Dropdown */
.topbar-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  z-index: 300;
  overflow: hidden;
  display: none;
}

.topbar-dropdown.open {
  display: block;
  animation: dropIn 0.18s var(--ease);
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.topbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--t-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.topbar-dropdown-item:hover {
  background: rgba(239,68,68,0.08);
  color: #f87171;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottomnav-h);
  background: rgba(8, 12, 24, 0.98);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 999;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5), 0 -1px 0 rgba(255,255,255,0.04);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 14px 6px;
  border-radius: 16px;
  color: rgba(148,163,184,0.6);
  transition: var(--t);
  cursor: pointer;
  position: relative;
  min-width: 60px;
  flex: 1;
  max-width: 90px;
}

.bottom-nav-item:hover {
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.05);
}

/* Active indicator (top line) */
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 12px rgba(16,185,129,0.7);
}

.bottom-nav-item.active {
  color: var(--primary);
  background: rgba(16,185,129,0.10);
}

.bottom-nav-icon-wrap {
  position: relative;
  font-size: 19px;
  line-height: 1;
  transition: var(--t);
}

.bottom-nav-item:hover .bottom-nav-icon-wrap,
.bottom-nav-item.active .bottom-nav-icon-wrap {
  transform: translateY(-1px);
}

.bottom-nav-badge {
  position: absolute;
  top: -7px;
  right: -10px;
  background: var(--danger);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid rgba(8,12,24,0.98);
  animation: badgePulse 2s ease infinite;
}

.bottom-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1px;
  white-space: nowrap;
  transition: var(--t);
}

/* Center highlighted item (Panier) */
.bottom-nav-item.center-item {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.22);
  color: var(--primary);
}

.bottom-nav-item.center-item .bottom-nav-icon-wrap { font-size: 22px; }
.bottom-nav-item.center-item.active { background: rgba(16,185,129,0.22); }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--topbar-h));
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 150;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar        { width: 4px; }
.sidebar::-webkit-scrollbar-track  { background: transparent; }
.sidebar::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 4px; }

/* Brand (hidden in sidebar — already in topbar) */
.sidebar-brand { display: none; }

/* Section labels */
.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 20px 18px 6px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sidebar-section i {
  color: var(--primary);
  font-size: 9px;
  opacity: .85;
}

/* Nav list */
.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0 8px;
}

/* Nav item */
.sidebar-nav-item { margin-bottom: 2px; }

/* Nav link */
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--t);
  position: relative;
  text-decoration: none !important;
}

.sidebar-nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.sidebar-nav-link.active,
.sidebar-nav-link.active:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.sidebar-nav-link.active .nav-icon { color: var(--primary); }

/* Icon */
.nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-light);
  flex-shrink: 0;
  transition: var(--t);
}

.sidebar-nav-link:hover .nav-icon { color: var(--text-muted); }

/* Text */
.nav-text { flex: 1; line-height: 1; }

/* Chevron */
.sidebar-nav-link .chevron {
  font-size: 10px;
  color: var(--text-light);
  transition: transform 0.2s var(--ease);
  margin-left: auto;
}

.sidebar-nav-link.open .chevron { transform: rotate(180deg); }

/* Submenu */
.sidebar-submenu {
  list-style: none;
  margin: 2px 0 4px 0;
  padding: 0 0 0 40px;
  display: none;
}

.sidebar-submenu.open { display: block; }

.sidebar-submenu-link {
  display: block;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  transition: var(--t);
  text-decoration: none !important;
}

.sidebar-submenu-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-submenu-link.active { color: var(--primary); font-weight: 600; }

/* Footer */
.sidebar-footer {
  margin-top: auto;
  padding: 16px 18px 0;
  font-size: 11px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
  min-height: calc(100vh - var(--topbar-h) - var(--bottomnav-h));
  margin-left: var(--sidebar-w);
}

.page-container {
  padding: 22px 24px 16px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 4px 0 0;
  font-weight: 500;
}

/* ============================================================
   KPI CARDS (Premium Gradient — Dark)
   ============================================================ */

.kpi-card {
  border-radius: var(--r-xl);
  padding: 22px 22px 18px;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: var(--t);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Dark gradient backgrounds */
.kpi-card.kpi-primary {
  background: linear-gradient(135deg, #0f1f18 0%, #0a2318 100%);
  border-color: rgba(16,185,129,0.25);
}
.kpi-card.kpi-info {
  background: linear-gradient(135deg, #0f172a 0%, #0c1d38 100%);
  border-color: rgba(59,130,246,0.25);
}
.kpi-card.kpi-warning {
  background: linear-gradient(135deg, #1a1300 0%, #1c1400 100%);
  border-color: rgba(245,158,11,0.25);
}
.kpi-card.kpi-purple {
  background: linear-gradient(135deg, #160d2a 0%, #1a0f30 100%);
  border-color: rgba(139,92,246,0.25);
}

/* Glow orb */
.kpi-card::after {
  content: '';
  position: absolute;
  right: -24px;
  top: -24px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.15;
  transition: var(--t);
}
.kpi-card:hover::after { opacity: 0.28; transform: scale(1.1); }
.kpi-primary::after { background: var(--primary); }
.kpi-info::after    { background: var(--info); }
.kpi-warning::after { background: var(--warning); }
.kpi-purple::after  { background: var(--purple); }

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.kpi-primary .kpi-icon { background: rgba(16,185,129,0.18); color: var(--primary-light); }
.kpi-info    .kpi-icon { background: rgba(59,130,246,0.18);  color: #60a5fa; }
.kpi-warning .kpi-icon { background: rgba(245,158,11,0.18);  color: #fbbf24; }
.kpi-purple  .kpi-icon { background: rgba(139,92,246,0.18);  color: #a78bfa; }

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.kpi-trend {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-trend.up   { color: var(--primary-light); }
.kpi-trend.down { color: #f87171; }

/* ============================================================
   CATEGORY CARDS
   ============================================================ */

.cat-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: var(--t);
  display: block;
  box-shadow: var(--shadow-xs);
  position: relative;
}

.cat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.cat-card-top {
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.cat-card-body { padding: 18px 20px 20px; }

.cat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.cat-card-name  { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); margin-bottom: 4px; }
.cat-card-count { font-size: 26px; font-weight: 900; color: var(--text); margin-bottom: 6px; letter-spacing: -0.5px; line-height: 1; }
.cat-card-meta  { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.cat-card::after {
  content: '→';
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 18px;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--t);
}

.cat-card:hover::after { opacity: 1; transform: translateX(0); }

/* ============================================================
   DDD CARD
   ============================================================ */

.ddd-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--t);
}

.ddd-card:hover { box-shadow: var(--shadow-md); }

.ddd-card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.02);
}

.ddd-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.ddd-card-body { padding: 20px 22px; }

/* ============================================================
   TABLES
   ============================================================ */

.ddd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ddd-table thead th {
  background: rgba(255,255,255,0.03);
  padding: 14px 24px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.ddd-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--t-fast);
}

.ddd-table tbody tr:last-child { border-bottom: none; }
.ddd-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.ddd-table tbody td {
  padding: 14px 24px;
  color: var(--text);
  vertical-align: middle;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-ddd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t);
  border: none;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.1px;
}

.btn-ddd:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-sm-ddd  { padding: 6px 13px; font-size: 12px; }
.btn-lg-ddd  { padding: 12px 28px; font-size: 14px; font-weight: 800; }
.btn-full    { width: 100%; justify-content: center; }

.btn-primary-ddd {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.35);
}
.btn-primary-ddd:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,0.45);
  transform: translateY(-1px);
}

.btn-danger-ddd {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.30);
}
.btn-danger-ddd:hover {
  background: #dc2626;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239,68,68,0.40);
}

.btn-info-ddd {
  background: var(--info);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.30);
}
.btn-info-ddd:hover { background: #2563eb; color: #fff; transform: translateY(-1px); }

.btn-ghost-ddd {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost-ddd:hover {
  background: rgba(255,255,255,0.09);
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
}

.btn-outline-ddd {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline-ddd:hover { background: var(--primary); color: #fff; }

/* ============================================================
   BADGES
   ============================================================ */

.badge-ddd {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success-ddd { background: rgba(16,185,129,0.15);  color: #34d399; }
.badge-danger-ddd  { background: rgba(239,68,68,0.15);   color: #f87171; }
.badge-warning-ddd { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-info-ddd    { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.badge-gray-ddd    { background: rgba(255,255,255,0.07); color: var(--text-muted); }
.badge-purple-ddd  { background: rgba(139,92,246,0.15);  color: #a78bfa; }

/* ============================================================
   FORMS
   ============================================================ */

.form-ddd-group { margin-bottom: 16px; }

.form-ddd-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.form-ddd-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: inherit;
  color: #e2e8f0;
  background: #1e293b;
  transition: var(--t);
  outline: none;
}

.form-ddd-control:focus {
  border-color: var(--primary);
  background: #162032;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.form-ddd-control::placeholder { color: #475569; }

.form-ddd-control:disabled,
.form-ddd-control[readonly] {
  background: #111827;
  color: #475569;
  cursor: not-allowed;
}

.form-ddd-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-ddd-select option,
.form-ddd-select optgroup {
  background-color: #1e293b;
  color: #e2e8f0;
}

/* ============================================================
   STATUS DOTS
   ============================================================ */

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
}

.status-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-valid::before   { background: var(--success);  box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }
.status-pending::before { background: var(--warning);  box-shadow: 0 0 0 2px rgba(245,158,11,0.25); }
.status-invalid::before { background: var(--danger);   box-shadow: 0 0 0 2px rgba(239,68,68,0.25); }

.status-valid   { color: #34d399; }
.status-pending { color: #fbbf24; }
.status-invalid { color: #f87171; }

/* ============================================================
   TOASTS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 12px);
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-ddd {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--r-lg);
  background: #1a2540;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 340px;
  animation: toastIn 0.3s var(--ease);
  pointer-events: all;
}

.toast-ddd.toast-hiding { animation: toastOut 0.25s ease forwards; }

@keyframes toastIn  { from { opacity:0; transform: translateX(28px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { to   { opacity:0; transform: translateX(28px); } }

.toast-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(16,185,129,0.15); color: var(--primary-light); }
.toast-error   .toast-icon { background: rgba(239,68,68,0.15);  color: #f87171; }
.toast-warning .toast-icon { background: rgba(245,158,11,0.15); color: #fbbf24; }
.toast-info    .toast-icon { background: rgba(59,130,246,0.15); color: #60a5fa; }

.toast-body  { flex: 1; }
.toast-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.toast-msg   { font-size: 12.5px; color: var(--text-muted); }

.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-light); padding: 0; font-size: 11px; transition: var(--t-fast);
}
.toast-close:hover { color: var(--text); }

/* ============================================================
   ALERTS
   ============================================================ */

.alert-ddd {
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid transparent;
  margin-bottom: 16px;
}

.alert-info    { background: rgba(59,130,246,0.10);  color: #93c5fd; border-color: rgba(59,130,246,0.25); }
.alert-success { background: rgba(16,185,129,0.10);  color: #6ee7b7; border-color: rgba(16,185,129,0.25); }
.alert-danger  { background: rgba(239,68,68,0.10);   color: #fca5a5; border-color: rgba(239,68,68,0.25); }
.alert-warning { background: rgba(245,158,11,0.10);  color: #fde68a; border-color: rgba(245,158,11,0.25); }

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state { padding: 48px 24px; text-align: center; }

.empty-state-icon {
  width: 64px; height: 64px;
  border-radius: var(--r-xl);
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--text-light);
  margin: 0 auto 16px;
}

.empty-state-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.empty-state-text  { font-size: 13px; color: var(--text-muted); max-width: 280px; margin: 0 auto; }

/* ============================================================
   AUTOCOMPLETE
   ============================================================ */

.autocomplete-wrap { position: relative; }

.autocomplete-list {
  position: absolute;
  top: calc(100% + 3px);
  left: 0; right: 0;
  background: #1a2540;
  border: 1.5px solid var(--primary);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.autocomplete-list.open { display: block; animation: dropIn 0.15s var(--ease); }

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: var(--t-fast);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--primary-bg); color: var(--primary-light); }
.autocomplete-name  { font-weight: 700; }
.autocomplete-phone { font-size: 11px; color: var(--text-muted); }
.autocomplete-create-btn {
  border-top: 1px solid var(--border);
  color: var(--primary) !important;
  cursor: pointer;
  font-size: 13px;
}
.autocomplete-create-btn:hover {
  background: rgba(52,211,153,0.08) !important;
}

/* ============================================================
   CART ANIMATIONS
   ============================================================ */

.row-removing { animation: rowRemove 0.33s var(--ease) forwards; pointer-events: none; }

@keyframes rowRemove {
  to { opacity: 0; transform: translateX(-14px); }
}

.price-flash { animation: priceFlash 0.4s ease; }

@keyframes priceFlash {
  0%,100% { color: var(--primary); }
  50%      { color: #fff; font-weight: 900; }
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-content {
  border-radius: var(--r-xl) !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: var(--shadow-xl) !important;
  background: var(--bg-card) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  padding: 18px 22px !important;
  background: rgba(255,255,255,0.02);
}

.modal-title  { font-size: 15px; font-weight: 800; color: var(--text); }
.modal-body   { padding: 22px !important; font-size: 14px; color: var(--text-muted); background: var(--bg-card); }
.modal-footer { border-top: 1px solid var(--border) !important; padding: 14px 22px !important; background: var(--bg-card); }

.close { color: var(--text-muted) !important; opacity: 1 !important; }
.close:hover { color: var(--text) !important; }

/* ============================================================
   LOGIN
   ============================================================ */

.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #050810 0%, #091428 40%, #060e1c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  padding-bottom: 24px !important;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(16,185,129,0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(59,130,246,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 10%, rgba(139,92,246,0.05) 0%, transparent 50%);
  animation: bgShift 10s ease-in-out infinite alternate;
}

@keyframes bgShift {
  from { opacity: 1; }
  to   { opacity: 0.7; transform: scale(1.03); }
}

.login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 70%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.10) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.07) 0%, transparent 100%);
  pointer-events: none;
}

.login-card {
  background: rgba(15, 23, 42, 0.98);
  border: 1.5px solid rgba(255,255,255,0.10);
  border-radius: var(--r-2xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(12px);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.login-logo img {
  width: 52px; height: 52px;
  border-radius: var(--r-lg);
  border: 2.5px solid var(--primary);
  padding: 3px;
}

.login-brand         { margin-left: 12px; }
.login-brand-name    { font-size: 18px; font-weight: 900; color: var(--text); line-height: 1; letter-spacing: -0.3px; }
.login-brand-sub     { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.login-title         { font-size: 22px; font-weight: 900; color: var(--text); text-align: center; margin-bottom: 6px; letter-spacing: -0.3px; }
.login-subtitle      { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }

/* ============================================================
   FOOTER
   ============================================================ */

.ddd-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */

.scroll-to-top {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 14px);
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16,185,129,0.45);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: var(--t);
  z-index: 500;
}

.scroll-to-top.show { opacity: 1; pointer-events: all; }
.scroll-to-top:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

.fade-up   { animation: fadeUp 0.38s var(--ease) both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.10s; }
.fade-up-3 { animation-delay: 0.15s; }
.fade-up-4 { animation-delay: 0.20s; }
.fade-up-5 { animation-delay: 0.25s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   DATATABLES — Custom DOM (ddd-dt-*)
   ============================================================ */

table.dataTable {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 0 !important;
}

.dataTables_wrapper {
  padding: 0 !important;
  font-family: inherit !important;
  color: var(--text) !important;
  position: relative;
}

/* ---- Top toolbar ---- */
.ddd-dt-top {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 12px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.01);
}

/* Neutralise DataTables' own injected floats so our flex works */
.ddd-dt-length .dataTables_length,
.ddd-dt-search .dataTables_filter {
  float: none !important;
  margin: 0 !important;
}

.ddd-dt-search .dataTables_filter {
  text-align: left !important;
}

/* Length (entries per page) */
.ddd-dt-length .dataTables_length { margin: 0; }

.ddd-dt-length .dataTables_length label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  font-family: inherit !important;
  margin: 0 !important;
  white-space: nowrap;
}

.ddd-dt-length .dataTables_length select {
  appearance: none;
  background-color: #1e293b !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  color: #e2e8f0 !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--r-sm) !important;
  padding: 5px 28px 5px 10px !important;
  font-size: 12px !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  outline: none !important;
  cursor: pointer;
  transition: var(--t) !important;
}

.ddd-dt-length .dataTables_length select:hover,
.ddd-dt-length .dataTables_length select:focus {
  border-color: var(--primary) !important;
  background-color: #162032 !important;
}

.ddd-dt-length .dataTables_length select option,
.ddd-dt-length .dataTables_length select optgroup {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}

/* Search (filter) */
.ddd-dt-search .dataTables_filter { margin: 0; }

.ddd-dt-search .dataTables_filter label {
  display: flex !important;
  align-items: center;
  font-size: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
}

.ddd-dt-search .dataTables_filter input[type="search"] {
  display: block !important;
  background-color: #1e293b !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 11px center !important;
  color: #e2e8f0 !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--r) !important;
  padding: 7px 14px 7px 34px !important;
  font-size: 12.5px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: var(--t) !important;
  width: 220px !important;
  margin: 0 !important;
}

.ddd-dt-search .dataTables_filter input[type="search"]:focus {
  border-color: var(--primary) !important;
  background-color: #162032 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12) !important;
  width: 260px !important;
}

.ddd-dt-search .dataTables_filter input[type="search"]::placeholder {
  color: var(--text-light) !important;
}

/* ---- Table container ---- */
.ddd-dt-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---- Bottom bar ---- */
.ddd-dt-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px 14px;
  border-top: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.01);
}

/* Info */
.ddd-dt-info .dataTables_info {
  font-size: 12px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
  padding: 0 !important;
}

.ddd-dt-info .dataTables_info span {
  color: var(--text) !important;
  font-weight: 700 !important;
}

/* Pagination */
.ddd-dt-pages .dataTables_paginate { padding: 0 !important; }

.ddd-dt-pages .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: var(--r-sm) !important;
  border: 1.5px solid var(--border) !important;
  background: rgba(255,255,255,0.04) !important;
  color: var(--text-muted) !important;
  font-size: 12px !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  margin: 0 2px !important;
  padding: 0 8px !important;
  transition: var(--t) !important;
  cursor: pointer;
  line-height: 1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.ddd-dt-pages .dataTables_paginate .paginate_button.current,
.ddd-dt-pages .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(16,185,129,0.35) !important;
  text-shadow: none !important;
}

.ddd-dt-pages .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  background: var(--primary-bg) !important;
  border-color: rgba(16,185,129,0.4) !important;
  color: var(--primary) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.ddd-dt-pages .dataTables_paginate .paginate_button.disabled,
.ddd-dt-pages .dataTables_paginate .paginate_button.disabled:hover {
  color: var(--text-light) !important;
  background: rgba(255,255,255,0.02) !important;
  border-color: var(--border-light) !important;
  cursor: default !important;
  box-shadow: none !important;
}

/* ---- Table rows / cells ---- */
table.dataTable tbody tr {
  background: transparent !important;
  color: var(--text) !important;
}
table.dataTable tbody tr:hover {
  background: rgba(255,255,255,0.03) !important;
}
table.dataTable tbody td {
  border-top: 1px solid var(--border-light) !important;
  border-bottom: none !important;
  color: var(--text) !important;
}
table.dataTable thead th {
  border-top: none !important;
  border-bottom: 1.5px solid var(--border) !important;
}

/* tfoot */
.ddd-table tfoot th,
table.dataTable tfoot th {
  background: rgba(255,255,255,0.02) !important;
  padding: 12px 24px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.7px !important;
  text-transform: uppercase !important;
  color: var(--text-light) !important;
  border-top: 1.5px solid var(--border) !important;
  border-bottom: none !important;
}

/* ---- Sorting icons ---- */
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after,
table.dataTable thead .sorting_asc_disabled::after,
table.dataTable thead .sorting_desc_disabled::after {
  color: var(--text-light) !important;
  opacity: 0.6 !important;
}
table.dataTable thead .sorting_asc::after  { color: var(--primary) !important; opacity: 1 !important; }
table.dataTable thead .sorting_desc::after { color: var(--primary) !important; opacity: 1 !important; }

/* ---- Mobile ---- */
@media (max-width: 600px) {
  .ddd-dt-top {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px 10px;
  }
  .ddd-dt-search .dataTables_filter input[type="search"],
  .ddd-dt-search .dataTables_filter input[type="search"]:focus {
    width: 100% !important;
  }
  .ddd-dt-bottom {
    flex-direction: column;
    align-items: center;
    padding: 10px 14px 12px;
  }
}

/* ============================================================
   TABLE CONTAINER
   ============================================================ */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* ============================================================
   CHART
   ============================================================ */

.chart-wrap {
  position: relative;
  height: 260px;
  width: 100%;
}

.chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ============================================================
   BOOTSTRAP OVERRIDES (Dark)
   ============================================================ */

/* Table inside Bootstrap */
.table { color: var(--text) !important; }
.table thead th { border-bottom-color: var(--border) !important; }
.table td, .table th { border-top-color: var(--border-light) !important; }

/* Native select dark — fix Windows (Chrome/Edge force system colors on dropdown popup) */
select {
  color-scheme: dark;
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
select option,
select optgroup {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
select option:checked,
select option:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

/* Spinner */
.spinner-border-sm { width: 14px; height: 14px; border-width: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .sidebar              { display: none; }
  .main-content         { margin-left: 0; }
  .page-container       { padding: 14px 12px; }
  .ddd-card-body        { padding: 16px 14px; }
  .ddd-card-header      { padding: 13px 14px; }
  .ddd-table tbody td,
  .ddd-table thead th   { padding: 11px 12px; }
  .kpi-value            { font-size: 24px; }
  .page-title           { font-size: 18px; }
}

@media (max-width: 600px) {
  .bottom-nav-item      { min-width: 0; padding: 8px 6px 6px; }
  .bottom-nav-label     { font-size: 10px; }
  .bottom-nav-icon-wrap { font-size: 17px; }
  .topbar-brand-sub     { display: none; }
  .topbar               { padding: 0 14px; }
  .login-card           { padding: 28px 20px; }
  .kpi-value            { font-size: 22px; }
}

/* ============================================================
   UTILITY
   ============================================================ */

.text-primary-ddd { color: var(--primary) !important; }
.text-danger-ddd  { color: #f87171 !important; }
.text-muted-ddd   { color: var(--text-muted) !important; }
.fw-900           { font-weight: 900 !important; }
.ms-auto          { margin-left: auto !important; }
.me-1             { margin-right: 4px !important; }
.me-2             { margin-right: 8px !important; }
.gap-6            { gap: 6px; }
.gap-8            { gap: 8px; }
.gap-12           { gap: 12px; }
.gap-16           { gap: 16px; }

/* ============================================================
   BOOTSTRAP / CRISPY FORMS DARK OVERRIDE
   ============================================================ */

/* Force dark on all Bootstrap inputs (login crispy form, etc.) */
.form-control,
.form-control:focus {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: var(--border) !important;
}
/* select.form-control : fond opaque obligatoire pour que Windows ne force pas le blanc */
select.form-control {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
.form-control:focus {
  background-color: #162032 !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12) !important;
}
.form-control::placeholder { color: var(--text-light) !important; }

/* Labels */
label { color: var(--text-muted) !important; font-size: 12.5px; font-weight: 700; }

/* Modal backdrop tint */
.modal-backdrop { background-color: rgba(0,0,0,0.75) !important; }
.modal-backdrop.show { opacity: 1 !important; }

/* Bootstrap close button */
.modal .close { color: var(--text-muted) !important; text-shadow: none !important; }

/* ===== GLOBAL LOADER ===== */
#ddd-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 16, 30, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#ddd-loader.active {
  opacity: 1;
  pointer-events: all;
}
.ddd-loader-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(52, 211, 153, 0.12);
  border-top-color: #34d399;
  border-right-color: #34d399;
  animation: ddd-spin 0.65s linear infinite;
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.18);
}
@keyframes ddd-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   NOUVEAUX COMPOSANTS — QUINCAILLERIE AVANCÉE
   ============================================================ */

/* ── Badges supplémentaires ─────────────────────────────────────────────── */
.badge-danger-ddd  { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-warning-ddd { background: rgba(251,191,36,0.15); color: #fbbf24; }
.btn-warning-ddd   { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.btn-warning-ddd:hover { background: rgba(251,191,36,0.25); }
.btn-danger-ddd    { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger-ddd:hover  { background: rgba(239,68,68,0.28); }

/* ── Alerte stock bas (dashboard) ───────────────────────────────────────── */
.alert-stock-bas {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 12px;
  padding: 14px 18px;
  flex-wrap: wrap;
}
.alert-stock-icon {
  font-size: 22px;
  color: #fbbf24;
  flex-shrink: 0;
}
.alert-stock-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.alert-stock-body strong { color: var(--text); font-size: 14px; }
.alert-stock-body span   { color: var(--text-muted); font-size: 12px; }

/* ── Badge "Nouveau" sur les liens sidebar ──────────────────────────────── */
.nav-badge-new {
  margin-left: auto;
  background: rgba(52,211,153,0.18);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* ── Lien POS dans sidebar (mis en avant) ───────────────────────────────── */
.sidebar-pos-link {
  background: rgba(52,211,153,0.07) !important;
  border: 1px solid rgba(52,211,153,0.14) !important;
  border-radius: 10px !important;
  margin: 2px 6px !important;
}
.sidebar-pos-link .nav-icon { color: var(--primary) !important; }

/* ── Lignes d'entrée de stock (modal) ───────────────────────────────────── */
.entry-line-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: var(--surface-2);
  border-radius: 8px;
}

/* ============================================================
   INTERFACE POS — Caisse
   ============================================================ */

/* ── Barre dépôt actif ───────────────────────────────────────────────────── */
.pos-depot-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.pos-depot-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.pos-depot-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.pos-depot-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  font-family: inherit;
}
.pos-depot-btn:hover  { border-color: var(--primary); color: var(--primary); }
.pos-depot-btn.active { background: var(--primary); border-color: var(--primary); color: #0f172a; font-weight: 700; }
.pos-depot-btn.is-main::after {
  content: ' ★';
  font-size: 10px;
  opacity: .7;
}

/* Chip dépôt dans le panneau panier */
.pos-active-depot-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(52, 211, 153, 0.05);
  flex-shrink: 0;
}

/* Layout principal: deux colonnes pleine hauteur */
.pos-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - var(--topbar-h, 64px) - var(--bottom-nav-h, 60px) - 1px);
  min-height: 500px;
  overflow: hidden;
}

/* ── Panneau gauche (articles) ──────────────────────────────────────────── */
.pos-left {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.pos-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.pos-search-icon { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.pos-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.pos-search-input::placeholder { color: var(--text-light); }

.pos-cats {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: none;
  flex-shrink: 0;
}
.pos-cats::-webkit-scrollbar { display: none; }

.pos-cat-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  font-family: inherit;
}
.pos-cat-btn:hover  { border-color: var(--primary); color: var(--primary); }
.pos-cat-btn.active { background: var(--primary); border-color: var(--primary); color: #0f172a; font-weight: 700; }

.pos-articles-wrap { flex: 1; overflow-y: auto; padding: 12px; }

.pos-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.pos-article-card {
  --card-accent: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-accent);
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.pos-article-card:hover {
  border-top-color: var(--card-accent);
  border-color: color-mix(in srgb, var(--card-accent) 40%, var(--border));
  background: rgba(255,255,255,0.03);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2), 0 0 0 1px color-mix(in srgb, var(--card-accent) 15%, transparent);
}
.pos-article-card:active { transform: scale(0.97); }
.pos-article-card.out-of-stock {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.pos-article-bg-icon {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 42px;
  color: var(--card-accent);
  opacity: 0.08;
  pointer-events: none;
  line-height: 1;
  transform: rotate(-10deg);
}

.pos-article-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  position: relative;
}
.pos-article-price {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--card-accent);
  position: relative;
}
.pos-article-stock {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  position: relative;
}
.pos-article-stock.low { color: #fbbf24; }

.pos-low-badge {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pos-out-badge {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pos-empty-msg {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 13px;
}

.pos-loading {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 13px;
}

/* ── Panneau droit (panier POS) ─────────────────────────────────────────── */
.pos-right {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow: hidden;
}

.pos-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.pos-cart-title { font-size: 14px; font-weight: 700; color: var(--text); }
.pos-cart-title i { color: var(--primary); margin-right: 6px; }

.pos-clear-btn {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #f87171;
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.pos-clear-btn:hover { background: rgba(239,68,68,0.22); }

.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}
.pos-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 13px;
  gap: 6px;
  padding: 30px 0;
}

/* Ligne panier POS */
.pos-cart-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pos-cart-row:last-child { border-bottom: none; }

/* Info produit (nom + unité) */
.pos-row-info {
  flex: 1;
  min-width: 0;
}
.pos-row-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-row-unit {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Contrôles quantité + prix + supprimer */
.pos-row-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.pos-row-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}
.pos-remove-btn {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  flex-shrink: 0;
}
.pos-remove-btn:hover { background: rgba(239,68,68,0.15); }
.pos-cart-row:last-child { border-bottom: none; }
.pos-cart-row-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pos-cart-qty-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pos-qty-btn {
  width: 22px; height: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
  font-family: inherit;
}
.pos-qty-btn:hover { background: rgba(52,211,153,0.12); border-color: var(--primary); }
.pos-qty-val { font-size: 12px; font-weight: 700; color: var(--text); min-width: 20px; text-align: center; }
.pos-qty-inline {
  font-size: 12px; font-weight: 700; color: var(--text);
  width: 46px; text-align: center;
  background: transparent; border: 1px solid transparent;
  border-radius: 5px; padding: 2px 3px;
  outline: none; font-family: inherit;
  transition: background .12s, border-color .12s;
  -moz-appearance: textfield;
  cursor: pointer;
}
.pos-qty-inline:hover  { border-color: var(--border); background: var(--surface-2); cursor: text; }
.pos-qty-inline:focus  { border-color: var(--primary); background: var(--surface-2); cursor: text; }
.pos-qty-inline::-webkit-outer-spin-button,
.pos-qty-inline::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pos-qty-inline.qty-over {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
  background: rgba(239,68,68,0.08) !important;
  animation: qty-shake .25s ease;
}
@keyframes qty-shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-3px); }
  75%      { transform: translateX(3px); }
}

/* ── Modal saisie quantité POS ───────────────────────────────────────────── */
.pos-qty-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeInPosQty .15s ease;
}
@keyframes fadeInPosQty {
  from { opacity:0; }
  to   { opacity:1; }
}
.pos-qty-modal {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 26px 24px 20px;
  width: 290px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.65);
  animation: slideUpPosQty .2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUpPosQty {
  from { transform: translateY(20px); opacity:0; }
  to   { transform: none; opacity:1; }
}
.pos-qty-modal-name {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 4px;
  line-height: 1.3;
}
.pos-qty-modal-stock {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 18px;
}
.pos-qty-modal-stock strong { color: #34d399; }
.pos-qty-input {
  width: 100%;
  font-size: 36px;
  font-weight: 900;
  text-align: center;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  color: #34d399;
  padding: 14px 12px;
  margin-bottom: 16px;
  outline: none;
  -moz-appearance: textfield;
  transition: border-color .15s;
}
.pos-qty-input::-webkit-outer-spin-button,
.pos-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pos-qty-input:focus { border-color: #34d399; }
.pos-qty-actions { display: flex; gap: 8px; }
.pos-qty-actions .btn-ddd { flex: 1; justify-content: center; padding: 10px 0; font-size: 14px; }
.pos-cart-row-price { font-size: 12px; font-weight: 700; color: var(--primary); flex-shrink: 0; white-space: nowrap; }
.pos-cart-row-del {
  background: transparent; border: none;
  color: var(--text-light); cursor: pointer; font-size: 11px;
  padding: 2px 4px; flex-shrink: 0;
  transition: color .12s;
}
.pos-cart-row-del:hover { color: #f87171; }

/* Total */
.pos-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.pos-total-row span:first-child { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.pos-total-amount { font-size: 18px; font-weight: 800; color: var(--primary); }

/* Section client POS */
.pos-customer-wrap { padding: 10px 14px 6px; border-bottom: 1px solid var(--border); }
.pos-field-label { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.pos-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 7px 11px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.pos-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52,211,153,0.1);
}

.pos-customer-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
  margin-top: 6px;
}
.pos-chip-remove {
  margin-left: auto; background: transparent; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 11px;
}

/* Mode paiement */
.pos-pay-toggle-wrap { padding: 10px 14px 6px; border-bottom: 1px solid var(--border); }
.pos-pay-toggle { display: flex; gap: 6px; }
.pos-pay-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.pos-pay-btn.active {
  background: rgba(52,211,153,0.15);
  border-color: var(--primary);
  color: var(--primary);
}
.pos-pay-btn:hover:not(.active) { border-color: var(--text-muted); }

/* Champs crédit */
.pos-credit-fields { padding: 8px 14px; border-bottom: 1px solid var(--border); }
.pos-credit-fields .pos-input { margin-top: 2px; }

/* Bouton valider POS */
/* Livraison */
.pos-livraison-wrap {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.pos-livraison-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t);
}
.pos-livraison-toggle:hover { border-color: var(--primary); color: var(--primary); }
.pos-livraison-toggle.active {
  background: rgba(16,185,129,0.12);
  border-color: var(--primary);
  color: var(--primary);
}
.pos-livraison-badge {
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
}
.pos-livraison-fields {
  margin-top: 10px;
  animation: fadeIn .15s ease;
}
.pos-livraison-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 0;
  border-bottom: 1px solid var(--border);
}

.pos-validate-btn {
  margin: 12px 14px;
  width: calc(100% - 28px);
  padding: 13px 0;
  background: var(--primary);
  color: #0f172a;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  font-family: inherit;
  letter-spacing: .3px;
}
.pos-validate-btn:hover:not(:disabled) { opacity: .88; }
.pos-validate-btn:active:not(:disabled) { transform: scale(.98); }
.pos-validate-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ── Reçu POS (confirmation après vente) ────────────────────────────────── */
.pos-receipt-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(10,16,30,0.7);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.pos-receipt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.pos-receipt-icon { font-size: 40px; color: var(--primary); margin-bottom: 14px; }
.pos-receipt-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.pos-receipt-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.pos-receipt-total { font-size: 28px; font-weight: 900; color: var(--primary); margin-bottom: 18px; }
.pos-receipt-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Responsive POS ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pos-depot-bar {
    padding: 6px 10px;
    gap: 6px;
  }
  .pos-depot-label { font-size: 11.5px; }
  .pos-depot-btn   { padding: 3px 10px; font-size: 11px; }

  .pos-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .pos-left  { height: 52vh; }
  .pos-right { width: 100%; height: auto; max-height: 52vh; overflow-y: auto; }

  /* Ligne panier — plus compact sur mobile */
  .pos-cart-row    { gap: 5px; padding: 7px 4px; }
  .pos-row-name    { font-size: 11.5px; }
  .pos-row-unit    { font-size: 10.5px; }
  .pos-row-sub     { font-size: 11px; }
  .pos-qty-btn     { width: 20px; height: 20px; font-size: 11px; }
  .pos-qty-val     { font-size: 11px; min-width: 16px; }
  .pos-qty-inline  { font-size: 11px; width: 38px; }
  .pos-remove-btn  { width: 20px; height: 20px; }
}

/* ============================================================
   ONGLETS (ddd-tabs)
   ============================================================ */

.ddd-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 4px;
  width: fit-content;
}

.ddd-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: calc(var(--r) - 3px);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--t);
  font-family: inherit;
}

.ddd-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.ddd-tab.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
}

.ddd-tab-count {
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
}

.ddd-tab.active .ddd-tab-count {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ============================================================
   BULK SELECT — barre flottante de sélection multiple
   ============================================================ */

.ddd-bulk-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(52,211,153,0.12);
  z-index: 1055;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.25s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.ddd-bulk-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.ddd-bulk-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 600;
}
.ddd-bulk-bar-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(52,211,153,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34d399;
  font-size: 13px;
  flex-shrink: 0;
}
.ddd-bulk-bar-actions { display: flex; gap: 8px; }

/* Checkbox column */
.ddd-table th.col-check,
.ddd-table td.col-check {
  width: 40px !important;
  min-width: 40px;
  text-align: center;
  padding: 0 8px !important;
}
.ddd-table input[type="checkbox"].row-check,
.ddd-table input[type="checkbox"].check-all-tbl {
  width: 15px;
  height: 15px;
  accent-color: #34d399;
  cursor: pointer;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .ddd-bulk-bar { left: 16px; right: 16px; transform: translateX(0) translateY(100px); min-width: 0; width: calc(100% - 32px); }
  .ddd-bulk-bar.visible { transform: translateX(0) translateY(0); }
}

/* Modals responsive */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 8px !important;
    max-width: calc(100% - 16px) !important;
  }
  .modal-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 12px 16px !important;
  }
  .modal-footer .btn-ddd,
  .modal-footer button {
    width: 100% !important;
    flex: none !important;
    justify-content: center !important;
    text-align: center !important;
  }
}
