/* ==========================================================================
   Single Post (Blog) — Mobile first
   ========================================================================== */

/* Override site-main pour la page article */
.single-post .site-main {
	max-width: none;
	padding: 0;
}

/* ---------- Article Hero ---------- */

.sp-hero {
	position: relative;
	background-color: var(--color-bg-alt);
	overflow: hidden;
}

.sp-hero__image {
	position: relative;
	width: 100%;
	height: 280px;
	overflow: hidden;
}

.sp-hero__image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(253, 242, 237, 0.2) 0%,
		rgba(253, 242, 237, 0.85) 70%,
		var(--color-bg-alt) 100%
	);
	pointer-events: none;
}

.sp-hero__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.sp-hero__content {
	position: relative;
	max-width: 800px;
	margin: -48px auto 0;
	padding: 0 16px 48px;
	z-index: 1;
	text-align: center;
}

/* Sans image */
.sp-hero--no-image .sp-hero__content {
	margin-top: 0;
	padding-top: 40px;
}

/* ---------- Meta ---------- */

.sp-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 20px;
}

.sp-hero__category {
	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;
	transition: background-color var(--transition), color var(--transition);
}

.sp-hero__category:hover,
.sp-hero__category:focus-visible {
	background-color: var(--color-primary);
	color: #fff;
}

.sp-hero__date,
.sp-hero__reading-time {
	font-size: 0.8125rem;
	color: rgba(34, 34, 34, 0.5);
}

.sp-hero__meta-separator {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background-color: rgba(34, 34, 34, 0.25);
	flex-shrink: 0;
}

/* ---------- Title ---------- */

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

/* ---------- Author inline ---------- */

.sp-hero__author {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.sp-hero__author-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background-color: rgba(197, 129, 129, 0.15);
}

.sp-hero__author-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sp-hero__author-avatar--initials {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-primary);
}

.sp-hero__author-name {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-black);
}

/* ---------- Decorative divider ---------- */

.sp-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 0 16px;
	max-width: 800px;
	margin: 0 auto;
}

.sp-divider::before,
.sp-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background-color: rgba(34, 34, 34, 0.08);
}

.sp-divider__icon {
	width: 8px;
	height: 8px;
	border: 1.5px solid rgba(197, 129, 129, 0.4);
	border-radius: 50%;
	flex-shrink: 0;
}

/* ---------- Content body ---------- */

.sp-body {
	max-width: 720px;
	margin: 0 auto;
	padding: 40px 16px;
}

/* Inherit entry__content styles from main.css, add refinements */
.sp-body .entry__content {
	font-size: 1rem;
	line-height: 1.8;
	color: rgba(34, 34, 34, 0.85);
}

.sp-body .entry__content > * + * {
	margin-top: 24px;
}

.sp-body .entry__content h2 {
	margin-top: 48px;
	font-size: 1.5rem;
}

.sp-body .entry__content h3 {
	margin-top: 36px;
}

.sp-body .entry__content blockquote {
	padding: 24px 32px;
	margin-left: 0;
	margin-right: 0;
	border-left: 3px solid var(--color-primary);
	background-color: var(--color-bg-alt);
	border-radius: 0 12px 12px 0;
	font-style: italic;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: rgba(34, 34, 34, 0.75);
}

.sp-body .entry__content img {
	border-radius: 12px;
}

.sp-body .entry__content figure {
	margin-left: 0;
	margin-right: 0;
}

.sp-body .entry__content figcaption {
	margin-top: 8px;
	font-size: 0.8125rem;
	color: rgba(34, 34, 34, 0.5);
	text-align: center;
}

/* ---------- Tags ---------- */

.sp-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid rgba(34, 34, 34, 0.08);
}

.sp-tags__label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(34, 34, 34, 0.4);
	line-height: 30px;
	margin-right: 4px;
}

.sp-tags__link {
	display: inline-block;
	padding: 4px 12px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: rgba(34, 34, 34, 0.6);
	background-color: rgba(34, 34, 34, 0.04);
	border-radius: 100px;
	transition: color var(--transition), background-color var(--transition);
}

.sp-tags__link:hover,
.sp-tags__link:focus-visible {
	color: var(--color-primary);
	background-color: rgba(197, 129, 129, 0.1);
}

/* ---------- Share ---------- */

.sp-share {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
}

.sp-share__label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(34, 34, 34, 0.4);
}

.sp-share__links {
	display: flex;
	gap: 8px;
}

.sp-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(34, 34, 34, 0.12);
	border-radius: 50%;
	color: rgba(34, 34, 34, 0.5);
	transition:
		color var(--transition),
		border-color var(--transition),
		background-color var(--transition);
}

