/* ============================================
   WELY EXPRESS - DETAIL PRODUIT  STYLE
   Refonte complète 2026 - Inspiré d'
   ============================================ */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Couleurs Wely (conservées) */
  --wely-primary: #10b981;
  --wely-primary-dark: #059669;
  --wely-secondary: #3b82f6;
  --wely-accent: #f59e0b;
  
  /* Couleurs sémantiques */
  --detail-success: #10b981;
  --detail-danger: #ef4444;
  --detail-warning: #f59e0b;
  --detail-info: #3b82f6;
  
  /* Backgrounds */
  --detail-bg-primary: #ffffff;
  --detail-bg-secondary: #f9fafb;
  --detail-bg-tertiary: #f3f4f6;
  
  /* Textes */
  --detail-text-primary: #111827;
  --detail-text-secondary: #6b7280;
  --detail-text-tertiary: #9ca3af;
  
  /* Borders */
  --detail-border: #e5e7eb;
  --detail-border-light: #f3f4f6;
  
  /* Shadows */
  --detail-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --detail-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --detail-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --detail-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --detail-shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.2);
  
  /* Radius */
  --detail-radius-sm: 6px;
  --detail-radius-md: 10px;
  --detail-radius-lg: 14px;
  --detail-radius-xl: 20px;
  --detail-radius-full: 9999px;
  
  /* Transitions */
  --detail-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --detail-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --detail-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
#view-produit-detail {
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  min-height: 100vh;
  padding-bottom: 80px; /* Espace pour sticky footer mobile */
}

#view-produit-detail.dark {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
}

/* ===== HEADER STICKY ===== */
.produit-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--detail-border);
  padding: 12px 16px;
  transition: all var(--detail-transition-fast);
}

.dark .produit-header {
  background: rgba(31, 41, 55, 0.95);
  border-bottom-color: #374151;
}

.back-btn,
.share-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--detail-radius-full);
  background: var(--detail-bg-secondary);
  border: 1px solid var(--detail-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--detail-text-primary);
  cursor: pointer;
  transition: all var(--detail-transition-fast);
}

.back-btn:hover,
.share-btn:hover {
  background: var(--detail-bg-primary);
  border-color: var(--detail-primary);
  color: var(--detail-primary);
  transform: translateY(-1px);
  box-shadow: var(--detail-shadow-sm);
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  margin: 0 12px;
  font-size: 13px;
  overflow: hidden;
}

.breadcrumb-item {
  color: var(--detail-text-secondary);
  white-space: nowrap;
}

.breadcrumb-item.active {
  color: var(--detail-text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-separator {
  color: var(--detail-text-tertiary);
  font-size: 11px;
}

/* ===== LAYOUT 2 COLONNES DESKTOP ===== */
.detail-main-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 24px 16px;
}

@media (min-width: 1024px) {
  .detail-main-content {
    grid-template-columns: 420px 1fr;
    gap: 40px;
    padding: 32px 24px;
  }
}

/* ===== GALERIE D'IMAGES - STYLE  ===== */
.galerie-produit-container {
  position: sticky;
  top: 80px;
  background: var(--detail-bg-primary);
  border-radius: var(--detail-radius-lg);
  overflow: hidden;
  box-shadow: var(--detail-shadow-md);
  aspect-ratio: 1 / 1;
  max-height: 500px;
}

@media (min-width: 1024px) {
  .galerie-produit-container {
    position: sticky;
    top: 90px;
    aspect-ratio: 1 / 1.1;
    max-height: 600px;
  }
}

.galerie-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.galerie-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.galerie-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--detail-bg-secondary);
  cursor: pointer;
  position: relative;
}

.galerie-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  user-select: none;
  -webkit-user-drag: none;
}

.galerie-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--detail-text-tertiary);
  font-size: 64px;
}

/* Dots indicateurs */
.galerie-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: var(--detail-radius-full);
}

.galerie-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--detail-radius-full);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--detail-transition-fast);
}

