/* ════════════════════════════════════════════════════════════
   SINGLE ARTICLE — MyProd
   Chargé uniquement sur is_singular('post').
   ════════════════════════════════════════════════════════════ */

.sgl-article {
	position: relative;
	background: #fefefe;
}

/* ───────────────────────────────────────────────
   Utilitaire réutilisable : soulignement animé
   (le trait se dessine de gauche à droite à l'affichage)
   -> candidat à remonter dans global.less si besoin ailleurs.
   Usage : wrapper le texte concerné dans un span
   <span class="u-underline-anim">Texte</span>
   ─────────────────────────────────────────────── */

.u-underline-anim {
	position: relative;
	display: inline-block;
}

.u-underline-anim::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 6px;
	width: 100%;
	height: 1px;
	background: #08b9e0;
	transform: scaleX(0);
	transform-origin: left;
	animation: uUnderlineReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes uUnderlineReveal {
	to {
		transform: scaleX(1);
	}
}

/* ───────────────────────────────────────────────
   1. HERO — effet "volet"
   ─────────────────────────────────────────────── */

.sgl-hero {
	position: relative;
	overflow: hidden;
	z-index: 0;
	background-color: var(--dark-blue, #101820);
	color: #fff;
}

.sgl-hero__pin {
	position: relative;
	padding-top: 200px;
	transform-origin: center top;
	will-change: transform;
}

.sgl-hero__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}

.sgl-hero__glow {
	position: absolute;
	inset: 0;
}

/* GLOWS — même technique et mêmes couleurs que le footer (footer.css) :
   c'est le point du gradient lui-même qui est repositionné via "at X Y",
   pas l'élément (plus de left/top/transform/blur sur .sgl-hero__glow).
   --spot-x/--spot-y (front) et --spot-x-back/--spot-y-back (back) sont
   posées en JS (single-article.js), exactement comme footer.js. */
.sgl-hero__glow--back {
	background: radial-gradient(circle clamp(500px, 70vw, 1100px) at var(--spot-x-back, 30%) var(--spot-y-back, 40%),
		rgba(41, 51, 138, 0.9) 0%,
		rgba(41, 51, 138, 0.5) 40%,
		rgba(41, 51, 138, 0) 75%);
}

.sgl-hero__glow--front {
	background: radial-gradient(circle clamp(350px, 50vw, 850px) at var(--spot-x, 65%) var(--spot-y, 25%),
		rgba(8, 185, 224, 0.55) 0%,
		rgba(8, 185, 224, 0.28) 35%,
		rgba(8, 185, 224, 0) 65%);
}

.sgl-hero__inner {
	position: relative;
	z-index: 1;
}

.sgl-hero__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding-bottom: 48px;
	flex-wrap: wrap;
}

.sgl-hero__title {
	font-size: clamp(28px, 3.2vw, 48px);
	font-weight: 500;
	line-height: 1.15;
	max-width: 640px;
	margin: 0;
}

.sgl-hero__tags {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
	padding-top: 6px;
}

