/* ─── HEADER ────────────────────────────────────────────────────────────────── */
.store-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,14,16,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: .75rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.store-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.1rem; font-weight: 700; color: var(--text); text-decoration: none; flex-shrink: 0;
}
.store-logo span { color: var(--accent); }
.logo-3d-icon { width: 2rem; height: 2rem; color: var(--accent); flex-shrink: 0; }
.header-nav { flex: 1; }
.search-bar {
  width: 100%; max-width: 360px; background: var(--bg2);
  border: 1px solid var(--border); color: var(--text);
  border-radius: 99px; padding: .5rem 1rem; font-size: .875rem;
}
.cart-btn {
  display: flex; align-items: center; gap: .4rem;
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  border-radius: 99px; padding: .5rem 1rem; cursor: pointer; font-size: .875rem;
  flex-shrink: 0; transition: .15s; white-space: nowrap;
}
.cart-btn svg { width: 1.1rem; height: 1.1rem; }
.cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-count {
  background: var(--accent2); color: #fff; border-radius: 99px;
  font-size: .7rem; font-weight: 700; min-width: 1.2rem; height: 1.2rem;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 .3rem;
}

/* ─── HERO ──────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; color: #fff; }
.hero p { font-size: .95rem; color: rgba(255,255,255,.65); margin-top: 1.25rem; line-height: 1.8; max-width: 640px; }

/* ─── CATALOGUE ─────────────────────────────────────────────────────────────── */
.catalogue-section { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.catalogue-inner { display: flex; gap: 2rem; align-items: flex-start; }

.filters { width: 180px; flex-shrink: 0; position: sticky; top: 80px; }
.filters h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); margin-bottom: .75rem; }
#category-list { display: flex; flex-direction: column; gap: .25rem; }
.cat-btn {
  text-align: left; background: none; border: none; color: var(--text2);
  padding: .4rem .75rem; border-radius: 8px; cursor: pointer; font-size: .875rem; transition: .15s;
}
.cat-btn:hover { background: var(--bg2); color: var(--text); }
.cat-btn.active { background: rgba(124,58,237,.2); color: var(--accent); }

