/*
** Next Mobiles - Blog listing ([nxt_blog])
** Palette issue du Figma "Marketing".
*/

.nxt_blog {
	--nxt-blog-red: #ff485c;
	--nxt-blog-dark: #191517;
	--nxt-blog-text: #333333;
	--nxt-blog-grey-100: #f5f5f5;
	--nxt-blog-grey-300: #d6d6d6;
	--nxt-blog-radius: 20px;
	--nxt-blog-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px 60px;
	color: var(--nxt-blog-text);
	font-family: "Avenir", "Helvetica Neue", Arial, sans-serif;
}

.nxt_blog *,
.nxt_blog *::before,
.nxt_blog *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- HERO */

.nxt_blog_hero {
	position: relative;
	margin: 0 0 50px;
	padding: 64px 48px 96px;
	border-radius: 24px 24px 0 0;
	background: linear-gradient(120deg, #ff5b6d 0%, var(--nxt-blog-red) 100%);
	color: #fff;
	overflow: hidden;
}

/* Vague blanche en bas du hero (signature du Figma). */
.nxt_blog_hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 72px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,52 C260,112 520,8 760,42 C1000,74 1220,108 1440,48 L1440,100 L0,100 Z'/%3E%3C/svg%3E") no-repeat;
	background-size: 100% 100%;
	pointer-events: none;
}

.nxt_blog_hero_title {
	margin: 0 0 12px;
	font-size: 44px;
	font-weight: 800;
	line-height: 1.1;
}

.nxt_blog_hero_subtitle {
	margin: 0;
	max-width: 620px;
	font-size: 16px;
	line-height: 1.5;
	opacity: 0.95;
}

/* ------------------------------------------------------------- SECTIONS */

.nxt_blog_section_title {
	margin: 0 0 24px;
	font-size: 26px;
	font-weight: 800;
	color: var(--nxt-blog-dark);
}

.nxt_blog_layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	align-items: start;
	margin-bottom: 60px;
}

.nxt_blog_latest_row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-top: 20px;
}

/* ---------------------------------------------------------------- CARDS */

.nxt_blog_card {
	position: relative;
	display: block;
	min-height: 220px;
	border-radius: var(--nxt-blog-radius);
	overflow: hidden;
	color: #fff;
	text-decoration: none;
	box-shadow: var(--nxt-blog-shadow);
	isolation: isolate;
}

.nxt_blog_card_big {
	min-height: 420px;
}

.nxt_blog_card_media {
	position: absolute;
	inset: 0;
	background-image: var(--bgImg);
	background-size: cover;
	background-position: center;
	background-color: var(--nxt-blog-dark);
	transition: transform 0.4s ease;
	z-index: -2;
}

.nxt_blog_card:hover .nxt_blog_card_media {
	transform: scale(1.05);
}

.nxt_blog_card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0) 75%);
	z-index: -1;
}

.nxt_blog_card_content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 20px;
	gap: 8px;
}

.nxt_blog_card_cat {
	align-self: flex-start;
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 5px 12px;
	border-radius: 30px;
	background: var(--nxt-blog-red);
	font-size: 12px;
	font-weight: 800;
	text-transform: capitalize;
}

.nxt_blog_card_title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
}

.nxt_blog_card_big .nxt_blog_card_title {
	font-size: 30px;
}

.nxt_blog_card_meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 13px;
	opacity: 0.9;
}

.nxt_blog_meta_item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* -------------------------------------------------------------- SIDEBAR */

.nxt_blog_sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.nxt_blog_top {
	padding: 20px;
	border-radius: var(--nxt-blog-radius);
	background: #fff;
	box-shadow: var(--nxt-blog-shadow);
}

.nxt_blog_top_head {
	margin-bottom: 16px;
	padding: 10px 16px;
	border-radius: 12px;
	background: var(--nxt-blog-dark);
	color: #fff;
	font-weight: 800;
	text-align: center;
}

.nxt_blog_top_list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.nxt_blog_top_item {
	display: flex;
	gap: 12px;
	align-items: center;
	text-decoration: none;
	color: var(--nxt-blog-dark);
}

.nxt_blog_top_thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 12px;
	background-image: var(--bgImg);
	background-size: cover;
	background-position: center;
	background-color: var(--nxt-blog-grey-100);
}

.nxt_blog_top_title {
	display: block;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
}

.nxt_blog_top_date {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 4px;
	font-size: 12px;
	color: #8a8a8a;
}

.nxt_blog_promo {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	border-radius: var(--nxt-blog-radius);
	background: linear-gradient(135deg, #ff5b6d, var(--nxt-blog-red));
	color: #fff;
	text-align: center;
}

.nxt_blog_promo_title {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
}

.nxt_blog_promo .nxt_btn {
	align-self: center;
}

/* --------------------------------------------------------------- FILTERS */

.nxt_blog_filters {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--nxt-blog-grey-300);
}

.nxt_blog_filter {
	position: relative;
	padding: 0 0 14px;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	color: #8a8a8a;
	cursor: pointer;
}

.nxt_blog_filter.is_active {
	color: var(--nxt-blog-red);
}

.nxt_blog_filter.is_active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--nxt-blog-red);
}

/* ------------------------------------------------------------------ GRID */

.nxt_blog_grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.nxt_blog_grid .nxt_blog_card {
	min-height: 260px;
}

/* Masqué par le JS (au-delà du batch, ou filtré). Fallback : tout visible. */
.nxt_blog_grid .nxt_blog_card.is_hidden {
	display: none;
}

.nxt_blog_more_wrap {
	display: flex;
	justify-content: center;
	margin-top: 36px;
}

.nxt_blog_more.is_hidden {
	display: none;
}

/* ------------------------------------------------------------ RESPONSIVE */

@media screen and (max-width: 991px) {
	.nxt_blog_layout {
		grid-template-columns: 1fr;
	}

	.nxt_blog_grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 640px) {
	.nxt_blog {
		padding: 0 16px 48px;
	}

	.nxt_blog_hero {
		padding: 40px 24px 70px;
	}

	.nxt_blog_hero_title {
		font-size: 32px;
	}

	.nxt_blog_section_title {
		font-size: 22px;
	}

	.nxt_blog_latest_row,
	.nxt_blog_grid {
		grid-template-columns: 1fr;
	}

	.nxt_blog_card_big {
		min-height: 320px;
	}

	.nxt_blog_card_big .nxt_blog_card_title {
		font-size: 24px;
	}

	.nxt_blog_filters {
		gap: 18px;
		overflow-x: auto;
		flex-wrap: nowrap;
		/* Évite de couper la bordure basse au scroll horizontal. */
		padding-bottom: 1px;
	}

	.nxt_blog_filter {
		white-space: nowrap;
	}
}