.sp-share__link:hover,
.sp-share__link:focus-visible {
	color: #fff;
	border-color: var(--color-primary);
	background-color: var(--color-primary);
}

.sp-share__link svg {
	width: 16px;
	height: 16px;
}

/* ---------- Author card ---------- */

.sp-author {
	background-color: var(--color-bg-alt);
	border-radius: 20px;
	padding: 32px 24px;
	margin-top: 48px;
}

.sp-author__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 16px;
}

.sp-author__avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background-color: rgba(197, 129, 129, 0.15);
}

.sp-author__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sp-author__avatar--initials {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--color-primary);
}

.sp-author__label {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-primary);
}

.sp-author__name {
	font-family: var(--font-family-head);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--color-black);
	margin-top: 2px;
}

.sp-author__name a {
	color: inherit;
	transition: color var(--transition);
}

.sp-author__name a:hover {
	color: var(--color-primary);
}

.sp-author__bio {
	font-size: 0.875rem;
	line-height: 1.7;
	color: rgba(34, 34, 34, 0.65);
	max-width: 480px;
}

/* ---------- Post navigation (enhanced) ---------- */

.sp-nav {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 16px;
}

.sp-nav__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 40px 0;
	border-top: 1px solid rgba(34, 34, 34, 0.08);
}

.sp-nav__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
	border-radius: 12px;
	background-color: var(--color-bg-alt);
	transition: background-color var(--transition);
}

.sp-nav__item:hover {
	background-color: rgba(197, 129, 129, 0.1);
}

.sp-nav__item--next {
	text-align: right;
}

.sp-nav__label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-primary);
}

.sp-nav__item--next .sp-nav__label {
	justify-content: flex-end;
}

.sp-nav__label svg {
	width: 14px;
	height: 14px;
}

.sp-nav__title {
	font-family: var(--font-family-head);
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-black);
	line-height: 1.3;
	transition: color var(--transition);
}

.sp-nav__item:hover .sp-nav__title {
	color: var(--color-primary);
}

/* ---------- Related posts ---------- */

.sp-related {
	background-color: var(--color-bg-alt);
	padding: 56px 16px;
}

.sp-related__inner {
	max-width: var(--container-width);
	margin: 0 auto;
}

.sp-related__header {
	text-align: center;
	margin-bottom: 32px;
}

.sp-related__subtitle {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-primary);
	margin-bottom: 8px;
}

.sp-related__title {
	font-family: var(--font-family-head);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-black);
}

.sp-related__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

/* ---------- Related post card ---------- */

.sp-card {
	display: flex;
	flex-direction: column;
	background-color: var(--color-bg);
	border-radius: 16px;
	overflow: hidden;
	transition: transform var(--transition), box-shadow var(--transition);
}

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

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

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

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

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

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

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

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

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

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

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

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

/* ==========================================================================
   Single Post — Desktop (>= 768px)
   ========================================================================== */

@media (min-width: 768px) {
	.sp-hero__image {
		height: 420px;
	}

	.sp-hero__content {
		margin-top: -80px;
		padding: 0 40px 56px;
	}

	.sp-hero--no-image .sp-hero__content {
		padding-top: 56px;
	}

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

	.sp-hero__meta {
		margin-bottom: 24px;
	}

	.sp-divider {
		padding: 0 40px;
	}

	.sp-body {
		padding: 56px 40px;
	}

	.sp-body .entry__content {
		font-size: 1.0625rem;
		line-height: 1.85;
	}

	.sp-body .entry__content h2 {
		font-size: 1.75rem;
	}

	.sp-body .entry__content blockquote {
		padding: 28px 40px;
		border-radius: 0 16px 16px 0;
	}

	.sp-body .entry__content img {
		border-radius: 16px;
	}

	.sp-author {
		padding: 40px 48px;
		border-radius: 24px;
	}

	.sp-author__inner {
		flex-direction: row;
		text-align: left;
		gap: 24px;
	}

	.sp-author__avatar {
		width: 80px;
		height: 80px;
	}

	.sp-nav {
		padding: 0 80px;
	}

	.sp-nav__inner {
		flex-direction: row;
		padding: 48px 0;
	}

	.sp-nav__item {
		flex: 1;
		padding: 24px;
		border-radius: 16px;
	}

	.sp-nav__title {
		font-size: 1.0625rem;
	}

	.sp-related {
		padding: 80px 80px;
	}

	.sp-related__header {
		margin-bottom: 40px;
	}

	.sp-related__title {
		font-size: 2rem;
	}

	.sp-related__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 28px;
	}

	.sp-card__body {
		padding: 24px;
	}
}
