/*
 * @author: Mathieu MARI <contact@mathieumari.com>
 * @date:   2026-09-02
 * @lastModifiedBy: Mathieu MARI <contact@mathieumari.com>
 * @lastModifiedTime: 2026-09-02
 *
 * Blog front — listing, catégorie, article (tokens Palmer).
 */

.page-blog .is-hidden { display: none !important; }

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

.page-blog .icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid #e5e5e5;
	border-radius: 50%;
	background: #fff;
	color: #333;
	cursor: pointer;
	font-size: 1.4rem;
	line-height: 1;
}

.page-blog .icon-btn:hover {
	border-color: var(--green);
	color: var(--green);
}

.page-blog-main {
	padding-top: 0;
	padding-bottom: 4rem;
}

.blog-intro.wide-60 {
	padding-top: 160px;
	padding-bottom: 20px;
}

@media (max-width: 991px) {
	.blog-intro.wide-60 {
		padding-top: 140px;
	}
}

.blog-intro .section-title.title-centered h1.h3-sm {
	margin-bottom: 0;
}

.blog-listing {
	padding-bottom: 3rem;
}

.blog-listing__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

@media (min-width: 992px) {
	.blog-listing__inner {
		grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
	}
}

.blog-sidebar-toggle {
	display: inline-flex;
	margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
	.blog-sidebar-toggle { display: none; }
}

.blog-listing--categories {
	padding-bottom: 3rem;
}

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

.blog-grid--categories {
	gap: 2rem;
}

