/**
 * Styles pour le widget Aratice Slider
 * Slider simple avec image et titre
 */

.aratice-slider-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.aratice-slider-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 4px;
}

.aratice-slider-container .swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.slide-image-mobile {
  display: none;
}

@media (max-width: 600px) {
  .slide-image-mobile {
    display: block;
  }
  
  .slide-image-desktop {
    display: none;
  }
}

.slide-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  position: absolute;
  top: 0;
  left: 0;
}

.slide-link:hover {
  text-decoration: none;
}

.swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
  bottom: 45px!important;
}

span.swiper-pagination-bullet.swiper-pagination-bullet-active {
  background: #163C79;
}

/* Navigation par flèches */
.aratice-slider-container .swiper-button-next,
.aratice-slider-container .swiper-button-prev {
  width: 50px;
  height: 50px;
  background: #163C79;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  transition: all 0.3s ease;
  bottom: 25px;
}

.aratice-slider-container .swiper-button-next:hover,
.aratice-slider-container .swiper-button-prev:hover {
  background: #0f2a5a;
  transform: scale(1.1);
}

.aratice-slider-container .swiper-button-next:after,
.aratice-slider-container .swiper-button-prev:after {
  font-size: 20px;
  font-weight: 600;
}

.aratice-slider-container .swiper-button-next {
  right: 20px;
}

.aratice-slider-container .swiper-button-prev {
  left: 20px;
}

/* Navigation par texte */
.slider-text-navigation {
  background: white;
  padding: 20px 0;
  padding-bottom: 0px;
  display: flex;
  border-bottom: 1px solid #C9C9C9;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-tab {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  font-family: 'Lexend Deca';
  text-align: center;
  font-weight: 300;
}

.nav-tab:hover {
  color: #163C79;
}

.nav-tab.active {
  color: #163C79 !important;
  font-weight: 700 !important;
  font-size: 15px;
  border-bottom: 4px solid #163C79;
}

/* Responsive Design */
@media (max-width: 768px) {
  .aratice-slider-container {
    height: 300px;
  }

  /* Masquer les titres sur mobile */
  .slider-text-navigation {
    display: none;
  }

  /* Réduire la taille des flèches sur mobile */
  .aratice-slider-container .swiper-button-next,
  .aratice-slider-container .swiper-button-prev {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .aratice-slider-container .swiper-button-next:after,
  .aratice-slider-container .swiper-button-prev:after {
    font-size: 14px;
  }

  /* Ajouter les dots de pagination - uniquement sur mobile */
  .swiper-pagination {
    position: relative;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    bottom: 25px;
  }

  .swiper-pagination-bullet {
    width: 10px!important;
    height: 10px!important;
    background: #C9C9C9!important;
    border-radius: 50%;
    opacity: 1!important;
    transition: all 0.3s ease;
  }

  .swiper-pagination-bullet-active {
    background: #163C79!important;
    transform: scale(1.2);
  }

  /* Instructions de swipe - uniquement sur mobile */
  .swipe-instructions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 12px;
    color: #666;
    gap: 30px;
  }

  .swipe-instructions .swipe-left {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .swipe-instructions .swipe-right {
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: right;
  }

  .swipe-instructions .hand-icon {
    width: 24px;
    height: 24px;
    opacity: 0.5;
  }
}

/* Masquer les instructions de swipe et dots sur desktop */
@media (min-width: 769px) {
  .swipe-instructions {
    display: none;
  }
  
  .swiper-pagination {
    display: none;
  }
}

@media (max-width: 480px) {
  /* Hauteur gérée par Elementor */
  
  .slider-text-navigation {
    flex-direction: column;
    gap: 10px;
  }

  .nav-tab {
    width: 100%;
    min-width: auto;
    font-size: 0.9rem;
  }

  .nav-tab.active {
    font-size: 1rem;
  }
}

/* Animation d'entrée - simplifiée */
.aratice-slider-container .swiper-slide {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.aratice-slider-container .swiper-slide-active {
  opacity: 1;
}

/* Premier slide visible immédiatement */
.aratice-slider-container .swiper-slide:first-child {
  opacity: 1;
}

/* Préchargement de la première image */
.aratice-slider-container .swiper-slide:first-child .slide-image {
  will-change: auto;
}

/* Forcer l'affichage correct des slides */
.aratice-slider-container .swiper-slide {
  position: relative;
}

.aratice-slider-container .swiper-slide .slide-image {
  position: absolute;
  top: 0;
  padding:0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Amélioration de l'accessibilité - supprimé pour éviter la double border */

/* Mode éditeur Elementor */
.elementor-editor-active .aratice-slider-container {
  position: relative;
}

.elementor-editor-active .aratice-slider-container .swiper-slide {
  position: relative;
  opacity: 1;
  transform: none;
  transition: none;
}

.elementor-editor-active .swiper-button-next,
.elementor-editor-active .swiper-button-prev {
  display: none;
}
