/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100vw; overflow-x: hidden; position: relative; width: 100%; }

:root {
  --primary: #000000;
  --accent: #FF4500;
  --accent-hover: #CC3700;
  --secondary: #1a1a1a;
  --light-bg: #F4F4F4;
  --border: #e0e0e0;
  --text: #333;
  --text-muted: #777;
  --white: #fff;
  --success: #28a745;
  --warning: #ffc107;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 16px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.15);
  --transition: .25s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; overflow-x: hidden; width: 100%; position: relative; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== LAYOUT ===== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.section { padding: 60px 0; }
.section-sm { padding: 40px 0; }

/* ===== GRID ===== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.fw-bold { font-weight: 700; }

/* ===== SECTION TITLE ===== */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: var(--text-muted); font-size: 1rem; }
.section-title::after {
  content: ''; display: block; width: 60px; height: 3px;
  background: var(--accent); margin: 16px auto 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; transition: var(--transition);
  cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(233,69,96,.35); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--white); }
.btn-dark { background: var(--primary); color: var(--white); }
.btn-dark:hover { background: var(--secondary); }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 10px; border-radius: 50%; width: 40px; height: 40px; }

/* ===== HEADER ===== */
.header-top { background: var(--primary); color: rgba(255,255,255,.75); font-size: .82rem; padding: 8px 0; }
.header-main { background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 1000; }
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 0; gap: 16px;
}

/* Logo image */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 48px; width: auto; display: block; }

/* Barre de recherche */
.search-bar { flex: 1; min-width: 0; max-width: 520px; }
.search-bar form { display: flex; border: 2px solid var(--border); border-radius: 50px; overflow: hidden; }
.search-bar input { flex: 1; min-width: 0; border: none; padding: 9px 18px; font-size: .9rem; outline: none; }
.search-bar button { background: var(--accent); color: var(--white); padding: 9px 18px; border: none; cursor: pointer; transition: var(--transition); flex-shrink: 0; }
.search-bar button:hover { background: var(--accent-hover); }

/* Actions header */
.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.header-icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 8px; border-radius: var(--radius);
  color: var(--primary); transition: var(--transition);
}
.header-icon-btn:hover { color: var(--accent); background: var(--light-bg); }
.header-icon-btn svg { width: 24px; height: 24px; display: block; }
.badge {
  position: absolute; top: 2px; right: 2px; background: var(--accent);
  color: var(--white); font-size: .6rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* Hamburger */
.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; cursor: pointer; flex-shrink: 0; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--primary); border-radius: 2px; transition: var(--transition); }

/* ===== NAV DESKTOP ===== */
.nav-main { background: var(--secondary); }
.nav-search { display: none; } /* caché sur desktop */
.nav-list { display: flex; align-items: center; overflow-x: auto; gap: 0; }
.nav-list::-webkit-scrollbar { height: 0; }
.nav-link {
  display: block; padding: 13px 16px; color: rgba(255,255,255,.85);
  font-size: .88rem; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); border-bottom-color: var(--accent); }

/* Bouton fermer offcanvas : caché sur desktop */
.nav-close { display: none; }

/* ===== HERO BANNER ===== */
.hero { position: relative; overflow: hidden; border-radius: 0; }
.hero-slide { position: relative; }
.hero-img { width: 100%; height: clamp(300px, 55vw, 600px); object-fit: cover; }
.hero-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; padding: 40px 60px;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, transparent 65%);
  color: var(--white);
}
.hero-content h1 { font-size: clamp(1.5rem, 4vw, 3rem); margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.hero-content p { font-size: clamp(.95rem, 2vw, 1.2rem); margin-bottom: 28px; opacity: .9; max-width: 480px; }

/* Slider dots */
.slider { position: relative; }
.slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--white); transform: scale(1.3); }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.2); backdrop-filter: blur(4px); border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); color: white; border: 1px solid rgba(255,255,255,.3); }
.slider-nav:hover { background: rgba(255,255,255,.4); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: var(--transition);
  position: relative; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

.product-card__img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--light-bg); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card__img img { transform: scale(1.06); }

