/* ========================================
   CORRECTIONS MOBILE RESPONSIVE
   ======================================== */

/* 1. FIX SECTION #OFFRES - CAROUSEL PRICING CARDS */
@media (max-width: 768px) {
  /* Carousel wrapper - Remove 3D effect on mobile */
  .carousel-wrapper {
    min-height: auto !important;
    padding: 30px 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Carousel container - Horizontal scroll */
  .carousel-3d {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 15px !important;
    padding: 0 20px !important;
    max-width: none !important;
    width: auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Pricing cards - Fixed width for scroll */
  .carousel-3d > *,
  .pricing-card {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    scroll-snap-align: center !important;
    transform: none !important;
    opacity: 1 !important;
  }

  /* Remove 3D transforms on mobile */
  .pricing-card {
    transform: none !important;
  }

  .pricing-card:hover {
    transform: translateY(-5px) !important;
  }

  /* Adjust pricing card content for mobile */
  .plan-icon {
    font-size: 1.6rem !important;
  }

  .plan-name {
    font-size: 1.2rem !important;
  }

  .price-amount {
    font-size: 1.8rem !important;
  }

  .features-list li {
    font-size: 11px !important;
    padding: 8px 10px !important;
  }

  .cta-button {
    padding: 12px 20px !important;
    font-size: 13px !important;
  }

  /* Hide carousel controls on mobile */
  .carousel-controls {
    display: none !important;
  }

  /* Carousel instruction - Show scroll hint */
  .carousel-instruction {
    font-size: 12px !important;
    padding: 15px 10px !important;
  }
}

/* 2. FIX CHATBOT - POSITION MOBILE */
@media (max-width: 768px) {
  /* Chatbot button - Better position on mobile */
  .iptv-btn {
    right: 20px !important;
    bottom: 20px !important;
    width: 60px !important;
    height: 60px !important;
    z-index: 99999 !important;
  }

  /* Chatbot box - Full screen on mobile */
  .iptv-box {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .iptv-header {
    border-radius: 0 !important;
  }

  .iptv-input-zone {
    border-radius: 0 !important;
  }
}

/* 3. FIX PAGES LÉGALES - MENU BURGER */
/* Ces styles seront appliqués aux pages mentions-legales, cgv, politique-confidentialite, politique-remboursement */

/* Header avec menu burger pour pages légales */
.legal-page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 2px solid rgba(139, 92, 246, 0.3);
  padding: 14px 0;
}

.legal-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.legal-page-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.legal-page-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #8b5cf6;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

/* Desktop menu */
.legal-page-menu {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-page-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.legal-page-menu li a:hover {
  color: #8b5cf6;
}

/* Mobile menu toggle */
.legal-mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.legal-mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-radius: 3px;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.legal-mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.legal-mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.legal-mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* Mobile menu */
.legal-mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 2px solid rgba(139, 92, 246, 0.3);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 99;
}

.legal-mobile-menu.active {
  max-height: 80vh;
  overflow-y: auto;
}

.legal-mobile-menu ul {
  list-style: none;
  padding: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.legal-mobile-menu ul li a {
  display: block;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
}

.legal-mobile-menu ul li a:hover {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15));
  transform: translateX(5px);
  border-left: 3px solid #8b5cf6;
}

/* Show mobile menu on small screens */
@media (max-width: 768px) {
  .legal-page-menu {
    display: none !important;
  }

  .legal-mobile-menu-toggle {
    display: flex !important;
  }

  .legal-mobile-menu {
    display: block !important;
  }

  /* Adjust legal page content padding */
  .legal-page-content {
    padding: 20px 15px !important;
  }

  .legal-page-content h1 {
    font-size: 24px !important;
  }

  .legal-page-content h2 {
    font-size: 20px !important;
  }

  .legal-page-content p,
  .legal-page-content li {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }
}

/* 4. GENERAL MOBILE IMPROVEMENTS */
@media (max-width: 768px) {
  /* Better spacing for mobile */
  .section {
    padding: 50px 0 !important;
  }

  .container {
    width: 95% !important;
  }

  /* Hero section adjustments */
  .hero {
    padding: 60px 0 40px !important;
  }

  .hero h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }

  .lead {
    font-size: 16px !important;
  }

  /* Stats grid - 2 columns on mobile */
  .stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }

  .stat-card {
    padding: 20px 15px !important;
  }

  .stat-number {
    font-size: 2rem !important;
  }

  /* Buttons - Better touch targets */
  .btn {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }

  /* Feature cards - Stack on mobile */
  .feature-card,
  .compat-card,
  .testimonial-card {
    min-width: 280px !important;
    max-width: 280px !important;
  }

  /* Contact cards */
  .contact-card {
    min-width: 100% !important;
    max-width: 100% !important;
  }

  /* FAQ - Better mobile spacing */
  .qa button {
    padding: 15px !important;
    font-size: 15px !important;
  }

  .qa .content {
    padding: 0 15px 15px 15px !important;
    font-size: 14px !important;
  }

  /* Footer - Stack columns */
  .foot {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

/* 5. SCROLLBAR STYLING FOR MOBILE */
@media (max-width: 768px) {
  /* Custom scrollbar for horizontal scroll sections */
  .carousel-3d::-webkit-scrollbar {
    height: 8px;
  }

  .carousel-3d::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
  }

  .carousel-3d::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  }

  /* Scroll hint for pricing section */
  .carousel-wrapper::after {
    content: '👉 Faites défiler pour voir toutes les offres';
    display: block;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
  }
}

/* 6. TOUCH-FRIENDLY IMPROVEMENTS */
@media (max-width: 768px) {
  /* Larger touch targets */
  button,
  a.btn,
  .cta-button {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  /* Prevent text selection on buttons */
  button,
  .btn {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
}
