.cte-wrapper {
	max-width: 1600px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Barre de filtre ---------- */
.cte-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	margin-bottom: 24px;
	box-sizing: border-box;
	min-height: var(--cte-filter-height, 100px);
}

.cte-filter-field {
	flex: 1 1 200px;
}

.cte-filter-recherche {
	flex: 2 1 260px;
}

.cte-filter-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	margin-bottom: 3px;
}

.cte-filter-bar input,
.cte-filter-bar select {
	width: 100%;
	height: 46px;
	box-sizing: border-box;
	padding: 0 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	font-size: 14px;
	color: #1f2937;
	background: #f3f4f6;
}

.cte-filter-bar input::placeholder {
	color: #9ca3af;
}

.cte-btn-rechercher {
	flex: 0 0 auto;
	height: 46px;
	background: #f97316;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0 26px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: background 0.15s ease;
}

.cte-btn-rechercher:hover {
	background: #ea580c;
}

/* ---------- En-tête "Prochains événements" ---------- */
.cte-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}

.cte-titre {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
}

.cte-titre-bar {
	display: inline-block;
	width: 4px;
	height: 20px;
	background: #f97316;
	border-radius: 2px;
}

.cte-btn-voir-tous {
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #0f172a;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.cte-btn-voir-tous:hover {
	border-color: #94a3b8;
	background: #f8fafc;
}

/* ---------- Grille de vignettes (nombre de colonnes configurable) ---------- */
.cte-grid {
	display: grid;
	grid-template-columns: repeat(var(--cte-columns, 3), 1fr);
	gap: 22px;
}

@media (max-width: 900px) {
	.cte-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 600px) {
	.cte-grid {
		grid-template-columns: 1fr !important;
	}
	.cte-filter-bar {
		flex-direction: column;
		align-items: stretch;
		min-height: auto;
	}
	.cte-filter-field,
	.cte-filter-recherche {
		flex: 0 0 auto;
		width: 100%;
	}
	.cte-btn-rechercher {
		width: 100%;
		height: 46px;
	}
}

.cte-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 240px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cte-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.cte-card-image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #e2e8f0;
	overflow: hidden;
}

.cte-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cte-badge-date {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #fff;
	border-radius: 8px;
	padding: 7px 10px;
	text-align: center;
	line-height: 1.1;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.cte-badge-date-jour {
	display: block;
	font-size: 26px;
	font-weight: 800;
	color: #0f172a;
}

.cte-badge-date-jour-range {
	font-size: 13px;
}

.cte-badge-date-mois {
	display: block;
	font-size: 10px;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 0.03em;
	margin-top: 2px;
}

.cte-badge-type-wrap {
	position: absolute;
	bottom: 10px;
	left: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: calc(100% - 20px);
}

.cte-badge-type {
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.04em;
	padding: 5px 10px;
	border-radius: 6px;
}

.cte-card-body {
	position: relative;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.cte-card-title {
	font-size: 16px;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
}

.cte-card-lieu {
	font-size: 13px;
	color: #475569;
	margin: 0;
}

.cte-card-distances {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 12.5px;
	font-weight: 600;
	color: #334155;
	margin: 2px 0 8px;
}

.cte-card-distances span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cte-card-distances span::before {
	content: "• ";
	color: #94a3b8;
}

.cte-card-infos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	font-size: 13px;
	color: #475569;
	margin: 0 0 8px;
}

.cte-card-footer {
	margin-top: auto;
	padding-top: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.cte-statut {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #334155;
}

.cte-statut-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #94a3b8;
}

.cte-statut-ouvertes .cte-statut-dot {
	background: #22c55e;
}

.cte-statut-fermees .cte-statut-dot {
	background: #94a3b8;
}

.cte-statut-annulee .cte-statut-dot {
	background: #ef4444;
}

.cte-statut-complete .cte-statut-dot {
	background: #f59e0b;
}

.cte-statut-alerte .cte-statut-dot {
	background: #f59e0b;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.cte-filigrane-annulee {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 2;
	overflow: hidden;
}

.cte-filigrane-annulee span {
	display: inline-block;
	transform: rotate(-22deg);
	font-size: 26px;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #ef4444;
	border: 3px solid #ef4444;
	padding: 6px 22px;
	background: rgba(255, 255, 255, 0.75);
	white-space: nowrap;
}

.cte-btn-voir {
	border: 1px solid #f97316;
	color: #f97316;
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.cte-btn-voir:hover {
	background: #f97316;
	color: #fff;
}

.cte-btn-resultats {
	background: #f97316;
	color: #fff;
	border: 1px solid #f97316;
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.15s ease;
}

.cte-btn-resultats:hover {
	opacity: 0.88;
}

/* ---------- Pagination ---------- */
.cte-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 28px;
}

.cte-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	text-decoration: none;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
}

.cte-pagination .page-numbers.current {
	background: #f97316;
	border-color: #f97316;
	color: #fff;
}

.cte-pagination .page-numbers:hover:not(.current) {
	border-color: #94a3b8;
}

.cte-aucun-resultat {
	text-align: center;
	color: #64748b;
	padding: 40px 0;
}