.galerie-dot.active {
  background: var(--detail-primary);
  width: 24px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Counter */
.galerie-counter {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: white;
  padding: 6px 12px;
  border-radius: var(--detail-radius-full);
  font-size: 13px;
  font-weight: 500;
}

/* Badge promo sur image */
.galerie-promo-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 8px 14px;
  border-radius: var(--detail-radius-sm);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--detail-shadow-md);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Miniatures verticales (desktop) */
.galerie-thumbnails {
  display: none;
}

@media (min-width: 1024px) {
  .galerie-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }

  .galerie-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--detail-radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--detail-transition-fast);
    background: var(--detail-bg-secondary);
  }

  .galerie-thumb.active {
    border-color: var(--detail-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  }

  .galerie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ===== PRODUCT INFO COLUMN ===== */
.product-info-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 1024px) {
  .product-info-column {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 8px;
    
    /* Scrollbar personnalisée */
    scrollbar-width: thin;
    scrollbar-color: var(--detail-border) transparent;
  }
  
  .product-info-column::-webkit-scrollbar {
    width: 6px;
  }
  
  .product-info-column::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .product-info-column::-webkit-scrollbar-thumb {
    background: var(--detail-border);
    border-radius: var(--detail-radius-full);
  }
}

/* ===== CATÉGORIE BADGE ===== */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: var(--detail-info);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--detail-radius-full);
  margin-bottom: 12px;
}

.dark .category-badge {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #93c5fd;
}

/* ===== NOM PRODUIT ===== */
.product-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--detail-text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

@media (min-width: 1024px) {
  .product-title {
    font-size: 32px;
  }
}

/* ===== RATING BAR ===== */
.product-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--detail-border);
  margin-bottom: 16px;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 18px;
  color: #fbbf24;
}

.star.empty {
  color: #d1d5db;
}

.rating-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--detail-text-primary);
}

.rating-count {
  font-size: 14px;
  color: var(--detail-text-secondary);
}

.rating-divider {
  width: 1px;
  height: 20px;
  background: var(--detail-border);
}

.rating-source {
  font-size: 13px;
  color: var(--detail-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--detail-success);
  font-size: 12px;
  font-weight: 600;
}

/* ===== PRICING HERO BLOCK ===== */
.pricing-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 2px solid var(--detail-primary);
  border-radius: var(--detail-radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--detail-shadow-sm);
  transition: all var(--detail-transition-base);
}

.dark .pricing-hero {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-color: var(--detail-primary);
}

.pricing-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.pricing-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.price-current {
  font-size: 40px;
  font-weight: 900;
  color: var(--detail-text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.price-original {
  font-size: 20px;
  color: var(--detail-text-tertiary);
  text-decoration: line-through;
  font-weight: 500;
}

.price-discount {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--detail-radius-full);
  border: 1px solid #f59e0b;
}

.dark .price-discount {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  color: #fcd34d;
  border-color: #f59e0b;
}

.price-unit {
  font-size: 14px;
  color: var(--detail-text-secondary);
  font-weight: 500;
}

.pricing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--detail-border);
}

.price-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--detail-text-secondary);
}

.price-meta-item i {
  color: var(--detail-primary);
  font-size: 14px;
}

.savings-calculator {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-radius: var(--detail-radius-md);
  font-size: 13px;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dark .savings-calculator {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #6ee7b7;
}

.savings-calculator strong {
  color: var(--detail-success);
  font-weight: 700;
}

/* ===== TRUST BADGES GRID ===== */
.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 16px;
  background: var(--detail-bg-secondary);
  border-radius: var(--detail-radius-md);
  border: 1px solid var(--detail-border);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--detail-bg-primary);
  border-radius: var(--detail-radius-sm);
  border: 1px solid var(--detail-border-light);
  transition: all var(--detail-transition-fast);
}

.trust-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--detail-shadow-sm);
  border-color: var(--detail-primary);
}

