/**
 * Article de blog — hero, contenu riche, section « autres articles »
 */

.post-single :is(h1, h2, h3, h4, h5, h6),
.post-hero__title {
	font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
	font-weight: 400;
}

.post-single {
	--post-primary: #004e90;
	--post-blue: #0073ba;
	--post-blue-dark: #005a94;
	--post-heading: #122b54;
	--post-text: #5c6773;
	--post-text-muted: #8a939c;
	--post-border: #dde4ea;
	--post-surface: #e8f4f8;
	--post-callout: #d4eef3;
	--post-max: 1200px;
}

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

.post-hero {
	--post-hero-blue: var(--post-primary);
	background-color: var(--post-hero-blue);
	min-height: 340px;
	overflow: hidden;
}

.post-hero__inner {
	display: flex;
	align-items: stretch;
	min-height: 340px;
	max-width: 100%;
}

.post-hero__content {
	flex: 0 0 50%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	padding: 48px 32px 48px max(24px, calc((100vw - 1170px) / 2 + 15px));
	position: relative;
	z-index: 2;
}

.post-hero__content::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.1;
	background-image:
		linear-gradient(30deg, transparent 45%, rgba(255, 255, 255, 0.35) 45%, rgba(255, 255, 255, 0.35) 46%, transparent 46%),
		linear-gradient(150deg, transparent 45%, rgba(255, 255, 255, 0.35) 45%, rgba(255, 255, 255, 0.35) 46%, transparent 46%);
	background-size: 56px 48px;
	pointer-events: none;
}

.post-hero__cat {
	position: relative;
	margin: 0;
	align-self: flex-start;
	padding: 6px 12px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	border-radius: 4px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.post-hero__title {
	position: relative;
	margin: 0;
	color: #fff;
	font-size: clamp(22px, 2.6vw, 34px);
	font-weight: 700;
	line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.post-hero__date {
	position: relative;
	margin: 0;
	color: rgba(255, 255, 255, 0.88);
	font-family: 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
}

.post-hero__media {
	flex: 1 1 50%;
	position: relative;
	min-height: 280px;
}

.post-hero__media::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to right,
		var(--post-hero-blue) 0%,
		rgba(0, 78, 144, 0.88) 20%,
		rgba(0, 78, 144, 0.4) 45%,
		transparent 65%
	);
	pointer-events: none;
}

.post-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 280px;
	object-fit: cover;
	object-position: center right;
}

.post-hero--no-image .post-hero__content {
	flex: 1 1 100%;
}

/* --------------------------------------------------------------------------
   Corps de l’article
   -------------------------------------------------------------------------- */

.post-single__wrap.container {
	max-width: var(--post-max);
	padding-top: 48px;
	padding-bottom: 56px;
}

.post-single__content {
	color: var(--post-text);
	font-family: 'Segoe UI', sans-serif;
	font-size: 18px;
	line-height: 1.7;
}