.product-card__badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 4px; }
.badge-pill { font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.badge-promo { background: var(--accent); color: var(--white); }
.badge-new { background: var(--success); color: var(--white); }
.badge-featured { background: var(--warning); color: #333; }
.badge-outofstock { background: #999; color: white; }

.product-card__actions { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.product-card__action-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: var(--transition);
  color: var(--text); border: none; cursor: pointer;
}
.product-card__action-btn:hover { background: var(--accent); color: var(--white); transform: scale(1.1); }
.product-card__action-btn.in-wishlist { background: var(--accent); color: var(--white); }
.product-card__action-btn svg { width: 18px; height: 18px; pointer-events: none; }

.product-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.product-card__category { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.product-card__name { font-size: .95rem; font-weight: 600; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price-current { font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.price-original { font-size: .85rem; color: var(--text-muted); text-decoration: line-through; }

.product-card__footer { padding: 0 16px 16px; }
.product-card__add-btn {
  width: 100%; padding: 10px; border-radius: var(--radius); font-weight: 600; font-size: .875rem;
  background: var(--primary); color: var(--white); transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.product-card__add-btn:hover { background: var(--accent); }
.product-card__add-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ===== CATEGORIES GRID ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.cat-card {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--light-bg);
  aspect-ratio: 1; position: relative; cursor: pointer; transition: var(--transition);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover img { transform: scale(1.08); }
.cat-card__label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px 12px 12px; font-weight: 600; font-size: .875rem; color: var(--white);
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  text-align: center;
}

/* ===== BANNERS ===== */
.banner-middle { margin: 40px 0; }
.banner-middle img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; max-height: 250px; }
.banner-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0; }
.banner-pair img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; height: 200px; }

/* ===== PRODUCT DETAIL ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 40px 0; }
/* .product-gallery — pas de styles spécifiques actuellement */
.gallery-main { aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--light-bg); margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 72px; height: 72px; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; border: 2px solid transparent; transition: var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb--video {
  background: var(--light-bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text-muted); font-size: .7rem;
}

.product-info { display: flex; flex-direction: column; gap: 20px; }
.product-info__category { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.product-info__title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.3; }
.product-info__price { display: flex; align-items: baseline; gap: 12px; }
.product-info__price .price-current { font-size: 1.75rem; }
.product-info__price .price-original { font-size: 1rem; }
.discount-badge { background: var(--accent); color: white; padding: 2px 10px; border-radius: 20px; font-size: .8rem; font-weight: 700; }

.product-info__desc { color: var(--text-muted); line-height: 1.7; }

.product-info__variants { display: flex; flex-direction: column; gap: 16px; }
.variant-label { font-weight: 600; margin-bottom: 8px; font-size: .9rem; }
.color-options { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; outline: 2px solid transparent; transition: var(--transition);
}
.color-swatch:hover, .color-swatch.selected { border-color: var(--white); outline-color: var(--primary); }
.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn {
  padding: 8px 16px; border-radius: var(--radius); font-size: .875rem; font-weight: 600;
  border: 2px solid var(--border); background: var(--white); cursor: pointer; transition: var(--transition);
}
.size-btn:hover, .size-btn.selected { border-color: var(--accent); background: var(--accent); color: var(--white); }

.quantity-selector { display: flex; align-items: center; gap: 0; border: 2px solid var(--border); border-radius: var(--radius); width: fit-content; }
.qty-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: var(--transition); }
.qty-btn:hover { background: var(--light-bg); }
.qty-input { width: 52px; height: 40px; text-align: center; border: none; font-size: 1rem; font-weight: 600; outline: none; }

.product-info__cta { display: flex; gap: 12px; }

/* Product tabs */
.product-tabs { margin: 48px 0; }
.tab-list { display: flex; border-bottom: 2px solid var(--border); gap: 0; overflow-x: auto; }
.tab-btn {
  padding: 12px 24px; font-weight: 600; font-size: .95rem; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; transition: var(--transition);
  color: var(--text-muted);
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; padding: 32px 0; }
.tab-panel.active { display: block; }

/* Specifications table */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr:nth-child(even) { background: var(--light-bg); }
.specs-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { font-weight: 600; width: 35%; color: var(--text-muted); }

/* ===== CART ===== */
.cart-page-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.cart-page-count { font-size: 1rem; color: var(--text-muted); font-weight: 400; white-space: nowrap; }

.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; margin: 32px 0 60px; }
.cart-items-col { min-width: 0; }
.cart-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 12px 16px; text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 2px solid var(--border); white-space: nowrap; }
.cart-table td { padding: 16px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-td-img { width: 82px; padding-left: 0 !important; }
.cart-td-subtotal, .cart-td-price { white-space: nowrap; }
.cart-td-remove { padding-right: 0 !important; }
.cart-remove-btn { color: var(--accent); }

.cart-item-img { width: 70px; height: 70px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; display: block; }
.cart-item-img--placeholder { background: var(--light-bg); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.cart-item-name { font-weight: 600; margin-bottom: 4px; display: block; line-height: 1.35; }
.cart-item-variant { font-size: .8rem; color: var(--text-muted); }
.cart-qty-form { display: flex; align-items: center; }

/* Actions bas du tableau */
.cart-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; flex-wrap: wrap; gap: 12px; }
.cart-clear-btn { border: 2px solid #ddd; color: var(--text-muted); background: transparent; border-radius: var(--radius); padding: 12px 24px; font-size: .95rem; font-weight: 600; transition: var(--transition); }
.cart-clear-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Récapitulatif */
.cart-summary { background: var(--light-bg); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 80px; }
.cart-summary h3 { margin-bottom: 20px; }
.summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.summary-line:last-of-type { border: none; }
.summary-line--item { font-size: .875rem; }
.summary-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-item-price, .summary-price { white-space: nowrap; font-weight: 600; flex-shrink: 0; }
.summary-total { font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.delivery-zone-select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .875rem; background: var(--white); color: var(--text); cursor: pointer;
  transition: border-color .2s;
}
.delivery-zone-select:focus { outline: none; border-color: var(--accent); }
.summary-delivery-row { border-bottom: 1px solid var(--border); }
tr.updating { opacity: .5; pointer-events: none; transition: opacity .2s; }


/* ===== CHECKOUT ===== */
.checkout-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.checkout-card-title { margin: 0 0 20px; font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: .88rem; font-weight: 600; }
.form-input, .form-group input, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .9rem; font-family: inherit; transition: border-color .2s; box-sizing: border-box;
}
.form-input:focus, .form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-hint { font-size: .78rem; color: var(--text-muted); }
.form-error { font-size: .8rem; color: #ef4444; margin: 0; }
.req { color: var(--accent); }
/* Zone cards */
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.zone-card { cursor: pointer; border: 2px solid var(--border); border-radius: var(--radius); transition: border-color .2s, background .2s; }
.zone-card:hover { border-color: var(--accent); }
.zone-card.selected { border-color: var(--accent); background: #fff5f2; }
.zone-card-inner { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.zone-card-name { font-weight: 600; font-size: .9rem; }
.zone-card-price { font-size: .9rem; color: var(--accent); font-weight: 700; }
.zone-card-desc { font-size: .75rem; color: var(--text-muted); }
.checkout-submit-mobile { display: none; margin-top: 20px; }
@media (max-width: 768px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .zone-grid { grid-template-columns: 1fr 1fr; }
  .checkout-submit-mobile { display: flex; }
  .checkout-submit-desktop { display: none; }
}
@media (max-width: 480px) {
  .zone-grid { grid-template-columns: 1fr; }
}

/* ===== WISHLIST ===== */
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { opacity: .5; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; flex-wrap: wrap; }
.page-btn {
  width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .9rem; transition: var(--transition);
  border: 2px solid var(--border); color: var(--text);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: var(--white); border-color: var(--accent); }
.page-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ===== FILTERS BAR ===== */
.filters-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--light-bg); border-radius: var(--radius); margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.filters-bar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; background: white; cursor: pointer; }

/* ===== FOOTER ===== */
.footer { background: var(--primary); color: rgba(255,255,255,.8); margin-top: 80px; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 60px 0; }
.footer-brand .logo { color: var(--white); margin-bottom: 16px; }
.footer-brand p { font-size: .9rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { color: var(--white); margin-bottom: 16px; font-size: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .9rem; transition: var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; flex-wrap: wrap; gap: 8px; }

/* Social links */
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-link { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.social-link:hover { background: var(--accent); }
.social-link svg { width: 18px; height: 18px; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state svg { width: 80px; height: 80px; color: var(--border); margin: 0 auto 24px; }
.empty-state h2 { margin-bottom: 12px; }
.empty-state p { color: var(--text-muted); margin-bottom: 32px; }

/* ===== ALERTS / MESSAGES ===== */
.messages-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 360px; width: 100%; }
.alert { padding: 14px 20px; border-radius: var(--radius); font-size: .9rem; font-weight: 500; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; animation: slideIn .3s ease; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--success); }
.alert-error { background: #f8d7da; color: #721c24; border-left: 4px solid var(--accent); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--warning); }
.alert-close { margin-left: auto; cursor: pointer; opacity: .6; }
.alert-close:hover { opacity: 1; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ===== VIDEO ===== */
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-lg); }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* ===== 404 ===== */
.page-404 { text-align: center; padding: 100px 20px; }
.page-404 h1 { font-size: 8rem; color: var(--accent); line-height: 1; font-weight: 900; }
.page-404 h2 { margin: 16px 0; }

/* ===== LOADING ===== */
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ── Tablette (≤1024px) ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  /* Masque col prix unitaire sur tablette */
  .cart-th-price { display: none; }

  /* ── MENU TABLETTE/MOBILE ── */
  .menu-toggle { display: flex; z-index: 9999 !important; pointer-events: auto !important; position: relative; }
  .nav-main {
    position: fixed; top: 0; left: 0;
    width: min(300px, 85vw); height: 100vh;
    background: var(--secondary);
    z-index: 10000 !important; overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 60px 0 32px;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  .nav-main.open { transform: translateX(0); }
  .nav-close { display: flex; position: absolute; top: 15px; right: 15px; z-index: 1101; font-size: 1.5rem; color: #fff; border: none; background: none; }
  .nav-list { flex-direction: column; padding: 0; }
  .nav-link { border-bottom: 1px solid rgba(255,255,255,0.05); padding: 16px 24px; width: 100%; border-left: 4px solid transparent; }
  .nav-link.active { border-left-color: var(--accent); background: rgba(255,255,255,0.03); }
}

/* ── OVERLAY OFFCANVAS (global) ── */
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1099;
}
.nav-overlay.desktop-only { display: inline-block; }
.mobile-only { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }

  /* Header top : 1 ligne centrée */
  .header-top { padding: 4px 0; font-size: .72rem; text-align: center; }
  .header-top .flex-between { flex-direction: column; gap: 0; }

  /* Header principal */
  .header-inner { padding: 8px 0; gap: 8px; }
  .logo-img { height: 36px; }
  .search-bar { display: none; }
  .header-actions { gap: 6px; }

  /* ── Les styles OFFCANVAS sont maintenant gérés dès 1024px ci-dessus ── */
  .nav-main {
    padding: 52px 0 32px;
  }
  .nav-main.open { transform: translateX(0); }

  /* Bouton fermer */
  .nav-close {
    display: flex; position: absolute; top: 10px; right: 12px;
    width: 32px; height: 32px;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); border: none; border-radius: 50%;
    color: var(--white); font-size: .95rem; cursor: pointer;
  }

  /* Recherche dans l'offcanvas */
  .nav-search {
    display: block; padding: 0 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 6px;
  }
  .nav-search form { display: flex; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); overflow: hidden; }
  .nav-search input { flex: 1; min-width: 0; border: none; background: rgba(255,255,255,.08); color: var(--white); padding: 9px 12px; font-size: .9rem; outline: none; }
  .nav-search input::placeholder { color: rgba(255,255,255,.4); }
  .nav-search button { background: var(--accent); color: var(--white); border: none; padding: 9px 12px; cursor: pointer; }

  /* Liens verticaux */
  .nav-list { flex-direction: column; overflow-x: visible; padding: 0; }
  .nav-link {
    padding: 13px 20px; font-size: .95rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    border-left: 3px solid transparent;
  }
  .nav-link.active, .nav-link:hover {
    border-left-color: var(--accent);
    border-bottom-color: rgba(255,255,255,.07);
  }

  /* Grilles */
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Sections */
  .section { padding: 32px 0; }
  .section-sm { padding: 20px 0; }
  .section-title { margin-bottom: 24px; }

  /* Hero */
  .hero-img { height: clamp(200px, 48vw, 320px); }
  .hero-content { padding: 16px 14px; }
  .hero-content h1 { font-size: 1.15rem; margin-bottom: 6px; }
  .hero-content p { font-size: .82rem; margin-bottom: 14px; }
  .btn-lg { padding: 11px 18px; font-size: .9rem; }

  /* Bannières */
  .banner-pair { grid-template-columns: 1fr; }

  /* Détail produit */
  .product-detail { margin: 20px 0; }
  .product-info__cta { flex-wrap: wrap; }
  .product-info__cta .btn-lg { flex: 1; min-width: 150px; }

  /* ── PANIER : Table → Cards verticales (Zéro scroll horizontal) ── */
  .cart-layout { gap: 20px; margin: 16px 0 40px; display: block; width: 100%; }
  .cart-table, .cart-table thead, .cart-table tbody, .cart-table th, .cart-table td, .cart-table tr {
    display: block; width: 100%; min-width: 0; box-sizing: border-box;
  }
  .cart-table thead { display: none; }
  .cart-table tr {
    position: relative !important;
    padding: 16px;
    margin-bottom: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  }
  .cart-table tr.updating {
    opacity: 0.6;
    filter: grayscale(0.5) blur(1px);
    pointer-events: none;
    transition: all 0.3s ease;
  }
  .cart-td-img { width: 80px; flex-shrink: 0; padding: 0 !important; border: none; }
  .cart-td-name { flex: 1; min-width: 160px; padding: 0 !important; border: none; }
  .cart-item-name { font-size: .95rem; font-weight: 600; margin-bottom: 4px; display: block; }
  .cart-item-header-mobile { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; width: 100%; }
  .cart-mobile-remove { flex-shrink: 0; }
  .cart-remove-btn--sm { color: #888; background: var(--light-bg); border: 1px solid var(--border); border-radius: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
  .cart-remove-btn--sm:active { background: #fee2e2; color: #ef4444; }
  
  .cart-td-remove { display: none !important; } /* Masquer l'ancienne colonne */
  
  .cart-item-img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }
  .qty-btn { width: 34px; height: 36px; background: var(--white) !important; border: 1px solid var(--border) !important; }
  .qty-input { width: 40px; height: 36px; border-top: 1px solid var(--border) !important; border-bottom: 1px solid var(--border) !important; }
  /* Récapitulatif */
  .cart-summary { padding: 18px 14px; }
  /* Actions bas de tableau : empilées pleine largeur */
  .cart-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .cart-actions .btn,
  .cart-actions .btn-outline,
  .cart-actions .cart-clear-btn { width: 100%; justify-content: center; text-align: center; }
  .cart-actions form { display: flex; }
  .cart-actions form .cart-clear-btn { flex: 1; }

  /* Footer */
  .footer-main { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
}

/* ── Mobile petit (≤480px) ── */
@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .section { padding: 28px 0; }

  /* Header top masqué sur très petit écran */
  .header-top { display: none; }

  /* Logo encore plus compact */
  .logo { font-size: 1.1rem; }

  /* Grilles : 2 colonnes serrées */
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Cartes produits : textes adaptés */
  .product-card__body { padding: 10px; gap: 6px; }
  .product-card__name { font-size: .85rem; }
  .price-current { font-size: 1rem; }
  .product-card__footer { padding: 0 10px 10px; }
  .product-card__add-btn { padding: 8px; font-size: .8rem; }

  /* CTA produit : colonne */
  .product-info__cta { flex-direction: column; }

  /* Tabs : scrollable */
  .tab-list { overflow-x: auto; }
  .tab-btn { padding: 10px 16px; font-size: .875rem; }

  /* Section title */
  .section-title h2 { font-size: 1.3rem; }

  /* Specs table */
  .specs-table td { padding: 10px 12px; font-size: .875rem; }
  .specs-table td:first-child { width: 40%; }

  /* USP bloc */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Détourage final panier (≤480px) */
  .cart-table tr { padding: 12px; gap: 12px; }
  .cart-td-img { width: 64px; }
  .cart-item-img { width: 64px; height: 64px; }
  .cart-td-name { min-width: 140px; }
  .cart-item-name { font-size: .88rem; }
  .qty-btn { width: 28px; height: 32px; }
  .qty-input { width: 32px; height: 32px; }
  .cart-summary { padding: 16px 12px; }
  .summary-line { font-size: .88rem; }
  .summary-total { font-size: 1.05rem; }
}

/* ===== CART PANEL (slide depuis la droite) ===== */
.cart-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1200;
}
.cart-overlay.active { display: block; }

