/* mod_eb_events — horizontal CECAP cards */
.eb-h-grid {
	--eb-club-cyan: #1B64A6;
	--eb-club-cyan-dark: #154d80;
	--eb-club-green: #5F3A4E;
	--eb-club-ink: #1a2332;
	--eb-club-muted: #5c6778;
	--eb-club-surface: #ffffff;
	--eb-club-glow: rgba(27, 100, 166, 0.18);
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}

.eb-h-grid.row,
.eb-h-grid.row-fluid {
	margin-left: 0;
	margin-right: 0;
}

.eb-h-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--eb-club-surface);
	border-radius: 1.25rem;
	overflow: hidden;
	isolation: isolate;
	box-shadow:
		0 1px 0 rgba(26, 35, 50, 0.04),
		0 12px 32px -12px rgba(26, 35, 50, 0.18);
	transition:
		transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	animation: eb-h-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(var(--eb-h-i, 0) * 80ms);
	/* Bootstrap span floats conflict with flex gap — neutralize */
	float: none !important;
	margin-left: 0 !important;
	width: calc((100% - (var(--eb-h-cols, 2) - 1) * 1.5rem) / var(--eb-h-cols, 2)) !important;
	max-width: none !important;
	box-sizing: border-box;
}

.eb-h-card:hover {
	transform: translateY(-6px);
	box-shadow:
		0 1px 0 rgba(26, 35, 50, 0.04),
		0 22px 48px -16px rgba(27, 100, 166, 0.35);
}

.eb-h-card--featured {
	outline: 2px solid var(--eb-club-cyan);
	outline-offset: 0;
}

.eb-h-media {
	position: relative;
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	/* Pas de ratio forcé : les visuels promo (titre/lieu dans l’image) restent entiers */
	overflow: hidden;
	background: #e8f0f7;
	text-decoration: none;
	line-height: 0;
}

.eb-h-media--empty {
	min-height: 160px;
	line-height: normal;
}

/*
 * SP Page Builder injecte souvent `#sppb-addon-… img { max-width:300px; height:300px }`
 * sur le module — on force la pleine largeur de la carte.
 */
.eb-h-card .eb-h-media,
.eb-h-card .eb-h-media img,
.eb-h-img,
.up-event-item .eb-h-img,
.sppb-addon-module .eb-h-img,
.sppb-addon-content .eb-h-img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: none !important;
	object-fit: contain !important;
	object-position: center top !important;
	border-radius: 0 !important;
	background: transparent !important;
	margin: 0 !important;
	vertical-align: top;
	transform: none !important;
	transition: opacity 0.35s ease;
}

.eb-h-card:hover .eb-h-img {
	transform: none !important;
	opacity: 0.96;
}

/* Overlay / badge date : non utilisés */

/* Anciens styles horizontalbottom (flex 300px) — neutralisés */
.eb-h-card .eb-image-container,
.up-event-item.eb-h-card .eb-image-container {
	flex: none !important;
	max-width: 100% !important;
	width: 100% !important;
}

.eb-h-body {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 1.15rem 1.25rem 1.35rem;
	flex: 1 1 auto;
}

.eb-h-category {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--eb-club-cyan-dark);
}

.eb-h-category a {
	color: inherit;
	text-decoration: none;
}

.eb-h-category a:hover {
	text-decoration: underline;
}

.eb-h-title {
	margin: 0;
	font-size: clamp(1.05rem, 1.8vw, 1.35rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--eb-club-ink) !important;
}

.eb-h-title a,
.up-event-item .eb-h-title a {
	color: var(--eb-club-ink) !important;
	text-decoration: none;
	background-image: linear-gradient(var(--eb-club-cyan), var(--eb-club-cyan));
	background-size: 0% 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.35s ease, color 0.25s ease;
}

.eb-h-card:hover .eb-h-title a {
	color: var(--eb-club-cyan-dark) !important;
	background-size: 100% 2px;
}

.eb-h-where {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	color: var(--eb-club-ink);
	font-weight: 600;
}

.eb-h-meta {
	margin: 0;
	font-size: 0.9rem;
	color: var(--eb-club-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.45rem;
}

.eb-h-sep {
	opacity: 0.5;
}

.eb-h-where i {
	margin-right: 0.2rem;
	opacity: 0.7;
}

.eb-h-excerpt {
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--eb-club-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.eb-h-excerpt p {
	margin: 0;
}

.eb-h-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: auto;
	padding-top: 0.35rem;
}

.eb-h-price {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--eb-club-ink);
}

.eb-h-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1.25rem;
	border-radius: 999px;
	background: var(--eb-club-cyan);
	color: #fff !important;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none !important;
	letter-spacing: 0.01em;
	box-shadow: 0 8px 18px -10px var(--eb-club-glow);
	transition:
		background 0.25s ease,
		transform 0.25s ease,
		box-shadow 0.25s ease;
}

.eb-h-cta:hover,
.eb-h-cta:focus {
	background: var(--eb-club-cyan-dark);
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 12px 24px -10px rgba(27, 100, 166, 0.55);
}

@keyframes eb-h-rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.eb-h-card,
	.eb-h-img,
	.eb-h-cta,
	.eb-h-title a {
		animation: none !important;
		transition: none !important;
	}

	.eb-h-card:hover {
		transform: none;
	}

	.eb-h-card:hover .eb-h-img {
		transform: none;
	}
}

@media (max-width: 991.98px) {
	.eb-h-card {
		width: calc((100% - 1.5rem) / 2) !important;
	}

	.eb-h-grid {
		--eb-h-cols: 2;
	}
}

@media (max-width: 767.98px) {
	.eb-h-grid {
		gap: 1.15rem;
		--eb-h-cols: 1;
	}

	.eb-h-card {
		width: 100% !important;
	}

	.eb-h-title {
		font-size: 1.15rem;
	}
}
