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

/* ---------- Barre de filtre ---------- */
.cter-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;
}

.cter-filter-field {
	flex: 1 1 160px;
}

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

.cter-filter-recherche {
	flex: 2 1 220px;
}

.cter-filter-bar input,
.cter-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;
}

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

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

.cter-btn-filtrer:hover {
	opacity: 0.9;
}

/* ---------- Titre ---------- */
.cter-header-row {
	margin-bottom: 18px;
}

.cter-titre {
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
}

/* ---------- Grille ---------- */
.cter-grid {
	display: grid;
	grid-template-columns: repeat(var(--cter-columns, 3), 1fr);
	gap: 22px;
	transition: opacity 0.15s ease;
}

.cter-grid.cter-loading {
	opacity: 0.4;
	pointer-events: none;
}

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

@media (max-width: 600px) {
	.cter-grid { grid-template-columns: 1fr !important; }
	.cter-filter-bar { flex-direction: column; align-items: stretch; }
	.cter-filter-field,
	.cter-filter-recherche { flex: none; width: 100%; }
	.cter-btn-filtrer { width: 100%; }
}

.cter-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%;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

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

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

.cter-badge-type-wrap {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: calc(100% - 24px);
}

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

.cter-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

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

.cter-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	font-size: 13px;
	color: #475569;
	margin: 0;
}

.cter-card-footer {
	margin-top: auto;
	padding-top: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.cter-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: opacity 0.15s ease;
	flex: 1 1 auto;
}

.cter-btn:hover {
	opacity: 0.88;
}

.cter-btn-resultats {
	background: #f97316;
	color: #fff;
}

.cter-btn-voir {
	background: #1e3a8a;
	color: #fff;
}

.cter-btn-stats {
	background: #e2e8f0;
	color: #334155;
}

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

.cter-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.cter-page-btn:hover:not(.cter-page-current) {
	border-color: #94a3b8;
}

.cter-page-current {
	background: #f97316;
	border-color: #f97316;
	color: #fff;
}

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

.cter-avertissement-date {
	background: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 13px;
	margin-bottom: 16px;
}

/* ---------- Popup Statistiques ---------- */
.cter-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cter-modal[hidden] {
	display: none;
}

.cter-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.cter-modal-panel {
	position: relative;
	background: #fff;
	border-radius: 16px;
	max-width: 560px;
	width: calc(100% - 32px);
	max-height: 85vh;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
}

.cter-modal-body {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 28px 28px 16px;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 #f1f5f9;
}

.cter-modal-body::-webkit-scrollbar {
	width: 8px;
}

.cter-modal-body::-webkit-scrollbar-track {
	background: #f1f5f9;
}

.cter-modal-body::-webkit-scrollbar-thumb {
	background-color: #cbd5e1;
	border-radius: 8px;
}

.cter-modal-footer {
	flex-shrink: 0;
	padding: 14px 28px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	justify-content: flex-end;
}

.cter-modal-btn-fermer {
	background: #e2e8f0;
	color: #334155;
	flex: 0 0 auto;
	padding: 10px 22px;
}

.cter-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
}

.cter-stats-titre {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
	padding-right: 24px;
}

.cter-stats-chargement,
.cter-stats-aucune {
	color: #64748b;
	text-align: center;
	padding: 20px 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cter-stats-epreuve {
	margin-bottom: 22px;
}

.cter-stats-epreuve:last-child {
	margin-bottom: 0;
}

.cter-stats-epreuve h4 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 800;
	color: #f97316;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.cter-stats-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.cter-stats-item {
	background: #f8fafc;
	border-radius: 10px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cter-stats-label {
	font-size: 12px;
	color: #64748b;
}

.cter-stats-value {
	font-size: 16px;
	font-weight: 800;
	color: #0f172a;
}