.badge-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--detail-radius-full);
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: var(--detail-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dark .badge-icon {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #6ee7b7;
}

.badge-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--detail-text-primary);
  line-height: 1.2;
}

.badge-subtitle {
  font-size: 10px;
  color: var(--detail-text-secondary);
  line-height: 1.2;
}

/* ===== PRODUCT SPECS QUICK VIEW ===== */
.product-specs-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--detail-bg-primary);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-md);
}

@media (min-width: 1024px) {
  .product-specs-quick {
    grid-template-columns: repeat(4, 1fr);
  }
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--detail-text-tertiary);
  font-weight: 600;
}

.spec-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--detail-text-primary);
}

.spec-value.stock-available {
  color: var(--detail-success);
}

.spec-value.stock-low {
  color: var(--detail-warning);
}

.spec-value.stock-out {
  color: var(--detail-danger);
}

/* ===== VARIANT SELECTOR PRO ===== */
.variant-section {
  background: var(--detail-bg-primary);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-md);
  padding: 16px;
}

.variant-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--detail-text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variant-section-title i {
  color: var(--detail-primary);
}

.variant-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-chip {
  position: relative;
  padding: 10px 16px;
  background: var(--detail-bg-secondary);
  border: 2px solid var(--detail-border);
  border-radius: var(--detail-radius-sm);
  cursor: pointer;
  transition: all var(--detail-transition-fast);
  font-size: 14px;
  font-weight: 500;
  color: var(--detail-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.variant-chip:hover {
  border-color: var(--detail-primary);
  background: var(--detail-bg-primary);
  transform: translateY(-1px);
}

.variant-chip.selected {
  border-color: var(--detail-primary);
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.dark .variant-chip.selected {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #6ee7b7;
}

.variant-chip.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.variant-chip-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--detail-radius-full);
  background: var(--detail-bg-primary);
  color: var(--detail-text-secondary);
  font-weight: 600;
}

/* ===== QUANTITY SELECTOR AVANCÉ ===== */
.quantity-section {
  background: var(--detail-bg-primary);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-md);
  padding: 16px;
}

.quantity-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--detail-text-primary);
  margin-bottom: 12px;
}

.quantity-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--detail-bg-secondary);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-md);
  padding: 8px;
  max-width: 280px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--detail-radius-sm);
  background: var(--detail-bg-primary);
  border: 1px solid var(--detail-border);
  color: var(--detail-text-primary);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--detail-transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qty-btn:hover:not(:disabled) {
  background: var(--detail-primary);
  color: white;
  border-color: var(--detail-primary);
  transform: scale(1.05);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-input {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--detail-text-primary);
  background: transparent;
  border: none;
  outline: none;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.quantity-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--detail-text-secondary);
}

.quantity-meta-item i {
  color: var(--detail-primary);
  font-size: 14px;
}

