/* Styles pour la page mes-favoris.html */

/* --- Conteneur principal --- */
.favorites-container {
  max-width: 1200px;
  margin: 4rem auto 5rem;
  padding: 0 2rem;
  position: relative;
}

/* En-tête avec effet */
.favorites-container h1 {
  font-size: 2.4rem;
  margin-bottom: 2.5rem;
  color: #333;
  text-align: center;
  position: relative;
  padding-bottom: 1.2rem;
}

.favorites-container h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #BB0B0B;
  border-radius: 2px;
}

/* --- Système de filtrage --- */
.favorites-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-tab {
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  background-color: #f5f5f5;
  color: #555;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.filter-tab:hover {
  background-color: #ebebeb;
  transform: translateY(-2px);
}

.filter-tab.active {
  background-color: #BB0B0B;
  color: white;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.1);
  color: inherit;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  margin-left: 0.5rem;
}

/* --- Section de catégorie --- */
.favorites-category-section {
  margin-top: 2.5rem;
  margin-bottom: 3rem;
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.favorites-category-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Titre des catégories avec badge */
.favorites-category-title {
  color: #333;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #f3f3f3;
  display: flex;
  align-items: center;
}

.favorites-category-title::before {
  content: '';
  display: inline-block;
  min-width: 18px;
  width: 18px;
  height: 18px;
  background-color: #BB0B0B;
  border-radius: 50%;
  margin-right: 0.8rem;
  flex-shrink: 0;
}

/* Grille pour les événements */
.favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.8rem;
  margin-top: 1.5rem;
}

/* --- Style des cartes d'événements --- */
.sidebar-event-item {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  height: 100%;
  cursor: pointer;
  transform-origin: center;
  border: 1px solid #f5f5f5;
  position: relative;
}

.sidebar-event-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: rgba(187, 11, 11, 0.15);
}

.sidebar-event-content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Container pour l'image */
.sidebar-img-container {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.sidebar-img-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.2) 100%);
  z-index: 1;
}

/* Image */
.sidebar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.sidebar-event-item:hover .sidebar-img {
  transform: scale(1.08);
}

/* Texte et détails */
.sidebar-text {
  padding: 1.2rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  margin: 0 0 0.7rem 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8rem;
}

.sidebar-venue {
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 0.7rem;
}

.sidebar-date {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #777;
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid #f5f5f5;
}

.sidebar-date::before {
  content: '\f073';
  font-family: 'Font Awesome 5 Free';
  margin-right: 0.5rem;
  color: #BB0B0B;
  font-size: 0.8rem;
}

/* Badge de catégorie */
.category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  background-color: rgba(187, 11, 11, 0.8);
  border-radius: 30px;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Bouton pour supprimer des favoris */
.sidebar-actions {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 5;
}

.btn-remove {
  width: 32px;
  height: 32px;
  background-color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #BB0B0B;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
}

.btn-remove:hover {
  background-color: #BB0B0B;
  color: white;
  transform: rotate(90deg);
}

/* Animation de chargement */
.favorites-loading {
  text-align: center;
  color: #777;
  padding: 4rem 0;
  font-size: 1.1rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Message quand il n'y a pas de favoris */
.no-favorites {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, #f9f9f9 0%, #f3f3f3 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  display: none; /* Caché par défaut, affiché via JS */
}

.no-favorites::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #BB0B0B, #ff5252);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.no-favorites p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.no-favorites .sub-message {
  font-size: 0.95rem;
  color: #777;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.no-favorites .btn {
  display: inline-block;
  background-color: #BB0B0B;
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid #BB0B0B;
  font-size: 0.95rem;
  box-shadow: 0 5px 15px rgba(187, 11, 11, 0.2);
}

.no-favorites .btn:hover {
  background-color: white;
  color: #BB0B0B;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(187, 11, 11, 0.3);
}

/* Message d'erreur */
.error-message {
  background-color: #fff5f5;
  color: #e53e3e;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid #e53e3e;
  font-weight: 500;
}

/* Animation pour la suppression */
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}

.fade-out {
  animation: fadeOut 0.3s ease forwards;
}