/**
 * Styles pour le carousel Top 5 - Mobile Optimisé
 * Version 0.8.2
 */

/* Wrapper principal */
.quentin-heart-top5-wrapper {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 15px;
}

.quentin-heart-top5-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 20px;
}

.quentin-heart-top5-empty {
  text-align: center;
  padding: 40px 20px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  color: #646970;
}

/* Carousel Swiper */
.quentin-heart-top5-carousel {
  padding: 10px 50px 40px 50px;
  position: relative;
}

/* Carte d'article - Design horizontal compact */
.quentin-heart-top5-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s ease;
  height: 120px;
  display: flex;
  flex-direction: row;
}

.quentin-heart-top5-card:hover {
  border-color: #ff375f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Badge rank et hearts */
.top5-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-rank {
  background: #1d2327;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.badge-hearts {
  background: white;
  color: #646970;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.badge-hearts-emoji {
  font-size: 12px;
  line-height: 1;
}

/* Image à gauche */
.top5-card-image {
  position: relative;
  width: 120px;
  min-width: 120px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
}

.top5-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.1) 0%, transparent 100%);
}

/* Contenu à droite */
.top5-card-content {
  padding: 12px 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.top5-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  margin: 0 0 6px 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.top5-card-excerpt {
  font-size: 12px;
  color: #646970;
  line-height: 1.4;
  margin: 0 0 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

.top5-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1d2327;
  padding: 0;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  transition: all 0.2s ease;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
}

.top5-card-link:hover {
  color: #ff375f;
  border-bottom-color: #ff375f;
}

/* Navigation Swiper - HORS des cartes */
.quentin-heart-top5-carousel .swiper-button-next,
.quentin-heart-top5-carousel .swiper-button-prev {
  color: #1d2327;
  background: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.quentin-heart-top5-carousel .swiper-button-next {
  right: 0;
}

.quentin-heart-top5-carousel .swiper-button-prev {
  left: 0;
}

.quentin-heart-top5-carousel .swiper-button-next:after,
.quentin-heart-top5-carousel .swiper-button-prev:after {
  font-size: 14px;
  font-weight: 700;
}

.quentin-heart-top5-carousel .swiper-button-next:hover,
.quentin-heart-top5-carousel .swiper-button-prev:hover {
  background: #1d2327;
  color: white;
  border-color: #1d2327;
}

/* Pagination - minimaliste */
.quentin-heart-top5-carousel .swiper-pagination {
  bottom: 10px;
}

.quentin-heart-top5-carousel .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #d0d0d0;
  opacity: 1;
}

.quentin-heart-top5-carousel .swiper-pagination-bullet-active {
  background: #1d2327;
  width: 24px;
  border-radius: 4px;
}

/* Responsive Tablette */
@media (max-width: 900px) {
  .quentin-heart-top5-carousel {
    padding: 10px 40px 40px 40px;
  }
  
  .quentin-heart-top5-carousel .swiper-button-next,
  .quentin-heart-top5-carousel .swiper-button-prev {
    width: 32px;
    height: 32px;
  }
  
  .quentin-heart-top5-carousel .swiper-button-next:after,
  .quentin-heart-top5-carousel .swiper-button-prev:after {
    font-size: 12px;
  }
}

/* Responsive Mobile */
@media (max-width: 640px) {
  .quentin-heart-top5-wrapper {
    padding: 0;
    margin: 20px 0;
  }
  
  .quentin-heart-top5-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding: 0 15px;
  }
  
  /* Carousel sans padding sur mobile pour utiliser toute la largeur */
  .quentin-heart-top5-carousel {
    padding: 10px 15px 40px 15px;
  }
  
  /* Masquer les flèches sur mobile */
  .quentin-heart-top5-carousel .swiper-button-next,
  .quentin-heart-top5-carousel .swiper-button-prev {
    display: none;
  }
  
  /* Carte optimisée mobile */
  .quentin-heart-top5-card {
    height: 110px;
  }
  
  .top5-card-image {
    width: 110px;
    min-width: 110px;
  }
  
  .top5-card-content {
    padding: 10px 12px;
  }
  
  .top5-card-title {
    font-size: 13px;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }
  
  .top5-card-excerpt {
    font-size: 11px;
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
  }
  
  .top5-card-link {
    font-size: 11px;
  }
  
  /* Badges plus petits sur mobile */
  .badge-rank {
    font-size: 11px;
    padding: 3px 6px;
  }
  
  .badge-hearts {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .badge-hearts-emoji {
    font-size: 11px;
  }
  
  /* Pagination plus visible sur mobile */
  .quentin-heart-top5-carousel .swiper-pagination {
    bottom: 5px;
  }
  
  .quentin-heart-top5-carousel .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }
  
  .quentin-heart-top5-carousel .swiper-pagination-bullet-active {
    width: 28px;
  }
}

/* Très petits écrans */
@media (max-width: 380px) {
  .quentin-heart-top5-card {
    height: 100px;
  }
  
  .top5-card-image {
    width: 95px;
    min-width: 95px;
  }
  
  .top5-card-content {
    padding: 8px 10px;
  }
  
  .top5-card-title {
    font-size: 12px;
  }
  
  .top5-card-excerpt {
    font-size: 10px;
  }
}
