/* R17 Shop — Blanc / Noir / Gris — Sobre & Dynamique */
:root {
  --noir: #0d0d0d;
  --blanc: #ffffff;
  --gris-bg: #f8f8f8;
  --gris-light: #efefef;
  --gris-border: #e0e0e0;
  --gris-mid: #aaaaaa;
  --gris-dark: #555555;
  --texte: #0d0d0d;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-weight: 400; color: var(--texte); background: var(--blanc); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── HEADER ── */
.site-header { position: sticky; top: 0; z-index: 100; background: #ffffff !important; border-bottom: 1px solid var(--gris-border); }
.header-logo-bar { position: relative; display: flex; justify-content: center; align-items: center; padding: 10px 32px; max-width: 1320px; margin: 0 auto; background: #fff; }
.logo { display: flex; justify-content: center; align-items: center; }
.logo-img { max-height: 60px; width: auto; display: block; }
.main-nav { display: flex; justify-content: center; gap: 0; border-top: 1px solid var(--gris-border); background: #fff; flex-wrap: wrap; }
.main-nav a { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--texte); padding: 11px 18px; text-transform: uppercase; letter-spacing: 1px; border: 2px solid transparent; transition: background 0.15s, color 0.15s, border-color 0.15s; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { background: var(--noir); color: #fff; border-color: var(--noir); }
.main-nav a.nav-promo { color: #ff2d78; }
.main-nav a.nav-promo:hover, .main-nav a.nav-promo.active { background: #ff2d78; border-color: #ff2d78; color: #fff; }
/* Accueil séparé visuellement */
.main-nav a.nav-accueil { margin-right: 20px; border-right: 2px solid var(--gris-border); padding-right: 20px; }
.main-nav a.nav-accueil:hover { border-right-color: var(--noir); }
/* Liens hors boutique (blog, galerie…) */
.main-nav a.nav-ext { margin-left: 0; color: var(--gris-dark); }
.main-nav .nav-ext-first { border-left: 2px solid var(--gris-border); margin-left: 16px; }
/* Dropdown "Et + ..." */
.nav-dropdown { position: relative; display: flex; align-items: stretch; }
.nav-dropdown-trigger { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--gris-dark); background: none; border: none; padding: 11px 18px; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s; border: 2px solid transparent; }
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.open .nav-dropdown-trigger { background: var(--noir); color: #fff; border-color: var(--noir); }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 210px; background: #fff; border: 2px solid var(--noir); box-shadow: 4px 4px 0 rgba(0,0,0,0.08); z-index: 200; flex-direction: column; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { padding: 12px 18px; font-family: var(--font-display); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--texte); border-bottom: 1px solid var(--gris-border); transition: background 0.12s, color 0.12s; white-space: nowrap; }
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: var(--noir); color: #fff; }
.cart-btn { display: flex; align-items: center; gap: 6px; color: var(--noir); background: transparent; padding: 7px 14px; border: 1px solid var(--gris-border); border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: background 0.15s, color 0.15s, border-color 0.15s; flex-shrink: 0; }
.cart-btn:hover { background: var(--noir); color: #fff; border-color: var(--noir); }
.cart-count { background: var(--noir); color: var(--blanc); border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }

/* ── MAIN ── */
.site-main { min-height: 60vh; }

/* ── CAT HERO ── */
.cat-hero { background: var(--blanc); border-bottom: 1px solid var(--gris-border); padding: 36px 32px 28px; }
.cat-hero--promo { background: #ff2d78 !important; border-bottom-color: #ff2d78 !important; }
.cat-hero--promo h1 { color: #fff !important; }
.cat-hero--promo p { color: rgba(255,255,255,0.85) !important; }
.cat-hero-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: baseline; gap: 16px; }
.cat-hero h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 4vw, 56px); text-transform: uppercase; line-height: 1; letter-spacing: -1px; }
.cat-hero p { color: var(--gris-mid); font-size: 14px; font-weight: 400; margin-top: 0; }

/* ── FILTRES ── */
.cat-filters { background: var(--blanc); border-bottom: 1px solid var(--gris-border); padding: 0 32px; overflow-x: auto; }
.cat-filters-inner { max-width: 1320px; margin: 0 auto; display: flex; }
.cat-filter-btn { font-size: 13px; font-weight: 500; padding: 13px 16px; color: var(--gris-dark); border: none; background: none; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; transition: color 0.15s, border-color 0.15s; letter-spacing: 0.2px; }
.cat-filter-btn:hover { color: var(--texte); }
.cat-filter-btn.active { color: var(--texte); border-bottom-color: var(--texte); font-weight: 600; }

/* ── GRILLE PRODUITS ── */
.products-section { max-width: 1320px; margin: 0 auto; padding: 36px 32px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0; background: var(--blanc); border: 1px solid var(--gris-border); }
.product-card { border-right: 1px solid var(--gris-border); border-bottom: 1px solid var(--gris-border); }
.product-card { background: var(--blanc); overflow: hidden; transition: background 0.15s; cursor: pointer; }
.product-card:hover { background: var(--gris-bg); }
.product-card-img { aspect-ratio: 1; overflow: hidden; background: var(--gris-bg); position: relative; display: flex; align-items: center; justify-content: center; padding: 24px; transition: background 0.15s; }
.product-card:hover .product-card-img { background: var(--gris-light); }
.product-card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s cubic-bezier(.25,.46,.45,.94); }
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-ribbon { position: absolute; top: 0; right: 0; background: var(--texte); color: var(--blanc); font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 10px; }
.product-card-body { padding: 16px 20px 20px; border-top: 1px solid var(--gris-border); }
.product-card-name { font-weight: 500; font-size: 14px; line-height: 1.35; margin-bottom: 10px; color: var(--texte); }
.product-card-price { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.5px; }
.product-card-price .compare { font-size: 14px; font-weight: 400; color: var(--gris-mid); text-decoration: line-through; margin-left: 6px; font-family: var(--font-body); }
.price--promo { color: #ff2d78 !important; }
.price--promo .compare { color: #999; font-weight: 400; font-size: .85em; }
.product-card-stock { font-size: 11px; margin-top: 5px; color: var(--gris-mid); letter-spacing: 0.2px; }
.product-card-stock.out { color: #999; }
.out-of-stock { opacity: 0.45; }

/* ── FICHE PRODUIT ── */
.product-page { max-width: 1200px; margin: 0 auto; padding: 48px 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.product-gallery { position: sticky; top: 76px; }
.product-main-img { aspect-ratio: 1; background: var(--gris-bg); border: 1px solid var(--gris-border); display: flex; align-items: center; justify-content: center; padding: 48px; }
.product-main-img img { max-height: 400px; object-fit: contain; }
.no-image { font-family: var(--font-display); font-size: 48px; font-weight: 900; color: var(--gris-border); letter-spacing: -2px; }
.product-info { padding-top: 0; }
.breadcrumb { font-size: 12px; color: var(--gris-mid); margin-bottom: 24px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: var(--texte); }
.breadcrumb span { opacity: 0.4; }
.product-name { font-family: var(--font-display); font-weight: 900; font-size: clamp(28px, 3vw, 44px); text-transform: uppercase; line-height: 1; letter-spacing: -1px; margin-bottom: 24px; }
.product-price-block { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--gris-border); }
.product-price { font-family: var(--font-display); font-weight: 900; font-size: 36px; letter-spacing: -1px; }
.product-compare { font-size: 18px; color: var(--gris-mid); text-decoration: line-through; margin-left: 10px; font-weight: 400; }
.price-note { font-size: 12px; color: var(--gris-mid); margin-top: 6px; }
.product-desc { font-size: 14px; line-height: 1.8; color: var(--gris-dark); margin-bottom: 32px; }
.product-desc p { margin-bottom: 10px; }
.product-desc ul { padding-left: 16px; }
.option-group { margin-bottom: 20px; }
.option-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; color: var(--gris-dark); }
.option-group select { width: 100%; padding: 11px 14px; border: 1px solid var(--gris-border); border-radius: var(--radius); font-family: var(--font-body); font-size: 14px; background: var(--blanc); cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; transition: border-color 0.15s; }
.option-group select:focus { outline: none; border-color: var(--texte); }
.qty-block { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.qty-block label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gris-dark); }
.qty-input { display: flex; align-items: center; border: 1px solid var(--gris-border); border-radius: var(--radius); overflow: hidden; }
.qty-input button { width: 38px; height: 38px; background: var(--gris-bg); border: none; font-size: 18px; cursor: pointer; transition: background 0.15s; line-height: 1; }
.qty-input button:hover { background: var(--gris-light); }
.qty-input input { width: 50px; height: 38px; text-align: center; border: none; font-size: 15px; font-family: var(--font-body); background: var(--blanc); }
.btn-add-cart { width: 100%; background: var(--texte); color: var(--blanc); border: none; padding: 16px 24px; font-family: var(--font-body); font-weight: 600; font-size: 14px; letter-spacing: 0.5px; cursor: pointer; border-radius: var(--radius); transition: opacity 0.15s; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
.btn-add-cart:hover { opacity: 0.85; }
.btn-add-cart:disabled { background: var(--gris-light); color: var(--gris-mid); cursor: not-allowed; opacity: 1; }
.stock-info { margin-top: 14px; font-size: 12px; color: var(--gris-mid); display: flex; align-items: center; gap: 7px; }
.stock-dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf50; flex-shrink: 0; }
.stock-dot.out { background: var(--gris-mid); }

/* ── PANIER ── */
.cart-page { max-width: 1100px; margin: 0 auto; padding: 48px 32px; display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.cart-title { font-family: var(--font-display); font-weight: 900; font-size: 36px; text-transform: uppercase; letter-spacing: -1px; margin-bottom: 32px; }
.cart-items { display: flex; flex-direction: column; }
.cart-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--gris-border); }
.cart-item:first-child { border-top: 1px solid var(--gris-border); }
.cart-item-img { width: 76px; height: 76px; background: var(--gris-bg); display: flex; align-items: center; justify-content: center; padding: 8px; }
.cart-item-img img { object-fit: contain; width: 100%; height: 100%; }
.cart-item-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.cart-item-opts { font-size: 12px; color: var(--gris-mid); margin-top: 2px; }
.cart-item-price { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-align: right; letter-spacing: -0.5px; white-space: nowrap; }
.cart-item-remove { font-size: 11px; color: var(--gris-mid); background: none; border: none; cursor: pointer; text-decoration: underline; margin-top: 6px; display: block; letter-spacing: 0.2px; }
.cart-item-remove:hover { color: var(--texte); }
.cart-summary { background: var(--gris-bg); padding: 28px; position: sticky; top: 76px; }
.cart-summary h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 24px; color: var(--gris-dark); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 12px; color: var(--gris-dark); }
.summary-row.total { border-top: 1px solid var(--gris-border); padding-top: 16px; margin-top: 8px; font-weight: 700; font-size: 18px; color: var(--texte); font-family: var(--font-display); letter-spacing: -0.5px; }
.btn-checkout { width: 100%; margin-top: 20px; background: var(--texte); color: var(--blanc); border: none; padding: 15px; font-family: var(--font-body); font-weight: 600; font-size: 14px; letter-spacing: 0.5px; cursor: pointer; border-radius: var(--radius); transition: opacity 0.15s; }
.btn-checkout:hover { opacity: 0.85; }

/* ── TOAST ── */
.toast { position: fixed; bottom: 28px; right: 28px; background: var(--texte); color: var(--blanc); padding: 13px 20px; border-radius: var(--radius); font-size: 13px; font-weight: 500; transform: translateY(60px); opacity: 0; transition: transform 0.25s cubic-bezier(.25,.46,.45,.94), opacity 0.25s; z-index: 1000; }
.toast.show { transform: translateY(0); opacity: 1; }

/* ── FOOTER ── */
.site-footer { background: var(--texte); margin-top: 24px; padding: 52px 32px 0; }
.footer-inner { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-brand p { color: rgba(255,255,255,0.35); font-size: 13px; margin-top: 12px; line-height: 1.7; }
.footer-links h4, .footer-social h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.footer-links a, .footer-social a { display: block; color: rgba(255,255,255,0.4); font-size: 13px; margin-bottom: 10px; transition: color 0.15s; }
.footer-links a:hover, .footer-social a:hover { color: var(--blanc); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 0; text-align: center; color: rgba(255,255,255,0.2); font-size: 12px; max-width: 1320px; margin: 0 auto; }

/* ── MISC ── */
.empty-state { text-align: center; padding: 100px 24px; }
.empty-state h2 { font-family: var(--font-display); font-weight: 900; font-size: 32px; text-transform: uppercase; letter-spacing: -1px; margin-bottom: 12px; }
.empty-state p { color: var(--gris-mid); margin-bottom: 28px; font-size: 14px; }
.btn-primary { display: inline-block; background: var(--texte); color: var(--blanc); padding: 12px 28px; font-weight: 600; font-size: 13px; letter-spacing: 0.5px; border-radius: var(--radius); transition: opacity 0.15s; }
.btn-primary:hover { opacity: 0.8; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .main-nav { display: none; }
}
@media (max-width: 768px) {
  .cat-hero { padding: 28px 16px 20px; }
  .cat-hero-inner { flex-direction: column; gap: 4px; }
  .cat-filters { padding: 0 16px; }
  .products-section { padding: 24px 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .product-page { grid-template-columns: 1fr; gap: 32px; padding: 24px 16px; }
  .product-gallery { position: static; }
  .cart-page { grid-template-columns: 1fr; padding: 24px 16px; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-footer { padding: 40px 16px 0; margin-top: 24px; }
}

/* ── WHATSAPP BTN ── */
.whatsapp-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  color: #666;
  transition: color 0.15s;
}
.whatsapp-btn:hover { color: #25d366; }
.atelier-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  color: #666;
  transition: color 0.15s;
}
.atelier-btn:hover { color: var(--noir); }

/* ── HEADER ACTIONS ── */
.header-actions { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 4px; }

/* ── WISHLIST header ── */
.wishlist-hdr-btn { position: relative; display: flex; align-items: center; padding: 0 6px; text-decoration: none; color: inherit; }
.wishlist-count { position: absolute; top: -4px; right: 0; min-width: 16px; height: 16px; background: #ff2d78; color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px; line-height: 1; }

/* ── WISHLIST product button ── */
.btn-wishlist { display: flex; align-items: center; justify-content: center; width: 48px; flex-shrink: 0; border: 2px solid var(--gris-border); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.btn-wishlist:hover { border-color: #ff2d78; background: #fff5f8; }
.btn-wishlist svg { transition: fill .2s, stroke .2s; }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; gap: 5px; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--noir);
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV ── */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 2px solid var(--noir);
}
.mobile-nav.open {
  display: flex;
  position: fixed;
  top: 57px; /* override par JS via getBoundingClientRect */
  left: 0; right: 0; bottom: 0;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 150;
}
.mobile-nav a {
  padding: 10px 20px;
  color: var(--texte);
  font-size: 13px; font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.8px;
  border-bottom: 1px solid var(--gris-border);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.mobile-nav a:hover { color: #fff; background: var(--noir); }
.mobile-nav a.nav-cat { background: var(--noir); color: #fff; }
.mobile-nav a.nav-cat:hover { background: #333; color: #fff; }
.mobile-nav a.nav-promo { background: #ff2d78; color: #fff; }
.mobile-nav a.nav-promo:hover { background: #e0206a; color: #fff; }

/* ── FOOTER LINKS - plus visibles ── */
.footer-links a, .footer-social a {
  color: rgba(255,255,255,0.6) !important;
}
.footer-links a:hover, .footer-social a:hover { color: var(--blanc) !important; }
.footer-links h4, .footer-social h4 { color: rgba(255,255,255,0.85) !important; }
.footer-brand p { color: rgba(255,255,255,0.5) !important; }

/* ── DESKTOP TEXT SIZES ── */
.product-card-name { font-size: 15px !important; }
.product-card-price { font-size: 20px !important; }
.cat-hero h1 { font-size: clamp(40px, 5vw, 64px) !important; }
.product-name { font-size: clamp(32px, 3.5vw, 48px) !important; }
.product-price { font-size: 38px !important; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .main-nav { display: none !important; }
  .hamburger { display: flex !important; }
  /* .mobile-nav visible uniquement via .open (display:flex dans .mobile-nav.open) */
  .whatsapp-btn { display: none; }
  .header-actions { position: static !important; transform: none !important; }
  .header-logo-bar { padding: 10px 16px; justify-content: space-between; background: #ffffff !important; }
  .logo-img { max-height: 49px; }
}
