/* ============ Grille fallback hors-swiper ============ */
.wevent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  justify-items: start;
}

/* Réglages généraux du slider events */
.event-menus-swiper {
  --dates-overlap: 40px;   /* hauteur qui dépasse (ton -40px) */
  --dates-gap: 8px;        /* petit espace visuel sous le badge */
  overflow: hidden;        /* anti-débordement horizontal */
  padding: 5px 10px;
}
.event-menus-swiper .swiper-wrapper { align-items: stretch; }
.event-menus-swiper .swiper-slide { height: auto; box-sizing: border-box; }

/* Cartes : on réserve de la place sous la carte pour le badge qui dépasse */
.wevent-card {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  padding: 10px;                 /* plus besoin d'énorme padding-bottom */
  border-radius: 8px;
  text-align: center;
  overflow: visible;             /* le badge peut dépasser la carte */
  display: flex;
  flex-direction: column;
  height: 85%;
  margin-bottom: calc(var(--dates-overlap) + var(--dates-gap));
  box-shadow: 0 2px 5px rgba(0,0,0,.05);
  transition: box-shadow .3s ease;
}
/* sécurité si un style inline traîne */
.event-menus-swiper .wevent-card { max-width: 100% !important; width: 100%; }

.wevent-card:hover,
.wevent-card:focus-visible { box-shadow: 0 4px 10px rgba(0,0,0,.1); outline: none; }

/* Vignette */
.wevent-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
  transition: transform .3s ease;
}
.wevent-card:hover .wevent-thumb { transform: scale(1.03); }

/* Titre (2 lignes max) */
.wevent-title {
  margin: 8px 0 12px;
  font-weight: 600;
  font-size: 1rem !important;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

/* === Badge dates : conservé tel quel mais “compté” grâce à la marge de la carte === */
.wevent-dates {
  position: absolute;
  bottom: calc(-1 * var(--dates-overlap));  /* équivaut à -40px */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  font-size: 14px;
  color: #fff;
}

/* Styles internes du badge (inchangés) */
.events_content_date {
  display: flex;
  align-items: center;
  background-color: var(--ast-global-color-0);
  width: 100%;
  height: auto;
  transition: all .3s ease;
  gap: 10px;
  padding-right: 10px;
  clip-path: polygon(
8% 0,    /* top-left  décalé */
100% 0,   /* top-right */
92% 100%, /* bottom-right décalé */
0% 100%   /* bottom-left */
);
}
.events_content_date i.fa-calendar-days {
  font-size: 24px;
  color: #ffffff;
  flex-shrink: 0;
  padding: 10px 0 10px 15px;
}
.events_content_date .dates-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}
.events_content_date span {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}
.events_content_date span::after {
  content: "";
  display: block;
}

/* Pagination cohérente avec menus */
.event-menus-swiper .swiper-pagination-bullet-active { background: #A6A6A6 !important; }
.event-menus-swiper .swiper-pagination { --swiper-pagination-bottom: -6px; }

/* Responsive (optionnel) */
@media (max-width: 900px) { .wevent-thumb { aspect-ratio: 16 / 10; } }
@media (max-width: 600px) { 
    .wevent-thumb {
    width: 90%;      /* ou 80% selon ton besoin */
    max-width: 320px; /* optionnel, pour éviter trop grand */
  }

    .wevent-thumb { aspect-ratio: 16 / 9; } 

    .wevent-dates {width:60%;font-size: 16px;}

    .event-menus-swiper {
  --dates-overlap: 50px;
    }

    .events_content_date i.fa-calendar-days {
  padding: 10px 0 10px 35px;
}
}
