/* ============================================
   CORRECTIFS MOBILE POUR IPHONE XR
   ============================================ */

/* 1. MENU HAMBURGER AMÉLIORÉ - Plus visible et avec fond */
@media (max-width: 768px) {

  /* Hamburger - Style TRÈS visible */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 87, 34, 0.15) !important;
    border: 3px solid #ff5722 !important;
    border-radius: 10px !important;
    cursor: pointer;
    padding: 0;
    position: relative !important;
    z-index: 10000 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    order: 2;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
  }

  /* Hamburger ouvert - Transformer en GROS bouton X orange */
  .mobile-menu-toggle[aria-expanded="true"] {
    background: #ff5722 !important;
    border-color: white !important;
    border-width: 3px !important;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255, 87, 34, 0.6);
  }

  /* Lignes du hamburger - Très épaisses et visibles */
  .hamburger-line {
    width: 32px !important;
    height: 4px !important;
    background-color: #ff5722 !important;
    margin: 4px 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  }

  /* Animation X - TRÈS GROS et BLANC sur fond orange */
  .mobile-menu-toggle[aria-expanded="true"] .hamburger-line {
    background-color: white !important;
    height: 4px !important;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
  }

  .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
  }

  .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
  }

  /* Pas de label texte - juste le X visuel suffit */
}

/* 2. CAROUSEL - Fix images blanches et resize */

/* Background pendant le chargement des images */
.hero-image {
  background-color: #1a1a2e !important; /* Fond sombre au lieu de blanc */
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  transition: background-image 0.6s ease-in-out !important; /* Transition plus douce */
  will-change: background-image;
}

/* Empêcher le resize des images */
.hero-banner {
  min-height: 500px;
  max-height: 700px;
}

@media (max-width: 768px) {
  .hero-banner {
    min-height: 400px;
    max-height: 500px;
  }

  .hero-image {
    background-attachment: scroll !important; /* Meilleure performance mobile */
    background-size: cover !important;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    min-height: 350px;
    max-height: 450px;
  }
}

/* 3. BOUTONS CAROUSEL - Plus visibles sur mobile */

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px !important;
  height: 50px !important;
  background: rgba(255, 87, 34, 0.9) !important; /* Orange au lieu de transparent */
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  color: white !important;
  font-size: 28px !important;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}

.carousel-arrow:hover,
.carousel-arrow:active {
  background: rgba(230, 74, 25, 1) !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.6);
}

.carousel-arrow.prev {
  left: 20px !important;
}

.carousel-arrow.next {
  right: 20px !important;
}

/* Mobile - Boutons plus petits mais toujours visibles */
@media (max-width: 768px) {
  .carousel-arrow {
    width: 44px !important;
    height: 44px !important;
    font-size: 24px !important;
    background: rgba(255, 87, 34, 0.95) !important;
  }

  .carousel-arrow.prev {
    left: 10px !important;
  }

  .carousel-arrow.next {
    right: 10px !important;
  }
}

@media (max-width: 480px) {
  .carousel-arrow {
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
  }

  .carousel-arrow.prev {
    left: 8px !important;
  }

  .carousel-arrow.next {
    right: 8px !important;
  }
}

/* 4. DOTS DU CAROUSEL - Plus visibles */
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background: #ff5722 !important;
  border-color: white;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 87, 34, 0.6);
}

@media (max-width: 768px) {
  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}

/* 5. OVERLAY DU MENU MOBILE - Améliorer */
@media (max-width: 768px) {
  .nav-links {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
  }

  /* Empêcher le scroll du body quand menu ouvert */
  body.menu-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
  }
}

/* 6. OPTIMISATIONS DE PERFORMANCE */

/* Accélération matérielle pour les animations */
.hero-image,
.carousel-arrow,
.mobile-menu-toggle,
.hamburger-line,
.nav-links {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Preload hint pour les images */
.hero-image::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}


/* ============================================
   3. CORRECTION SECTION CTA - Centrer et éviter débordement
   ============================================ */

/* Forcer le conteneur principal à ne pas déborder */
@media (max-width: 768px) {
  .circuits-section {
    width: 100% !important;
    overflow-x: hidden !important;
    padding: 0 !important;
  }

  .circuits-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 var(--space-4) !important;
    overflow-x: hidden !important;
  }

  /* Section CTA - Correction débordement */
  .circuits-cta {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: var(--space-8) var(--space-4) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Contenu CTA - Centré et sans débordement */
  .cta-content {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .cta-content h3 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-bottom: var(--space-4) !important;
    padding: 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    white-space: normal !important;
    max-width: 100% !important;
  }

  .cta-content p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    padding: 0 !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }

  /* Boutons CTA - Empiler verticalement sur mobile */
  .cta-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-3) !important;
    width: 100% !important;
    align-items: center !important;
  }

  .btn-cta-primary,
  .btn-cta-secondary {
    width: 100% !important;
    max-width: 320px !important;
    padding: var(--space-3) var(--space-4) !important;
    font-size: 0.9rem !important;
    text-align: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .btn-cta-primary .material-symbols-outlined,
  .btn-cta-secondary .material-symbols-outlined {
    font-size: 20px !important;
  }

  /* Stats CTA - Forcer horizontal et centrer */
  .cta-stats {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    gap: var(--space-2) !important;
    margin-top: var(--space-6) !important;
  }

  .cta-stats .stat-item {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  .cta-stats .stat-number {
    font-size: 1.75rem !important;
    line-height: 1 !important;
  }

  .cta-stats .stat-label {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}

/* Très petit écran - Ajustements supplémentaires */
@media (max-width: 480px) {
  .cta-content h3 {
    font-size: 1.3rem !important;
  }

  .cta-content p {
    font-size: 0.875rem !important;
  }

  .cta-stats .stat-number {
    font-size: 1.5rem !important;
  }

  .cta-stats .stat-label {
    font-size: 0.65rem !important;
  }
}

/* ============================================
   4. CORRECTION STATS EN COLONNE - Forcer horizontal
   ============================================ */

/* Stats sur la page Excursions */
@media (max-width: 768px) {
  /* Forcer les stats à rester horizontales */
  .stats-container,
  .excursion-stats,
  .hero-stats,
  .stats-section {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    text-align: center !important;
  }

  /* Chaque stat individuelle */
  .stat-item,
  .stat,
  .stats-container > div,
  .excursion-stats > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 80px !important;
    flex: 1 1 auto !important;
  }

  /* Numéros des stats */
  .stat-number,
  .stat h3,
  .stat-item h3 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: white !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: block !important;
  }

  /* Texte des stats */
  .stat-label,
  .stat p,
  .stat-item p {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: white !important;
    margin: 0.25rem 0 0 0 !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    display: block !important;
    white-space: nowrap !important;
  }

  /* Hero banner stats specifiques */
  .hero-banner .stats-container,
  .hero-content .stats-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-evenly !important;
    width: 100% !important;
    margin-top: 2rem !important;
  }
}

@media (max-width: 480px) {
  /* Sur très petit écran, permettre 2 lignes max */
  .stats-container,
  .excursion-stats,
  .hero-stats {
    justify-content: center !important;
    gap: 1.5rem 1rem !important;
  }

  .stat-item,
  .stat {
    min-width: 100px !important;
  }

  .stat-number,
  .stat h3 {
    font-size: 1.8rem !important;
  }

  .stat-label,
  .stat p {
    font-size: 0.75rem !important;
  }
}

