/* Article (single post) — new design. Colours come from the article's rubrique: --c / --t. */

.mp-article {
	font-family: var(--mp-font-text);
	color: var(--mp-text);
}

/* Hero: photo card with the title over it */

.mp-ahero-wrap .mp-wrap {
	padding-top: 16px;
}

.mp-ahero {
	position: relative;
	height: 560px;
	border-radius: 28px;
	overflow: hidden;
	background: var(--mp-cream);
}

.mp-ahero > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mp-ahero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.72) 100%);
	pointer-events: none;
}

.mp-ahero.sans-image {
	height: auto;
	min-height: 320px;
	display: flex;
	align-items: flex-end;
	background: linear-gradient(135deg, var(--t), var(--mp-cream));
}

.mp-ahero.sans-image::after {
	content: none;
}

.mp-ahero__texte {
	position: absolute;
	left: 48px;
	right: 48px;
	bottom: 40px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	color: #ffffff;
}

.sans-image .mp-ahero__texte {
	position: relative;
	left: auto;
	right: auto;
	bottom: auto;
	padding: 48px;
	color: var(--mp-ink);
}

.mp-ahero__rubrique,
.mp-ahero__rubrique:hover {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 14px 5px 5px;
	border-radius: 100px;
	background: rgba(255, 255, 255, 0.94);
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--c);
	text-decoration: none;
}

.mp-ahero__titre {
	margin: 0;
	max-width: 860px;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 50px;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: inherit;
	text-transform: none;
	text-wrap: balance;
}

.mp-ahero__meta {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.92);
}

.sans-image .mp-ahero__meta {
	color: #444444;
}

.mp-ahero__meta i {
	width: 4px;
	height: 4px;
	border-radius: 100px;
	background: currentColor;
	opacity: 0.6;
}

.mp-article .mp-avatar {
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 100px;
	object-fit: cover;
	background: #ffffff;
}

/* Two columns: text + sidebar */

.mp-art {
	max-width: 1140px;
	margin: 0 auto;
	padding: 56px 24px 88px;
	display: grid;
	grid-template-columns: minmax(0, 700px) 320px;
	justify-content: space-between;
	gap: 72px;
}

.mp-art.sans-colonne {
	grid-template-columns: minmax(0, 760px);
	justify-content: center;
}

/* Article text: styles the existing editor content (paragraphs, headings, images, lists…) */

.mp-prose {
	min-width: 0;
	font-size: 18px;
	line-height: 1.75;
	color: #222222;
}

.mp-prose > *:first-child {
	margin-top: 0;
}

.mp-prose p {
	margin: 0 0 22px;
}

.mp-prose > p:first-of-type {
	font-size: 22px;
	line-height: 1.6;
	font-weight: 600;
	color: var(--mp-ink);
}

.mp-prose a {
	color: var(--mp-ink);
	text-decoration: underline;
	text-decoration-color: var(--c);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.mp-prose a:hover {
	color: var(--c);
}

.mp-prose strong,
.mp-prose b {
	font-weight: 700;
	color: var(--mp-ink);
}

.mp-prose h2 {
	margin: 56px 0 20px;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--mp-ink);
	text-transform: none;
	text-wrap: balance;
}

.mp-prose h3 {
	margin: 40px 0 14px;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--mp-ink);
	text-transform: none;
}

.mp-prose h4,
.mp-prose h5,
.mp-prose h6 {
	margin: 32px 0 12px;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.35;
	color: var(--mp-ink);
	text-transform: none;
}

/* Headings written as bold paragraphs inside headings: keep one weight. */
.mp-prose h2 strong,
.mp-prose h3 strong,
.mp-prose h4 strong {
	font-weight: inherit;
}

.mp-prose figure,
.mp-prose .wp-block-image {
	margin: 10px 0 34px;
}

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

/* Tall pictures stay a reasonable height and are centred. */
.mp-prose .wp-block-image img,
.mp-prose > p > img,
.mp-prose figure > img {
	width: auto;
	max-height: 620px;
	margin: 0 auto;
}

.mp-prose figcaption,
.mp-prose .wp-element-caption {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.5;
	font-style: italic;
	text-align: center;
	color: #777777;
}

.mp-prose ul {
	margin: 0 0 28px;
	padding: 6px 0;
	list-style: none;
	border-left: 3px solid var(--c);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mp-prose ul li {
	position: relative;
	margin: 0;
	padding-left: 46px;
	font-size: 17px;
	line-height: 1.6;
}

.mp-prose ul li::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 0.62em;
	width: 9px;
	height: 9px;
	border-radius: 100px;
	background: var(--c);
}

