/* ==========================================================================
   Blog Archive — Mobile first
   ========================================================================== */

/* Override site-main pour la page archive blog
   On cible uniquement les archives d'articles (pas WooCommerce). */
.blog .site-main,
.archive.category .site-main,
.archive.tag .site-main,
.archive.date .site-main,
.archive.author .site-main,
.search .site-main {
	max-width: none;
	padding: 0;
}

/* ---------- Archive Hero ---------- */

.ba-hero {
	background-color: var(--color-bg-alt);
	padding: 40px 16px 48px;
	text-align: center;
}

.ba-hero__inner {
	max-width: 640px;
	margin: 0 auto;
}

.ba-hero__label {
	display: inline-block;
	padding: 5px 14px;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-primary);
	border: 1px solid rgba(197, 129, 129, 0.45);
	border-radius: 100px;
	margin-bottom: 16px;
}

.ba-hero__title {
	font-family: var(--font-family-head);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--color-black);
	letter-spacing: -0.01em;
}

.ba-hero__description {
	margin-top: 12px;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: rgba(34, 34, 34, 0.6);
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

.ba-hero__count {
	display: block;
	margin-top: 16px;
	font-size: 0.8125rem;
	color: rgba(34, 34, 34, 0.4);
}

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

.ba-grid {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 40px 16px 56px;
}

/* ---------- Featured post (first post) ---------- */

.ba-featured {
	display: flex;
	flex-direction: column;
	background-color: var(--color-bg-alt);
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 32px;
	transition: box-shadow var(--transition);
}

.ba-featured:hover {
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.ba-featured__image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.ba-featured__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ba-featured:hover .ba-featured__image img {
	transform: scale(1.02);
}

.ba-featured__image--placeholder {
	background-color: rgba(197, 129, 129, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ba-featured__image--placeholder svg {
	width: 48px;
	height: 48px;
	color: rgba(197, 129, 129, 0.25);
}

.ba-featured__body {
	padding: 28px 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ba-featured__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.ba-featured__category {
	display: inline-block;
	padding: 4px 12px;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-primary);
	border: 1px solid rgba(197, 129, 129, 0.35);
	border-radius: 100px;
	transition: background-color var(--transition), color var(--transition);
}

.ba-featured:hover .ba-featured__category {
	background-color: var(--color-primary);
	color: #fff;
}

.ba-featured__date {
	font-size: 0.8125rem;
	color: rgba(34, 34, 34, 0.4);
}

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

.ba-featured__reading-time {
	font-size: 0.8125rem;
	color: rgba(34, 34, 34, 0.4);
}

.ba-featured__title {
	font-family: var(--font-family-head);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-black);
	line-height: 1.25;
	transition: color var(--transition);
}

.ba-featured:hover .ba-featured__title {
	color: var(--color-primary);
}

.ba-featured__excerpt {
	font-size: 0.9375rem;
	line-height: 1.65;
	color: rgba(34, 34, 34, 0.6);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ba-featured__read-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-primary);
	margin-top: 4px;
	transition: gap var(--transition);
}

.ba-featured:hover .ba-featured__read-more {
	gap: 10px;
}

.ba-featured__read-more svg {
	width: 14px;
	height: 14px;
}

/* ---------- Posts grid ---------- */

.ba-posts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

/* ---------- Post card ---------- */

.ba-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);
}

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

.ba-card__image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.ba-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ba-card:hover .ba-card__image img {
	transform: scale(1.03);
}

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

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

.ba-card__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.ba-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

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

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

.ba-card__date {
	font-size: 0.75rem;
	color: rgba(34, 34, 34, 0.4);
}

.ba-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);
}

.ba-card:hover .ba-card__title {
	color: var(--color-primary);
}

.ba-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;
}

.ba-card__reading-time {
	font-size: 0.75rem;
	color: rgba(34, 34, 34, 0.4);
	margin-top: auto;
	padding-top: 4px;
}

/* ---------- Pagination ---------- */

.ba-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid rgba(34, 34, 34, 0.08);
}

.ba-pagination a,
.ba-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	font-size: 0.875rem;
	font-weight: 500;
	border-radius: var(--radius);
	transition:
		background-color var(--transition),
		color var(--transition),
		border-color var(--transition);
}

.ba-pagination a {
	color: rgba(34, 34, 34, 0.6);
	border: 1px solid rgba(34, 34, 34, 0.12);
}

.ba-pagination a:hover,
.ba-pagination a:focus-visible {
	color: #fff;
	background-color: var(--color-primary);
	border-color: var(--color-primary);
}

.ba-pagination .current {
	color: #fff;
	background-color: var(--color-primary);
	border: 1px solid var(--color-primary);
}

.ba-pagination .dots {
	border: none;
	color: rgba(34, 34, 34, 0.3);
	min-width: auto;
	padding: 0 4px;
}

.ba-pagination .prev,
.ba-pagination .next {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	gap: 6px;
}

.ba-pagination .prev svg,
.ba-pagination .next svg {
	width: 14px;
	height: 14px;
}

/* ---------- Empty state ---------- */

.ba-empty {
	text-align: center;
	padding: 64px 16px;
	max-width: 480px;
	margin: 0 auto;
}

.ba-empty__icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 20px;
	color: rgba(197, 129, 129, 0.4);
}

.ba-empty__title {
	font-family: var(--font-family-head);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--color-black);
	margin-bottom: 8px;
}

.ba-empty__text {
	font-size: 0.9375rem;
	color: rgba(34, 34, 34, 0.6);
	line-height: 1.6;
	margin-bottom: 24px;
}

/* ==========================================================================
   Blog Archive — Desktop (>= 768px)
   ========================================================================== */

@media (min-width: 768px) {

	/* Hero */
	.ba-hero {
		padding: 56px 80px 64px;
	}

	.ba-hero__title {
		font-size: 2.75rem;
	}

	/* Grid */
	.ba-grid {
		padding: 56px 80px 80px;
	}

	/* Featured post — horizontal layout */
	.ba-featured {
		flex-direction: row;
		border-radius: 24px;
		margin-bottom: 48px;
	}

	.ba-featured__image {
		flex: 0 0 50%;
		aspect-ratio: unset;
		min-height: 320px;
	}

	.ba-featured__body {
		flex: 1;
		padding: 36px 40px;
		justify-content: center;
		gap: 14px;
	}

	.ba-featured__title {
		font-size: 1.75rem;
	}

	/* Posts grid — 2 columns */
	.ba-posts {
		grid-template-columns: repeat(2, 1fr);
		gap: 28px;
	}

	/* Card body */
	.ba-card__body {
		padding: 24px;
	}

	/* Pagination */
	.ba-pagination {
		margin-top: 56px;
	}
}

/* ==========================================================================
   Blog Archive — Large desktop (>= 1024px)
   ========================================================================== */

@media (min-width: 1024px) {

	/* Posts grid — 3 columns */
	.ba-posts {
		grid-template-columns: repeat(3, 1fr);
	}
}
