/* CPTS Événements – affichage public */

.cev {
	--cev-violet: #7f248c;
	--cev-violet-dark: #5f1a69;
	--cev-violet-50: #f7eff8;
	--cev-violet-100: #ecdcef;
	--cev-vert: #3f8f3a;
	--cev-vert-50: #ebf5e8;
	--cev-text: #2d2a32;
	--cev-muted: #6b6772;
	--cev-border: #ebe6ee;
	--cev-surface: #fff;
	--cev-bg: #faf8fb;
	--cev-radius: 16px;
	--cev-shadow: 0 1px 2px rgba(45, 20, 55, 0.06), 0 6px 20px rgba(45, 20, 55, 0.06);
	--cev-shadow-hover: 0 2px 4px rgba(45, 20, 55, 0.08), 0 14px 34px rgba(45, 20, 55, 0.12);

	color: var(--cev-text);
	line-height: 1.55;
}
.cev *,
.cev *::before,
.cev *::after {
	box-sizing: border-box;
}
.cev ul,
.cev ol,
.cev dl,
.cev dd,
.cev figure {
	margin: 0;
	padding: 0;
	list-style: none;
}
.cev a {
	text-decoration: none;
}
.cev .cev-icon {
	flex: none;
}
.cev .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Boutons -------------------------------------------------------------- */

.cev .cev-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 22px;
	border: 2px solid var(--cev-violet);
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.cev .cev-btn--primary {
	background: var(--cev-violet);
	color: #fff;
}
.cev .cev-btn--primary:hover,
.cev .cev-btn--primary:focus-visible {
	background: var(--cev-violet-dark);
	border-color: var(--cev-violet-dark);
	color: #fff;
}
.cev .cev-btn--ghost {
	background: transparent;
	color: var(--cev-violet);
}
.cev .cev-btn--ghost:hover,
.cev .cev-btn--ghost:focus-visible {
	background: var(--cev-violet-50);
	color: var(--cev-violet-dark);
}
.cev .cev-btn--block {
	display: flex;
	width: 100%;
	margin-top: 20px;
}
.cev .cev-btn .cev-icon {
	width: 16px;
	height: 16px;
}
.cev a:focus-visible,
.cev button:focus-visible {
	outline: 3px solid rgba(127, 36, 140, 0.35);
	outline-offset: 2px;
}

/* Onglets À venir / Passés --------------------------------------------- */

.cev-tabs {
	display: flex;
	width: max-content;
	max-width: 100%;
	margin: 0 auto 32px;
	padding: 5px;
	background: var(--cev-violet-50);
	border-radius: 999px;
}
.cev .cev-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 24px;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--cev-violet);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
.cev .cev-tab[aria-selected="true"] {
	background: var(--cev-violet);
	color: #fff;
	box-shadow: 0 4px 12px rgba(127, 36, 140, 0.25);
}
.cev-tab__count {
	min-width: 24px;
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(127, 36, 140, 0.12);
	font-size: 0.8em;
	text-align: center;
}
.cev-tab[aria-selected="true"] .cev-tab__count {
	background: rgba(255, 255, 255, 0.22);
}

/* Grille de cartes ----------------------------------------------------- */

.cev-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: 28px;
}

.cev-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--cev-surface);
	border: 1px solid var(--cev-border);
	border-radius: var(--cev-radius);
	box-shadow: var(--cev-shadow);
	transition: transform 0.25s, box-shadow 0.25s;
}
.cev-card:hover,
.cev-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--cev-shadow-hover);
}

.cev-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--cev-violet-50);
}
.cev .cev-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}
.cev-card:hover .cev-card__img {
	transform: scale(1.04);
}
.cev-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #7f248c 0%, #a3479f 55%, #e2a8d6 100%);
	color: rgba(255, 255, 255, 0.85);
}
.cev-card__placeholder .cev-icon {
	width: 56px;
	height: 56px;
	stroke-width: 1.2;
}

.cev-card__badge,
.cev-session__badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	background: #fff;
	border-radius: 14px;
	color: var(--cev-violet);
	line-height: 1;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.cev-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
}
.cev-card__day {
	font-size: 24px;
	font-weight: 800;
}
.cev-card__month {
	margin-top: 3px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cev-card__flag {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	background: var(--cev-vert);
	border-radius: 999px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}
.cev-card__flag--visio {
	background: rgba(32, 20, 40, 0.75);
	backdrop-filter: blur(4px);
}
.cev-card__flag .cev-icon {
	width: 15px;
	height: 15px;
}

.cev-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 22px 22px;
}
.cev .cev-card__title {
	margin: 0 0 14px;
	font-size: 21px;
	line-height: 1.3;
}
.cev .cev-card__link {
	color: var(--cev-text);
}
.cev .cev-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.cev .cev-card__link:hover {
	color: var(--cev-violet);
}

