/* ============================================================
   AURA MARKET — Application Client
   Feuille de styles principale
   Fichier : client/css/client.css
   Architecture reprise du dashboard CARTIC, adaptée e-commerce client
   ============================================================ */

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

/* ─── Variables ────────────────────────────────────────────── */
:root {
  --primary:        #7C3AED;
  --primary-dark:   #5B21B6;
  --primary-light:  #F3EBFF;
  --primary-soft:   #D8C3FA;
  --gold:           #F2B705;
  --gold-light:     #FFF6DB;
  --white:          #FBFAFE;
  --bg:             #F6F4FB;
  --surface:        #FBFAFE;
  --text:           #1F1530;
  --text-secondary: #6B6178;
  --text-muted:     #A89BC0;
  --border:         #ECE6F8;
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --danger:         #E0276F;
  --danger-light:   #FCE4ED;
  --info:           #3B82F6;
  --info-light:     #DBEAFE;
  --shadow-sm:      0 1px 2px 0 rgba(91,33,182,.06);
  --shadow:         0 1px 3px 0 rgba(91,33,182,.10), 0 1px 2px 0 rgba(91,33,182,.06);
  --shadow-md:      0 4px 6px -1px rgba(91,33,182,.10), 0 2px 4px -1px rgba(91,33,182,.06);
  --shadow-lg:      0 10px 15px -3px rgba(91,33,182,.10), 0 4px 6px -2px rgba(91,33,182,.05);
  --radius:         8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --sidebar-width:  260px;
  --header-height:  64px;
}

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  overflow-x: hidden;
}
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

/* ─── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.brand-logo-img { max-width: 100%; max-height: 80%; object-fit: contain; }
.sidebar::after{
  content:"";
  position:absolute;
  top:24px;
  right:0;
  width:3px;
  height:calc(100% - 48px);
  background:linear-gradient(
    to bottom,
    rgba(124,58,237,.05),
    rgba(124,58,237,.35),
    rgba(124,58,237,.55),
    rgba(124,58,237,.35),
    rgba(124,58,237,.05)
  );
  border-radius:20px 0 0 20px;
}@media (max-width:768px){
  .sidebar::after{
    width:4px;
    background:linear-gradient(
      to bottom,
      #E9D5FF,
      #C084FC,
      #7C3AED,
      #A855F7,
      #E9D5FF
    );
    box-shadow:0 0 14px rgba(124,58,237,.35);
  }
}
.brand-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 16px;
}
.brand-logo svg { width: 20px; height: 20px; stroke: white; }
.brand-text { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.brand-text span { color: var(--primary); }
.brand-sub  { font-size: 11px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-top: -2px; }

.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-section {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); padding: 18px 12px 8px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  margin-bottom: 4px; border: none; background: transparent; width: 100%;
  text-align: left;
}
.nav-link:hover { background: var(--bg); color: var(--text); transform: translateX(2px); }
.nav-link.active { background: var(--primary-light); color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.nav-link svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
.nav-soft { min-height: 36px; padding-left: 18px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.nav-soft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #DCC7FF; flex-shrink: 0; }
.nav-service { min-height: 38px; font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.nav-service::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #E7C24A; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--primary); color: white;
  font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px;
}
.nav-badge.gold { background: var(--gold); color: var(--text); }
.nav-badge.danger { background: #E0276F; color: #fff; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.admin-mini      { display: flex; align-items: center; gap: 12px; }
.admin-avatar    { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.admin-avatar svg           { width: 18px; height: 18px; stroke: var(--primary); }
.admin-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-info .admin-name     { font-size: 13px; font-weight: 700; color: var(--text); }
.admin-info .admin-role     { font-size: 12px; color: var(--text-muted); }

/* ─── Layout principal ─────────────────────────────────────── */
.main-wrapper { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }

