/* ==================================================================
   BLUESTIFT - INFO CARDS SECTION v1.0
   Carousel horizontal avec glassmorphism
   8 cards explicatives sur Bluestift
   ================================================================== */

/* ==========================================
   SECTION CONTAINER
   ========================================== */

.info-cards-section {
  position: relative;
  width: 100%;
  padding: var(--space-20) var(--space-6);
  background: transparent;
  overflow: hidden;
}

.info-cards-container {
  max-width: var(--container-xl);
  margin: 0 auto;
  position: relative;
}

/* ==========================================
   CARDS WRAPPER - HORIZONTAL SCROLL
   ========================================== */

.info-cards-wrapper {
  display: flex;
  flex-direction: row;
  gap: var(--space-6);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: var(--space-6) var(--space-4);

  /* Scroll snap for centered cards */
  scroll-snap-type: x mandatory;
  scroll-padding: 0 calc(50% - 190px); /* Centers the card (380px/2 = 190px) */

  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.info-cards-wrapper::-webkit-scrollbar {
  display: none;
}

/* ==========================================
   INFO CARD - GLASSMORPHISM HORIZONTAL
   ========================================== */

.info-card {
  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-2xl);

  /* Layout */
  min-width: 380px;
  max-width: 380px;
  min-height: 260px;
  padding: var(--space-8) var(--space-6);

  /* Flexbox */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);

  /* Scroll snap */
  scroll-snap-align: center;
  scroll-snap-stop: always;

  /* Effects */
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);

  /* Shadow */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Top gradient line */
.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--color-primary-start), 
    var(--color-primary-mid), 
    var(--color-primary-end)
  );
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

/* Hover effect */
.info-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 
    0 12px 40px rgba(102, 126, 234, 0.25),
    0 24px 72px rgba(102, 126, 234, 0.15);
}

.info-card:hover::before {
  transform: scaleX(1);
}

/* Active card animation (for auto-scroll) */
.info-card.active {
  animation: cardPulse 0.6s ease-out;
}

@keyframes cardPulse {
  0% { 
    transform: scale(1);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.1),
      0 20px 60px rgba(0, 0, 0, 0.08);
  }
  50% { 
    transform: scale(1.02);
    box-shadow: 
      0 12px 40px rgba(102, 126, 234, 0.25),
      0 24px 72px rgba(102, 126, 234, 0.15);
  }
  100% { 
    transform: scale(1);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.1),
      0 20px 60px rgba(0, 0, 0, 0.08);
  }
}

/* ==========================================
   CARD CONTENT
   ========================================== */

.info-card-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: var(--space-2);
  transition: transform var(--transition-base);
}

.info-card:hover .info-card-icon {
  transform: scale(1.1) rotate(5deg);
}

.info-card h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: white;
  margin: 0;
  line-height: var(--line-height-tight);
}

.info-card p {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: white;
  line-height: var(--line-height-relaxed);
  margin: 0;
  opacity: 0.95;
}

/* ==========================================
   NAVIGATION - DOTS (TOP CENTER)
   ========================================== */