.cev-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 18px !important;
	font-size: 15px;
}
.cev-meta li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}
.cev-meta .cev-icon {
	margin-top: 2px;
	color: var(--cev-violet);
}
.cev-pill {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 9px;
	background: var(--cev-violet-50);
	border-radius: 999px;
	color: var(--cev-violet);
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
}

.cev-card__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	color: var(--cev-violet);
	font-weight: 700;
}
.cev-card__more .cev-icon {
	transition: transform 0.2s;
}
.cev-card:hover .cev-card__more .cev-icon {
	transform: translateX(4px);
}

/* Événements passés : visuel atténué */
.cev-card--passe .cev-card__img,
.cev-card--passe .cev-card__placeholder {
	filter: grayscale(0.6);
	opacity: 0.85;
}
.cev-card--passe .cev-card__badge {
	color: var(--cev-muted);
}

/* Aucun événement */
.cev-empty {
	max-width: 560px;
	margin: 0 auto;
	padding: 48px 28px;
	background: var(--cev-bg);
	border: 1px dashed var(--cev-violet-100);
	border-radius: var(--cev-radius);
	text-align: center;
}
.cev-empty > .cev-icon {
	width: 44px;
	height: 44px;
	margin-bottom: 12px;
	color: var(--cev-violet);
}
.cev-empty p {
	margin: 0 0 8px;
	color: var(--cev-muted);
}
.cev .cev-empty__title {
	color: var(--cev-text);
	font-size: 19px;
	font-weight: 700;
}
.cev-empty .cev-btn {
	margin-top: 14px;
}

/* Fiche événement ------------------------------------------------------ */

.cev-fiche {
	max-width: 1140px;
	margin: 0 auto;
}

.cev .cev-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 20px;
	color: var(--cev-violet);
	font-weight: 600;
}
.cev .cev-back:hover {
	color: var(--cev-violet-dark);
}

.cev-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	margin-bottom: 44px;
	padding: 36px;
	background:
		radial-gradient(circle at 100% 0%, rgba(127, 36, 140, 0.10), transparent 55%),
		linear-gradient(180deg, var(--cev-violet-50) 0%, #fff 100%);
	border: 1px solid var(--cev-border);
	border-radius: 24px;
}
.cev-hero--no-media {
	grid-template-columns: 1fr;
}

.cev-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}
.cev-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	background: var(--cev-vert-50);
	border-radius: 999px;
	color: var(--cev-vert);
	font-size: 13px;
	font-weight: 700;
}
.cev-tag .cev-icon {
	width: 15px;
	height: 15px;
}
.cev-tag--live {
	background: var(--cev-vert);
	color: #fff;
}
.cev-tag--past {
	background: #eeecef;
	color: var(--cev-muted);
}
.cev-tag--visio {
	background: var(--cev-violet-100);
	color: var(--cev-violet);
}

.cev .cev-hero__title {
	margin: 0 0 20px;
	color: var(--cev-text);
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.15;
}

.cev-facts {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 26px !important;
	font-size: 17px;
	font-weight: 600;
}
.cev-facts li {
	display: flex;
	align-items: center;
	gap: 12px;
}
.cev-facts .cev-icon {
	width: 38px;
	height: 38px;
	padding: 9px;
	background: #fff;
	border-radius: 10px;
	color: var(--cev-violet);
	box-shadow: 0 1px 3px rgba(45, 20, 55, 0.08);
}

.cev-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.cev-hero__media a {
	display: block;
	overflow: hidden;
	border-radius: 18px;
	box-shadow: 0 18px 40px rgba(45, 20, 55, 0.18);
	cursor: zoom-in;
}
.cev .cev-hero__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 460px;
	object-fit: cover;
}
.cev-fiche--passe .cev-hero__img {
	filter: grayscale(0.4);
}

.cev-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	align-items: start;
	gap: 44px;
}

.cev-section + .cev-section {
	margin-top: 40px;
}
.cev .cev-section__title,
.cev .cev-infos__title {
	position: relative;
	margin: 0 0 18px;
	padding-bottom: 10px;
	color: var(--cev-text);
	font-size: 24px;
	line-height: 1.25;
}
.cev .cev-section__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 44px;
	height: 3px;
	background: var(--cev-violet);
	border-radius: 3px;
}

