/* =====================================================
   Pupuce Prime — Design System
   ===================================================== */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Variables ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --rose-sig:    #F07BBE;
  --rose-pop:    #EF648D;
  --rose-lilas:  #F087D9;
  --rose-mist:   #FCE9F4;
  --charcoal:    #343434;
  --graphite:    #666666;
  --pearl:       #FAF8F9;

  /* Semantic */
  --primary:       var(--rose-sig);
  --primary-dark:  var(--rose-pop);
  --primary-light: var(--rose-mist);
  --primary-grad:  linear-gradient(135deg, #F07BBE 0%, #EF648D 100%);
  --primary-grad-h:linear-gradient(135deg, #EF648D 0%, #e0527e 100%);

  --success:      #22c55e;
  --success-light:#dcfce7;
  --danger:       #ef4444;
  --danger-light: #fee2e2;
  --warning:      #f59e0b;
  --warning-light:#fef3c7;
  --info:         #3b82f6;
  --info-light:   #dbeafe;

  /* Layout */
  --sidebar-w:    256px;
  --topbar-h:     64px;
  --sidebar-bg:   var(--charcoal);
  --sidebar-hover:rgba(240,123,190,0.12);
  --sidebar-active:rgba(240,123,190,0.22);

  /* Neutrals */
  --bg:     var(--pearl);
  --card:   #ffffff;
  --text:   #1a1a2e;
  --text-2: #444;
  --muted:  #888;
  --border: #ead8e8;
  --border-light: #f2e6f0;
  --row-hover: #fdf5fa;

  /* Misc */
  --radius:    14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --shadow:    0 1px 3px rgba(239,100,141,0.06), 0 4px 14px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 24px rgba(239,100,141,0.14);
  --shadow-lg: 0 12px 40px rgba(239,100,141,0.18);
}

/* ─── Mode sombre (interface admin) ─── */
[data-theme="dark"] {
  --bg:     #16171b;
  --card:   #1f2128;
  --text:   #f0f0f2;
  --text-2: #c7c7cc;
  --muted:  #9a9aa3;
  --border: #34353e;
  --border-light: #2c2d35;

  --success-light: #14301f;
  --danger-light:  #3a1d1d;
  --warning-light: #3a2e10;
  --info-light:    #16263d;

  --sidebar-bg:    #0e0f13;
  --row-hover: #2a2730;

  --shadow:    0 1px 3px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.25);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body, 'Inter'), 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddc8d8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--rose-sig); }

/* ===================================================
   SIDEBAR
   =================================================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-brand img {
  height: 36px;
  width: auto;
  display: block;
}
.sidebar-brand .brand-fallback {
  color: white; font-size: 1.15rem; font-weight: 800;
  letter-spacing: 0.3px;
}
.sidebar-brand .brand-sub {
  color: rgba(255,255,255,0.35);
  font-size: 0.68rem;
  margin-top: 4px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 28px; }
.nav-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 1.4px;
  color: rgba(255,255,255,0.28);
  padding: 0 10px; margin-bottom: 6px;
  text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: all 0.15s; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  margin-bottom: 2px;
}
.nav-item:hover  { background: var(--sidebar-hover); color: white; }
.nav-item.active { background: var(--sidebar-active); color: var(--rose-sig); }
.nav-item svg, .nav-item .nav-icon { flex-shrink: 0; width: 18px; height: 18px; opacity: 0.8; }
.nav-item.active svg, .nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--primary-grad);
  color: white; font-size: 0.65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 6px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: white;
  flex-shrink: 0; overflow: hidden;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

.nav-item-danger { color: rgba(255, 100, 100, 0.75) !important; }
.nav-item-danger:hover { background: rgba(239,68,68,0.12) !important; color: #ef4444 !important; }

/* ===================================================
   LAYOUT
   =================================================== */
