/**
 * mod_udroit_actus v1.0 — CSS BEM
 * Cards unifiées actualités / parutions / enseignement
 */

/* ── Module wrapper ── */
.ua-module {
	margin: 0 auto;
}

/* ══════════════════════════════════════
   CARD (grille + slider)
   ══════════════════════════════════════ */
.ua-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.15s ease;
	text-decoration: none;
	color: inherit;
}
.ua-card:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,0.1);
	transform: translateY(-2px);
	border-color: #d0d0d0;
}

/* ── Cover image ── */
.ua-card__cover {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #f5f5f5;
}
.ua-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.ua-card:hover .ua-card__cover img {
	transform: scale(1.05);
}

/* ── Overlay résumé ── */
.ua-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 100%);
	color: #fff;
	display: flex;
	align-items: flex-end;
	padding: 12px;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.ua-card:hover .ua-card__overlay {
	opacity: 1;
}
.ua-card__overlay p {
	margin: 0;
	font-size: 0.78em;
	line-height: 1.4;
}

/* ── Badge type (top-left) ── */
.ua-badge {
	position: absolute;
	top: 0;
	left: 0;
	padding: 3px 10px;
	font-size: 0.68em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #fff;
	z-index: 2;
}
.ua-badge--manif {
	background: linear-gradient(135deg, #c0392b, #e74c3c);
}
.ua-badge--appel {
	background: linear-gradient(135deg, #d35400, #e67e22);
}
.ua-badge--projet {
	background: linear-gradient(135deg, #2980b9, #3498db);
}
.ua-badge--soutenance {
	background: linear-gradient(135deg, #8e44ad, #9b59b6);
}
.ua-badge--parution {
	background: linear-gradient(135deg, #0f7173, #1abc9c);
}
.ua-badge--enseignement {
	background: linear-gradient(135deg, #27ae60, #2ecc71);
}
.ua-badge--jcp {
	background: linear-gradient(135deg, #16a085, #1abc9c);
}
.ua-badge--acteur {
	background: linear-gradient(135deg, #34495e, #5d6d7e);
}

/* ── Date badge (top-right) ── */
.ua-date {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(255,255,255,0.92);
	color: #333;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 0.7em;
	font-weight: 600;
	z-index: 2;
	line-height: 1.3;
}

/* ── Body ── */
.ua-card__body {
	padding: 12px 14px 8px;
	flex: 1;
}
.ua-card__title {
	font-size: 0.88em;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 4px;
	color: #222;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ua-card__subtitle {
	font-size: 0.78em;
	color: #777;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Footer ── */
.ua-card__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 14px;
	border-top: 1px solid #f0f0f0;
	margin-top: auto;
	background: #fafafa;
}
.ua-card__location {
	font-size: 0.72em;
	color: #888;
}
.ua-card__date-text {
	font-size: 0.72em;
	color: #999;
}

/* ── Status badges ── */
.ua-status {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 0.68em;
	font-weight: 600;
}
.ua-status--live {
	background: #27ae60;
	color: #fff;
}
.ua-status--upcoming {
	background: #2980b9;
	color: #fff;
}
.ua-status--deadline {
	background: #c0392b;
	color: #fff;
}

/* ══════════════════════════════════════
   LIST (compact en grille)
   ══════════════════════════════════════ */
.ua-list-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 8px 10px;
	border: 1px solid #eee;
	border-radius: 4px;
	transition: background 0.15s ease;
	height: 100%;
}
.ua-list-item:hover {
	background: #f8f8f8;
}
.ua-list-item__image {
	width: 70px;
	height: 50px;
	border-radius: 4px;
	overflow: hidden;
	flex-shrink: 0;
}
.ua-list-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ua-list-item__content {
	flex: 1;
	min-width: 0;
}
.ua-list-item__title {
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 3px;
	color: #222;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ua-list-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.ua-list-item__date {
	font-size: 0.72em;
	color: #999;
}
.ua-badge--small {
	position: static;
	padding: 1px 6px;
	font-size: 0.62em;
	border-radius: 2px;
}
.ua-status--small {
	padding: 1px 6px;
	font-size: 0.62em;
}

/* ── Slider ── */
.jl-slider-items .ua-card {
	height: 100%;
}

/* ── Responsive ── */
@media (max-width: 639px) {
	.ua-card__body {
		padding: 10px;
	}
	.ua-card__footer {
		padding: 6px 10px;
	}
	.ua-list-item__image {
		width: 56px;
		height: 40px;
	}
}
