/* ==========================================================================
   EEI - Page Produits (produits.css) - Figma Design Update
   ========================================================================== */

/* ── HERO BANNER ── */
.produits-hero {
  position: relative;
  background: linear-gradient(
    105deg,
    rgba(6, 19, 41, 0.97) 0%,
    rgba(10, 31, 68, 0.92) 55%,
    rgba(10, 31, 68, 0.80) 100%
  ), url('../assets/images/tableau_electrique_industriel.webp') center/cover no-repeat;
  color: #FFFFFF;
  padding: 100px 0 80px;
  overflow: hidden;
}

.produits-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(255, 184, 0, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.produits-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-badge-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.30);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 20px;
}

.badge-dot {
  font-size: 1.1rem;
  line-height: 0;
}

.produits-hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.text-gold {
  color: var(--accent-gold);
}

.produits-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Breadcrumb */
.hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.hero-breadcrumb a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.hero-breadcrumb a:hover {
  color: #FFFFFF;
}

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.35);
}

/* ── STATS BAND GOLD (FIGMA) ── */
.produits-stats-band {
  background-color: var(--accent-gold);
  padding: 28px 0;
}

.produits-stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
}

.produits-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: 6px 30px;
}

.produits-stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.produits-stat-label {
  font-size: 0.82rem;
  color: var(--primary-navy);
  font-weight: 500;
  opacity: 0.85;
}

.produits-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(10, 31, 68, 0.2);
  flex-shrink: 0;
}

/* ── MAIN PRODUITS SECTION ── */
.produits-main {
  padding: 70px 0 80px;
  background: var(--bg-light);
}

/* Intro text */
.produits-intro {
  text-align: center;
  margin-bottom: 50px;
}

.produits-intro-text {
  font-size: 1rem;
  color: var(--text-body);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Grid Layout */
.produits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 70px;
}

/* ── PRODUIT CARD ── */
.produit-card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.produit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(10, 31, 68, 0.15);
  border-color: rgba(255, 184, 0, 0.4);
}

/* Image Container with Overlay */
.produit-card-img {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #F0F4F8;
}

.produit-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.produit-card:hover .produit-card-img img {
  transform: scale(1.07);
}

/* Hover Overlay */
.produit-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 19, 41, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.produit-card:hover .produit-card-overlay {
  opacity: 1;
}

.produit-overlay-btn {
  transform: translateY(8px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.produit-card:hover .produit-overlay-btn {
  transform: translateY(0);
}

/* Card Body */
.produit-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.produit-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1.3;
  margin: 0;
}

.produit-card-desc {
  font-size: 0.84rem;
  color: var(--text-body);
  line-height: 1.5;
  flex: 1;
  margin: 0;
}

/* Small Button Variant */
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 20px;
  background-color: var(--accent-gold);
  color: var(--primary-navy-dark);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.btn-sm:hover {
  background-color: var(--accent-gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.35);
}

/* ── CTA SECTION ── */
.produits-cta {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-dark) 100%);
  border-radius: 20px;
  padding: 56px 48px;
  text-align: center;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.produits-cta::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 20px;
  background: rgba(255, 184, 0, 0.06);
}

.produits-cta-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.produits-cta-desc {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── GALLERY MODAL (preserved) ── */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-modal.open {
  opacity: 1;
  visibility: visible;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 19, 41, 0.85);
  backdrop-filter: blur(4px);
}

.gallery-modal-panel {
  position: relative;
  z-index: 1;
  background: #FFFFFF;
  border-radius: 16px;
  width: 92vw;
  max-width: 1000px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { transform: scale(0.93) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.gallery-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 18px;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  background: #FFFFFF;
  z-index: 1;
}

.gallery-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin: 0;
}

.gallery-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: #F1F5F9;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.gallery-modal-close:hover {
  background: #E2E8F0;
}

.gallery-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 28px;
}

.gallery-img-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gallery-img-item:hover {
  border-color: var(--accent-gold);
  transform: scale(1.02);
}

.gallery-img-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* ── LIGHTBOX (preserved) ── */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 20px;
}

.gallery-lightbox.open {
  display: flex;
}

.lightbox-img-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 85vw;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-caption {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
}

.lightbox-nav {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #FFFFFF;
  font-size: 2.5rem;
  width: 52px;
  height: 52px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.lightbox-nav:hover {
  background: rgba(255, 184, 0, 0.3);
  color: var(--accent-gold);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 184, 0, 0.3);
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .produits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .produits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .produits-hero-title {
    font-size: 2.4rem;
  }
  .gallery-modal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .produits-grid {
    grid-template-columns: 1fr;
  }
  .produits-hero-title {
    font-size: 2rem;
  }
  .produits-hero {
    padding: 70px 0 50px;
  }
  .produits-cta {
    padding: 36px 24px;
  }
  .produits-cta-title {
    font-size: 1.5rem;
  }
  .gallery-modal-grid {
    grid-template-columns: 1fr;
  }
}
