/* ==========================================================================
   Section Derniers Articles (page d'accueil) — Mobile first
   ========================================================================== */

.latest-posts {
	padding: 64px 16px;
}

.latest-posts__inner {
	max-width: var(--container-width);
	margin: 0 auto;
}

/* ---------- Header ---------- */

.latest-posts__header {
	text-align: center;
	margin-bottom: 32px;
}

.latest-posts__subtitle {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-primary);
	margin-bottom: 8px;
}

.latest-posts__title {
	font-family: var(--font-family-head);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-black);
}

/* ---------- Grid ---------- */

.latest-posts__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

/* ---------- Card ---------- */

.latest-posts__card {
	display: flex;
	flex-direction: column;
	background-color: var(--color-bg);
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid rgba(34, 34, 34, 0.06);
	transition: transform var(--transition), box-shadow var(--transition);
}

.latest-posts__card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

/* Image */
.latest-posts__card-image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.latest-posts__card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.latest-posts__card:hover .latest-posts__card-image img {
	transform: scale(1.03);
}

.latest-posts__card-image--placeholder {
	background-color: rgba(197, 129, 129, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
}

.latest-posts__card-image--placeholder svg {
	width: 32px;
	height: 32px;
	color: rgba(197, 129, 129, 0.25);
}

/* Body */
.latest-posts__card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

/* Meta */
.latest-posts__card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

.latest-posts__card-category {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-primary);
}

.latest-posts__card-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background-color: rgba(34, 34, 34, 0.2);
	flex-shrink: 0;
}

.latest-posts__card-date {
	font-size: 0.75rem;
	color: rgba(34, 34, 34, 0.4);
}

/* Title */
.latest-posts__card-title {
	font-family: var(--font-family-head);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-black);
	line-height: 1.3;
	transition: color var(--transition);
}

.latest-posts__card:hover .latest-posts__card-title {
	color: var(--color-primary);
}

/* Excerpt */
.latest-posts__card-excerpt {
	font-size: 0.875rem;
	line-height: 1.6;
	color: rgba(34, 34, 34, 0.6);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Reading time */
.latest-posts__card-read-time {
	font-size: 0.75rem;
	color: rgba(34, 34, 34, 0.4);
	margin-top: auto;
	padding-top: 4px;
}

/* ---------- Footer ---------- */

.latest-posts__footer {
	text-align: center;
	margin-top: 36px;
}

/* ==========================================================================
   Derniers Articles — Desktop (>= 768px)
   ========================================================================== */

@media (min-width: 768px) {
	.latest-posts {
		padding: 80px 80px;
	}

	.latest-posts__header {
		margin-bottom: 40px;
	}

	.latest-posts__title {
		font-size: 2rem;
	}

	.latest-posts__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 28px;
	}

	.latest-posts__card-body {
		padding: 24px;
	}

	.latest-posts__footer {
		margin-top: 48px;
	}
}