.app-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ===================================================
   TOPBAR
   =================================================== */
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center;
  padding: 0 28px; gap: 14px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 var(--border-light);
}
.topbar-title { font-size: 1rem; font-weight: 700; flex: 1; color: var(--text); }
.topbar-search {
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 14px; gap: 8px;
  width: 260px; transition: border-color 0.2s, box-shadow 0.2s;
}
.topbar-search:focus-within { border-color: var(--rose-sig); box-shadow: 0 0 0 3px rgba(240,123,190,0.12); }
.topbar-search input { border: none; background: none; outline: none; font-size: 0.875rem; width: 100%; color: var(--text); font-family: inherit; }
.topbar-search .ts-icon { color: var(--muted); font-size: 0.9rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 36px; height: 36px;
  background: var(--primary-grad); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.78rem; font-weight: 700; cursor: pointer;
}
.menu-toggle {
  display: none; width: 38px; height: 38px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer;
  align-items: center; justify-content: center; font-size: 1rem;
  color: var(--text);
}

.sidebar-overlay { display: none; }

.sidebar-close {
  display: none;
  position: absolute; top: 18px; right: 14px;
  width: 32px; height: 32px;
  border: none; border-radius: 8px;
  background: rgba(255,255,255,0.08); color: white;
  align-items: center; justify-content: center;
  cursor: pointer;
}

/* ===================================================
   PAGE CONTENT
   =================================================== */
.page-content { flex: 1; padding: 28px; }

.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 1.5rem; font-weight: 800; }
.page-header p { color: var(--muted); font-size: 0.875rem; margin-top: 3px; }

/* ===================================================
   STAT CARDS
   =================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.rose   { background: var(--rose-mist); }
.stat-icon.green  { background: var(--success-light); }
.stat-icon.red    { background: var(--danger-light); }
.stat-icon.yellow { background: var(--warning-light); }
.stat-icon.blue   { background: var(--info-light); }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--text); }
.stat-label { font-size: 0.75rem; color: var(--muted); margin-top: 4px; font-weight: 500; }
.stat-trend { font-size: 0.7rem; font-weight: 600; margin-top: 2px; }
.stat-trend.up { color: var(--success); }

/* ===================================================
   PRODUCT GRID (boutique)
   =================================================== */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: pointer; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card:hover .card-overlay { opacity: 1; }