/* ─── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-left  { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.menu-toggle  { display: none; width: 36px; height: 36px; border-radius: 8px; border: none; background: var(--bg); cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-toggle svg { width: 20px; height: 20px; stroke: #111111; }
.title-block  { min-width: 0; }
.page-title   { font-size: 20px; font-weight: 700; }
.breadcrumb   { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ─── Logo (mobile topbar) ─────────────────────────────────── */
.logo3d-wrap { display: none; align-items: center; }
.topbar-logo-img { height: 38px; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 768px) {
  .logo3d-wrap {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
  }
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
#topbarActionsMount { display: flex; align-items: center; }
.topbar-btn {
  width: 42px; height: 42px; border-radius: 14px;
  border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: transform .2s ease;
}
.topbar-btn:hover { transform: translateY(-1px); }
.topbar-btn svg { width: 20px; height: 20px; fill: none; stroke: #111111; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }



/* ─── Content ──────────────────────────────────────────────── */
.content { flex: 1; padding: 24px 32px 40px; }

/* ─── KPI Grid (réutilisé pour résumés compte) ────────────── */
.kpi-grid   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.kpi-card   { background: var(--white); border-radius: var(--radius-md); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: box-shadow 0.2s; }
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.kpi-label  { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.kpi-icon   { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.kpi-icon svg     { width: 20px; height: 20px; stroke-width: 2; fill: none; }
.kpi-icon.violet  { background: var(--primary-light); } .kpi-icon.violet svg  { stroke: var(--primary); }
.kpi-icon.green   { background: var(--success-light); } .kpi-icon.green svg   { stroke: var(--success); }
.kpi-icon.blue    { background: var(--info-light);    } .kpi-icon.blue svg    { stroke: var(--info);    }
.kpi-icon.gold    { background: var(--gold-light);    } .kpi-icon.gold svg    { stroke: var(--gold);    }
.kpi-value  { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.kpi-trend  { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi-trend.up   { color: var(--success); }
.kpi-trend.down { color: var(--danger);  }
.kpi-trend svg  { width: 16px; height: 16px; stroke-width: 2.5; }

/* ─── Panels ───────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }
.panel     { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.panel-body   { padding: 20px 24px; }
.panel-title  { font-size: 16px; font-weight: 700; }
.panel-action { font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; border: none; background: none; }
.full-panel   { grid-column: 1 / -1; }

/* ─── Catégories (pills horizontales) ─────────────────────── */
.cat-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; }
.cat-pill {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 76px; cursor: pointer; border: none; background: none;
}
.cat-circle {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--border); background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; transition: border-color .2s;
}
.cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.cat-pill.active .cat-circle { border-color: var(--primary); }
.cat-pill span { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: center; }
.cat-pill.active span { color: var(--primary); }

/* ─── Promo banners ────────────────────────────────────────── */
.promo-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 24px; }
.promo-banner {
  border-radius: var(--radius-lg); padding: 28px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff; min-height: 170px; display: flex; flex-direction: column; justify-content: center;
}
.promo-banner.alt { background: linear-gradient(120deg, #2A0A4F, var(--primary-dark)); }
.promo-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.15);
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px; width: fit-content;
}
.promo-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.promo-banner h3 { font-size: 24px; font-weight: 800; line-height: 1.25; margin-top: 14px; max-width: 280px; }
.promo-price-chip { background: #FBFAFE; color: var(--primary-dark); font-weight: 800; font-size: 14px; padding: 7px 14px; border-radius: 8px; width: fit-content; margin-top: 16px; }
.promo-blob { position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.08); right: -50px; bottom: -50px; }

/* ─── Produits ─────────────────────────────────────────────── */
.product-grid-2col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
/* ── Section Recommandé pour vous ───────────────────────── */
.reco-section { margin: 24px 0 20px; }
.reco-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.reco-header-left { display: flex; align-items: center; gap: 10px; }
.reco-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), #a855f7); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex-shrink: 0; }
.reco-title { font-size: 15px; font-weight: 700; color: var(--text); }
.reco-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.reco-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.reco-scroll::-webkit-scrollbar { display: none; }
.reco-scroll .pcard { flex: 0 0 200px; min-width: 0; }
.reco-scroll .pcard-img { aspect-ratio: 1/1; height: 160px; }
.reco-scroll .pcard-body { padding: 10px 12px; }
.reco-scroll .pcard-shop { font-size: 10px; margin-bottom: 2px; }
.reco-scroll .pcard-name { font-size: 12px; min-height: 0; -webkit-line-clamp: 1; }
.reco-scroll .pcard-price { font-size: 13px; font-weight: 800; }
.reco-scroll .pcard-old-price { font-size: 10px; }
.reco-scroll .pcard-price-row { margin-top: 4px; gap: 4px; }
.reco-scroll .verified-badge { display: none; }
.reco-scroll .fav-btn { width: 26px; height: 26px; top: 6px; right: 6px; }
.reco-scroll .discount-tag { font-size: 9px; padding: 3px 6px; top: 6px; left: 6px; }
.reco-skeleton { flex: 0 0 42%; height: 180px; background: linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%); background-size: 200%; border-radius: 14px; animation: shimmer 1.4s infinite; }
.product-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.pcard { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .2s, transform .2s; position: relative; }
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pcard-img { aspect-ratio: 1/1; background: var(--primary-light); position: relative; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.discount-tag { position: absolute; top: 10px; left: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
.fav-btn { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; }
.fav-btn svg { width: 15px; height: 15px; stroke: var(--primary); fill: none; }
.fav-btn.active svg { fill: var(--primary); }
.pcard-body { padding: 14px; }
.pcard-shop { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.pcard-name { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.35; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-price-row { display: flex; align-items: baseline; gap: 4px; flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.pcard-price { font-size: 14px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.pcard-old-price { font-size: 11px; color: var(--text-muted); text-decoration: line-through; white-space: nowrap; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pcard-stars { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.pcard-stars svg { width: 13px; height: 13px; fill: var(--gold); stroke: none; }
@media (max-width: 768px) {
  .reco-scroll .pcard { flex: 0 0 42% !important; width: 42%; }
  .cat-scroll .pcard { flex: 0 0 160px !important; width: 160px; }
  .reco-scroll .pcard-img, .cat-scroll .pcard-img { height: auto; aspect-ratio: 1/1; }
  .reco-scroll .pcard-body, .cat-scroll .pcard-body { padding: 8px 10px; }
  .reco-scroll .pcard-shop, .cat-scroll .pcard-shop { font-size: 10px; margin-bottom: 2px; }
  .reco-scroll .pcard-name, .cat-scroll .pcard-name { font-size: 11px; min-height: 0; -webkit-line-clamp: 2; }
  .reco-scroll .pcard-price, .cat-scroll .pcard-price { font-size: 12px; }
  .reco-scroll .pcard-old-price, .cat-scroll .pcard-old-price { font-size: 9px; }
  .reco-scroll .pcard-price-row, .cat-scroll .pcard-price-row { margin-top: 4px; gap: 3px; flex-wrap: nowrap; }
  .reco-scroll .fav-btn, .cat-scroll .fav-btn { width: 26px; height: 26px; top: 6px; right: 6px; }
  .reco-scroll .discount-tag, .cat-scroll .discount-tag { font-size: 9px; padding: 3px 6px; }
  .reco-scroll .verified-badge, .cat-scroll .verified-badge { display: none; }
  .product-grid-scroll {
    display: flex !important; flex-wrap: nowrap !important; overflow-x: auto;
    gap: 10px; scrollbar-width: none; padding-bottom: 4px;
  }
  .product-grid-scroll::-webkit-scrollbar { display: none; }
  .product-grid-scroll .pcard { flex: 0 0 42% !important; min-width: 0; width: 42%; }
  .product-grid-scroll .pcard-img { aspect-ratio: 1/1; height: auto !important; }
  .product-grid-scroll .pcard-body { padding: 8px 10px; }
  .product-grid-scroll .pcard-shop { font-size: 10px; margin-bottom: 2px; }
  .product-grid-scroll .pcard-name { font-size: 11px; min-height: 0 !important; -webkit-line-clamp: 2; }
  .product-grid-scroll .pcard-price { font-size: 12px; font-weight: 800; }
  .product-grid-scroll .pcard-old-price { font-size: 9px; }
.product-grid-scroll .pcard-price-row { margin-top: 4px; gap: 3px; flex-wrap: nowrap; }
  .product-grid-scroll .verified-badge { display: none !important; }
  .product-grid-scroll .fav-btn { width: 26px; height: 26px; top: 6px; right: 6px; }
  .product-grid-scroll .discount-tag { font-size: 9px; padding: 3px 6px; top: 4px; left: 4px; }
}
.verified-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--primary); font-weight: 700; margin-top: 6px; }
.verified-badge svg { width: 12px; height: 12px; }

/* ─── Boutiques ────────────────────────────────────────────── */
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.shop-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s; }
.shop-card:hover { box-shadow: var(--shadow-md); }
.shop-card-top { display: flex; align-items: center; gap: 10px; }
.shop-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden; border: 2px solid var(--primary-light); position: relative; }
.shop-avatar img { width: 100%; height: 100%; object-fit: cover; }
.shop-avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary-dark); font-weight: 800; font-size: 17px; }
.shop-check { position: absolute; bottom: -1px; right: -1px; width: 15px; height: 15px; background: var(--primary); border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; }
.shop-check svg { width: 7px; height: 7px; stroke: #fff; }
.shop-info { flex: 1; min-width: 0; }
.shop-name { font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-meta { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }
.shop-follow { width: 100%; padding: 7px 10px; font-size: 12px; }

/* ── COMMANDES — design cards ───────────────────────────── */
.cmd-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.cmd-filters::-webkit-scrollbar { display: none; }
.cmd-filter { flex-shrink: 0; padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--white); color: var(--text-secondary); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .18s; }
.cmd-filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cmd-list { display: flex; flex-direction: column; gap: 14px; }
.cmd-card { background: var(--white); border-radius: 18px; border: 1px solid var(--border); overflow: hidden; box-shadow: 0 2px 12px rgba(124,58,237,.06); }
.cmd-card-top { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px; align-items: center; }
.cmd-img-wrap { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--primary-light); }
.cmd-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmd-img-wrap.cancelled img { filter: grayscale(1) opacity(.5); }
.cmd-card-info { min-width: 0; }
.cmd-card-name { font-size: 13.5px; font-weight: 800; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.cmd-card-shop { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.cmd-card-shop svg { width: 12px; height: 12px; flex-shrink: 0; }
.cmd-card-meta { display: flex; gap: 8px; font-size: 10.5px; }
.cmd-card-num { color: var(--text-muted); font-weight: 600; }
.cmd-card-date { color: var(--text-muted); }
.cmd-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cmd-card-price { font-size: 15px; font-weight: 900; color: var(--primary); white-space: nowrap; }
.cmd-card-price.cancelled-price { color: var(--text-muted); text-decoration: line-through; }
.cmd-status-badge { font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.cmd-status-badge.transit { background: #EFF6FF; color: #3B82F6; }
.cmd-status-badge.delivered { background: #DCFCE7; color: #10B981; }
.cmd-status-badge.pending { background: #FEF3C7; color: #F59E0B; }
.cmd-status-badge.cancelled { background: #F3F4F6; color: #9CA3AF; }

.cmd-cancelled-banner { margin: 12px 16px 0; padding: 10px 14px; background: #FEF2F2; border-radius: 10px; display: flex; align-items: center; gap: 8px; color: #EF4444; font-size: 13px; font-weight: 700; }
.cmd-cancelled-banner svg { width: 16px; height: 16px; flex-shrink: 0; }
.cmd-livree-banner { margin: 12px 16px 0; padding: 10px 14px; background: #F0FDF4; border-radius: 10px; font-size: 13px; font-weight: 700; color: #16a34a; }
.cmd-card-actions { display: flex; gap: 10px; padding: 14px 16px 16px; }
.cmd-action-btn { flex: 1; padding: 10px 8px; border-radius: 10px; font-size: 12.5px; font-weight: 700; border: none; cursor: pointer; transition: opacity .15s; }
.cmd-action-btn:active { opacity: .8; }
.cmd-action-btn.primary { background: var(--primary); color: #fff; }
.cmd-action-btn.outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.cmd-action-btn.danger { background: #FEF2F2; color: #EF4444; border: 1.5px solid #FECACA; }
.cmd-empty { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; }
.cmd-empty-svg { width: 56px; height: 56px; margin-bottom: 16px; opacity: .7; }
.cmd-empty-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.cmd-empty-sub { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.cmd-skeleton { height: 110px; border-radius: 18px; background: linear-gradient(90deg,#f0f2f5 25%,#e4e6ea 50%,#f0f2f5 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin-bottom: 14px; }
.cmd-img-placeholder { width: 64px; height: 64px; border-radius: 12px; background: #ede9fe; display: flex; align-items: center; justify-content: center; font-size: 24px; }

/* ─── Badges (conservés pour usage global) ─────────────────── */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1; white-space: nowrap; }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-active { background: var(--success-light); color: var(--success); } .badge-active::before { background: var(--success); }
.badge-pending { background: var(--warning-light); color: var(--warning); } .badge-pending::before { background: var(--warning); }
.badge-blocked { background: var(--danger-light); color: var(--danger); } .badge-blocked::before { background: var(--danger); }
.badge-paid { background: var(--success-light); color: var(--success); } .badge-paid::before { background: var(--success); }
.badge-transit { background: var(--info-light); color: var(--info); } .badge-transit::before { background: var(--info); }

@media (max-width: 768px) {
  .cmd-img-wrap { width: 56px; height: 56px; }
  .cmd-card-name { font-size: 13px; }
  .cmd-card-price { font-size: 14px; }
  .cmd-status-badge { font-size: 10px; padding: 3px 8px; }
  .cmd-action-btn { font-size: 12px; padding: 9px 6px; }
}

.search-box { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; width: 320px; }
.search-box svg   { width: 16px; height: 16px; stroke: var(--text-muted); flex-shrink: 0; }
.search-box input { border: none; background: transparent; outline: none; font-size: 14px; width: 100%; font-weight: 500; }

/* ─── Barre recherche + filtre (mobile) ───────────────────── */
.mobile-search-row { display: none; }
.filter-btn {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.filter-btn svg { width: 19px; height: 19px; stroke: #111111; }
.filter-panel {
  display: flex;
  gap: 8px;
  padding: 10px 16px 12px;
  background: var(--white);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.filter-panel::-webkit-scrollbar { display: none; }
.filter-panel:empty { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.filter-chip svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}
.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.filter-chip.active svg { stroke: #fff; }

.tabs { display: flex; gap: 6px; width: 100%; margin-bottom: 14px; padding: 4px; overflow-x: auto; background: var(--bg); border-radius: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 800; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; transition: all .2s; white-space: nowrap; }
.tab.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }

.btn         { padding: 10px 18px; border-radius: var(--radius); font-weight: 700; font-size: 14px; border: none; cursor: pointer; text-align: center; transition: opacity 0.2s; }
.btn:active  { opacity: 0.8; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-success { background: var(--success); color: var(--white); }
.btn-sm      { padding: 7px 12px; font-size: 12.5px; }
.btn-block   { width: 100%; }

/* ─── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .emoji { font-size: 40px; margin-bottom: 12px; }
.empty-state .title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.empty-state .sub   { font-size: 13px; }

/* ─── Overlay mobile ───────────────────────────────────────── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; }
.overlay.show { display: block; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-grid          { grid-template-columns: repeat(2, 1fr); }
  .card-grid         { grid-template-columns: 1fr; }
  .product-grid      { grid-template-columns: repeat(4, 1fr); }
  .product-grid-2col { grid-template-columns: repeat(3, 1fr); }
  .shop-grid         { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 768px) {
  .sidebar       { transform: translateX(-100%); }
  .sidebar.open  { transform: translateX(0); }
  .main-wrapper  { margin-left: 0; }
  .menu-toggle   { display: flex; }
  .topbar        { padding: 0 16px; }
  .content       { padding: 16px; }
  .kpi-grid      { grid-template-columns: 1fr; }
  .product-grid      { grid-template-columns: repeat(2, 1fr); }
  .product-grid-2col { grid-template-columns: repeat(2, 1fr); }
  .shop-grid     { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shop-card     { padding: 11px; gap: 8px; }
  .shop-avatar   { width: 40px; height: 40px; }
  .shop-name     { font-size: 12px; }
  .shop-meta     { font-size: 10px; }
  .shop-follow   { font-size: 11px; padding: 6px 8px; }

  /* Logo remplace le titre dans la topbar mobile */
.title-block   { display: none; }
  .logo3d-wrap   { display: flex; width: auto; height: auto; z-index: 1; pointer-events: none; }
  .logo3d-wrap .topbar-logo-img, .logo3d-wrap a { pointer-events: auto; }

  /* Recherche desktop masquée, remplacée par la barre dédiée sous la topbar */
  .topbar-right .search-box { display: none; }
  .mobile-search-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--border);
    position: sticky; top: var(--header-height); z-index: 99;
  }
  .mobile-search { flex: 1; width: auto; }

  /* Cartes pub alignées horizontalement, scroll au lieu d'empiler */
  .promo-grid {
    display: flex; grid-template-columns: none; gap: 12px;
    overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
    margin-bottom: 18px;
  }
  .promo-grid::-webkit-scrollbar { display: none; }
  .promo-banner { flex: 0 0 78%; min-height: 130px; padding: 18px; }
  .promo-banner h3 { font-size: 18px; max-width: 220px; margin-top: 10px; }
  .promo-eyebrow { font-size: 10px; padding: 4px 10px; }
  .promo-price-chip { font-size: 12px; padding: 6px 12px; margin-top: 10px; }
  .promo-blob { width: 110px; height: 110px; right: -35px; bottom: -35px; }
}
.cat-row { gap: 18px; }
.cat-pill { min-width: 72px; }
.cat-circle {
  width: 64px;
  height: 64px;
  background: linear-gradient(180deg,#FBFAFE 0%,#F8F5FF 100%);
  border: 1px solid rgba(124,58,237,.14);
  box-shadow: 0 8px 18px rgba(124,58,237,.08);
}
.cat-circle img { display: none; }
.cat-circle svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat-pill span {
  font-size: 13px;
  font-weight: 800;
}
@media (max-width:768px){
  .cat-row { gap: 14px; }
  .cat-pill { min-width: 68px; }
  .cat-circle {
    width: 58px;
    height: 58px;
  }
  .cat-circle svg {
    width: 25px;
    height: 25px;
  }
}
/* ── Search Overlay ─────────────────────────────────────── */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000; align-items: flex-start; justify-content: center; }
.search-overlay.open { display: flex; }
.search-overlay-inner { width: 100%; max-width: 560px; padding: 16px; margin-top: 60px; }
.search-overlay-box { display: flex; align-items: center; background: var(--white); border-radius: 14px; padding: 0 14px; gap: 10px; box-shadow: 0 8px 32px rgba(108,43,217,.18); }
.search-overlay-box svg { width: 18px; height: 18px; stroke: var(--text-muted); flex-shrink: 0; }
.search-overlay-box input { flex: 1; border: none; outline: none; font-size: 15px; padding: 14px 0; background: transparent; color: var(--text); }
.search-overlay-box button { background: none; border: none; cursor: pointer; padding: 4px; display: flex; }
.search-overlay-box button svg { stroke: var(--text-muted); }
.topbar-search svg { width: 20px; height: 20px; }
/* ── Home scroll sentinel ───────────────────────────────── */
.home-sentinel { height: 40px; display: flex; align-items: center; justify-content: center; }
.home-sentinel.loading::after { content: ""; width: 24px; height: 24px; border: 3px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ── Sections par catégorie ─────────────────────────────── */
.cat-section { margin: 28px 0 8px; }
.cat-section-header { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--primary), #a855f7); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }
.cat-section-icon { width: 38px; height: 38px; background: rgba(255,255,255,.18); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-section-icon svg { width: 20px; height: 20px; stroke: #fff; }
.cat-section-info { flex: 1; min-width: 0; }
.cat-section-title { font-size: 15px; font-weight: 700; color: #fff; }
.cat-section-sub { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 1px; }
.cat-section-btn { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 20px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.cat-section-btn:active { background: rgba(255,255,255,.3); }
.cat-scroll { display: flex !important; flex-wrap: nowrap !important; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll .pcard { flex: 0 0 160px !important; min-width: 0; width: 160px; }
.cat-scroll .pcard-img { aspect-ratio: 1/1; height: auto !important; }
.cat-scroll .pcard-body { padding: 10px 12px; }
.cat-scroll .pcard-shop { font-size: 10px; margin-bottom: 2px; }
.cat-scroll .pcard-name { font-size: 12px; min-height: 0 !important; -webkit-line-clamp: 2; }
.cat-scroll .pcard-price { font-size: 13px; font-weight: 800; }
.cat-scroll .pcard-old-price { font-size: 10px; }
.cat-scroll .pcard-price-row { margin-top: 4px; gap: 4px; }
.cat-scroll .verified-badge { display: none !important; }
.cat-scroll .fav-btn { width: 26px; height: 26px; top: 6px; right: 6px; }
.cat-scroll .discount-tag { font-size: 9px; padding: 3px 6px; top: 6px; left: 6px; }
.cat-empty { font-size: 12px; color: var(--text-muted); padding: 16px 0; }
/* ── Footer ─────────────────────────────────────────────────── */
.app-footer {
  background: linear-gradient(180deg, #1a0d2e 0%, #0f0718 100%);
  border-top: 1px solid rgba(124,58,237,.35);
  margin-top: 40px;
  padding-bottom: 80px;
}
.app-footer-scroll-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(124,58,237,.2);
  cursor: pointer;
  transition: color .2s;
}
.app-footer-scroll-top svg {
  width: 14px; height: 14px;
  stroke: rgba(255,255,255,.55);
}
.app-footer-scroll-top:active { color: #fff; }
.app-footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid rgba(124,58,237,.2);
}
.app-footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  border-right: 1px solid rgba(124,58,237,.15);
  border-bottom: 1px solid rgba(124,58,237,.15);
  transition: color .2s, background .2s;
}
.app-footer-link:nth-child(2n) { border-right: none; }
.app-footer-link svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .7; }
.app-footer-link:active { background: rgba(124,58,237,.12); color: #fff; }
.app-footer-link.accent {
  color: #c084fc;
  font-weight: 700;
}
.app-footer-link.accent svg { opacity: 1; stroke: #c084fc; }
.app-footer-contact {
  padding: 18px 16px 12px;
  border-bottom: 1px solid rgba(124,58,237,.2);
}
.app-footer-contact-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.35);
  margin-bottom: 10px;
}
.app-footer-contact-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 5px;
}
.app-footer-contact-row span:first-child {
  color: rgba(255,255,255,.4);
  min-width: 110px;
  flex-shrink: 0;
}
.app-footer-contact-row span:last-child {
  color: rgba(255,255,255,.75);
  font-weight: 500;
}
.app-footer-copy {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.25);
  padding: 14px 16px;
}
/* ── Topbar hide/show on scroll ─────────────────────────────── */
.topbar {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.topbar.hidden {
  transform: translateY(-100%);
}
/* ── Bouton + sur cartes pcard ──────────────────────────────── */
.pcard-price-row-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 6px;
  min-width: 0;
}
.pcard-add-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
  transition: background .15s, transform .15s;
}
.pcard-add-btn:active { background: var(--primary-dark); transform: scale(.9); }
.pcard-add-btn svg {
  width: 13px;
  height: 13px;
  stroke: #fff;
  fill: none;
  flex-shrink: 0;
}

/* ── Loader global Aura Market ──────────────────────────────── */
#aura-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
#aura-loader.visible {
  opacity: 1;
  pointer-events: all;
}
.aura-loader-inner {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Ring tournant */
.aura-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #7C3AED;
  border-right-color: #A855F7;
  animation: aura-spin 0.85s cubic-bezier(0.4,0,0.2,1) infinite;
}
.aura-loader-ring-2 {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: #E9D5FF;
  border-left-color: #C084FC;
  animation: aura-spin 1.1s cubic-bezier(0.4,0,0.2,1) infinite reverse;
}
/* Logo A */
.aura-loader-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  animation: aura-pulse 1.4s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes aura-spin {
  to { transform: rotate(360deg); }
}
@keyframes aura-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(.85); opacity: .7; }
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px 32px;
}
.pagination-info {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 60px;
  text-align: center;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.pagination-btn svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  flex-shrink: 0;
}
.pagination-btn:not(:disabled):hover,
.pagination-btn:not(:disabled):active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.pagination-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.pagination-btn.next {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination-btn.next:not(:disabled):hover,
.pagination-btn.next:not(:disabled):active {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