/* Tags "liquid glass" — style Apple */
.sgl-tag {
	display: inline-flex;
	align-items: center;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #fff;
	border-radius: 999px;
	white-space: nowrap;

	    background: linear-gradient(180deg, #10182096, #10182021);
	backdrop-filter: blur(18px) saturate(180%);
	-webkit-backdrop-filter: blur(18px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		inset 0 -1px 6px rgba(0, 0, 0, 0.15),
		0 4px 14px rgba(0, 0, 0, 0.18);
	position: relative;
	overflow: hidden;
}

.sgl-tag::before {
	content: '';
	position: absolute;
	top: 0;
	left: 10%;
	width: 80%;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.sgl-tag--accent {
	background: linear-gradient(180deg, rgba(8, 185, 224, 0.55), rgba(8, 185, 224, 0.25));
	border-color: rgba(8, 185, 224, 0.5);
}

.sgl-tag--time {
	opacity: 0.85;
}

.sgl-hero__thumb-wrap {
	margin-top: 8px;
}

.sgl-hero__thumb {
	width: 100%;
	overflow: hidden;
	line-height: 0;
	border-radius: 24px;
}

.sgl-hero__thumb-img {
	width: 100%;
	height: clamp(280px, 45vw, 520px);
	object-fit: cover;
	display: block;
}

/* ───────────────────────────────────────────────
   2. CONTENU — recouvre le hero au scroll
   ───────────────────────────────────────────────
   ─────────────────────────────────────────────── */

.sgl-content {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 32px 32px 0 0;
	margin-top: -32px;
	padding: 88px 0 96px; /* +32px pour compenser le recouvrement négatif */
	box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.12);
}

/* Sidebar sticky */
.sgl-sidebar {
	position: relative;
}

.sgl-sidebar__inner {
	position: sticky;
	top: 120px; /* sous la nav flottante */
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.sgl-toc {
	border: 1px solid var(--grey-2, #e6e6e6);
	border-radius: 20px;
	padding: 24px 28px;
}

.sgl-toc__title {
	display: block;
	color: #101820;
	font-family: "Neulis";
	font-style: italic;
	font-weight: 500;
	font-size: 2.4rem;
	margin-bottom: 32px;
}

.sgl-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sgl-toc__item--text {
	padding-left: 18px;
}

.sgl-toc__text {
	display: block;
	color: var(--dark-blue, #101820);
	font-size: 14px;
	line-height: 1.4;
	opacity: 0.55;
}

.sgl-toc__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	line-height: 1.4;
	transition: color 0.25s ease;

	color: var(--grey-1, #999);
	font-family: Gilmer;
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	margin: 0;
}

.sgl-toc__link::before {
	content: '';
	display: none; /* pas de puce par défaut, seulement sur l'item actif */
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent-blue, #08b9e0);
	margin-right: 8px;
	flex-shrink: 0;
}

.sgl-toc__link:hover,
.sgl-toc__link.is-active {
	color: var(--dark-blue, #101820);
}

.sgl-toc__link.is-active::before {
	display: inline-block;
}

/* Sous-item (H3) du sommaire — indenté, même logique de couleur/puce,
   juste une taille légèrement réduite pour marquer la hiérarchie */
.sgl-toc__item--sub {
	padding-left: 18px;
}

.sgl-toc__item--sub .sgl-toc__link {
	font-size: 13px;
}

.sgl-toc__item--sub .sgl-toc__link::before {
	width: 4px;
	height: 4px;
}

/* Bouton contact perso (réutilise .btn-dot du thème) */
.sgl-contact-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 16px 28px;
	border-radius: 999px;
	background: #e8412c;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.sgl-contact-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(232, 65, 44, 0.35);
	color: #fff;
}

.sgl-contact-btn__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	flex-shrink: 0;
}

/* Case "En résumé" */
.sgl-summary-box {
	border: 1px solid var(--grey-2, #e6e6e6);
	border-radius: 20px;
	padding: 32px;
	margin-bottom: 40px;
}

.sgl-summary-box__title {
	display: block;
	font-family: "Neulis";
	color: #101820;
	font-style: italic;
	font-weight: 500;
	font-size: 2.4rem;
	margin-bottom: 14px;
}

.sgl-summary-box__text {
	font-family: Gilmer;
	font-size: 14px;
	line-height: 1.7;
	color: var(--dark-blue, #101820);
	margin-bottom: 14px;
}

.sgl-summary-box__text p {
	font-family: Gilmer;
	font-size: 14px;
	line-height: 1.7;
	color: var(--dark-blue, #101820);
	margin-bottom: 14px;
}

.sgl-summary-box__text p:last-child {
	margin-bottom: 0;
}

/* Corps de l'article */
.sgl-entry-content h2,
.sgl-entry-content h3 {
	scroll-margin-top: 140px; /* offset ancre sous la nav flottante */
}

.sgl-entry-content h2 {
	margin: 48px 0 20px;
}

.sgl-entry-content h3 {
	font-size: 20px;
	font-weight: 600;
	margin: 32px 0 14px;
}

.sgl-entry-content p {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
	margin-bottom: 20px;
}

.sgl-entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
}

/* ───────────────────────────────────────────────
   3. ARTICLES SUGGÉRÉS — "À lire également…"
   ─────────────────────────────────────────────── */

.sgl-related {
	padding: 200px 0 0;
}

.sgl-related__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 40px;
}

.sgl-related__title {
	margin: 0;
	color: var(--dark-blue, #101820);
}

/* Le style de l'italique/soulignement sur "À lire" est géré ailleurs
   (cohérent avec le reste du thème) — pas de redéfinition ici. */

.sgl-related__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.sgl-related__card {
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	border: 1px solid var(--grey-2, #e6e6e6);
	padding: 16px;
	text-decoration: none;
	color: inherit;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.sgl-related__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
	color: inherit;
}

.sgl-related__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background-color: var(--grey-2, #e6e6e6);
	margin-bottom: 16px;
}

.sgl-related__thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sgl-related__cat {
	display: inline-flex;
	align-self: flex-start;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--accent-blue, #08b9e0);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
	margin-bottom: 12px;
}

.sgl-related__card-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	color: var(--dark-blue, #101820);
}

@media (max-width: 991px) {
	.sgl-related__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 575px) {
	.sgl-related {
		padding-top: 64px;
	}

	.sgl-related__grid {
		grid-template-columns: 1fr;
	}
}

/* ───────────────────────────────────────────────
   4. RESPONSIVE (hero / contenu)
   ─────────────────────────────────────────────── */

@media (max-width: 991px) {
	.sgl-hero__pin {
		padding-top: 96px;
	}

	.sgl-content {
		margin-top: 0;
		border-radius: 0;
		box-shadow: none;
		padding-top: 56px;
	}

	.sgl-sidebar__inner {
		position: relative;
		top: 0;
		margin-bottom: 40px;
	}

	.sgl-hero__row {
		flex-direction: column;
	}

	.sgl-hero__tags {
		justify-content: flex-start;
	}
}