/* Masquer le 1er H1 Elementor si le titre est déjà dans le hero */
.post-single__content > .elementor > .elementor-section:first-child .elementor-heading-title.elementor-size-default:first-child,
.post-single__content > .elementor > .elementor-section:first-child h1.elementor-heading-title:first-of-type {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.post-single__content > .elementor > .elementor-section:first-child .elementor-widget-image:first-child,
.post-single__content > .elementor > .elementor-section:first-child .elementor-widget-theme-post-featured-image {
	display: none;
}

.post-single__content :is(h1, h2, h3, h4, h5, h6) {
	color: var(--post-heading);
	line-height: 1.35;
}

.post-single__content h1 {
	margin: 0 0 20px;
	font-size: 32px;
	font-weight: 700;
	text-transform: uppercase;
}

.post-single__content h2 {
	font-weight: 700;
}

.post-single__content h3 {
	margin: 32px 0 14px;
	font-size: 22px;
	font-weight: 600;
}

.post-single__content h4 {
	margin: 24px 0 12px;
	font-size: 20px;
	font-weight: 600;
}

.post-single__content h5 {
	margin: 20px 0 10px;
	font-size: 18px;
	font-weight: 600;
}

.post-single__content h6 {
	margin: 18px 0 8px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.post-single__content :is(h2, h3, h4, h5, h6):first-child {
	margin-top: 0;
}

.post-single__content p {
	margin: 0 0 1.25em;
}

.post-single__content p strong,
.post-single__content li strong {
	color: var(--post-heading);
	font-weight: 600;
}

.post-single__content a {
	color: var(--post-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.2s ease;
}

.post-single__content a:hover,
.post-single__content a:focus-visible {
	color: var(--post-blue-dark);
}

.post-single__content ul,
.post-single__content ol {
	margin: 0 0 1.5em;
	padding-left: 1.35em;
}

.post-single__content li {
	margin-bottom: 0.5em;
	line-height: 1.65;
}

.post-single__content ul li::marker {
	color: var(--post-blue);
}

.post-single__content ol li::marker {
	color: var(--post-primary);
	font-weight: 600;
}

.post-single__content blockquote {
	margin: 0 0 1.5em;
	padding: 20px 24px;
	border-left: 4px solid var(--post-blue);
	background: var(--post-surface);
	color: var(--post-heading);
	font-size: 17px;
	font-style: italic;
}

.post-single__content table {
	width: 100%;
	margin: 0 0 1.5em;
	border-collapse: collapse;
	font-size: 16px;
}

.post-single__content th,
.post-single__content td {
	padding: 12px 14px;
	border: 1px solid var(--post-border);
	text-align: left;
	vertical-align: top;
}

.post-single__content th {
	background: var(--post-surface);
	color: var(--post-heading);
	font-weight: 600;
}

.post-single__content tr:nth-child(even) td {
	background: #fafbfc;
}

.post-single__content figure {
	margin: 0 0 1.5em;
	max-width: 100%;
}

.post-single__content figcaption {
	margin-top: 8px;
	color: var(--post-text-muted);
	font-size: 14px;
	text-align: center;
}

.post-single__content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

.post-single__content hr {
	margin: 36px 0;
	border: 0;
	border-top: 1px solid var(--post-border);
}

/* Sections Elementor suivantes (ex. encadré conclusion) */
.post-single__content > .elementor > .elementor-section.elementor-top-section + .elementor-section.elementor-top-section {
	margin-top: 40px;
}

.post-single__content > .elementor > .elementor-section.elementor-top-section:has(> .elementor-background-overlay) {
	border-radius: 10px;
	overflow: hidden;
}

.post-single__content .elementor-section .elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

.post-single__page-links {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--post-border);
	font-size: 16px;
}

.post-single__page-links-label {
	margin-right: 8px;
	font-weight: 600;
	color: var(--post-heading);
}

.post-single__page-number {
	display: inline-block;
	margin: 0 4px;
	padding: 4px 10px;
	border: 1px solid var(--post-border);
	border-radius: 4px;
}

.post-single__page-number:hover {
	border-color: var(--post-blue);
	color: var(--post-blue);
}

/* Étiquettes (tags) sous l’article */
.post-single__tags-wrap.container {
	max-width: var(--post-max);
	margin-top: 0;
	padding-top: 8px;
	padding-bottom: 48px;
}

.post-single__tags {
	padding-top: 20px;
	border-top: 1px solid var(--post-border);
}

.post-single__tags-list {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-single__tag {
	display: inline-block;
	padding: 5px 11px;
	border: 1px solid var(--post-border);
	border-radius: 12px;
	background: #fafbfc;
	color: var(--post-text-muted);
	font-family: 'Segoe UI', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.post-single__tag:hover,
.post-single__tag:focus-visible {
	border-color: rgba(0, 115, 186, 0.35);
	background: var(--post-surface);
	color: var(--post-blue);
}

.post-single__tag--current {
	border-color: rgba(0, 78, 144, 0.35);
	background: var(--post-surface);
	color: var(--post-primary);
	font-weight: 600;
}

/* Section « autres articles » (réutilise .hp-news de front-page.css) */
.post-single .hp-news--related {
	padding-top: 64px;
	padding-bottom: 88px;
	border-top: 1px solid var(--post-border);
	background: #fff;
}

.post-single .hp-news--related .hp-news__post-title {
	font-weight: 700 !important;
}

@media (max-width: 991px) {
	.post-hero {
		min-height: 0;
	}

	.post-hero__inner {
		flex-direction: column;
		min-height: 0;
	}

	.post-hero__content {
		flex: none;
		padding: 40px 24px 28px;
	}

	.post-hero__media {
		flex: none;
		min-height: 220px;
	}

	.post-hero__media::before {
		background: linear-gradient(
			to bottom,
			var(--post-hero-blue) 0%,
			rgba(0, 78, 144, 0.55) 35%,
			transparent 65%
		);
	}

	.post-single__wrap.container {
		padding-top: 32px;
		padding-bottom: 40px;
	}

	.post-single__content h1 {
		font-size: 26px;
	}

	.post-single__content h2:not(:first-child) {
		margin-top: 36px;
	}

	.post-single__content {
		font-size: 17px;
	}

	.post-single__content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}
