/*
 * Blog : page Blog (page-template/blog.php) et archives (archive.php : catégories, étiquettes, dates).
 * Chargé seulement sur ces pages. Même rendu que le blog de gozem-revamp-theme.
 */

/* Cette page gère ses propres espacements. */
.site-main {
	padding-block: 0;
}

/* ---------- Bannière photo ---------- */

.blog-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	height: 576px;
	padding: 40px 20px;
	overflow: hidden;
	background: #d3d3d3;
}

.blog-hero__image,
.blog-hero__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Voile sombre pour que le texte blanc reste lisible. */
.blog-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(0, 0, 0, 0.3);
}

.blog-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1014px;
	margin-inline: auto;
	padding-bottom: 85px;
}

.blog-hero__title {
	max-width: 700px;
	margin: 0;
	color: var(--wp--preset--color--white);
	font-size: clamp(2.5rem, 5vw, 4.25rem); /* 68px sur grand écran. */
	font-weight: 700;
}

.blog-hero__text {
	max-width: 700px;
	margin: 16px 0 0;
	color: var(--wp--preset--color--white);
	font-size: 1.25rem;
	font-weight: 500;
}

/* ---------- Liste des articles ---------- */

.blog-list {
	padding-block: 96px;
}

.blog-list .container {
	max-width: calc(1014px + 40px);
}

.blog-list__title {
	margin: 0 0 8px;
	font-size: clamp(2rem, 4vw, 3rem); /* 48px sur grand écran. */
	font-weight: 800;
	text-align: center;
}

.blog-list__text {
	max-width: 956px;
	margin: 0 auto;
	color: var(--wp--preset--color--text);
	font-size: 1.125rem;
	font-weight: 500;
	text-align: center;
}

/* Filtre par catégorie (page Blog) : liste déroulante grise, flèche à droite. */
.blog-filter {
	display: flex;
	gap: 16px;
	margin-top: 40px;
}

.blog-filter select {
	flex: 1;
	min-width: 0;
	padding: 15px 56px 15px 24px;
	color: var(--wp--preset--color--text);
	font-weight: 500;
	background: #e8e8e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c6c6c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 24px center;
	border: 1px solid transparent;
	border-radius: 12px;
	appearance: none;
	cursor: pointer;
}

.blog-list__count {
	margin: 20px 0 0;
	color: var(--wp--preset--color--text);
}

/* Les 2 premiers articles sur une demi-largeur, les suivants sur un tiers. */
.blog-list__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 32px;
	margin-top: 40px;
}

.blog-list__grid > * {
	grid-column: span 2;
}

.blog-list__grid > :nth-child(-n + 2) {
	grid-column: span 3;
}

/* Pagination : ← 1 2 3 → */
.blog-list .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	margin-top: 96px;
}

.blog-list .page-numbers {
	color: var(--wp--preset--color--text);
	font-weight: 600;
	text-decoration: none;
}

.blog-list .page-numbers.current {
	color: var(--wp--preset--color--primary-dark);
}

@media (max-width: 991px) {
	.blog-hero {
		height: 400px;
	}

	.blog-hero__content {
		padding-bottom: 24px;
	}

	.blog-list {
		padding-block: 64px;
	}

	.blog-list__grid > *,
	.blog-list__grid > :nth-child(-n + 2) {
		grid-column: 1 / -1;
	}
}