.card-img-wrap { position: relative; overflow: hidden; }
.product-img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.3s; }
.product-card:hover .product-img { transform: scale(1.04); }
.placeholder-img {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--rose-mist), #f5d0e8);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(239,100,141,0.7), transparent);
  opacity: 0; transition: opacity 0.25s;
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.card-overlay-btn {
  background: white; color: var(--rose-pop);
  border: none; border-radius: 20px;
  padding: 8px 20px; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.card-overlay-btn:hover { background: var(--rose-mist); }

.card-badge-wrap { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-body { padding: 15px; }
.card-brand { font-size: 0.68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.card-body h3 { font-size: 0.92rem; font-weight: 700; margin-bottom: 4px; line-height: 1.3; color: var(--text); }
.card-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.4; margin-bottom: 10px; min-height: 30px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.price-tag { font-size: 1.05rem; font-weight: 800; background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.price-unit { font-size: 0.7rem; color: var(--muted); font-weight: 500; }

.card-sizes { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.size-chip {
  font-size: 0.65rem; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text-2);
}

/* ===================================================
   FILTERS / TOPBAR BOUTIQUE
   =================================================== */
.shop-controls {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 22px; flex-wrap: wrap;
}
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-tab {
  padding: 7px 16px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--card); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; color: var(--text-2);
  white-space: nowrap;
}
.cat-tab:hover { border-color: var(--rose-sig); color: var(--rose-sig); }
.cat-tab.active { background: var(--primary-grad); border-color: transparent; color: white; box-shadow: 0 3px 10px rgba(239,100,141,0.3); }

.filter-select {
  padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.875rem;
  outline: none; background: var(--card); cursor: pointer;
  color: var(--text); font-family: inherit;
  transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--rose-sig); }

/* ===================================================
   TABLE (admin)
   =================================================== */
.table-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow); overflow-x: auto; overflow-y: hidden;
}
.table-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.table-toolbar-left { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within { border-color: var(--rose-sig); box-shadow: 0 0 0 3px rgba(240,123,190,0.1); }
.search-box input { border: none; background: none; outline: none; font-size: 0.875rem; width: 200px; font-family: inherit; color: var(--text); }
.search-box .icon { color: var(--muted); }
.table-count { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 11px 16px; text-align: left;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}
.data-table td {
  padding: 13px 16px; border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem; vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: var(--row-hover); }

.table-product-cell { display: flex; align-items: center; gap: 12px; }
.table-thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.table-thumb-placeholder {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--rose-mist);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.table-name { font-weight: 600; font-size: 0.875rem; }
.table-sub { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.row-actions { display: flex; gap: 6px; }

/* ===================================================
   TABS
   =================================================== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-light); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 22px; border: none; background: none;
  font-size: 0.875rem; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all 0.15s; border-bottom: 2px solid transparent;
  margin-bottom: -2px; font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--rose-pop); border-bottom-color: var(--rose-pop); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===================================================
   DRAWER (formulaire produit)
   =================================================== */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed; top: 0; right: 0;
  width: 460px; max-width: 100vw; height: 100vh;
  background: var(--card); z-index: 400;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -6px 0 32px rgba(239,100,141,0.12);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 22px 26px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.drawer-header h3 { font-size: 1.08rem; font-weight: 800; }
.drawer-close {
  width: 34px; height: 34px; border: none; background: var(--bg);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all 0.15s;
}
.drawer-close:hover { background: var(--border); color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 26px; }
.drawer-footer {
  padding: 18px 26px; border-top: 1px solid var(--border-light);
  display: flex; gap: 10px; flex-shrink: 0;
}

/* ===================================================
   PRODUCT DETAIL MODAL (boutique)
   =================================================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--card); border-radius: var(--radius);
  max-width: 640px; width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  overflow: hidden; max-height: 90vh; display: flex; flex-direction: column;
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }
.modal-box-sm { max-width: 400px; }
.modal-close-btn {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border: none; background: rgba(0,0,0,0.1);
  border-radius: 50%; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: white; transition: background 0.15s;
}
.modal-close-btn:hover { background: rgba(0,0,0,0.25); }

.prod-modal-img { width: 100%; height: 260px; object-fit: cover; display: block; }
.prod-modal-body { padding: 26px; overflow-y: auto; }
.prod-modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.prod-modal-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.prod-modal-price { font-size: 1.6rem; font-weight: 800; background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 20px; }
.prod-modal-section { margin-bottom: 18px; }
.prod-modal-section label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 8px; }

.sizes-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.size-btn {
  min-width: 42px; padding: 6px 8px; text-align: center;
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  background: var(--card); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; color: var(--text);
}
.size-btn:hover { border-color: var(--rose-sig); color: var(--rose-sig); }
.size-btn.selected { background: var(--primary-grad); border-color: transparent; color: white; box-shadow: 0 2px 8px rgba(239,100,141,0.35); }

.colors-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.color-btn {
  padding: 6px 14px; border: 1.5px solid var(--border);
  border-radius: 20px; background: var(--card); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; color: var(--text);
}
.color-btn:hover { border-color: var(--rose-sig); }
.color-btn.selected { background: var(--primary-grad); border-color: transparent; color: white; }

.qty-ctrl { display: flex; align-items: center; gap: 12px; }
.qty-btn {
  width: 36px; height: 36px; border: 1.5px solid var(--border);
  border-radius: 50%; background: var(--card); font-size: 1.1rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.qty-btn:hover { border-color: var(--rose-sig); color: var(--rose-sig); }
.qty-val { font-size: 1rem; font-weight: 700; min-width: 30px; text-align: center; }
.min-order-hint { font-size: 0.72rem; color: var(--muted); margin-left: 6px; }

/* ===================================================
   PANIER DRAWER (boutique)
   =================================================== */
.cart-drawer {
  position: fixed; top: 0; right: 0;
  width: 380px; max-width: 100vw; height: 100vh;
  background: var(--card); z-index: 400;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -6px 0 32px rgba(0,0,0,0.14);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.cart-header h3 { font-size: 1rem; font-weight: 800; flex: 1; }
.cart-count-badge {
  background: var(--primary-grad); color: white;
  font-size: 0.72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.cart-body { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.cart-empty-icon { font-size: 3rem; margin-bottom: 14px; }
.cart-empty p { font-size: 0.875rem; }
.cart-item {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--rose-mist); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 0.83rem; margin-bottom: 2px; }
.cart-item-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 6px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; }
.cart-qty-btn {
  width: 24px; height: 24px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--card); font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: all 0.12s;
  display: flex; align-items: center; justify-content: center;
}
.cart-qty-btn:hover { border-color: var(--rose-sig); color: var(--rose-sig); }
.cart-qty-val { font-size: 0.82rem; font-weight: 600; min-width: 20px; text-align: center; }
.cart-remove { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.8rem; transition: color 0.15s; padding: 4px; }
.cart-remove:hover { color: var(--danger); }
.cart-item-price { font-size: 0.82rem; font-weight: 700; background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; white-space: nowrap; }

.cart-footer {
  padding: 18px 24px; border-top: 1px solid var(--border-light); flex-shrink: 0;
  background: var(--bg);
}
.cart-total-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cart-total-label { font-size: 0.875rem; color: var(--muted); font-weight: 500; }
.cart-total-value { font-size: 1.25rem; font-weight: 800; background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===================================================
   FORMS
   =================================================== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.75rem; font-weight: 700;
  color: var(--muted); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: inherit; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text); background: var(--card);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--rose-sig);
  box-shadow: 0 0 0 3px rgba(240,123,190,0.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-hint { font-size: 0.72rem; color: var(--muted); margin-top: 5px; }

/* Sizes checkboxes */
.sizes-check-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.size-check-label { cursor: pointer; }
.size-check-label input { display: none; }
.size-check-btn {
  display: inline-block; min-width: 40px; padding: 5px 8px; text-align: center;
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  font-size: 0.78rem; font-weight: 600; transition: all 0.15s; color: var(--text-2);
  background: var(--card);
}
.size-check-label input:checked + .size-check-btn {
  background: var(--primary-grad); border-color: transparent; color: white;
}
.size-check-btn:hover { border-color: var(--rose-sig); }

.size-range-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.size-range-btn {
  padding: 5px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  font-size: 0.78rem; font-weight: 600; color: var(--text-2); background: var(--card);
  cursor: pointer; transition: all 0.15s;
}
.size-range-btn:hover { border-color: var(--rose-sig); }
.size-range-btn.active { background: var(--primary-grad); border-color: transparent; color: white; }

.theme-swatch {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card);
  outline: 1px solid var(--border); cursor: pointer; transition: transform 0.1s;
}
.theme-swatch:hover { transform: scale(1.12); }

.theme-grad-swatch {
  width: 44px; height: 30px; border-radius: var(--radius-xs); border: 2px solid var(--card);
  outline: 1px solid var(--border); cursor: pointer; transition: transform 0.1s;
}
.theme-grad-swatch:hover { transform: scale(1.08); }

.radius-option {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 18px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: var(--text-2); transition: all 0.15s;
}
.radius-option:hover { border-color: var(--rose-sig); color: var(--rose-sig); }
.radius-option.active { border-color: var(--rose-sig); background: var(--sidebar-active); color: var(--rose-sig); }
.radius-preview {
  display: block; width: 44px; height: 28px; background: var(--primary-grad);
}

/* Image preview */
.img-preview-wrap { margin-top: 10px; }
.img-preview { width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--radius-sm); border: 1.5px solid var(--border); }

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 700; cursor: pointer;
  transition: all 0.18s; text-decoration: none; white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary-grad); color: white;
  box-shadow: 0 3px 10px rgba(239,100,141,0.3);
}
.btn-primary:hover { background: var(--primary-grad-h); box-shadow: 0 4px 16px rgba(239,100,141,0.4); transform: translateY(-1px); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger-light); color: var(--danger); border: 1.5px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-ghost { background: none; color: var(--text-2); border: 1.5px solid transparent; }
.btn-ghost:hover { background: var(--bg); border-color: var(--border); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--radius-xs); }
.btn-icon.btn-sm { width: 28px; height: 28px; }

