/* ============================================================
   DigitMarket — Feuille de style principale
   Police: Syne (display) + DM Sans (body)
   Palette: --ink (sombre), --cream (fond), --accent (orange-vif)
   ============================================================ */

:root {
  --ink:        #0f0e17;
  --ink-mid:    #2e2d3d;
  --ink-light:  #6b6a7d;
  --cream:      #fafaf8;
  --white:      #ffffff;
  --accent:     #f97316;
  --accent-d:   #ea6500;
  --accent-l:   #fff0e6;
  --green:      #22c55e;
  --red:        #ef4444;
  --blue:       #3b82f6;
  --border:     #e8e7f0;
  --shadow-sm:  0 1px 3px rgba(15,14,23,.07);
  --shadow-md:  0 4px 16px rgba(15,14,23,.10);
  --shadow-lg:  0 12px 40px rgba(15,14,23,.13);
  --radius:     10px;
  --radius-lg:  16px;
  --font-head:  'Syne', sans-serif;
  --font-body:  'DM Sans', sans-serif;
  --max-w:      1280px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--cream); color: var(--ink); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ── CONTAINER ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 1.2rem; }
.logo-icon { font-size: 1.4rem; color: var(--accent); }
.logo-text strong { color: var(--accent); }

.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 6px 14px; border-radius: 8px; font-weight: 500; color: var(--ink-mid); transition: all .2s; }
.main-nav a:hover { background: var(--accent-l); color: var(--accent); }

.header-search { flex: 1; max-width: 380px; }
.header-search form { display: flex; gap: 0; }
.header-search input {
  flex: 1; padding: 9px 14px; border: 1.5px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  font: inherit; background: var(--white);
  transition: border-color .2s;
}
.header-search input:focus { outline: none; border-color: var(--accent); }
.header-search button {
  padding: 9px 14px; background: var(--accent); color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background .2s;
}
.header-search button:hover { background: var(--accent-d); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius); font-weight: 500;
  font-family: var(--font-body); transition: all .2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink-mid); }
.btn-ghost:hover { background: var(--border); }
.btn-lg { padding: 12px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-icon { position: relative; display: flex; align-items: center;
  padding: 8px; border-radius: var(--radius); color: var(--ink-mid); }
.btn-icon .badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--accent); color: #fff;
  border-radius: 9px; font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* User Menu */
.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-l); color: var(--accent);
  font-weight: 700; font-family: var(--font-head); overflow: hidden;
  border: 2px solid var(--border); transition: border-color .2s;
}
.user-avatar:hover { border-color: var(--accent); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200;
}
.user-menu:hover .user-dropdown { display: block; }
.dropdown-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.dropdown-header strong { display: block; font-family: var(--font-head); }
.dropdown-header small { color: var(--ink-light); font-size: .8rem; }
.user-dropdown a { display: block; padding: 9px 16px; font-size: .9rem;
  color: var(--ink-mid); transition: background .15s; }
.user-dropdown a:hover { background: var(--accent-l); color: var(--accent); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.logout-link { color: var(--red) !important; }

/* ── FLASH MESSAGES ── */
.flash-container { position: fixed; top: 72px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-md); animation: slideIn .3s ease;
}
.flash--success { background: #dcfce7; color: #166534; border-left: 3px solid var(--green); }
.flash--error   { background: #fee2e2; color: #991b1b; border-left: 3px solid var(--red); }
.flash--info    { background: #dbeafe; color: #1e40af; border-left: 3px solid var(--blue); }
.flash-close    { margin-left: auto; opacity: .6; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── HERO ── */
.hero {
  background: var(--ink);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(249,115,22,.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.08) 0%, transparent 50%);
}
.hero .container { position: relative; z-index: 1; }
.hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; color: var(--white);
  line-height: 1.15; margin-bottom: 20px;
}
.hero-content h1 em { color: var(--accent); font-style: normal; }
.hero-content p { color: rgba(255,255,255,.7); font-size: 1.15rem; margin-bottom: 32px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.1); }
.stat strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--white); }
.stat span { font-size: .875rem; color: rgba(255,255,255,.5); }