.mp-prose ol {
	margin: 0 0 28px;
	padding-left: 1.4em;
}

.mp-prose ol li {
	margin-bottom: 10px;
	padding-left: 6px;
}

.mp-prose ol li::marker {
	font-family: var(--mp-font-title);
	font-weight: 700;
	color: var(--c);
}

.mp-prose blockquote {
	position: relative;
	margin: 40px 0;
	padding: 4px 0 4px 28px;
	border-left: 3px solid var(--c);
	font-family: var(--mp-font-title);
	font-weight: 600;
	font-size: 22px;
	line-height: 1.45;
	color: var(--mp-ink);
}

.mp-prose blockquote p:last-child {
	margin-bottom: 0;
}

.mp-prose blockquote cite {
	display: block;
	margin-top: 10px;
	font-family: var(--mp-font-text);
	font-size: 14px;
	font-style: normal;
	font-weight: 600;
	color: #777777;
}

.mp-prose table {
	width: 100%;
	margin: 0 0 28px;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
}

.mp-prose th,
.mp-prose td {
	padding: 10px 12px;
	border-bottom: 1px solid #EFE6DC;
	text-align: left;
	vertical-align: top;
}

.mp-prose th {
	font-family: var(--mp-font-title);
	font-weight: 700;
	background: var(--t);
}

.mp-prose iframe,
.mp-prose video {
	max-width: 100%;
	border-radius: 18px;
}

/* Embedded videos (YouTube, Vimeo…) fill the column at 16:9. */
.mp-prose .wp-block-embed.is-type-video iframe,
.mp-prose iframe[src*="youtube"],
.mp-prose iframe[src*="vimeo"] {
	position: static;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.mp-prose .wp-block-embed__wrapper::before {
	content: none;
}

.mp-prose hr {
	margin: 48px 0;
	border: 0;
	border-top: 1px solid #EFE6DC;
}

/* Mid-article product banner */

.mp-prose .mp-inbanner {
	margin: 40px 0;
	padding: 18px 22px;
	border-radius: 22px;
	background: var(--mp-cream);
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr) auto;
	align-items: center;
	gap: 22px;
}

.mp-prose .mp-inbanner img {
	width: 120px;
	max-height: none;
	margin: 0;
	border-radius: 0;
}

.mp-inbanner span {
	display: block;
	font-family: var(--mp-font-hand);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.1;
	color: var(--mp-pink);
}

.mp-inbanner strong {
	display: block;
	margin-top: 4px;
	font-family: var(--mp-font-title);
	font-size: 16px;
	line-height: 1.35;
}

.mp-prose .mp-inbanner__bouton,
.mp-prose .mp-inbanner__bouton:hover {
	min-height: 46px;
	padding: 0 20px;
	border-radius: 100px;
	background: var(--mp-black);
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	color: #ffffff;
}

.mp-prose .mp-inbanner__bouton:hover {
	opacity: 0.85;
}

/* End of article: author and sharing */

.mp-art__fin {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid #EFE6DC;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mp-auteur {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.mp-article .mp-avatar--grand {
	width: 56px;
	height: 56px;
	border-radius: 100px;
}

.mp-auteur strong {
	font-family: var(--mp-font-title);
	font-size: 17px;
	color: var(--mp-ink);
}

.mp-auteur p {
	margin: 6px 0 0;
	font-size: 15px;
	line-height: 1.6;
	color: #555555;
}

.mp-partage {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 14px;
}

.mp-partage > span {
	margin-right: 6px;
}

.mp-partage a,
.mp-partage button {
	position: relative;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 100px;
	border: 1.5px solid #DDD2C6;
	background: rgba(255, 255, 255, 0.7);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--mp-ink);
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.mp-partage a:hover,
.mp-partage button:hover,
.mp-partage a:focus-visible,
.mp-partage button:focus-visible {
	border-color: var(--c);
	background: var(--t);
}

.mp-partage svg {
	width: 17px;
	height: 17px;
}

.mp-partage__ok:not(:empty) {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	padding: 4px 10px;
	border-radius: 100px;
	background: var(--mp-black);
	white-space: nowrap;
	font-size: 12px;
	font-weight: 600;
	color: #ffffff;
}

/* Sidebar: table of contents + product card, sticky */

.mp-rail {
	position: relative;
}