.quantity-total {
  margin-top: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-radius: var(--detail-radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dark .quantity-total {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

.quantity-total-label {
  font-size: 12px;
  color: #065f46;
  font-weight: 500;
}

.dark .quantity-total-label {
  color: #6ee7b7;
}

.quantity-total-value {
  font-size: 22px;
  font-weight: 800;
  color: #065f46;
}

.dark .quantity-total-value {
  color: #6ee7b7;
}

.quantity-total-unit {
  font-size: 12px;
  color: #047857;
}

.dark .quantity-total-unit {
  color: #6ee7b7;
}

/* ===== CTA BUTTONS GROUP ===== */
.purchase-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

@media (min-width: 1024px) {
  .purchase-actions {
    flex-direction: row;
  }
}

.btn-contact,
.btn-cart,
.btn-buy {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--detail-radius-md);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--detail-transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--detail-shadow-sm);
}

.btn-contact {
  background: var(--detail-bg-secondary);
  color: var(--detail-text-primary);
  border: 2px solid var(--detail-border);
}

.btn-contact:hover {
  background: var(--detail-bg-primary);
  border-color: var(--detail-primary);
  color: var(--detail-primary);
  transform: translateY(-2px);
  box-shadow: var(--detail-shadow-md);
}

.btn-cart {
  background: linear-gradient(135deg, var(--detail-secondary) 0%, #2563eb 100%);
  color: white;
}

.btn-cart:hover {
  transform: translateY(-2px);
  box-shadow: var(--detail-shadow-lg);
}

.btn-buy {
  background: linear-gradient(135deg, var(--detail-primary) 0%, var(--detail-primary-dark) 100%);
  color: white;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: var(--detail-shadow-lg);
}

.btn-contact:active,
.btn-cart:active,
.btn-buy:active {
  transform: translateY(0);
}

/* ===== TABS SECTION ===== */
.product-tabs {
  background: var(--detail-bg-primary);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-lg);
  overflow: hidden;
  margin-top: 24px;
}

.tabs-nav {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 2px solid var(--detail-border);
  background: var(--detail-bg-secondary);
  -ms-overflow-style: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--detail-text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--detail-transition-fast);
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--detail-text-primary);
  background: var(--detail-bg-primary);
}

.tab-btn.active {
  color: var(--detail-primary);
  background: var(--detail-bg-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--detail-primary) 0%, var(--detail-secondary) 100%);
  border-radius: var(--detail-radius-full) var(--detail-radius-full) 0 0;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: var(--detail-primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--detail-radius-full);
  min-width: 20px;
}

.tab-content {
  padding: 24px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== DESCRIPTION ===== */
.description-content {
  color: var(--detail-text-secondary);
  line-height: 1.8;
  font-size: 15px;
}

.description-content p {
  margin-bottom: 16px;
}

.description-content ul,
.description-content ol {
  margin-left: 20px;
  margin-bottom: 16px;
}

.description-content li {
  margin-bottom: 8px;
}

/* ===== CARACTÉRISTIQUES GRID ===== */
.caracteristiques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.caracteristique-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--detail-bg-secondary);
  border-radius: var(--detail-radius-sm);
  border: 1px solid var(--detail-border-light);
}

.caracteristique-label {
  font-size: 13px;
  color: var(--detail-text-secondary);
  font-weight: 500;
}

.caracteristique-value {
  font-size: 14px;
  color: var(--detail-text-primary);
  font-weight: 700;
  text-align: right;
}

/* ===== LIVRAISON SECTION ===== */
.livraison-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--detail-bg-secondary);
  border-radius: var(--detail-radius-sm);
  border: 1px solid var(--detail-border-light);
  margin-bottom: 10px;
}

.livraison-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--detail-radius-full);
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: var(--detail-info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dark .livraison-icon {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #93c5fd;
}

.livraison-content {
  flex: 1;
}

.livraison-type {
  font-size: 14px;
  font-weight: 700;
  color: var(--detail-text-primary);
  margin-bottom: 4px;
}

.livraison-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--detail-text-secondary);
  margin-top: 4px;
}

.livraison-price {
  color: var(--detail-success);
  font-weight: 600;
}

/* ===== AVIS & REVIEWS ===== */
.reviews-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 20px;
  background: var(--detail-bg-secondary);
  border-radius: var(--detail-radius-md);
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .reviews-summary {
    grid-template-columns: 200px 1fr;
  }
}

.reviews-overview {
  text-align: center;
  padding: 20px;
  background: var(--detail-bg-primary);
  border-radius: var(--detail-radius-md);
  border: 1px solid var(--detail-border);
}