/* ── SECTIONS ── */
.section { padding: 64px 0; }
.section--alt { background: var(--white); }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; }
.section-title { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; }
.see-all { color: var(--accent); font-weight: 500; font-size: .9rem; }

/* ── CATEGORIES GRID ── */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px; background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  text-align: center; transition: all .2s;
}
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-icon { font-size: 2rem; }
.cat-name { font-weight: 600; font-size: .9rem; }
.cat-count { font-size: .75rem; color: var(--ink-light); }

/* ── PRODUCTS GRID ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ── PRODUCT CARD ── */
.product-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  border: 1.5px solid var(--border); transition: all .25s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-card__thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: #f0eef8;
}
.product-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-card__thumb img { transform: scale(1.04); }
.product-card__thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 1.5rem; color: var(--ink-light);
  background: linear-gradient(135deg, #f0eef8, #e6e4f0);
}
.product-card__overlay {
  position: absolute; inset: 0; background: rgba(15,14,23,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.product-card:hover .product-card__overlay { opacity: 1; }
.badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 8px; border-radius: 6px;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
}
.badge--sale  { background: var(--accent); color: #fff; }
.badge--free  { background: var(--green); color: #fff; }
.badge--success { background: #dcfce7; color: #166534; }

.product-card__body { padding: 14px; }
.product-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.file-type-badge {
  padding: 2px 7px; border-radius: 5px;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  background: var(--accent-l); color: var(--accent);
}
.rating { font-size: .8rem; color: var(--ink-light); }
.product-card__title { font-family: var(--font-head); font-size: .95rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.product-card__title a:hover { color: var(--accent); }
.product-card__seller { font-size: .8rem; color: var(--ink-light); margin-bottom: 12px; }
.product-card__seller a:hover { color: var(--accent); }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.price--free { color: var(--green); }
.price--old { font-size: .8rem; color: var(--ink-light); text-decoration: line-through; margin-left: 4px; font-weight: 400; font-family: var(--font-body); }
.btn-wishlist { font-size: 1.1rem; opacity: .4; transition: all .2s; padding: 4px; }
.btn-wishlist:hover, .btn-wishlist.active { opacity: 1; color: var(--red); }

/* ── CTA SECTION ── */
.cta-section { background: var(--ink); }
.cta-box { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-box h2 { font-family: var(--font-head); font-size: 2rem; color: var(--white); margin-bottom: 16px; }
.cta-box p  { color: rgba(255,255,255,.7); margin-bottom: 28px; font-size: 1.05rem; }

/* ── FOOTER ── */
.site-footer { background: var(--ink); color: rgba(255,255,255,.5); padding: 56px 0 28px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand .logo { color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: .875rem; line-height: 1.7; }
.footer-col h4 { font-family: var(--font-head); color: var(--white); font-weight: 600; margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 10px; font-size: .875rem; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; font-size: .8rem; }

/* ── AUTH PAGES ── */
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-brand { background: var(--ink); padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-brand .logo { color: var(--white); margin-bottom: 48px; font-size: 1.3rem; }
.auth-brand__tagline h2 { font-family: var(--font-head); font-size: 2.5rem; color: var(--white); margin-bottom: 16px; }
.auth-brand__tagline p  { color: rgba(255,255,255,.6); font-size: 1.05rem; line-height: 1.7; }
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--cream); }
.auth-form-inner { width: 100%; max-width: 420px; }
.auth-form-inner h1 { font-family: var(--font-head); font-size: 2rem; margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--ink-light); font-size: .9rem; }
.auth-switch a { color: var(--accent); font-weight: 500; }

/* ── FORMS ── */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-size: .875rem; font-weight: 500; color: var(--ink-mid); display: flex; justify-content: space-between; }
.form-label-link { font-weight: 400; color: var(--accent); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="url"], textarea, select {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font: inherit; background: var(--white);
  color: var(--ink); transition: border-color .2s; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.input-password-wrapper { position: relative; }
.input-password-wrapper input { padding-right: 44px; }
.toggle-password { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); opacity: .4; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; }
.checkbox-label input { width: auto; }
.input-group { display: flex; gap: 0; }
.input-group input { border-radius: var(--radius) 0 0 var(--radius); border-right: none; }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; }

.alert { padding: 12px 16px; border-radius: var(--radius); font-size: .9rem; margin-bottom: 4px; }
.alert--error   { background: #fee2e2; color: #991b1b; border-left: 3px solid var(--red); }
.alert--success { background: #dcfce7; color: #166534; border-left: 3px solid var(--green); }
.alert--warning { background: #fef9c3; color: #854d0e; border-left: 3px solid #eab308; }
.alert ul { margin-top: 6px; padding-left: 20px; }

/* ── PAGE TITLE ── */
.page-title {
  font-family: var(--font-head); font-size: 1.8rem;
  margin: 40px 0 24px;
}
.page-title .count { font-size: 1rem; color: var(--ink-light); font-weight: 400; font-family: var(--font-body); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state__icon { font-size: 4rem; display: block; margin-bottom: 16px; }
.empty-state h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 10px; }
.empty-state p  { color: var(--ink-light); margin-bottom: 24px; }

/* ── CART ── */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; padding-bottom: 48px; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto auto; gap: 16px; align-items: center;
  padding: 16px; background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border);
}
.cart-item__thumb { width: 80px; height: 60px; border-radius: var(--radius); overflow: hidden; background: #f0eef8; }
.cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: .75rem; color: var(--ink-light); }
.cart-item__name { font-weight: 600; font-family: var(--font-head); font-size: .95rem; }
.cart-item__meta { font-size: .8rem; color: var(--ink-light); margin-top: 4px; display: flex; gap: 10px; }
.cart-item__price { font-family: var(--font-head); font-weight: 700; }
.btn-icon--danger { color: var(--ink-light); transition: color .2s; }
.btn-icon--danger:hover { color: var(--red); }

.cart-summary {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; height: fit-content;
  position: sticky; top: 80px;
}
.cart-summary h3 { font-family: var(--font-head); margin-bottom: 20px; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: .9rem; border-bottom: 1px solid var(--border); }
.summary-line--discount { color: var(--green); }
.summary-line--total { border-bottom: none; font-size: 1.1rem; margin-top: 8px; padding-top: 16px; }
.coupon-form { margin: 16px 0; }
.coupon-remove-form { margin-bottom: 8px; }
.link-btn { color: var(--accent); font-size: .85rem; font-weight: 500; }
.payment-logos { display: flex; gap: 12px; justify-content: center; margin: 12px 0; font-size: 1.2rem; opacity: .6; }
.continue-shopping { display: block; text-align: center; margin-top: 12px; font-size: .85rem; }

/* ── CHECKOUT ── */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; padding-bottom: 48px; }
.checkout-items { background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border); padding: 24px; height: fit-content; }
.checkout-items h3 { font-family: var(--font-head); margin-bottom: 18px; }
.checkout-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.checkout-item:last-of-type { border-bottom: none; }
.checkout-item__thumb { width: 60px; height: 45px; border-radius: 8px; overflow: hidden; background: #f0eef8; flex-shrink: 0; }
.checkout-item__name { flex: 1; font-size: .9rem; font-weight: 500; }
.checkout-item__price { font-family: var(--font-head); font-weight: 700; }
.checkout-totals { margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--border); }
.total-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: .9rem; }
.total-line--discount { color: var(--green); }
.total-line--grand { font-size: 1.2rem; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }

.checkout-payment { background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border); padding: 24px; height: fit-content; }
.checkout-payment h3 { font-family: var(--font-head); margin-bottom: 16px; }
.billing-info { padding: 12px 16px; background: var(--cream); border-radius: var(--radius); margin-bottom: 20px; font-size: .9rem; }
.billing-info p { margin-bottom: 2px; }

