/*
 * Page d'un article. Largeur maximale et polices du thème.
 * Pour réduire la largeur : .ma-art { --ma-art-max: 1500px; }
 */
.ma-art {
	--ma-art-max: var(--wd-container-w, 1400px);
	grid-column: 1 / -1;
	width: 100%;
	min-width: 0;
}
body.ma-art-page .wd-page-wrapper { overflow-x: clip; }
body.ma-art-page main.wd-content-layout { padding-top: 0 !important; }

/* ---------- En-tête transparent sur la photo (même règle que « Nos engagements ») ---------- */
body.ma-art-cover .whb-header { z-index: 410; }
body.ma-art-cover .whb-header:not(.whb-sticked),
body.ma-art-cover .whb-header:not(.whb-sticked) .whb-row,
body.ma-art-cover .whb-header:not(.whb-sticked) .whb-general-header,
body.ma-art-cover .whb-header:not(.whb-sticked) .whb-general-header-inner { border-color: transparent !important; background: transparent !important; box-shadow: none !important; }
body.ma-art-cover .whb-header:not(.whb-sticked) .whb-general-header :is(.wd-nav > li > a, .wd-nav > li > a .nav-link-text, .wd-tools-element > a, .wd-tools-text, .wd-tools-icon, .wd-tools-icon::before) { color: #fff !important; }
body.ma-art-cover .whb-header:not(.whb-sticked) .whb-general-header :is(.wd-burger-icon, .wd-burger-icon::before, .wd-burger-icon::after) { background-color: #fff !important; }
body.ma-art-cover .whb-header:not(.whb-sticked) .site-logo img { filter: brightness(0) invert(1); }
body.ma-art-cover .whb-header .wd-dropdown { background-color: #fff; }
body.ma-art-cover .whb-header:not(.whb-sticked)::before { content: ""; position: absolute; z-index: -1; top: 0; right: 0; left: 0; height: 150px; background: linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, 0)); pointer-events: none; }
@media (min-width: 1025px) {
	body.ma-art-cover .whb-header:not(.whb-sticked) { position: absolute; top: auto; right: 0; left: 0; width: 100%; }
}
@media (max-width: 1024px) {
	body.ma-art-cover .whb-header { position: absolute; top: auto; right: 0; left: 0; width: 100%; }
	body.ma-art-cover .whb-header.whb-sticked { position: fixed; top: 0; }
	body.ma-art-cover .whb-header.whb-sticked .whb-general-header { background-color: #fafafa !important; }
}

/* ---------- Grande photo ---------- */
.ma-art-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100vw;
	min-height: clamp(520px, 74vh, 760px);
	margin-left: calc(50% - 50vw);
	overflow: hidden;
	background: var(--ma-soft);
	text-align: center;
}
.ma-art-hero img.ma-art-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.ma-art-hero-text { position: relative; z-index: 1; max-width: 1100px; padding: 130px 24px 64px; }
.ma-art-hero p.ma-art-cat { margin: 0 0 18px; font-family: var(--ma-num); font-size: 13px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.ma-art-cat a { color: inherit; }
.ma-art .ma-art-hero h1.ma-art-title {
	margin: 0;
	color: var(--ma-title);
	font-family: var(--ma-serif);
	font-size: clamp(38px, 4.4vw, 78px);
	font-weight: 500;
	letter-spacing: .04em;
	line-height: 1.12;
	text-transform: none;
	text-wrap: balance;
	overflow-wrap: break-word;
}
.ma-art-hero p.ma-art-intro { max-width: 760px; margin: 22px auto 0; font-size: clamp(20px, 1.5vw, 24px); line-height: 1.5; text-wrap: balance; }
.ma-art-hero p.ma-art-meta { margin: 22px 0 0; font-family: var(--ma-num); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
body.ma-art-cover .ma-art-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .34); }
body.ma-art-cover .ma-art-hero img.ma-art-hero-img { z-index: 0; }
body.ma-art-cover .ma-art-hero-text,
body.ma-art-cover .ma-art .ma-art-hero h1.ma-art-title { z-index: 2; color: #fff; text-shadow: 0 1px 18px rgba(0, 0, 0, .25); }

/* ---------- Feuille blanche : publicités à gauche, article à droite ---------- */
.ma-art-sheet { max-width: var(--ma-art-max); margin: 0 auto; padding: 0 clamp(0px, 2.4vw, 48px) 64px; background: #fff; }
.ma-art-crumbs { padding: 18px 0; border-bottom: 1px solid var(--ma-line); font-family: var(--ma-num); font-size: 12px; letter-spacing: .04em; color: #8a8a8a; }
.ma-art-crumbs a { color: #555; text-decoration: none; }
.ma-art-crumbs a:hover { text-decoration: underline; }
.ma-art-layout { display: grid; grid-template-columns: clamp(250px, 21vw, 340px) minmax(0, 1fr); gap: clamp(28px, 3.4vw, 64px); padding-top: 48px; }
.ma-art-left { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.ma-art-ads { flex: 1; }
.ma-art-ads .ma-ad + .ma-ad { position: sticky; top: 90px; margin-top: 32px; }

/* Sommaire */
.ma-art-toc summary { padding-bottom: 12px; color: var(--ma-ink); font-family: var(--ma-num); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; list-style: none; cursor: pointer; }
.ma-art-toc summary::-webkit-details-marker { display: none; }
.ma-art-toc ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ma-ink); }
.ma-art-toc li { margin: 0; border-bottom: 1px solid var(--ma-line); }
.ma-art-toc li a { display: block; padding: 12px 0; color: #444; font-size: 19px; line-height: 1.3; text-decoration: none; }
.ma-art-toc li a:hover { color: var(--ma-ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Texte ---------- */
.ma-art-body { min-width: 0; color: #444; font-size: var(--wd-text-font-size, 20px); line-height: 1.65; }
/* Le texte reste lisible ; photos, produits et bandeaux prennent toute la largeur. */
.ma-art-body > :is(p, h2, h3, h4, ul, ol, blockquote, .wp-block-details, .wp-block-table, .wp-block-heading) { max-width: 820px; margin-right: auto; margin-left: auto; }
.ma-art-body > :first-child { margin-top: 0; }
.ma-art-body p { margin-bottom: 1.1em; }
.ma-art-body > p:first-child { max-width: 860px; margin-bottom: 40px; color: var(--ma-title); font-size: clamp(22px, 1.7vw, 26px); line-height: 1.55; text-align: center; }
.ma-art-body h2 { margin-top: 56px; margin-bottom: 18px; color: var(--ma-title); font-family: var(--ma-serif); font-size: clamp(30px, 2.8vw, 42px); font-weight: 500; line-height: 1.18; scroll-margin-top: 100px; }
.ma-art-body h3 { margin-top: 36px; margin-bottom: 12px; color: var(--ma-title); font-family: var(--ma-serif); font-size: clamp(24px, 2vw, 30px); font-weight: 500; line-height: 1.22; }
.ma-art-body > h2:has(+ .wp-block-details) { margin-top: 72px; text-align: center; }
.ma-art-body > h2:has(+ .wp-block-details)::before { content: "FAQ"; display: block; margin-bottom: 10px; color: #8a8a8a; font-family: var(--ma-num); font-size: 12px; font-weight: 600; letter-spacing: .24em; }
.ma-art-body :is(p, li, td) a:not([class]) { color: var(--ma-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.ma-art-body > ul,
.ma-art-body > ol { padding-left: 1.2em; }
.ma-art-body li { margin-bottom: .35em; }
.ma-art-body img { height: auto; border-radius: 0; }
.ma-art-body > .wp-block-image { margin-top: 48px; margin-bottom: 48px; }
.ma-art-body > .wp-block-image img { width: 100%; }
.ma-art-body figcaption { font-family: var(--ma-num); font-size: 12px; color: #8a8a8a; text-align: center; }
.ma-art-body > blockquote { margin-top: 48px; margin-bottom: 48px; padding: 36px 32px; border: 0; background: var(--ma-brume); color: var(--ma-ink); font-size: 26px; font-style: normal; line-height: 1.45; text-align: center; }
.ma-art-body blockquote p:last-child { margin: 0; }
.ma-art-body > .wp-block-table { margin-top: 36px; margin-bottom: 36px; overflow-x: auto; }
.ma-art-body .wp-block-table table { width: 100%; margin: 0; border-collapse: collapse; font-size: 19px; line-height: 1.4; }
.ma-art-body .wp-block-table :is(th, td) { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--ma-line); text-align: left; vertical-align: top; }
.ma-art-body .wp-block-table th { background: var(--ma-jaune); color: var(--ma-ink); font-family: var(--ma-num); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* Respiration entre le texte et les blocs de vente, quels que soient les réglages du thème. */
.ma-art .ma-art-body > :is(.ma-prods, .ma-feature, .ma-shop) { margin-top: 64px; margin-bottom: 64px; }
.ma-art .ma-art-body > .wp-block-media-text + .ma-feature,
.ma-art .ma-art-body > .ma-feature + .wp-block-media-text { margin-top: -64px; }
.ma-art .ma-art-body > :is(.ma-prods, .ma-feature, .ma-shop):last-child { margin-bottom: 0; }

/* ---------- Articles proches : trois grandes photos ---------- */
.ma-art-related { margin-top: 72px; text-align: center; }
.ma-art-related h2 { margin: 0 0 32px; color: var(--ma-title); font-family: var(--ma-serif); font-size: clamp(32px, 3vw, 44px); font-weight: 500; }
.ma-art-related ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 0; padding: 0; list-style: none; }
.ma-art-related li { margin: 0; }
.ma-art-related a { position: relative; display: flex; align-items: flex-end; justify-content: center; height: clamp(340px, 34vw, 520px); overflow: hidden; background: #777; color: #fff; }
.ma-art-related img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.ma-art-related a:hover img { transform: scale(1.04); }
.ma-art-related-text { position: relative; width: 100%; padding: 80px 24px 28px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .65)); }
.ma-art-related-title { display: block; margin-bottom: 10px; font-family: var(--ma-serif); font-size: 28px; font-weight: 500; line-height: 1.2; }
.ma-art-related-more { font-family: var(--ma-num); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-decoration: underline; text-transform: uppercase; text-underline-offset: 6px; }

/* ---------- Tablette et mobile : sommaire, article, puis publicités ---------- */
@media (max-width: 1024px) {
	.ma-art-hero { min-height: clamp(460px, 76vh, 620px); }
	.ma-art-hero-text { padding: 110px 18px 40px; }
	.ma-art .ma-art-hero h1.ma-art-title { letter-spacing: .02em; }
	.ma-art-sheet { padding: 0 0 40px; }
	.ma-art-crumbs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.ma-art-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 24px; }
	.ma-art-left { display: contents; }
	.ma-art-toc { order: 1; margin: 0 12px; }
	.ma-art-toc summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--ma-line); }
	.ma-art-toc summary::after { content: "+"; font-size: 22px; font-weight: 400; line-height: 1; }
	.ma-art-toc details[open] summary::after { content: "–"; }
	.ma-art-body { order: 2; }
	.ma-art .ma-art-body > :is(.ma-prods, .ma-feature, .ma-shop) { margin-top: 44px; margin-bottom: 44px; }
	.ma-art .ma-art-body > .wp-block-media-text + .ma-feature,
	.ma-art .ma-art-body > .ma-feature + .wp-block-media-text { margin-top: -44px; }
	.ma-art-ads { order: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
	.ma-art-ads .ma-ad + .ma-ad { position: static; margin: 0; }
	.ma-art .ma-ad p.ma-ad-title { font-size: 20px; }
	.ma-art .ma-ad a.ma-btn { font-size: 11px; }
	.ma-ad-body { padding: 14px 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.ma-art * { transition: none !important; }
}