.reviews-big-score {
  font-size: 56px;
  font-weight: 900;
  color: var(--detail-text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.reviews-stars-large {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.reviews-total {
  font-size: 14px;
  color: var(--detail-text-secondary);
}

.reviews-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.review-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.review-bar-label {
  width: 40px;
  text-align: right;
  color: var(--detail-text-secondary);
  font-weight: 500;
}

.review-bar-track {
  flex: 1;
  height: 8px;
  background: var(--detail-bg-tertiary);
  border-radius: var(--detail-radius-full);
  overflow: hidden;
}

.review-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: var(--detail-radius-full);
  transition: width var(--detail-transition-slow);
}

.review-bar-count {
  width: 40px;
  text-align: left;
  color: var(--detail-text-secondary);
  font-weight: 600;
}

/* Review Item */
.review-item {
  padding: 16px;
  background: var(--detail-bg-secondary);
  border-radius: var(--detail-radius-md);
  border: 1px solid var(--detail-border-light);
  margin-bottom: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--detail-radius-full);
  background: linear-gradient(135deg, var(--detail-primary) 0%, var(--detail-secondary) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.review-user-info {
  flex: 1;
}

.review-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--detail-text-primary);
  margin-bottom: 2px;
}

.review-date {
  font-size: 12px;
  color: var(--detail-text-tertiary);
}

.review-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.review-comment {
  color: var(--detail-text-secondary);
  line-height: 1.6;
  font-size: 14px;
  margin-bottom: 10px;
}

.review-photos {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.review-photo {
  width: 80px;
  height: 80px;
  border-radius: var(--detail-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--detail-transition-fast);
}

.review-photo:hover {
  transform: scale(1.05);
}

.review-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-actions {
  display: flex;
  gap: 12px;
  font-size: 13px;
}

.review-action-btn {
  background: none;
  border: none;
  color: var(--detail-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--detail-transition-fast);
}

.review-action-btn:hover {
  color: var(--detail-primary);
}

/* ===== FAQ ACCORDION ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--detail-bg-secondary);
  border: 1px solid var(--detail-border-light);
  border-radius: var(--detail-radius-md);
  overflow: hidden;
  transition: all var(--detail-transition-fast);
}

.faq-item:hover {
  border-color: var(--detail-primary);
}

.faq-question {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  color: var(--detail-text-primary);
  font-size: 15px;
  user-select: none;
}

.faq-arrow {
  transition: transform var(--detail-transition-fast);
  color: var(--detail-primary);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-reponse {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--detail-transition-base);
}

.faq-item.open .faq-reponse {
  max-height: 500px;
}

.faq-reponse-inner {
  padding: 0 16px 16px;
  color: var(--detail-text-secondary);
  line-height: 1.7;
  font-size: 14px;
}

/* ===== SELLER CARD ===== */
.seller-card {
  background: var(--detail-bg-primary);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-lg);
  padding: 20px;
  margin-top: 24px;
}

.seller-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.seller-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--detail-radius-md);
  object-fit: cover;
  border: 2px solid var(--detail-border);
}

.seller-logo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--detail-radius-md);
  background: linear-gradient(135deg, var(--detail-primary) 0%, var(--detail-secondary) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.seller-info {
  flex: 1;
}

.seller-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--detail-text-primary);
  margin-bottom: 4px;
}

.seller-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seller-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: var(--detail-info);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--detail-radius-full);
}

.dark .seller-badge {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #93c5fd;
}

.seller-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--detail-bg-secondary);
  border-radius: var(--detail-radius-sm);
}

.seller-stat {
  text-align: center;
}

.seller-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--detail-text-primary);
  margin-bottom: 2px;
}

.seller-stat-label {
  font-size: 11px;
  color: var(--detail-text-secondary);
  line-height: 1.2;
}

.seller-actions {
  display: flex;
  gap: 10px;
}

.btn-seller {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--detail-radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--detail-border);
  background: var(--detail-bg-secondary);
  color: var(--detail-text-primary);
  cursor: pointer;
  transition: all var(--detail-transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-seller:hover {
  background: var(--detail-primary);
  color: white;
  border-color: var(--detail-primary);
  transform: translateY(-1px);
}

/* ===== PRODUCTS RECOMMENDATIONS ===== */
.recommendations-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--detail-border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--detail-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  color: var(--detail-primary);
}