.payment-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.payment-tab {
  flex: 1; padding: 10px; border-radius: var(--radius); font-size: .875rem; font-weight: 500;
  border: 1.5px solid var(--border); color: var(--ink-mid); transition: all .2s;
}
.payment-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.payment-panel { display: none; }
.payment-panel.active { display: block; }
.stripe-element { padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.payment-error { color: var(--red); font-size: .875rem; margin-bottom: 12px; }
.payment-security { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: .8rem; color: var(--ink-light); text-align: center; }
.free-order-notice { text-align: center; padding: 20px; background: var(--accent-l); border-radius: var(--radius); margin-bottom: 20px; }
.free-order-notice span { font-size: 2rem; display: block; margin-bottom: 8px; }

/* ── SUCCESS PAGE ── */
.success-page { text-align: center; max-width: 560px; margin: 60px auto; padding: 48px; background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border); }
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.success-page h1 { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: 10px; }
.success-subtitle { font-size: 1.05rem; margin-bottom: 8px; }
.order-items-summary { margin: 24px 0; text-align: left; }
.success-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--cream); border-radius: var(--radius); margin-bottom: 8px; }
.success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* ── PRODUCT DETAIL ── */
.product-detail { padding-bottom: 80px; }
.breadcrumb { padding: 16px 0; font-size: .85rem; color: var(--ink-light); }
.breadcrumb a:hover { color: var(--accent); }
.product-layout { display: grid; grid-template-columns: 1fr 400px; gap: 48px; margin-top: 24px; }
.gallery-main { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-lg); background: #f0eef8; margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 3rem; color: var(--ink-light); }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumb-item { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; transition: all .2s; }
.gallery-thumb-item:hover, .gallery-thumb-item.active { border-color: var(--accent); opacity: 1; }
.product-preview { margin-top: 16px; padding: 16px; background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--border); }
.product-preview h4 { margin-bottom: 10px; font-family: var(--font-head); }
.product-preview audio { width: 100%; }

