/* ══════════════════════════════════════════════════════════════
   BURNING BLUE — Cart Drawer + Modales
══════════════════════════════════════════════════════════════ */

/* ── Overlay ────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Cart : modale plein écran verre dépoli (même traitement que le menu) ── */
.cart-drawer {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h,70px) + 34px) clamp(24px,6vw,90px) 40px;
  background: rgba(7,9,16,0.55);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease;
}
.cart-drawer.open { opacity: 1; pointer-events: auto; }
.cart-drawer-header {
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 22px; border-bottom: none; flex-shrink: 0;
  max-width: 640px; width: 100%; margin: 0 auto;
}
.cart-drawer-header h3 {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300;
  font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: 0.02em;
}
.cart-drawer-close {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  width: auto; height: auto; border-radius: 0; background: none;
  font-size: 2.4rem; font-weight: 200; line-height: 1; color: #fff;
  padding: 10px; transition: color 0.25s, transform 0.35s;
}
.cart-drawer-close:hover { background: none; color: var(--gold-light); transform: translateX(-50%) rotate(90deg); }
.cart-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 4px 0; display: flex; flex-direction: column; gap: 16px;
  max-width: 640px; width: 100%; margin: 0 auto;
}
.cart-drawer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  gap: 16px;
  padding: 40px;
}
.cart-drawer-empty svg { opacity: 0.2; }
.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}
.cart-item-img {
  width: 72px; height: 72px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.cart-item-detail { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.cart-item-price { font-weight: 800; color: var(--gold-light); font-size: 1rem; margin-top: 8px; }
.cart-item-remove {
  position: absolute;
  top: 12px; right: 12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.07);
  font-size: 0.75rem;
  color: var(--muted);
  transition: all 0.2s;
}
.cart-item-remove:hover { background: rgba(232,85,85,0.2); color: var(--error); }

/* Promo dans le drawer */
.drawer-promo {
  display: flex;
  gap: 8px;
}
.drawer-promo .form-input { flex:1; padding: 10px 14px; font-size: 0.88rem; }

/* Footer du drawer */
.cart-drawer-footer {
  padding: 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.14);
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 12px;
  max-width: 640px; width: 100%; margin: 16px auto 0;
}
.drawer-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-total .label { font-weight: 600; }
.drawer-total .amount { font-weight: 800; font-size: 1.4rem; color: var(--gold-light); }
@keyframes bb-blue-flow { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.drawer-pay-btn {
  width: 100%;
  padding: 17px 24px;
  background: linear-gradient(100deg, var(--blue) 0%, var(--blue-light) 25%, #a9c8ff 50%, var(--blue-light) 75%, var(--blue) 100%);
  background-size: 200% auto;
  color: #fff;
  font-family: 'Outfit', sans-serif; font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
  border-radius: 10px;
  box-shadow: 0 6px 26px rgba(59,111,232,0.4);
  animation: bb-blue-flow 2.8s linear infinite;
  transition: filter 0.2s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.drawer-pay-btn:hover { filter: brightness(1.12); box-shadow: 0 8px 32px rgba(107,159,255,0.6); }
@media (prefers-reduced-motion: reduce) { .drawer-pay-btn { animation: none; } }
.drawer-secure { display:flex;align-items:center;justify-content:center;gap:6px;font-size:0.75rem;color:var(--muted); }

/* ── Modale galerie (lightbox) ──────────────────────────────── */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.gallery-modal.open { opacity: 1; pointer-events: auto; }
.gallery-modal-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 20px;
}
.gallery-modal img {
  max-width: 80vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.gallery-modal-close {
  position: absolute;
  top: -48px; right: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--white);
  transition: background 0.2s;
}
.gallery-modal-close:hover { background: rgba(255,255,255,0.2); }
.gallery-nav-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all 0.2s;
}
.gallery-nav-btn:hover { background: rgba(255,255,255,0.2); }

/* ── Badge panier dans la nav ───────────────────────────────── */
.cart-count-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: var(--blue);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.cart-count-badge.visible { display: flex; }
.nav-cart-btn { position: relative; }

/* ── Modale confirmation commande ───────────────────────────── */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.confirm-modal.open { opacity: 1; pointer-events: auto; }
.confirm-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  transform: scale(0.95);
  transition: transform 0.3s;
}
.confirm-modal.open .confirm-modal-box { transform: scale(1); }
.confirm-modal-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(59,111,232,0.15);
  border: 2px solid rgba(59,111,232,0.4);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.confirm-modal h3 { margin-bottom: 12px; }
.confirm-modal p { color: var(--muted); margin-bottom: 28px; font-size: 0.95rem; line-height: 1.7; }
.confirm-modal-actions { display: flex; gap: 12px; }
.confirm-modal-actions .btn { flex: 1; }

/* ── Page produit ───────────────────────────────────────────── */
.product-page { padding-top: calc(var(--nav-h) + 60px); }
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 80px;
}
@media(max-width:900px){ .product-hero { grid-template-columns: 1fr; } }
.product-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg2);
  cursor: pointer;
  position: relative;
}
.product-gallery-main::after {
  content: '⤢';
  position: absolute;
  bottom: 16px; right: 16px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.2s;
}
.product-gallery-main:hover::after { opacity: 1; }
.product-gallery-main video,
.product-gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
}
.product-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 72px; height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.gallery-thumb.active { border-color: var(--blue); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding-top: 8px; }
.product-collection-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.product-name { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.product-desc { color: var(--muted); line-height: 1.8; margin-bottom: 28px; }
.product-specs {
  margin-bottom: 28px;
}
.product-specs li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.product-specs li::before { content: '—'; color: var(--blue); font-weight: 700; }
.add-to-cart-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--blue), #5b8fff);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(59,111,232,0.4);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.add-to-cart-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(59,111,232,0.6); }
.add-to-cart-btn:disabled { opacity:0.5; cursor:not-allowed; transform:none; }

/* ── Toast notification ─────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s;
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.success { border-color: var(--success); }
.toast.success::before { content: '✓'; color: var(--success); }