.section-link {
  font-size: 13px;
  color: var(--detail-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: gap var(--detail-transition-fast);
}

.section-link:hover {
  gap: 8px;
}

.products-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.products-scroll::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 180px;
  background: var(--detail-bg-primary);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--detail-transition-base);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--detail-shadow-lg);
  border-color: var(--detail-primary);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--detail-bg-secondary);
  position: relative;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--detail-transition-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.1);
}

.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--detail-text-tertiary);
  font-size: 40px;
}

.product-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--detail-radius-full);
}

.product-card-info {
  padding: 12px;
}

.product-card-name {
  font-size: 13px;
  color: var(--detail-text-primary);
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.product-card-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--detail-success);
  margin-bottom: 4px;
}

.product-card-sales {
  font-size: 11px;
  color: var(--detail-text-tertiary);
}

/* ===== STICKY FOOTER MOBILE ===== */
.detail-footer-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--detail-border);
  padding: 10px 12px;
  z-index: 1000;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.dark .detail-footer-mobile {
  background: rgba(31, 41, 55, 0.95);
  border-top-color: #374151;
}

/* ===== FLOATING FOOTER DESKTOP ===== */
.detail-footer-desktop {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--detail-border);
  border-radius: var(--detail-radius-xl);
  padding: 14px 24px;
  z-index: 1000;
  box-shadow: var(--detail-shadow-xl);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 40px);
}

.dark .detail-footer-desktop {
  background: rgba(31, 41, 55, 0.98);
  border-color: #374151;
}

.footer-price {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.footer-price-label {
  font-size: 11px;
  color: var(--detail-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-price-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--detail-text-primary);
}

.btn-action {
  padding: 10px 18px;
  border-radius: var(--detail-radius-md);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--detail-transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--detail-shadow-md);
}

/* ===== SECTION PARTAGE SOCIAL ===== */
.social-share-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--detail-bg-secondary);
  border-radius: var(--detail-radius-md);
  border: 1px solid var(--detail-border);
  margin-top: 20px;
}

.share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--detail-text-secondary);
  margin-right: 4px;
}

.share-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--detail-radius-full);
  border: 1px solid var(--detail-border);
  background: var(--detail-bg-primary);
  color: var(--detail-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--detail-transition-fast);
}

.share-btn-icon:hover {
  background: var(--detail-primary);
  color: white;
  border-color: var(--detail-primary);
  transform: translateY(-2px);
}

/* ===== LOADING SKELETON ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.dark .skeleton-shimmer {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
}

.skeleton-line {
  height: 16px;
  border-radius: var(--detail-radius-sm);
  margin-bottom: 10px;
}

.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: var(--detail-radius-full);
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--detail-radius-md);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out;
}

/* Animation au scroll avec Intersection Observer */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE FINE-TUNING ===== */
@media (max-width: 640px) {
  .pricing-hero {
    padding: 16px;
  }

  .price-current {
    font-size: 32px;
  }

  .price-original {
    font-size: 16px;
  }

  .trust-badges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .trust-badge {
    padding: 8px;
  }

  .badge-title {
    font-size: 11px;
  }

  .product-tabs {
    border-radius: var(--detail-radius-md);
  }

  .tab-btn {
    padding: 12px 14px;
    font-size: 13px;
  }

  .tab-content {
    padding: 16px;
  }

  .caracteristiques-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== DARK MODE ===== */
.dark #view-produit-detail {
  --detail-bg-primary: #1f2937;
  --detail-bg-secondary: #111827;
  --detail-text-primary: #f9fafb;
  --detail-text-secondary: #d1d5db;
  --detail-text-tertiary: #9ca3af;
  --detail-border: #374151;
  --detail-border-light: #4b5563;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible pour accessibilité */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--detail-primary);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .detail-footer-mobile,
  .detail-footer-desktop,
  .produit-header,
  .sticky-purchase-bar {
    display: none !important;
  }
}