.product-info__header { display: flex; gap: 8px; margin-bottom: 12px; }
.license-badge { padding: 2px 7px; border-radius: 5px; font-size: .7rem; font-weight: 700; background: #dbeafe; color: #1e40af; }
.product-title { font-family: var(--font-head); font-size: 1.75rem; font-weight: 800; margin-bottom: 16px; }
.product-seller-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.seller-link { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.seller-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-l); color: var(--accent); font-weight: 700; font-family: var(--font-head); font-size: .75rem; display: flex; align-items: center; justify-content: center; }
.product-rating { display: flex; align-items: center; gap: 4px; }
.star { color: var(--border); font-size: 1rem; }
.star.filled { color: #f59e0b; }
.rating-text { font-size: .85rem; color: var(--ink-light); margin-left: 4px; }
.product-short-desc { color: var(--ink-mid); margin-bottom: 20px; line-height: 1.7; }
.product-pricing { display: flex; align-items: baseline; gap: 10px; margin-bottom: 24px; }
.price-main { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--ink); }
.price-original { color: var(--ink-light); text-decoration: line-through; font-size: 1.1rem; }
.discount-badge { background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: .8rem; font-weight: 700; }
.sale-ends { display: block; color: var(--ink-light); font-size: .8rem; margin-top: 4px; }
.purchase-status { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.product-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.btn-wishlist-toggle { color: var(--ink-mid); }
.product-meta-list { background: var(--cream); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.meta-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.meta-item:last-child { border-bottom: none; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; background: var(--cream); border: 1.5px solid var(--border); border-radius: 20px; font-size: .8rem; transition: all .2s; }
.tag:hover { border-color: var(--accent); color: var(--accent); }

.product-description { margin-top: 48px; }
.product-description h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 20px; }
.prose { line-height: 1.8; color: var(--ink-mid); max-width: 780px; }
.prose p { margin-bottom: 16px; }

.product-reviews { margin-top: 48px; border-top: 2px solid var(--border); padding-top: 40px; }
.product-reviews h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 24px; }
.review-form-wrapper { background: var(--cream); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 28px; }
.review-form-wrapper h3 { font-family: var(--font-head); margin-bottom: 16px; }
.star-rating-input { display: flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 16px; }
.star-rating-input input { display: none; }
.star-rating-input label { font-size: 1.8rem; color: var(--border); cursor: pointer; transition: color .15s; }
.star-rating-input input:checked ~ label,
.star-rating-input label:hover ~ label,
.star-rating-input label:hover { color: #f59e0b; }
.review-form textarea { width: 100%; min-height: 100px; margin-bottom: 12px; }

.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-item { padding: 20px; background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.review-author { font-weight: 600; }
.review-date { font-size: .8rem; color: var(--ink-light); margin-left: auto; }
.review-comment { color: var(--ink-mid); line-height: 1.7; }
.no-reviews { color: var(--ink-light); text-align: center; padding: 32px; }

.related-products { margin-top: 56px; border-top: 2px solid var(--border); padding-top: 40px; }
.related-products h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 24px; }

/* ── DASHBOARD ── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 32px 0 64px; }
.dashboard-sidebar { background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border); padding: 16px; height: fit-content; position: sticky; top: 80px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); font-size: .9rem; color: var(--ink-mid); transition: all .2s; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--accent-l); color: var(--accent); font-weight: 500; }
.sidebar-nav .divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── ADMIN LAYOUT ── */
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); padding: 24px 0; }
.admin-sidebar .logo { color: var(--white); padding: 0 20px 24px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 16px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: .875rem; color: rgba(255,255,255,.6); transition: all .2s; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(249,115,22,.15); color: var(--accent); }
.admin-nav .nav-section { padding: 14px 20px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.25); }
.admin-content { background: var(--cream); }
.admin-topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.admin-main { padding: 32px; }
.admin-title { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--white); border-radius: var(--radius-lg); padding: 20px; border: 1.5px solid var(--border); }
.stat-card__label { font-size: .8rem; color: var(--ink-light); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.stat-card__value { font-family: var(--font-head); font-size: 2rem; font-weight: 800; }
.stat-card__sub { font-size: .8rem; color: var(--ink-light); margin-top: 4px; }

/* ── TABLE ── */
.table-wrapper { background: var(--white); border-radius: var(--radius-lg); border: 1.5px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-light); text-align: left; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; font-size: .875rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--cream); }

