/**
 * Card Événement
 *
 * Structure :
 *   <article class="ri-event-card">
 *     <a class="link">
 *       <div class="visuel" style="background-color:…">
 *         <span class="type-nom" style="color:…">Nom type</span>
 *       </div>
 *       <div class="corps">
 *         <div class="meta">
 *           <span class="tag"><span class="dot"></span> TYPE</span>
 *           <span class="lieu-date">Ville — Le 01.01.25</span>
 *         </div>
 *         <div class="intro-wrap"><p class="intro">…</p></div>
 *         <div class="cta">
 *           <span class="cta-arrow">></span>
 *           <span class="cta-label">Découvrir l'événement</span>
 *         </div>
 *       </div>
 *     </a>
 *   </article>
 */

/* ── Carte ── */

.ri-event-card {
	box-shadow: 0 4px 20px rgba(208, 208, 208, 0.5);
}

.ri-event-card .link {
	display: flex;
	align-items: stretch;
	text-decoration: none;
	color: inherit;
	height: 165px;
	transition: box-shadow var(--ri-transition-base);
}

.ri-event-card .link:hover,
.ri-event-card .link:focus-visible {
	box-shadow: var(--ri-shadow-lg);
}

.ri-event-card .link:focus-visible {
	outline: 2px solid var(--ri-color-teal);
	outline-offset: 2px;
}

/* ── Panneau gauche coloré ── */

.ri-event-card .visuel {
	flex-shrink: 0;
	width: 267px;
	margin: 4px;
	overflow: hidden;
	position: relative;
}

.ri-event-card .type-nom {
	font: 700 48px/0.8 var(--ri-font-2);
	padding: 16px 87px 16px 16px;
	position: absolute;
	bottom: 0;
	left: 0;
	word-break: break-all;
}

/* ── Panneau droit ── */

.ri-event-card .corps {
	flex: 1;
	min-width: 0;
	padding: 16px 16px 24px;
	background: var(--ri-color-white);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
}

/* ── Meta ── */

.ri-event-card .meta {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}

.ri-event-card .tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font: 700 12px/1 var(--ri-font-1);
	color: var(--ri-color-teal);
	text-transform: uppercase;
}

.ri-event-card .dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--ri-color-teal);
	flex-shrink: 0;
}

.ri-event-card .lieu-date {
	font: 400 12px/1 var(--ri-font-1);
	color: var(--ri-color-grey);
	text-align: right;
	flex-shrink: 0;
}

/* ── Intro ── */

.ri-event-card .intro-wrap {
	flex: 1;
}

.ri-event-card .intro {
	margin: 0;
	font: 400 var(--ri-size-text-body) / 1.5 var(--ri-font-1);
	max-height: calc(1.5em * 2);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	line-clamp: 2;
}

/* ── CTA ── */

.ri-event-card .cta {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
}

.ri-event-card .cta-arrow {
	font: 700 var(--ri-size-text-body-sm) / 1 var(--ri-font-1);
}

.ri-event-card .cta-label {
	font: 700 var(--ri-size-text-body-sm) / 1 var(--ri-font-1);
	color: var(--ri-color-teal);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 25%;
	transition: opacity var(--ri-transition-base);
}

.ri-event-card .link:hover .cta-label {
	opacity: 0.7;
}

/* ── Responsive ── */

@media (max-width: 782px) {

	.ri-event-card .link {
		height: auto;
		min-height: 118px;
	}

	.ri-event-card .visuel {
		width: 94px;
	}

	.ri-event-card .type-nom {
		font: 700 20px/0.9 var(--ri-font-2);
		padding: 8px 17px 8px 8px;
	}

	.ri-event-card .corps {
		padding: 18px 12px;
		gap: 4px;
	}

	.ri-event-card .tag {
		font: 700 10px/1 var(--ri-font-1);
	}

	.ri-event-card .dot {
		width: 8px;
		height: 8px;
	}

	.ri-event-card .lieu-date {
		display: none;
	}

	.ri-event-card .intro {
		max-height: calc(1.5em * 3);
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}

	.ri-event-card .cta {
		display: none;
	}
}
