/*
 * Blocs des articles, sur le site et dans l'éditeur. Style des pages de la marque :
 * angles droits, boutons noirs, grandes photos, titres Cormorant.
 */
.ma-prods,
.ma-feature,
.ma-shop,
.ma-ad,
.ma-art,
.editor-styles-wrapper {
	--ma-ink: #111;
	--ma-title: #242424;
	--ma-line: #e8e8e8;
	--ma-soft: #f7f6f3;
	--ma-jaune: #fcf6ba;
	--ma-brume: #b5c2ca;
	--ma-terre: #a75249;
	--ma-num: "Pontano Sans", Arial, Helvetica, sans-serif;
	--ma-serif: var(--wd-title-font, "Cormorant Garamond", Georgia, serif);
}

/* ---------- Boutons, prix, petits titres ---------- */
:is(.ma-prods, .ma-feature, .ma-shop, .ma-ad) a.ma-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 30px;
	border: 1px solid var(--ma-ink);
	border-radius: 0;
	background: var(--ma-ink);
	color: #fff;
	font-family: var(--ma-num);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background .2s, color .2s;
}
:is(.ma-prods, .ma-feature, .ma-shop, .ma-ad) a.ma-btn:hover { background: #fff; color: var(--ma-ink); }
:is(.ma-prods, .ma-feature, .ma-shop, .ma-ad) a.ma-btn.loading { opacity: .6; }
:is(.ma-prods, .ma-feature, .ma-ad) a.added_to_cart { display: block; margin-top: 8px; font-family: var(--ma-num); font-size: 13px; text-align: center; text-decoration: underline; }
:is(.ma-prods, .ma-feature) a.ma-link {
	color: var(--ma-ink);
	font-family: var(--ma-num);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-decoration: underline;
	text-transform: uppercase;
	text-underline-offset: 6px;
}
.ma-price { display: block; font-family: var(--ma-num); font-size: 16px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; line-height: 1.4; }
.ma-price .amount,
.ma-price ins { color: inherit !important; font-family: var(--ma-num); font-weight: 600; text-decoration: none; }
.ma-price del,
.ma-price del .amount { color: #8a8a8a !important; font-weight: 400; text-decoration: line-through; }
:is(.ma-feature, .ma-ad, .ma-art-related) p.ma-kicker {
	margin: 0 0 8px;
	color: #6b6b6b;
	font-family: var(--ma-num);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .18em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* ---------- Grille de produits ---------- */
.ma-prods { container-type: inline-size; margin: 64px 0; }
.ma-prods p.ma-prods-title {
	max-width: none;
	margin: 0 0 28px;
	color: var(--ma-title);
	font-family: var(--ma-serif);
	font-size: clamp(30px, 3vw, 40px);
	font-weight: 500;
	line-height: 1.15;
	text-align: center;
}
.ma-prods ul.ma-prods-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; max-width: none; margin: 0; padding: 0; list-style: none; }
.ma-prods li.ma-prod { display: flex; flex-direction: column; margin: 0; padding: 0; text-align: center; }
.ma-prods li.ma-prod::before { content: none; }
.ma-prod-img { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ma-soft); }
.ma-prod-img img.ma-photo { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; transition: opacity .35s, transform .6s; }
.ma-prod-img img.ma-photo--alt { opacity: 0; }
@media (hover: hover) {
	.ma-prod-img:hover img.ma-photo { transform: scale(1.03); }
	.ma-prod-img:hover img.ma-photo--alt { opacity: 1; }
}
.ma-prod a.ma-prod-name { margin: 16px 0 4px; color: var(--ma-title); font-family: var(--ma-serif); font-size: 22px; font-weight: 600; line-height: 1.25; text-decoration: none; }
.ma-prod .ma-price { margin-bottom: 14px; }
.ma-prod a.ma-btn { margin-top: auto; padding-inline: 12px; }
.ma-prods p.ma-prods-more { max-width: none; margin: 32px 0 0; text-align: center; }
@container (min-width: 760px) {
	.ma-prods ul.ma-prods-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ma-prods ul.ma-prods-list:has(> li:nth-child(3):last-child),
	.ma-prods ul.ma-prods-list:has(> li:nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ma-prods ul.ma-prods-list:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
}

/* ---------- Produit mis en avant et blocs image + texte : moitié / moitié ---------- */
.ma-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 560px; margin: 64px 0; background: var(--ma-soft); }
.ma-feature-img { position: relative; display: block; overflow: hidden; }
.ma-feature-img img.ma-photo { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; transition: transform .8s; }
.ma-feature-img:hover img.ma-photo { transform: scale(1.03); }
.ma-feature.is-reverse .ma-feature-img { order: 2; }
.ma-feature-body { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 64px); text-align: center; }
.ma-feature p.ma-feature-name { margin: 0 0 14px; font-family: var(--ma-serif); font-size: clamp(30px, 3vw, 44px); font-weight: 500; line-height: 1.15; }
.ma-feature-name a { color: var(--ma-title); text-decoration: none; }
.ma-feature p.ma-feature-text { max-width: 440px; margin: 0 0 18px; }
.ma-feature .ma-price { margin-bottom: 22px; font-size: 20px; }
.ma-feature a.ma-link { margin-top: 20px; }