/* ── UTILITIES ── */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.text-muted { color: var(--ink-light); }
.text-success { color: var(--green); }
.text-danger  { color: var(--red); }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; } .gap-2 { gap: 8px; } .align-center { align-items: center; }

/* ── RESPONSIVE ── */
.mobile-menu-toggle { display: none; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .checkout-layout, .cart-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .main-nav { display: none; }
  .header-search { display: none; }
  .mobile-menu-toggle { display: flex; }
  .hero-stats { gap: 24px; }
  .dashboard-layout, .admin-layout { grid-template-columns: 1fr; }
}

/* ── CATALOGUE + FILTRES ── */
.page-banner { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.sort-select-wrap select, .form-select {
  padding:9px 14px; border:1.5px solid var(--border); border-radius:var(--radius);
  font:inherit; background:var(--white); color:var(--ink); cursor:pointer;
}
.catalog-layout { display:grid; grid-template-columns:220px 1fr; gap:28px; }
.filters-sidebar { background:var(--white); border:1.5px solid var(--border); border-radius:var(--radius-lg); padding:20px; height:fit-content; position:sticky; top:80px; }
.filter-group { margin-bottom:20px; border-bottom:1px solid var(--border); padding-bottom:16px; }
.filter-group:last-child { border-bottom:none; margin-bottom:0; }
.filter-group h4 { font-family:var(--font-head); font-size:.85rem; font-weight:700; margin-bottom:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-light); }
.filter-check { display:flex; align-items:center; gap:8px; padding:5px 0; cursor:pointer; font-size:.875rem; color:var(--ink-mid); }
.filter-check input { width:auto; accent-color:var(--accent); }
.filter-check small { margin-left:auto; color:var(--ink-light); font-size:.75rem; }
.filter-check:hover { color:var(--accent); }
.price-range { display:flex; align-items:center; gap:6px; margin-top:8px; }
.price-range input { padding:6px 10px; border:1.5px solid var(--border); border-radius:var(--radius); font:inherit; font-size:.85rem; }
.products-grid--catalog { grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); }

/* ── PAGINATION ── */
.pagination { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:32px; }
.page-btn { padding:9px 18px; border:1.5px solid var(--border); border-radius:var(--radius); font-size:.875rem; font-weight:500; transition:all .2s; background:var(--white); }
.page-btn:hover { border-color:var(--accent); color:var(--accent); }
.page-btn.disabled { opacity:.35; pointer-events:none; }
.page-info { font-size:.875rem; color:var(--ink-light); }