@media (min-width: 640px) {
	.blog-grid--categories {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.blog-grid--categories {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

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

.blog-grid--related {
	margin-top: 1.75rem;
	gap: 1.15rem;
}

@media (min-width: 640px) {
	.blog-grid--related {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 992px) {
	.blog-grid--related {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.blog-grid--related .blog-card {
	gap: .55rem;
}

.blog-grid--related .blog-card__media {
	border-radius: 14px;
	aspect-ratio: 16 / 10;
}

.blog-grid--related .blog-card__title {
	font-size: 1rem;
	line-height: 1.3;
}

.blog-grid--related .blog-card__more {
	font-size: .85rem;
}

.blog-empty,
.blog-sidebar__empty {
	margin: 0;
	padding: 1rem 0;
	color: #777;
	font-size: .95rem;
}

.blog-card {
	display: flex;
	flex-direction: column;
	gap: .85rem;
	min-width: 0;
}

.blog-card__media {
	display: block;
	overflow: hidden;
	border-radius: 20px;
	aspect-ratio: 450 / 307;
	background: #f4f4f4;
}

.blog-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.blog-card:hover .blog-card__img {
	transform: scale(1.04);
}

.blog-card__title {
	margin: 0;
}

.blog-card__title a {
	color: #333;
}

.blog-card__title a:hover {
	color: var(--green);
}

.blog-card__more {
	display: inline-block;
	margin-top: .15rem;
	font-weight: 600;
	color: var(--green);
}

.blog-card__more:hover {
	color: #333;
}

.blog-cat-card {
	display: flex;
	flex-direction: column;
	gap: .85rem;
	min-width: 0;
}

.blog-cat-card__media {
	display: block;
	overflow: hidden;
	border-radius: 20px;
	aspect-ratio: 450 / 307;
	background: #f4f4f4;
}

.blog-cat-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.blog-cat-card:hover .blog-cat-card__img {
	transform: scale(1.04);
}

.blog-cat-card__title {
	margin: 0;
}

.blog-cat-card__title a {
	color: #333;
}

.blog-cat-card__title a:hover {
	color: var(--green);
}

.blog-cat-card__excerpt {
	margin: .15rem 0 0;
	color: #777;
	font-size: .95rem;
	line-height: 1.45;
}

.blog-cat-card__excerpt:empty {
	display: none;
}

.blog-cat-card__more {
	display: inline-block;
	margin-top: .15rem;
	font-weight: 600;
	color: var(--green);
}

.blog-cat-card__more:hover {
	color: #333;
}

.blog-sidebar__panel {
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
	padding: 1.35rem 1.25rem;
	border: 1px solid #eee;
	border-radius: 20px;
	background: #fff;
}

.blog-sidebar__panel-head {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.blog-sidebar__panel-title {
	margin: 0;
	font-weight: 700;
}

.blog-sidebar__backdrop { display: none; }

.blog-sidebar__title {
	margin: 0 0 .75rem;
	padding-left: 12px;
	border-left: 4px solid var(--green);
	font-size: 1.05rem;
	font-family: 'Josefin Sans', sans-serif;
}

.blog-sidebar__categories,
.blog-sidebar__recent,
.blog-sidebar__tags {
	list-style: none;
	margin: 0;
	padding: 0;
}

.blog-sidebar__categories li + li {
	margin-top: .55rem;
}

.blog-sidebar__cat-link {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	color: #555;
}

.blog-sidebar__cat-link:hover {
	color: var(--green);
}

.blog-sidebar__cat-count {
	flex-shrink: 0;
	color: #999;
	font-size: .8125rem;
}

.blog-sidebar__recent-item {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: .85rem;
	padding-block: .85rem;
	border-top: 1px solid #eee;
}

.blog-sidebar__recent-item:first-child {
	padding-top: 0;
	border-top: 0;
}

.blog-sidebar__recent-thumb {
	display: block;
	overflow: hidden;
	border-radius: 12px;
	aspect-ratio: 1;
	background: #f4f4f4;
}

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

.blog-sidebar__recent-date {
	margin: 0 0 .3rem;
	color: #999;
}

.blog-sidebar__recent-title {
	display: block;
	font-weight: 600;
	line-height: 1.35;
	color: #333;
}

.blog-sidebar__recent-title:hover {
	color: var(--green);
}

.blog-sidebar__tags {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.blog-sidebar__tag {
	display: inline-flex;
	align-items: center;
	padding: .3rem .7rem;
	border: 1px solid #eee;
	border-radius: 999px;
	background: #f7f7f7;
	color: #555;
	font-size: .75rem;
	font-weight: 600;
}

@media (min-width: 992px) {
	.blog-sidebar {
		position: sticky;
		top: 7.5rem;
	}
}

@media (max-width: 991.98px) {
	.blog-sidebar {
		position: fixed;
		inset: 0;
		z-index: 80;
		pointer-events: none;
		visibility: hidden;
	}

	.blog-sidebar.is-open {
		pointer-events: auto;
		visibility: visible;
	}

	.blog-sidebar__backdrop {
		display: block;
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, .35);
	}

	.blog-sidebar__panel {
		position: absolute;
		top: 0;
		right: 0;
		width: min(22rem, 92vw);
		height: 100%;
		margin: 0;
		border-radius: 0;
		overflow: auto;
		transform: translateX(100%);
		transition: transform .28s ease;
	}

	.blog-sidebar.is-open .blog-sidebar__panel {
		transform: translateX(0);
	}

	.blog-sidebar__panel-head { display: flex; }

	body.blog-sidebar-open { overflow: hidden; }
}

.page-blog--article .page-blog-main {
	padding-top: 140px;
}

.blog-article {
	padding-bottom: 3rem;
}

.blog-article__hero {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	overflow: hidden;
	background: transparent;
}

.blog-article__hero-img {
	display: block;
	width: 100%;
	max-height: min(62vh, 36rem);
	object-fit: cover;
	border-radius: 20px;
}

.blog-article__inner {
	max-width: 48rem;
	padding-top: 2rem;
}

.blog-article__header {
	margin-bottom: 1.75rem;
}

.blog-article__tag {
	display: inline-flex;
	margin: 0 0 .85rem;
	padding: .3rem .75rem;
	border-radius: 999px;
	background: rgba(0, 163, 74, .1);
	color: var(--green);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.blog-article__title {
	margin: 0 0 1rem;
	font-family: 'Josefin Sans', sans-serif;
}

.blog-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem 1rem;
	color: #777;
}

.blog-article__meta-sep {
	width: 1px;
	height: 1rem;
	background: #ddd;
}

.blog-prose {
	color: #444;
	font-size: 1.05rem;
	line-height: 1.75;
}

.blog-prose > *:first-child { margin-top: 0; }
.blog-prose > *:last-child { margin-bottom: 0; }

.blog-prose h2,
.blog-prose h3,
.blog-prose h4 {
	margin: 1.75rem 0 .75rem;
	font-family: 'Josefin Sans', sans-serif;
}

.blog-prose p { margin: 0 0 1.1rem; }
.blog-prose a { color: var(--green); }
.blog-prose ul,
.blog-prose ol {
	margin: 0 0 1.1rem;
	padding-left: 1.25rem;
}

.blog-prose img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 20px;
}

.blog-prose blockquote {
	margin: 1.25rem 0;
	padding: .85rem 1.1rem;
	border-left: 5px solid var(--green);
	background: #f7f7f7;
	color: #333;
}

.blog-article .markdownContentWebsites h1,
.blog-article .markdownContentWebsites h2 {
	margin-top: 1.75rem;
	margin-bottom: .75rem;
	font-family: 'Josefin Sans', sans-serif;
}

.blog-article .markdownContentWebsites h3,
.blog-article .markdownContentWebsites h4 {
	margin-top: 1.5rem;
	margin-bottom: .5rem;
	font-family: 'Josefin Sans', sans-serif;
}

.blog-article .markdownContentWebsites p {
	margin-top: .75rem;
	margin-bottom: .75rem;
}

.blog-article .markdownContentWebsites ul {
	margin-top: 1rem;
	margin-bottom: 1rem;
	padding-left: 1.5rem;
	list-style: disc outside none;
	line-height: 1.5;
}

.blog-article .markdownContentWebsites ol {
	margin-top: 1rem;
	margin-bottom: 1rem;
	padding-left: 1.5rem;
	list-style: decimal outside none;
	line-height: 1.5;
}

.blog-article .markdownContentWebsites li {
	display: list-item;
	list-style: inherit;
	margin-top: .375rem;
	margin-bottom: .25rem;
}

.blog-article .markdownContentWebsites li:last-child {
	margin-bottom: 0;
}

.blog-article .markdownContentWebsites strong {
	font-weight: 700;
}

.blog-article__gallery {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-top: 1.75rem;
	margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
	.blog-article__gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.blog-article__gallery-item {
	margin: 0;
	overflow: hidden;
	border-radius: 20px;
	aspect-ratio: 450 / 320;
	background: #f4f4f4;
}

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

.blog-article__tags {
	margin-top: 2.25rem;
}

.blog-article__tags-label {
	margin: 0 0 .75rem;
	color: #333;
	font-weight: 600;
}

.blog-article__tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.blog-article__tag-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.25rem;
	padding: .4rem 1rem;
	border-radius: 6px;
	background: #f5f5f5;
	color: #333;
	font-size: .9rem;
	line-height: 1.4;
}

.blog-related {
	margin-top: 4rem;
	padding: 3.5rem 0 1rem;
	border-top: 1px solid #eee;
}

.blog-related__head {
	margin-bottom: .5rem;
}

.blog-related__title {
	margin: 0 0 .65rem;
	padding-left: 15px;
	border-left: 5px solid var(--green);
	font-family: 'Josefin Sans', sans-serif;
}

.blog-related__lead {
	margin: 0;
	color: #555;
}
