/* =============================================
   CSC Événements — styles front
   (reprend le style d'origine du bloc event)
============================================= */

.csc-events {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.csc-events-grid {
	display: grid;
	grid-template-columns: repeat(var(--csc-cols, 3), 1fr);
	gap: 20px;
	width: 100%;
}

@media (max-width: 1200px) {
	.csc-events-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.csc-events-grid {
		grid-template-columns: 1fr;
	}
}

.csc-events-empty {
	text-align: center;
}

/* =============================================
   Regroupement par mois
   (repris du style d'origine)
============================================= */
.csc-months-container {
	display: flex;
	flex-direction: column;
	gap: 60px;
	width: 100%;
}

.csc-month-section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.csc-month-title {
	font-size: 2rem;
	font-weight: 600;
	color: #333;
	margin: 0;
	padding-bottom: 15px;
	border-bottom: 3px solid var(--Principal, #4285f4);
}

/* =============================================
   Flip-card
============================================= */
.csc-flip-card {
	width: 100%;
	height: 450px;
	perspective: 1000px;
	position: relative;
}

.csc-flip-inner {
	width: 100%;
	height: 100%;
	position: relative;
	transition: transform 0.8s ease;
	transform-style: preserve-3d;
}

.csc-flip-card.active .csc-flip-inner {
	transform: rotateY(180deg);
}

.csc-flip-front,
.csc-flip-back {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	padding: 10px;
	border: 2px solid var(--Principal, #4285f4);
}

/* ─── Face avant ─────────────────────────── */
.csc-flip-front {
	background-color: #fff;
	justify-content: flex-start;
	align-items: center;
	gap: 10px;
}

.csc-flip-front img {
	height: 55%;
	width: auto;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
}

.csc-front-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	text-align: center;
	gap: 15px;
	min-height: 0;
}

.csc-front-infos {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

.csc-flip-front h3,
.csc-flip-front h4 {
	margin: 0;
}

/* ─── Face arrière ───────────────────────── */
.csc-flip-back {
	background-color: #fff;
	color: #000;
	transform: rotateY(180deg);
	justify-content: space-between;
	align-items: center;
	text-align: center;
	gap: 8px;
}

.csc-back-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	text-align: center;
	overflow-y: auto;
	min-height: 0;
}

.csc-back-content h3,
.csc-back-content p {
	margin: 0;
}

.csc-back-description p {
	margin: 0 0 6px;
}

.csc-back-description ul,
.csc-back-description ol {
	margin: 0 0 6px;
	padding-left: 20px;
	text-align: left;
}

.csc-back-description strong {
	font-weight: 700;
}

.csc-back-description p{
    font-weight: 400 !important;
}

.csc-back-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* ─── Boutons ────────────────────────────── */
.csc-flip-btn,
.csc-flip-back-btn {
	padding: 10px 20px;
	width: fit-content;
	height: auto;
	flex-shrink: 0;
	cursor: pointer;
}

/* ─── Liens ──────────────────────────────── */
.csc-resa-link {
	flex-shrink: 0;
}

.csc-gcal-link {
	display: inline-block;
	font-size: 0.85rem;
	color: var(--Principal, #4285f4);
	flex-shrink: 0;
}

/* =============================================
   Badges
============================================= */
.csc-event-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	border-radius: 15px;
	padding: 5px 10px;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
	z-index: 10;
	text-transform: uppercase;
	pointer-events: none;
}

.csc-event-badge[hidden] {
	display: none;
}

.csc-event-badge.badge-today {
	background-color: #fbbc05;
}

.csc-event-badge.badge-upcoming {
	background-color: var(--Principal, #4285f4);
}

.csc-event-badge.badge-live {
	background-color: #e00;
	animation: csc-pulse 1.2s ease-in-out infinite;
}

.csc-live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	background-color: #fff;
	border-radius: 50%;
	flex-shrink: 0;
	animation: csc-blink 1s step-start infinite;
}

/* Masquer le badge quand la carte est retournée (mobile) */
@media (max-width: 768px) {
	.csc-flip-card.active .csc-event-badge {
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}
	.csc-flip-card:not(.active) .csc-event-badge {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}
}

/* =============================================
   Animations
============================================= */
@keyframes csc-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.08); }
}

@keyframes csc-blink {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0; }
}

/* =============================================
   Responsive cartes
============================================= */
@media (max-width: 1024px) {
	.csc-flip-card { height: 420px; }
}

@media (max-width: 768px) {
	.csc-flip-card { height: 380px; }
	.csc-flip-front img { height: 48%; }
	.csc-event-badge { font-size: 0.78rem; padding: 4px 8px; }
}

@media (max-width: 480px) {
	.csc-flip-front img { height: 44%; }
	.csc-event-badge { font-size: 0.72rem; padding: 3px 6px; }
}