/* ── SEARCH PAGE ── */
.search-page-form { display:flex; gap:10px; margin-bottom:24px; }
.search-page-form input { flex:1; padding:12px 16px; border:1.5px solid var(--border); border-radius:var(--radius); font:inherit; font-size:1rem; background:var(--white); }
.search-page-form input:focus { outline:none; border-color:var(--accent); }

/* ── DOWNLOADS ── */
.downloads-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:16px; }
.download-card { display:grid; grid-template-columns:80px 1fr auto; gap:14px; align-items:start; padding:16px; background:var(--white); border-radius:var(--radius-lg); border:1.5px solid var(--border); transition:box-shadow .2s; }
.download-card:hover { box-shadow:var(--shadow-md); }
.download-card--expired { opacity:.6; }
.download-card__thumb { width:80px; height:60px; border-radius:var(--radius); overflow:hidden; background:#f0eef8; }
.download-card__thumb img { width:100%; height:100%; object-fit:cover; }
.download-card__body h3 { font-family:var(--font-head); font-size:.9rem; margin-bottom:6px; }
.download-meta { display:flex; align-items:center; gap:8px; font-size:.75rem; margin-bottom:6px; flex-wrap:wrap; }
.download-expiry { font-size:.75rem; margin-bottom:8px; }
.download-counter { font-size:.75rem; margin-top:6px; }
.counter-bar { height:4px; background:var(--border); border-radius:2px; margin-bottom:3px; overflow:hidden; }
.counter-fill { height:100%; background:var(--accent); border-radius:2px; transition:width .3s; }
.download-card__action { display:flex; flex-direction:column; gap:6px; align-items:flex-end; }

/* ── SELLER HERO (profil public) ── */
.seller-hero { background:var(--ink); padding:40px 0; }
.seller-header { display:flex; align-items:flex-start; gap:24px; }
.seller-avatar-lg { width:80px; height:80px; border-radius:50%; overflow:hidden; background:var(--accent-l); color:var(--accent); font-family:var(--font-head); font-weight:700; font-size:2rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; border:3px solid rgba(255,255,255,.15); }
.seller-avatar-lg img { width:100%; height:100%; object-fit:cover; }
.seller-info h1 { font-family:var(--font-head); font-size:1.8rem; color:#fff; margin-bottom:4px; }
.seller-handle { color:rgba(255,255,255,.4); font-size:.875rem; margin-bottom:10px; }
.seller-bio { color:rgba(255,255,255,.65); font-size:.9rem; max-width:560px; margin-bottom:12px; line-height:1.6; }
.seller-meta-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.seller-link-ext { color:var(--accent); font-size:.85rem; font-weight:500; }
.seller-stat { font-size:.8rem; color:rgba(255,255,255,.4); }

/* ── SELLER STATS GRID ── */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.stat-card { background:var(--white); border-radius:var(--radius-lg); padding:18px; border:1.5px solid var(--border); }
.stat-card__label { font-size:.72rem; color:var(--ink-light); text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
.stat-card__value { font-family:var(--font-head); font-size:1.8rem; font-weight:800; }
.stat-card__sub { font-size:.78rem; color:var(--ink-light); margin-top:4px; }

/* ── BADGE VARIANTS ── */
.badge--warning { background:#fef9c3; color:#854d0e; }
.badge--danger  { background:#fee2e2; color:#991b1b; }

/* ── ADDITIONAL RESPONSIVE ── */
@media (max-width:1024px) {
  .catalog-layout { grid-template-columns:1fr; }
  .filters-sidebar { position:static; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .downloads-grid { grid-template-columns:1fr; }
}
@media (max-width:768px) {
  .seller-header { flex-direction:column; }
  .seller-avatar-lg { width:60px; height:60px; font-size:1.5rem; }
  .page-banner { flex-direction:column; gap:12px; align-items:flex-start; }
  .download-card { grid-template-columns:60px 1fr; }
  .download-card__action { grid-column:1/-1; flex-direction:row; }
  .stats-grid { grid-template-columns:1fr 1fr; }
}