.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px;
  background: var(--primary-grad); color: white; border: none;
  font-size: 0.875rem; font-weight: 700; cursor: pointer;
  transition: all 0.18s; font-family: inherit;
  box-shadow: 0 3px 10px rgba(239,100,141,0.3);
}
.cart-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(239,100,141,0.4); }
.cart-btn-count {
  background: white; color: var(--rose-pop);
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 800;
}

/* ===================================================
   BADGES
   =================================================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700;
}
.badge-rose   { background: var(--rose-mist); color: var(--rose-pop); }
.badge-green  { background: var(--success-light); color: #16a34a; }
.badge-red    { background: var(--danger-light); color: var(--danger); }
.badge-yellow { background: var(--warning-light); color: #b45309; }
.badge-gray   { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge-blue   { background: var(--info-light); color: var(--info); }

/* Commandes status */
.status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.status-nouveau   { background: var(--info-light); color: var(--info); }
.status-confirme  { background: var(--warning-light); color: #92400e; }
.status-expedie   { background: var(--success-light); color: #166534; }
.status-annule    { background: var(--danger-light); color: var(--danger); }
.status-livre     { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.status-rembourse { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }
.status-payée     { background: var(--info-light); color: var(--info); }
.status-attente_paiement { background: var(--warning-light); color: #92400e; }

/* ===================================================
   CATEGORIES (admin)
   =================================================== */
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 12px 16px;
  transition: all 0.15s;
}
.cat-row:hover { border-color: var(--rose-sig); background: var(--rose-mist); }
.cat-row-name { flex: 1; font-weight: 600; font-size: 0.9rem; }
.cat-row-count { font-size: 0.75rem; color: var(--muted); }
.cat-add-form { display: flex; gap: 10px; margin-bottom: 20px; }
.cat-add-form input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: inherit; outline: none;
  transition: border-color 0.2s; color: var(--text);
}
.cat-add-form input:focus { border-color: var(--rose-sig); box-shadow: 0 0 0 3px rgba(240,123,190,0.12); }

/* ===================================================
   ORDER DETAIL
   =================================================== */
.order-items-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.order-item-row {
  display: flex; gap: 10px; padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius-sm);
  align-items: center;
}
.order-item-row img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--rose-mist); }
.order-item-name { flex: 1; font-size: 0.82rem; font-weight: 600; }
.order-item-meta { font-size: 0.72rem; color: var(--muted); }
.order-item-price { font-size: 0.82rem; font-weight: 700; background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===================================================
   TOAST
   =================================================== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--charcoal); color: white;
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 0.855rem; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  min-width: 230px; max-width: 340px;
}
.toast.show { transform: translateX(0); }
.toast-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; flex-shrink: 0;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.success .toast-icon { background: var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.error   .toast-icon { background: var(--danger); }
.toast.info    { border-left: 3px solid var(--rose-sig); }
.toast.info    .toast-icon { background: var(--rose-sig); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.warning .toast-icon { background: var(--warning); }

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { font-size: 3.2rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; margin-bottom: 22px; }

/* ===================================================
   MISC
   =================================================== */
.divider { border: none; border-top: 1px solid var(--border-light); margin: 20px 0; }
.text-muted { color: var(--muted); }
.text-small { font-size: 0.78rem; }
.fw-700 { font-weight: 700; }
.gradient-text { background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.mobile-open .sidebar-close { display: flex; }
  .app-wrapper { margin-left: 0; }
  .menu-toggle { display: flex; }
  .topbar-search { display: none; }
  .drawer { width: 100vw; }
  .cart-drawer { width: 100vw; }
  .modal-box { max-width: 100%; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .sidebar-overlay.show {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 199;
  }
}
@media (max-width: 600px) {
  .page-content { padding: 16px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .product-img, .placeholder-img { height: 160px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .data-table th:nth-child(n+4):not(:last-child), .data-table td:nth-child(n+4):not(:last-child) { display: none; }
  .data-table { min-width: 420px; }
}