.products-area { flex: 1; min-width: 0; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* ─── PRODUCT CARD ──────────────────────────────────────────────────────────── */
.product-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .15s, border-color .15s;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.product-card-img {
  width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center; background: var(--bg3);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: .875rem; }
.product-card-name { font-weight: 600; font-size: .95rem; margin-bottom: .25rem; }
.product-card-desc { font-size: .8rem; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .75rem; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.product-stock-out { font-size: .8rem; color: var(--danger); }
.btn-add-cart {
  background: var(--accent2); color: #fff; border: none; border-radius: 8px;
  padding: .4rem .75rem; font-size: .8rem; cursor: pointer; transition: .15s;
}
.btn-add-cart:hover { background: var(--accent); }
.btn-add-cart:disabled { background: var(--bg3); color: var(--text2); cursor: not-allowed; }

/* ─── PRODUCT DETAIL MODAL ──────────────────────────────────────────────────── */
.product-detail-modal { max-width: 800px; padding: 0; overflow-y: auto; }
.product-detail-modal .modal-close {
  position: absolute; top: 1rem; right: 1rem; background: rgba(0,0,0,.6);
  color: #fff; border: none; border-radius: 50%; width: 2rem; height: 2rem;
  font-size: 1.2rem; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center;
}
.detail-layout { display: flex; flex-direction: column; }
@media (min-width: 600px) { .detail-layout { flex-direction: row; } }
.detail-gallery { flex: 1; min-width: 0; }
.detail-gallery-main {
  width: 100%; aspect-ratio: 1; background: var(--bg3);
  display: flex; align-items: center; justify-content: center; font-size: 5rem;
}
.detail-gallery-main img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.detail-thumbs { display: flex; gap: .4rem; padding: .5rem; overflow-x: auto; background: var(--bg3); }
.detail-thumb {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 4px;
  overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: .6; transition: .15s;
}
.detail-thumb:hover, .detail-thumb.active { border-color: var(--accent); opacity: 1; }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.detail-name { font-size: 1.3rem; font-weight: 700; }
.detail-price { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.detail-desc { font-size: .875rem; color: var(--text2); line-height: 1.6; }
.detail-meta { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--text2); }
.detail-meta span { color: var(--text); }
.detail-qty { display: flex; align-items: center; gap: .5rem; }
.qty-btn {
  width: 2rem; height: 2rem; border-radius: 6px; background: var(--bg3);
  border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.qty-btn:hover { border-color: var(--accent); }
.qty-val { min-width: 2rem; text-align: center; font-weight: 600; }

/* ─── CART DRAWER ───────────────────────────────────────────────────────────── */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: var(--bg2); border-left: 1px solid var(--border); z-index: 61;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.cart-header h2 { font-size: 1.1rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.cart-item { display: flex; gap: .75rem; align-items: center; background: var(--bg3); border-radius: 8px; padding: .75rem; }
.cart-item-img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg2); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: .8rem; color: var(--accent); margin-top: .15rem; }
.cart-item-controls { display: flex; align-items: center; gap: .35rem; }
.cart-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: .8rem; padding: .2rem .4rem; }
.cart-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
.cart-totals { display: flex; flex-direction: column; gap: .3rem; }
.cart-total-row { display: flex; justify-content: space-between; font-size: .875rem; color: var(--text2); }
.cart-total-row.grand { font-weight: 700; font-size: 1rem; color: var(--text); border-top: 1px solid var(--border); padding-top: .5rem; margin-top: .25rem; }

/* ─── CHECKOUT ──────────────────────────────────────────────────────────────── */
.checkout-modal { max-width: 560px; }
.checkout-section-title { font-size: .9rem; font-weight: 600; color: var(--text2); border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.checkout-recap { background: var(--bg3); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.checkout-recap-row { display: flex; justify-content: space-between; font-size: .875rem; }
.checkout-recap-row.total { font-weight: 700; border-top: 1px solid var(--border); padding-top: .4rem; margin-top: .2rem; }

/* ─── HEADER NAV PAGES ──────────────────────────────────────────────────────── */
.header-nav { flex: 1; display: flex; align-items: center; gap: .25rem; padding: 0 1rem; }
.header-right { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.nav-page-btn {
  background: none; border: none; color: var(--text2); cursor: pointer;
  padding: .4rem .85rem; border-radius: 99px; font-size: .875rem; font-family: inherit;
  transition: .15s; white-space: nowrap;
}
.nav-page-btn:hover { background: var(--bg2); color: var(--text); }
.nav-page-btn.active { background: rgba(124,58,237,.2); color: var(--accent); }

/* ─── PERSONNALISATION HERO ─────────────────────────────────────────────────── */
.perso-hero {
  background: linear-gradient(135deg, #1a0533 0%, #2d1b69 50%, #1e3a5f 100%);
  border-bottom: 1px solid var(--border);
}
.perso-hero-inner { max-width: 800px; margin: 0 auto; padding: 4rem 1.5rem; text-align: center; }
.perso-hero-badge {
  display: inline-block; background: rgba(167,139,250,.2); color: var(--accent);
  border: 1px solid rgba(167,139,250,.3); border-radius: 99px;
  padding: .3rem 1rem; font-size: .8rem; font-weight: 600; margin-bottom: 1.25rem;
}
.perso-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; color: #fff; margin-bottom: 1rem; }
.perso-hero p { font-size: .975rem; color: rgba(255,255,255,.6); line-height: 1.7; }

/* ─── PERSO CHOICE ──────────────────────────────────────────────────────────── */
.perso-choice-section { padding: 3rem 1.5rem; }
.perso-choice-inner { max-width: 900px; margin: 0 auto; }
.perso-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 640px) { .perso-cards { grid-template-columns: 1fr; } }

.perso-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: 2rem; display: flex; flex-direction: column; gap: 1rem;
  transition: border-color .2s, transform .2s; cursor: default;
}
.perso-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.perso-card-icon { font-size: 3rem; }
.perso-card h2 { font-size: 1.4rem; font-weight: 700; }
.perso-card p { color: var(--text2); font-size: .9rem; line-height: 1.6; }
.perso-features { list-style: none; display: flex; flex-direction: column; gap: .4rem; font-size: .875rem; flex: 1; }
.perso-features li { color: var(--text2); }
.perso-features strong { color: var(--text); }
.perso-select-btn { margin-top: auto; width: 100%; padding: .7rem; font-size: .95rem; }

/* ─── PERSO FORM ────────────────────────────────────────────────────────────── */
.perso-form-section { padding: 2rem 1.5rem 4rem; }
.perso-form-inner { max-width: 760px; margin: 0 auto; }
.perso-back-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: none; border: none; color: var(--text2); cursor: pointer;
  font-size: .875rem; padding: .4rem 0; margin-bottom: 1.5rem; font-family: inherit;
  transition: color .15s;
}
.perso-back-btn:hover { color: var(--text); }
.perso-form-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.perso-form-icon { font-size: 2.5rem; }
.perso-form-header h2 { font-size: 1.4rem; font-weight: 700; }

.perso-form-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.perso-form-block {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.perso-form-block h3 { font-size: .95rem; font-weight: 600; color: var(--text2); border-bottom: 1px solid var(--border); padding-bottom: .6rem; }

.perso-upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 2.5rem 1rem;
  text-align: center; cursor: pointer; color: var(--text2); transition: .15s;
}
.perso-upload-zone:hover, .perso-upload-zone.dragging { border-color: var(--accent); color: var(--accent); }
.perso-upload-zone input { display: none; }
.perso-logo-preview { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.perso-file-chip {
  display: flex; align-items: center; gap: .6rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: .5rem .875rem; font-size: .875rem;
}
.perso-file-chip .chip-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perso-file-chip .chip-size { color: var(--text2); font-size: .75rem; flex-shrink: 0; }
.perso-file-chip .chip-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 .2rem; flex-shrink: 0; }
.perso-file-chip .chip-ok { color: var(--success); font-size: .85rem; flex-shrink: 0; }

/* ─── LOGO UPLOAD ───────────────────────────────────────────────────────────── */
.logo-upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.5rem;
  text-align: center; cursor: pointer; color: var(--text2); transition: border-color .15s;
}
.logo-upload-zone:hover, .logo-upload-zone.dragging { border-color: var(--accent); color: var(--accent); }
.logo-upload-zone input { display: none; }
.logo-file-chip {
  display: flex; align-items: center; gap: .5rem; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 8px; padding: .4rem .75rem; font-size: .8rem;
}
.logo-file-chip .remove-logo { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .2rem; }

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */
.store-footer { border-top: 1px solid var(--border); text-align: center; padding: 2rem 1.5rem; color: var(--text2); font-size: .85rem; }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Header */
  .header-inner { padding: .6rem 1rem; gap: .5rem; flex-wrap: wrap; }
  .header-nav { order: 3; width: 100%; padding: 0; border-top: 1px solid var(--border); margin-top: .25rem; padding-top: .4rem; }
  .nav-page-btn { padding: .35rem .7rem; font-size: .8rem; }
  .search-bar { max-width: 100%; font-size: .85rem; }
  .header-right { gap: .5rem; }
  .cart-btn { padding: .4rem .75rem; font-size: .8rem; }

  /* Hero */
  .hero-inner { padding: 2.5rem 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: .875rem; }

  /* Catalogue */
  .catalogue-section { padding: 1rem; }
  .catalogue-inner { flex-direction: column; }
  .filters { width: 100%; position: static; }
  #category-list { flex-direction: row; flex-wrap: wrap; }
  .cat-btn { padding: .3rem .65rem; font-size: .8rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .product-card-body { padding: .6rem; }
  .product-card-name { font-size: .85rem; }
  .product-price { font-size: 1rem; }

  /* Modals plein écran */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%; width: 100%; border-radius: 16px 16px 0 0;
    max-height: 95vh; padding: 1.25rem 1rem;
  }
  .product-detail-modal { max-height: 95vh; border-radius: 16px 16px 0 0; }
  .checkout-modal { border-radius: 16px 16px 0 0; }

  /* Forms */
  .form-row, .form-row-3 { grid-template-columns: 1fr; }

  /* Panier */
  .cart-drawer { width: 100vw; }

  /* Perso */
  .perso-hero-inner { padding: 2rem 1rem; }
  .perso-choice-section { padding: 1.5rem 1rem; }
  .perso-cards { grid-template-columns: 1fr; }
  .perso-form-section { padding: 1rem 1rem 3rem; }
  .perso-form-block { padding: 1rem; }
}
