/**
 * Styles pour les événements
 * Plugin Site Core - Vizara
 */

/* ========== GRILLE D'ÉVÉNEMENTS ========== */

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== CARTE D'ÉVÉNEMENT ========== */

.event-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.08),
    -8px -8px 20px rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  position: relative;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.5),
    rgba(0, 0, 0, 0.05)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 12px 12px 30px rgba(0, 0, 0, 0.12),
    -12px -12px 30px rgba(255, 255, 255, 1),
    inset 0 0 0 1px rgba(78, 197, 241, 0.2);
}

/* ========== THUMBNAIL ========== */

.event-thumb {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background: #f5f5f7;
  border-radius: 16px 16px 0 0;
}

.event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.95) contrast(1.05);
}

.event-card:hover .event-thumb img {
  transform: scale(1.08);
  filter: brightness(1) contrast(1.1);
}

/* Placeholder si pas d'image */
.event-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0f0f2 0%, #e8e8ea 100%);
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.05),
    inset -4px -4px 8px rgba(255, 255, 255, 0.9);
}

.event-thumb-placeholder .dashicons {
  font-size: 60px;
  width: 60px;
  height: 60px;
  color: #c8c8ca;
  opacity: 0.6;
}

/* ========== BODY ========== */

.event-body {
  padding: 1.75rem;
  color: #1a1a1a;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.event-title {
  margin: 0 0 0.875rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.event-title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
  background: linear-gradient(to right, #4ec5f1 0%, #4ec5f1 100%);
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

.event-title a:hover {
  color: #4ec5f1;
  background-size: 100% 2px;
}

/* ========== MÉTADONNÉES ========== */

.event-meta {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  color: #6b6b6b;
  line-height: 1.6;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  background: #f8f8fa;
  border-radius: 10px;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.04),
    inset -2px -2px 4px rgba(255, 255, 255, 0.8);
}

.event-date,
.event-venue {
  display: inline;
}

/* ========== EXTRAIT ========== */

.event-excerpt {
  margin: 0 0 1.25rem 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #4a4a4a;
  flex: 1;
}

.event-excerpt p {
  margin: 0;
}

/* ========== LIEN CARTE ========== */

.event-map-link {
  margin: 0;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e8e8ea;
}

.event-map-link a {
  color: #4ec5f1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: #f8f8fa;
  border-radius: 10px;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.05),
    -3px -3px 6px rgba(255, 255, 255, 0.9);
}

.event-map-link a:hover {
  color: #3ba8cc;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.06),
    inset -2px -2px 4px rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

/* ========== MESSAGE AUCUN ÉVÉNEMENT ========== */

.no-events {
  text-align: center;
  padding: 3rem 2rem;
  color: #6b6b6b;
  font-size: 1.1rem;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.08),
    -8px -8px 20px rgba(255, 255, 255, 0.9);
}

.no-events p {
  margin: 0;
  font-weight: 500;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 767px) {
  .events-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .event-thumb {
    height: 180px;
  }

  .event-body {
    padding: 1.25rem;
  }

  .event-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .event-thumb {
    height: 160px;
  }

  .event-body {
    padding: 1rem;
  }

  .event-title {
    font-size: 1.1rem;
  }

  .event-meta {
    font-size: 0.85rem;
  }
}