.cards-navigation {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.cards-dots {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
}

.cards-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cards-dots .dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.cards-dots .dot.active {
  background: white;
  width: 28px;
  border-color: white;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ==========================================
   NAVIGATION - ARROWS (SIDES)
   ========================================== */

.cards-arrows {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.card-arrow-btn {
  /* Gradient background */
  background: linear-gradient(135deg, 
    var(--color-primary-start) 0%, 
    var(--color-primary-mid) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  
  /* Square shape */
  width: 52px;
  height: 52px;
  
  /* Icon */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  
  /* Effects */
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 
    0 4px 16px rgba(102, 126, 234, 0.3),
    0 8px 24px rgba(102, 126, 234, 0.15);
}

.card-arrow-btn:hover {
  transform: scale(1.08);
  box-shadow: 
    0 6px 20px rgba(102, 126, 234, 0.4),
    0 12px 32px rgba(102, 126, 234, 0.2);
  filter: brightness(1.15);
}

.card-arrow-btn:active {
  transform: scale(0.98);
}

.card-arrow-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.card-arrow-btn i {
  pointer-events: none;
}

/* ==========================================
   DARK MODE OVERRIDES
   ========================================== */

body.dark-theme .info-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .info-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
}

body.dark-theme .info-card h3,
body.dark-theme .info-card p {
  color: rgba(255, 255, 255, 0.95);
}

body.dark-theme .cards-dots .dot {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

body.dark-theme .cards-dots .dot.active {
  background: rgba(255, 255, 255, 0.9);
}

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

/* Tablets */
@media (max-width: 1024px) {
  .info-cards-section {
    padding: var(--space-16) var(--space-4);
  }

  .info-cards-wrapper {
    scroll-padding: 0 calc(50% - 170px); /* Centers the card (340px/2 = 170px) */
  }

  .cards-navigation {
    top: -45px;
  }

  .cards-dots .dot {
    width: 9px;
    height: 9px;
  }

  .cards-dots .dot.active {
    width: 26px;
  }

  .info-card {
    min-width: 340px;
    max-width: 340px;
    min-height: 240px;
    padding: var(--space-6) var(--space-5);
  }

  .info-card-icon {
    font-size: 3rem;
  }

  .info-card h3 {
    font-size: var(--font-size-lg);
  }

  .info-card p {
    font-size: var(--font-size-sm);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .info-cards-section {
    padding: var(--space-12) var(--space-4);
  }

  .info-cards-wrapper {
    scroll-padding: 0 calc(50% - 150px); /* Centers the card (300px/2 = 150px) */
  }

  .info-card {
    min-width: 300px;
    max-width: 300px;
    min-height: 220px;
    padding: var(--space-6) var(--space-4);
  }

  .info-card-icon {
    font-size: 2.5rem;
  }

  .info-card h3 {
    font-size: var(--font-size-lg);
  }

  .info-card p {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
  }

  .cards-navigation {
    top: -40px;
  }

  .cards-dots .dot {
    width: 8px;
    height: 8px;
  }

  .cards-dots .dot.active {
    width: 24px;
  }

  .cards-arrows {
    gap: var(--space-2);
    margin-top: var(--space-4);
  }

  .card-arrow-btn {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .info-cards-wrapper {
    scroll-padding: 0 calc(50% - 140px); /* Centers the card (280px/2 = 140px) */
  }

  .cards-navigation {
    top: -35px;
  }

  .cards-dots {
    gap: var(--space-1);
    padding: var(--space-2);
  }

  .cards-dots .dot {
    width: 7px;
    height: 7px;
  }

  .cards-dots .dot.active {
    width: 20px;
  }

  .info-card {
    min-width: 280px;
    max-width: 280px;
    min-height: 200px;
    padding: var(--space-5) var(--space-4);
  }

  .info-card-icon {
    font-size: 2.2rem;
  }

  .info-card h3 {
    font-size: var(--font-size-base);
  }

  .info-card p {
    font-size: 0.875rem;
  }

  .card-arrow-btn {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  .info-card,
  .info-card-icon,
  .card-arrow-btn,
  .cards-dots .dot {
    transition: none;
    animation: none;
  }

  .info-cards-wrapper {
    scroll-behavior: auto;
  }
}

/* Focus states for keyboard navigation */
.info-card:focus,
.card-arrow-btn:focus,
.cards-dots .dot:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

/* ==========================================
   NOTES D'IMPLEMENTATION
   ========================================== */

/*
  JAVASCRIPT REQUIS :
  
  1. Auto-scroll functionality:
     - setInterval pour changer de card toutes les 5 secondes
     - Smooth scroll vers la prochaine card
     
  2. Navigation dots:
     - Click handler pour chaque dot
     - Update active state
     - Scroll to corresponding card
     
  3. Arrow buttons:
     - Click handlers pour prev/next
     - Disable state aux extremites
     - Smooth scroll animation
     
  4. Touch/Swipe support:
     - Detecter swipe gauche/droite sur mobile
     - Update dots active state en fonction du scroll
     
  EXEMPLE STRUCTURE JS :
  
  const cardsWrapper = document.getElementById('info-cards-wrapper');
  const cards = document.querySelectorAll('.info-card');
  const dots = document.querySelectorAll('.cards-dots .dot');
  
  let currentIndex = 0;
  const autoScrollInterval = 5000; // 5 secondes
  
  function scrollToCard(index) {
    const card = cards[index];
    cardsWrapper.scrollTo({
      left: card.offsetLeft - 20,
      behavior: 'smooth'
    });
    updateDots(index);
  }
  
  function updateDots(index) {
    dots.forEach((dot, i) => {
      dot.classList.toggle('active', i === index);
    });
  }
  
  // Auto-scroll
  setInterval(() => {
    currentIndex = (currentIndex + 1) % cards.length;
    scrollToCard(currentIndex);
  }, autoScrollInterval);
*/