.mp-rail__inner {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.admin-bar .mp-rail__inner {
	top: 56px;
}

.mp-rail__titre {
	display: block;
	margin-bottom: 10px;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #888888;
}

.mp-toc {
	display: flex;
	flex-direction: column;
}

.mp-toc a {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	gap: 6px;
	padding: 10px 0 10px 14px;
	border-left: 2px solid #EFE6DC;
	font-size: 14px;
	line-height: 1.45;
	color: #555555;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.mp-toc a span {
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 12px;
	color: #B5A797;
}

.mp-toc a:hover {
	color: var(--mp-ink);
}

.mp-toc a.is-active {
	border-left-color: var(--c);
	font-weight: 700;
	color: var(--mp-ink);
}

.mp-toc a.is-active span {
	color: var(--c);
}

.mp-railbuy {
	padding: 16px 18px 18px;
	border: 1.5px solid var(--mp-yellow);
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 20px 40px -24px rgba(80, 40, 20, 0.3);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mp-railbuy__image {
	height: 150px;
	margin-bottom: 6px;
	border-radius: 16px;
	background: var(--mp-cream);
	display: flex;
	align-items: center;
	justify-content: center;
}

.mp-railbuy__image img {
	display: block;
	max-width: 84%;
	max-height: 120px;
}

.mp-railbuy__accroche {
	font-family: var(--mp-font-hand);
	font-weight: 700;
	font-size: 23px;
	line-height: 1;
}

.mp-railbuy strong {
	font-family: var(--mp-font-title);
	font-size: 19px;
	color: var(--mp-ink);
}

.mp-railbuy p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #555555;
}

.mp-railbuy__achat {
	margin-top: 6px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.mp-railbuy__prix {
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 22px;
	white-space: nowrap;
}

.mp-railbuy__prix del {
	font-size: 14px;
	font-weight: 400;
	color: #888888;
}

.mp-railbuy__prix ins {
	text-decoration: none;
}

.mp-railbuy__bouton {
	min-height: 44px;
	padding: 0 20px;
	font-size: 12px;
}

.mp-railbuy small {
	font-size: 12px;
	text-align: center;
	color: #777777;
}

/* Question after the article: same section as the magazine block, a little tighter. */
.mp-article .mp-question__inner {
	padding-top: 88px;
	padding-bottom: 88px;
}

@media (max-width: 960px) {
	.mp-ahero {
		height: 440px;
	}

	.mp-ahero__texte {
		left: 22px;
		right: 22px;
		bottom: 24px;
	}

	.sans-image .mp-ahero__texte {
		padding: 28px 22px;
	}

	.mp-ahero__titre {
		font-size: 30px;
	}

	.mp-art,
	.mp-art.sans-colonne {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding-top: 36px;
		padding-bottom: 64px;
	}

	.mp-rail {
		display: none;
	}
}

@media (max-width: 760px) {
	.mp-ahero-wrap .mp-wrap {
		padding-left: 12px;
		padding-right: 12px;
	}

	.mp-ahero {
		height: 420px;
		border-radius: 22px;
	}

	.mp-ahero__titre {
		font-size: 27px;
	}

	.mp-ahero__meta {
		gap: 6px 12px;
		font-size: 13px;
	}

	/* Lines wrap on phones: separator dots would end up at line ends. */
	.mp-ahero__meta i {
		display: none;
	}

	.mp-art {
		padding-left: 20px;
		padding-right: 20px;
	}

	.mp-prose {
		font-size: 17px;
		line-height: 1.7;
	}

	.mp-prose > p:first-of-type {
		font-size: 19px;
	}

	.mp-prose h2 {
		margin-top: 44px;
		font-size: 24px;
	}

	.mp-prose h3 {
		font-size: 20px;
	}

	.mp-prose img {
		border-radius: 16px;
	}

	.mp-prose ul li {
		padding-left: 34px;
		font-size: 16px;
	}

	.mp-prose ul li::before {
		left: 14px;
	}

	.mp-prose .mp-inbanner {
		grid-template-columns: 84px minmax(0, 1fr);
		gap: 14px 16px;
		padding: 16px;
	}

	.mp-prose .mp-inbanner img {
		width: 84px;
	}

	.mp-prose .mp-inbanner__bouton {
		grid-column: 1 / -1;
		justify-content: center;
	}

	.mp-article .mp-question__inner {
		padding-top: 56px;
		padding-bottom: 64px;
	}
}