/* La grille est redéfinie ici : le thème peut désactiver les styles des blocs WordPress. */
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 520px; margin-top: 64px; margin-bottom: 64px; background: var(--ma-soft); }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text > .wp-block-media-text__media { grid-column: 1; grid-row: 1; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text > .wp-block-media-text__content { grid-column: 2; grid-row: 1; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__media { grid-column: 2; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__content { grid-column: 1; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text > .wp-block-media-text__media img { display: block; width: 100%; max-width: none; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text > .wp-block-media-text__content { align-self: center; padding: clamp(24px, 4vw, 64px); }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text > .wp-block-media-text__media { position: relative; align-self: stretch; min-height: 100%; margin: 0; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text.is-image-fill-element > .wp-block-media-text__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text__content > :first-child { margin-top: 0; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text__content > :last-child { margin-bottom: 0; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text__content h2 { font-size: clamp(28px, 2.4vw, 40px); }
/* Deux blocs qui se suivent se touchent, en damier. */
.ma-art-body .wp-block-media-text + .wp-block-media-text,
.ma-art-body .wp-block-media-text + .ma-feature,
.ma-art-body .ma-feature + .wp-block-media-text { margin-top: -64px; }

/* ---------- Encart boutique ---------- */
.ma-shop { display: flex; flex-direction: column; align-items: center; margin: 64px 0; padding: clamp(40px, 5vw, 80px) 24px; background: var(--ma-jaune); color: var(--ma-ink); text-align: center; }
.ma-shop p.ma-shop-title { margin: 0 0 12px; font-family: var(--ma-serif); font-size: clamp(32px, 3.6vw, 52px); font-weight: 500; line-height: 1.15; }
.ma-shop p.ma-shop-text { max-width: 620px; margin: 0 0 26px; }

/* ---------- Couleurs proposées dans l'onglet « Styles » ---------- */
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) :is(.wp-block-media-text, .wp-block-group, .ma-shop).is-style-ma-blanc { background: #fff; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) :is(.wp-block-media-text, .wp-block-group, .ma-shop).is-style-ma-jaune { background: var(--ma-jaune); color: var(--ma-ink); }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) :is(.wp-block-media-text, .wp-block-group, .ma-shop).is-style-ma-brume { background: var(--ma-brume); color: var(--ma-ink); }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) :is(.wp-block-media-text, .wp-block-group, .ma-shop).is-style-ma-terre { background: var(--ma-terre); color: #fff; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) :is(.wp-block-media-text, .wp-block-group, .ma-shop).is-style-ma-terre :is(h2, h3, p, li, a:not(.ma-btn)) { color: #fff; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-group:is(.is-style-ma-blanc, .is-style-ma-jaune, .is-style-ma-brume, .is-style-ma-terre) { margin-top: 64px; margin-bottom: 64px; padding: clamp(32px, 5vw, 72px) 24px; text-align: center; }

/* ---------- Questions fréquentes ---------- */
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-details { margin-top: 0; margin-bottom: 0; padding: 0; border: 0; border-bottom: 1px solid var(--ma-line); }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-details summary { position: relative; padding: 22px 40px 22px 0; color: var(--ma-title); font-size: 22px; font-weight: 600; line-height: 1.35; cursor: pointer; list-style: none; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-details summary::-webkit-details-marker { display: none; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-details summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-details[open] summary::after { margin-top: -2px; transform: rotate(225deg); }
:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-details > :not(summary) { margin: 0 0 20px; }

/* ---------- Publicités de la colonne ---------- */
.ma-ad { background: var(--ma-soft); text-align: center; }
.ma-ad-img { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.ma-ad-img img.ma-photo { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; transition: opacity .35s, transform .8s; }
.ma-ad-img img.ma-photo--alt { opacity: 0; }
@media (hover: hover) {
	.ma-ad-img:hover img.ma-photo { transform: scale(1.03); }
	.ma-ad-img:hover img.ma-photo--alt { opacity: 1; }
}
.ma-ad-body { padding: 20px 18px 22px; }
.ma-ad p.ma-ad-title { margin: 0 0 8px; font-family: var(--ma-serif); font-size: 26px; font-weight: 600; line-height: 1.2; }
.ma-ad-title a { color: var(--ma-title); text-decoration: none; }
.ma-ad .ma-price { margin-bottom: 6px; }
.ma-ad a.ma-btn { width: 100%; margin-top: 10px; padding-inline: 12px; }

@media (max-width: 767px) {
	.ma-prods { margin: 44px 0; }
	.ma-prods ul.ma-prods-list { gap: 28px 10px; }
	.ma-prod a.ma-prod-name { font-size: 19px; }
	.ma-prod a.ma-btn { font-size: 11px; letter-spacing: .05em; }
	.ma-feature { grid-template-columns: minmax(0, 1fr); min-height: 0; margin: 44px 0; }
	.ma-feature-img,
	.ma-feature.is-reverse .ma-feature-img { order: 0; aspect-ratio: 4 / 5; }
	.ma-feature-body { padding: 28px 20px 32px; }
	.ma-feature a.ma-btn { align-self: stretch; }
	:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text.is-stacked-on-mobile { grid-template-columns: minmax(0, 1fr) !important; min-height: 0; margin-top: 44px; margin-bottom: 44px; }
	:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text.is-stacked-on-mobile.wp-block-media-text > .wp-block-media-text__media { grid-column: 1; grid-row: 1; min-height: 0; aspect-ratio: 4 / 5; }
	:is(.ma-art-body, .editor-styles-wrapper.post-type-post) .wp-block-media-text.is-stacked-on-mobile.wp-block-media-text > .wp-block-media-text__content { grid-column: 1; grid-row: 2; padding: 28px 20px; }
	.ma-art-body .wp-block-media-text + .wp-block-media-text,
	.ma-art-body .wp-block-media-text + .ma-feature,
	.ma-art-body .ma-feature + .wp-block-media-text { margin-top: -44px; }
	.ma-shop { margin: 44px 0; }
}
