/* Club Boissy — Event Booking list WOW (no crop, light matte gallery) */
body.itemid-171,
body.itemid-216,
body.itemid-260,
.bclub-events {
  --bclub-terra: #c5381c;
  --bclub-terra-dark: #9e3116;
  --bclub-lime: #b8cf4b;
  --bclub-cta: #04b404;
  --bclub-cta-dark: #038a03;
  --bclub-ink: #252525;
  --bclub-muted: #6a635c;
  --bclub-paper: #ffffff;
  --bclub-sand: #f4eee7;
  --bclub-mat: #ebe3d8;
  --bclub-line: #ddd4c8;
  --bclub-font: "Poppins", system-ui, sans-serif;
}

body.itemid-171,
body.itemid-216,
body.itemid-260 {
  background: var(--bclub-sand);
}

body.itemid-171 #sp-main-body,
body.itemid-216 #sp-main-body,
body.itemid-260 #sp-main-body {
  background: var(--bclub-sand);
}

body.itemid-171 .eb-page-heading,
body.itemid-216 .eb-page-heading,
body.itemid-260 .eb-page-heading {
  font-family: var(--bclub-font);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bclub-ink);
  margin: 0 0 1.25rem;
  text-align: left;
}

body.itemid-171 .eb-category-description,
body.itemid-216 .eb-category-description,
body.itemid-260 .eb-category-description {
  margin: 0 0 1.75rem;
  color: var(--bclub-muted);
  font-family: var(--bclub-font);
  text-align: left;
}

/* Grille égale — liste + module homepage */
.bclub-events.eb-columns-layout-container,
.bclub-events.bclub-events--module {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0 0 1.5rem !important;
  float: none !important;
  align-items: stretch;
}

.bclub-events.eb-columns-layout-container::before,
.bclub-events.eb-columns-layout-container::after,
.bclub-events.bclub-events--module::before,
.bclub-events.bclub-events--module::after {
  display: none !important;
  content: none !important;
}

.bclub-events > .bclub-events__cell,
.bclub-events > [class*="span"],
.bclub-events > [class*="col-"] {
  display: flex !important;
  width: auto !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: none !important;
  min-height: 0;
}

.bclub-events .eb-thumb-left,
.bclub-events img.eb-thumb-left,
.bclub-events img.eb-event-thumb {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bclub-events .eb-event-wrapper,
.bclub-event-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: var(--bclub-paper);
  border: 1px solid var(--bclub-line);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(37, 37, 37, 0.06);
  font-family: var(--bclub-font);
  color: var(--bclub-ink);
  text-align: left !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bclub-events .eb-event-wrapper:hover,
.bclub-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(37, 37, 37, 0.1);
}

.bclub-event-card__hit {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  color: inherit;
  text-decoration: none !important;
  cursor: pointer;
}

.bclub-event-card__hit:hover,
.bclub-event-card__hit:focus {
  color: inherit;
  text-decoration: none !important;
}

.bclub-event-card__hit:focus-visible {
  outline: 2px solid var(--bclub-terra);
  outline-offset: 3px;
}

/*
 * Cadre gallery 1:1 clair — portrait ET paysage
 * reposent sur le même fond sable, sans crop, sans barres noires.
 */
.bclub-event-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  margin: 0;
  padding: 0.85rem;
  background:
    linear-gradient(180deg, #faf7f2 0%, var(--bclub-mat) 100%);
  border-bottom: 1px solid var(--bclub-line);
  text-decoration: none;
  overflow: hidden;
  box-sizing: border-box;
}

.bclub-event-card__media--empty {
  background:
    linear-gradient(135deg, rgba(184, 207, 75, 0.2), transparent 55%),
    var(--bclub-mat);
}

.bclub-event-card__flyer {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.bclub-event-card__flyer--empty {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(37, 37, 37, 0.12);
}

.bclub-event-card__img,
.bclub-events .eb-event-wrapper img.bclub-event-card__img,
.bclub-events img.bclub-event-card__img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border-radius: 1px;
  box-shadow:
    0 1px 2px rgba(37, 37, 37, 0.06),
    0 14px 30px rgba(37, 37, 37, 0.16);
  background: transparent;
}

.bclub-event-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.4rem;
  padding: 1.2rem 1.25rem 1.35rem;
  text-align: left !important;
  min-height: 0;
}

.bclub-event-card__mark {
  width: 2.1rem;
  height: 0.22rem;
  border-radius: 999px;
  background: var(--bclub-lime);
  margin: 0 0 0.3rem;
}

.bclub-event-card__date {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bclub-terra);
  line-height: 1.4;
}

.bclub-event-card__title,
.bclub-events .eb-event-title-container {
  margin: 0;
  font-size: clamp(1.02rem, 1.45vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-align: left !important;
}

.bclub-event-card__title .eb-event-title,
.bclub-events .eb-event-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--bclub-ink);
  text-decoration: none;
}

.bclub-event-card__hit:hover .eb-event-title {
  color: var(--bclub-terra);
}

body.itemid-171 .pagination,
body.itemid-216 .pagination,
body.itemid-260 .pagination {
  margin: 0.25rem 0 1.75rem;
  justify-content: center;
}

@media (min-width: 1200px) {
  .bclub-events.eb-columns-layout-container,
  .bclub-events.bclub-events--module {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.65rem;
  }
}

@media (max-width: 760px) {
  .bclub-events.eb-columns-layout-container,
  .bclub-events.bclub-events--module {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .bclub-event-card__media {
    aspect-ratio: 4 / 3;
    padding: 1rem;
  }
}

/* Neutralise le CSS stock eventgrid sur le module WOW */
.bclub-events--module .eb-event-main-category,
.bclub-events--module .eb-event-location,
.bclub-events--module .eb-event-price,
.bclub-events--module .eb-event-short-description,
.bclub-events--module .eb-taskbar {
  display: none !important;
}