.cart-panel {
  position: fixed; top: 0; right: 0; height: 100dvh;
  width: min(480px, 100vw);
  background: var(--white); z-index: 1201;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 32px rgba(0,0,0,.12);
  overflow: hidden;
}
.cart-panel.open { transform: translateX(0); }

.cart-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-panel-title {
  font-size: 1.05rem; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.cart-panel-count {
  background: var(--accent); color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
  min-width: 20px; text-align: center;
}
.cart-panel-count:empty { display: none; }
.cart-panel-close {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  background: var(--light-bg); border: none; color: var(--text);
  transition: background .2s;
}
.cart-panel-close:hover { background: var(--border); }

/* Le div wrapper injecté par JS */
#cart-panel-content {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.cart-panel-body {
  flex: 1; overflow: hidden; display: flex; flex-direction: column;
  padding: 0; min-height: 0;
}
.cp-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Articles */
.cart-panel-items { padding: 12px 20px; display: flex; flex-direction: column; gap: 14px; }

.cp-item {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start;
}
.cp-item-img { width: 72px; height: 72px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.cp-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cp-item-img-placeholder { width: 100%; height: 100%; background: var(--light-bg); }
.cp-item-info { display: flex; flex-direction: column; gap: 3px; }
.cp-item-name { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.cp-item-variant { font-size: .75rem; color: var(--text-muted); }
.cp-item-row {
  display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap;
}
.cp-qty .qty-btn { width: 28px; height: 28px; font-size: 1rem; }
.cp-qty .qty-input { width: 34px; height: 28px; font-size: .85rem; }
.cp-item-subtotal { font-size: .88rem; font-weight: 700; color: var(--accent); flex: 1; text-align: right; }
.cp-remove-form { margin: 0; }
.cp-remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px; display: flex; align-items: center;
  transition: color .2s;
}
.cp-remove-btn:hover { color: #ef4444; }

/* Séparateur */
.cp-divider { height: 1px; background: var(--border); margin: 0 20px; flex-shrink: 0; }

/* Section */
.cp-section { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.cp-section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 0 0 4px; }

/* Inputs */
.cp-input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .88rem; font-family: inherit;
  box-sizing: border-box; transition: border-color .2s; background: var(--white);
}
.cp-input:focus { outline: none; border-color: var(--accent); }

/* Zones */
.cp-zones { display: flex; flex-direction: column; gap: 6px; }
.cp-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 34px; cursor: pointer;
}

/* Footer totaux */
.cp-footer {
  padding: 14px 20px 20px; border-top: 2px solid var(--border);
  flex-shrink: 0; background: var(--white);
  box-shadow: 0 -4px 12px rgba(0,0,0,.06);
}
.cp-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .9rem; padding: 5px 0;
}
.cp-total-final { font-size: 1.1rem; font-weight: 800; color: var(--accent); padding-top: 10px; border-top: 2px solid var(--text); margin-top: 4px; }

/* Panier vide */
.cp-empty { align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 48px 20px; }
.cp-empty p { color: var(--text-muted); margin: 0; }

