/**
 * Pleasetrip — Archive blog (index /fr/blog/).
 */

:root {
	--blog-max:        1200px;
	--blog-px:         clamp(1rem, 4vw, 2rem);
	--radius-card:     1rem;
	--color-text:      #1a1a2e;
	--color-muted:     #6b7280;
	--color-white:     #ffffff;
	--color-link:      var(--pt-link);
	--color-yellow:    #facc15;
	--color-yellow-h:  #e0b400;
}

.site-content:has(#pleasetrip-blog) {
	padding-top: 0;
}

#pleasetrip-blog {
	overflow-x: clip;
	width: 100%;
}

.blog-container {
	max-width: var(--blog-max);
	margin-inline: auto;
	padding-inline: var(--blog-px);
}

/* ── Héros ─────────────────────────────────────────────────────────────────── */
.blog-hero {
	position: relative;
	min-height: clamp(320px, 52vh, 560px);
	background: #132032;
	overflow: hidden;
}

.blog-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	background-color: #0f172a;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	filter: saturate(1.06);
}

.blog-hero__bg--empty {
	background-image: linear-gradient(135deg, #1e293b 0%, #0f172a 55%, #132032 100%);
}

.blog-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(8, 12, 20, .25) 0%, rgba(8, 12, 20, .65) 70%);
}

.blog-hero__content {
	position: relative;
	z-index: 2;
	max-width: 720px;
	margin-inline: auto;
	text-align: center;
	padding: clamp(3rem, 10vw, 5rem) var(--blog-px);
	color: var(--color-white);
}

.blog-hero__kicker {
	font-size: clamp(.88rem, 1.8vw, 1rem);
	margin: 0 0 .5rem;
	opacity: .92;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.blog-hero__title {
	font-size: clamp(1.75rem, 4.2vw, 2.75rem);
	font-weight: 800;
	margin: 0 0 .75rem;
	color: var(--color-white);
	text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.blog-hero__desc {
	font-size: clamp(.9rem, 1.7vw, 1.05rem);
	line-height: 1.55;
	margin: 0 auto;
	max-width: 52ch;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}

/* ── Filtres (chips + recherche) ───────────────────────────────────────────── */
.blog-filters {
	padding: 2rem 0 1.25rem;
	background: var(--color-white);
	border-bottom: 1px solid #e5e7eb;
}

.blog-filters__inner {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.blog-filters__chips-label {
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--color-muted);
	margin: 0 0 .5rem;
}

.blog-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .42rem .5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.blog-chip {
	display: inline-flex;
	align-items: center;
	padding: .32rem .85rem;
	border-radius: 999px;
	font-size: .82rem;
	font-weight: 600;
	text-decoration: none;
	background: #f3f4f6;
	color: var(--color-text);
	border: 1px solid #e5e7eb;
	transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.blog-chip:hover,
.blog-chip:focus-visible {
	background: #fefce8;
	border-color: rgba(234, 179, 8, .45);
	color: #78350f;
	transform: translateY(-1px);
}

.blog-search {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: stretch;
	max-width: 28rem;
}

.blog-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.blog-search__input {
	flex: 1;
	min-width: 0;
	padding: .55rem .85rem;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	font-size: .9rem;
	line-height: 1.4;
}

.blog-search__input:focus {
	outline: 2px solid var(--color-link);
	outline-offset: 2px;
	border-color: var(--color-link);
}

.blog-search__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .55rem 1.1rem;
	border: none;
	border-radius: 999px;
	background: var(--color-yellow);
	color: #111827;
	font-weight: 700;
	font-size: .88rem;
	cursor: pointer;
	transition: background .18s ease, transform .18s ease;
}

.blog-search__submit:hover {
	background: var(--color-yellow-h);
	transform: translateY(-1px);
}

/* ── Liste / grille articles ───────────────────────────────────────────────── */
.blog-listing {
	padding: 2.5rem 0 3.5rem;
	background: #f9fafb;
}

.blog-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: start;
}

.blog-card {
	display: flex;
	flex-direction: column;
	background: var(--color-white);
	border-radius: var(--radius-card);
	box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
	min-width: 0;
}

.blog-card:hover {
	box-shadow: 0 8px 28px rgba(0, 0, 0, .1);
	transform: translateY(-2px);
}

.blog-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background-color: #e5e7eb;
	overflow: hidden;
	flex-shrink: 0;
}

.blog-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blog-card__img--empty {
	background: linear-gradient(135deg, #cbd5e1, #94a3b8);
	min-height: 100%;
}

.blog-card__body {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	padding: .85rem 1rem 1rem;
	flex: 1;
}

.blog-card__meta {
	font-size: .75rem;
	color: var(--color-muted);
	margin: 0;
}

.blog-card__title {
	font-size: 1.02rem;
	font-weight: 700;
	margin: 0;
	color: var(--color-text);
	line-height: 1.3;
}

.blog-card__excerpt {
	font-size: .85rem;
	line-height: 1.45;
	color: var(--color-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.blog-card__more {
	margin-top: auto;
	padding-top: .35rem;
	font-size: .82rem;
	font-weight: 700;
	color: var(--color-link);
}

.blog-empty {
	text-align: center;
	padding: 3rem var(--blog-px);
	color: var(--color-muted);
	font-size: 1rem;
}

/* ── Pagination ────────────────────────────────────────────────────────────── */
.blog-pagination {
	padding: 0 0 3rem;
	background: #f9fafb;
}

.blog-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .35rem;
}

.blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 .5rem;
	border-radius: 999px;
	font-size: .88rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--color-text);
	background: var(--color-white);
	border: 1px solid #e5e7eb;
}

.blog-pagination .page-numbers.current {
	background: var(--pt-text);
	border-color: var(--pt-text);
	color: var(--color-white);
}

.blog-pagination .page-numbers:hover:not(.current) {
	background: #f3f4f6;
}

/* ── Responsive : liste horizontale mobile ─────────────────────────────────── */
@media (max-width: 768px) {
	.blog-hero {
		min-height: auto;
	}

	.blog-hero__content {
		padding-top: 2.5rem;
		padding-bottom: 2.5rem;
	}

	.blog-cards {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.blog-card {
		flex-direction: row;
		align-items: stretch;
	}

	.blog-card__media {
		width: 38%;
		max-width: 11rem;
		aspect-ratio: 4 / 3;
	}

	.blog-card__body {
		padding: .75rem .85rem;
	}

	.blog-card__excerpt {
		-webkit-line-clamp: 2;
	}

	.blog-search {
		max-width: none;
		width: 100%;
	}
}

@media (max-width: 1024px) {
	.blog-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 769px) {
	.blog-filters__inner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: flex-end;
		justify-content: space-between;
	}

	.blog-filters__chips-wrap {
		flex: 1;
		min-width: 0;
	}
}