.cev-description {
	font-size: 16.5px;
}
.cev-description p {
	margin: 0 0 1em;
}
.cev-description ul {
	margin: 0 0 1em 1.2em;
	list-style: disc;
}
.cev-description ol {
	margin: 0 0 1em 1.2em;
	list-style: decimal;
}
.cev-description a {
	color: var(--cev-violet);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.cev-description img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

/* Séances */
.cev-sessions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.cev-session {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px;
	background: var(--cev-bg);
	border: 1px solid var(--cev-border);
	border-radius: 14px;
}
.cev-session__badge {
	flex: none;
	width: 56px;
	height: 56px;
	box-shadow: none;
	border: 1px solid var(--cev-violet-100);
}
.cev-session__text {
	display: flex;
	flex-direction: column;
}
.cev-session__text span {
	color: var(--cev-muted);
}
.cev-session.is-past {
	opacity: 0.6;
}

/* Documents */
.cev-files {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cev .cev-file {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: var(--cev-surface);
	border: 1px solid var(--cev-border);
	border-radius: 14px;
	color: var(--cev-text);
	transition: border-color 0.2s, background-color 0.2s;
}
.cev .cev-file:hover {
	background: var(--cev-violet-50);
	border-color: var(--cev-violet-100);
}
.cev-file__icon {
	display: flex;
	padding: 9px;
	background: var(--cev-violet-50);
	border-radius: 10px;
	color: var(--cev-violet);
}
.cev-file__name {
	flex: 1;
	font-weight: 700;
}
.cev-file__meta {
	color: var(--cev-muted);
	font-size: 13px;
	white-space: nowrap;
}
.cev-file__dl {
	display: flex;
	color: var(--cev-violet);
}

.cev-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
	margin-top: 16px !important;
}
.cev-files + .cev-gallery {
	margin-top: 20px !important;
}
.cev-gallery a {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 12px;
	cursor: zoom-in;
}
.cev .cev-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}
.cev-gallery a:hover img {
	transform: scale(1.05);
}
.cev-gallery__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 24px 10px 8px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}

/* Infos pratiques */
.cev-aside {
	position: sticky;
	top: 110px;
}
.cev-infos {
	padding: 26px;
	background: var(--cev-surface);
	border: 1px solid var(--cev-border);
	border-top: 4px solid var(--cev-violet);
	border-radius: var(--cev-radius);
	box-shadow: var(--cev-shadow);
}
.cev .cev-infos__title {
	font-size: 20px;
}
.cev-infos dl > div + div {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--cev-border);
}
.cev-infos dt {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
	color: var(--cev-violet);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.cev-infos dt .cev-icon {
	width: 16px;
	height: 16px;
}
.cev-infos dd {
	font-size: 15.5px;
}
.cev-infos__line {
	display: block;
}
.cev-nowrap {
	white-space: nowrap;
}
.cev .cev-infos dd a {
	color: var(--cev-violet);
}
.cev .cev-infos__map {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	font-weight: 600;
	font-size: 14px;
}
.cev-infos__map .cev-icon {
	width: 14px;
	height: 14px;
}

/* Agrandissement d'image */
.cev-lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	background: rgba(18, 10, 22, 0.92);
	border: 0;
}
.cev-lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}
.cev-lightbox::backdrop {
	background: transparent;
}
.cev-lightbox figure {
	margin: 0;
	text-align: center;
}
.cev-lightbox img {
	max-width: 90vw;
	max-height: 82vh;
	border-radius: 8px;
}
.cev-lightbox figcaption {
	margin-top: 12px;
	color: #fff;
	font-weight: 600;
}
.cev-lightbox button {
	position: absolute;
	width: 48px;
	height: 48px;
	padding: 0;
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}
.cev-lightbox button:hover {
	background: rgba(255, 255, 255, 0.25);
}
.cev-lightbox__close {
	top: 20px;
	right: 20px;
}
.cev-lightbox__nav {
	display: none;
	top: 50%;
	transform: translateY(-50%);
}
.cev-lightbox.has-nav .cev-lightbox__nav {
	display: block;
}
.cev-lightbox__prev {
	left: 20px;
}
.cev-lightbox__next {
	right: 20px;
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 980px) {
	.cev-hero {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 26px;
	}
	.cev-hero__media {
		order: -1;
	}
	.cev-layout {
		grid-template-columns: 1fr;
		gap: 36px;
	}
	.cev-aside {
		position: static;
	}
}

@media (max-width: 600px) {
	.cev-hero {
		margin-left: -6px;
		margin-right: -6px;
		padding: 20px;
		border-radius: 18px;
	}
	.cev-actions .cev-btn {
		width: 100%;
	}
	.cev .cev-tab {
		padding: 9px 16px;
	}
	.cev .cev-file {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cev *,
	.cev *::before,
	.cev *::after {
		transition: none !important;
	}
}
