/**
 * Gabarit d'article — charte 2026.
 * Maquette de référence : Article-Desktop / Article-Mobile.
 */

/* ------------------------------------------------------------ Neutralisation */

/* Pastille de catégorie flottante Divi + sa croix : retirée du gabarit. */
.mh-single .et_post_meta_wrapper > .et_pb_post_extra,
.mh-single .mhama-floating-category,
.mh-single .mhama-category-badge {
	display: none !important;
}

/* Emplacement publicitaire vide au-dessus du texte : supprimé. */
.mh-single .mhama-ad-above-content {
	display: none !important;
}

/* ------------------------------------------------------------------ Ossature */

.mh-single {
	padding: 26px 0 56px;
}

.mh-article-grid {
	display: grid;
	grid-template-columns: minmax(0, 800px) 312px;
	gap: 40px;
	align-items: start;
}

.mh-article-main {
	min-width: 0;
}

.mh-article-aside {
	min-width: 0;
}

/* --------------------------------------------------------------- En-tête */

.mh-article-head {
	margin: 14px 0 0;
}

.mh-article-head h1 {
	font-size: 40px;
	margin: 10px 0 0;
}

.mh-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin-top: 14px;
	font-size: 14px;
	color: var(--mh-muted);
}

.mh-article-meta a {
	color: var(--mh-muted);
	font-weight: 600;
}

.mh-article-meta a:hover {
	color: var(--mh-ink);
}

.mh-article-meta .mh-dot {
	color: var(--mh-line-strong);
}

.mh-article-hero {
	margin-top: 22px;
}

.mh-article-hero figcaption {
	font-size: 13px;
	color: var(--mh-muted);
	margin-top: 8px;
}

/* ------------------------------------------------------------------ Sommaire */

.mh-toc {
	margin-top: 26px;
	padding: 18px 20px;
}

.mh-toc > .mh-eyebrow {
	display: block;
	margin-bottom: 10px;
}

.mh-toc ol {
	counter-reset: mhtoc;
	list-style: none;
	display: grid;
	gap: 7px;
}

.mh-toc ol li {
	list-style: none !important;
	counter-increment: mhtoc;
	font-size: 15px;
	line-height: 1.4;
	padding-left: 26px;
	position: relative;
}

.mh-toc ol li::before {
	content: counter(mhtoc);
	position: absolute;
	left: 0;
	top: 1px;
	width: 19px;
	height: 19px;
	border-radius: 4px;
	background: var(--mh-tint);
	color: var(--mh-eyebrow);
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mh-toc-sub {
	padding-left: 14px;
}

/* Sommaire replié en mobile : géré par <details>. */
.mh-toc summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 44px;
}

.mh-toc summary::-webkit-details-marker {
	display: none;
}

.mh-toc summary .mh-toc-count {
	font-size: 13px;
	color: var(--mh-muted);
	font-weight: 600;
}

/* --------------------------------------------------------------- Contenu */

.mh-article-body {
	margin-top: 28px;
	max-width: 68ch;
	font-size: 17px;
	line-height: 1.7;
	color: var(--mh-ink-2);
}

.mh-article-body > * + * {
	margin-top: 18px;
}

.mh-article-body h2 {
	font-size: 27px;
	margin-top: 38px;
	color: var(--mh-ink);
	scroll-margin-top: 90px;
}

.mh-article-body h3 {
	font-size: 21px;
	margin-top: 28px;
	color: var(--mh-ink);
	scroll-margin-top: 90px;
}

.mh-article-body p {
	margin: 0;
}

.mh-article-body ul,
.mh-article-body ol {
	padding-left: 22px;
	display: grid;
	gap: 8px;
}

.mh-article-body ul li {
	list-style: disc;
}

.mh-article-body ol li {
	list-style: decimal;
}

.mh-article-body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--mh-r-sm);
}

.mh-article-body figure {
	margin: 0;
}

.mh-article-body figcaption {
	font-size: 13px;
	color: var(--mh-muted);
	margin-top: 7px;
}

.mh-article-body blockquote {
	margin: 0;
	padding: 4px 0 4px 18px;
	border-left: 3px solid var(--mh-red);
	font-size: 18px;
	color: var(--mh-ink);
}

.mh-article-body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.mh-article-body th,
.mh-article-body td {
	border: 1px solid var(--mh-line);
	padding: 9px 11px;
	text-align: left;
}

.mh-article-body th {
	background: var(--mh-tint);
	font-weight: 700;
}

/* ------------------------------------------------------- Bloc fiche modèle */

.mh-fiche {
	margin-top: 26px;
	padding: 20px;
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}

.mh-fiche-visual {
	border-radius: var(--mh-r-sm);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mh-fiche-visual img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	image-rendering: pixelated;
}

.mh-fiche-body h3 {
	font-size: 22px;
}

.mh-fiche-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.mh-nomenclature {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 18px;
}

.mh-nomenclature li {
	list-style: none !important;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--mh-ink-2);
}

.mh-bead {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 1px solid rgba(0, 0, 0, .12);
}

.mh-bead-count {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	color: var(--mh-ink);
}

.mh-fiche-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

/* La fiche sur sa propre page : même bloc, visuel plus large, caractéristiques
 * en colonnes plutôt qu'en ligne de méta. */

.mh-fiche--page {
	grid-template-columns: 380px minmax(0, 1fr);
	margin-top: 18px;
}

.mh-fiche-specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 18px;
	margin: 0;
}

.mh-fiche-specs dt {
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--mh-ink-2);
}

.mh-fiche-specs dd {
	margin: 2px 0 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--mh-ink);
	font-variant-numeric: tabular-nums;
}

.mh-fiche-nomenclature {
	margin-top: 28px;
}

/* -------------------------------------------------------------- Affiliation
 * Le rendu reste produit par syj-wc-woozone-affiliates-features : la
 * conformité Amazon y est (rel sponsored nofollow, tag forcé, prix masqué).
 * On ne réimplémente pas cette logique, on rhabille son markup à la charte
 * et on remplace le défilement horizontal par une grille de trois cartes.
 *
 * La feuille du plugin (assets/front.css) n'arrive JAMAIS sur le site : son
 * URL contient « woozone », et mhama_strip_commerce_style_tags() supprime par
 * sécurité toute feuille boutique hors shop. Ces règles sont donc autonomes,
 * elles ne présupposent aucun style de base.
 */

.mh-affil {
	margin-top: 40px;
	padding: 22px;
}

.mh-affil-head h2 {
	font-size: 24px;
	margin-top: 6px;
}

.mh-affil-head p {
	margin: 8px 0 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--mh-ink-2);
}

.mh-affil .syj-hama-carousel {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	background: none;
	border-radius: 0;
	color: inherit;
}

/* Le titre du bloc est porté par .mh-affil-head. */
.mh-affil .syj-hama-carousel__title {
	display: none;
}

.mh-affil .syj-hama-carousel__track {
	order: 1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	/* AdSense insère ses blocs auto entre les cartes : ils deviennent des
	 * éléments de grille. Ligne entière pour eux, remplissage « dense » pour
	 * que les trois cartes se regroupent quand même sur la première ligne. */
	grid-auto-flow: row dense;
	gap: 16px;
	margin-top: 18px;
	padding: 0;
	list-style: none;
	overflow: visible;
	scroll-snap-type: none;
}

.mh-affil .syj-hama-carousel__track > .google-auto-placed {
	grid-column: 1 / -1;
	min-width: 0;
}

.mh-affil .syj-hama-carousel__disclosure {
	order: 2;
	margin: 14px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--mh-muted);
}

.mh-affil .syj-hama-card {
	display: flex;
	flex-direction: column;
	flex: 0 1 auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 14px;
	background: var(--mh-surface);
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-r-sm);
	box-sizing: border-box;
	overflow: visible;
}

.mh-affil .syj-hama-card__media {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 4px;
	background: var(--mh-surface);
}

.mh-affil .syj-hama-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mh-affil .syj-hama-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	flex: 1 1 auto;
	padding: 10px 0 0;
}

.mh-affil .syj-hama-card__title {
	margin: 0;
	font-family: var(--mh-text);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--mh-ink);
}

.mh .mh-affil .syj-hama-card__title a {
	color: var(--mh-ink);
}

.mh .mh-affil .syj-hama-card__title a:hover,
.mh .mh-affil .syj-hama-card__title a:focus {
	color: var(--mh-link);
}

.mh-affil .syj-hama-card__price {
	font-size: 14px;
	color: var(--mh-muted);
}

.mh .mh-affil .syj-hama-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	min-height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--mh-r-sm);
	background: var(--mh-red);
	color: #FFFFFF;
	font-family: var(--mh-text);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.mh .mh-affil .syj-hama-card__cta:hover,
.mh .mh-affil .syj-hama-card__cta:focus {
	background: var(--mh-red-dark);
	color: #FFFFFF;
	text-decoration: none;
}

/* --------------------------------------------------------------- Maillage */

.mh-linked {
	margin-top: 44px;
}

.mh-linked-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
}

.mh-linked-card img,
.mh-linked-card .mh-linked-ph {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

.mh-linked-card .mh-linked-txt {
	padding: 12px 14px 15px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mh-linked-card h3 {
	font-size: 16px;
	line-height: 1.35;
}

.mh-linked-card a {
	color: var(--mh-ink);
}

.mh-linked-card a:hover {
	color: var(--mh-link);
}

.mh-collection-strip {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.mh-collection-strip a {
	display: block;
	color: var(--mh-ink);
}

.mh-collection-strip .mh-collection-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	margin-top: 8px;
}

/* ------------------------------------------------------------ Commentaires */

.mh-comments {
	margin-top: 44px;
}

.mh-comments .mh-card {
	padding: 20px;
}

/* --------------------------------------------------------------- Tablette */

@media (max-width: 1100px) {
	.mh-article-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 34px;
	}

	.mh-article-aside {
		max-width: none;
	}
}

/* --------------------------------------------------------------- Mobile */

@media (max-width: 767px) {
	.mh-single {
		padding: 18px 0 40px;
	}

	.mh-article-head h1 {
		font-size: 28px;
	}

	.mh-article-body {
		font-size: 16px;
		max-width: none;
	}

	.mh-article-body h2 {
		font-size: 22px;
		margin-top: 30px;
	}

	.mh-article-body h3 {
		font-size: 19px;
	}

	.mh-fiche,
	.mh-fiche--page {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		padding: 16px;
	}

	.mh-fiche-visual {
		max-width: 320px;
	}

	.mh-nomenclature {
		grid-template-columns: minmax(0, 1fr);
	}

	.mh-affil {
		padding: 16px;
	}

	/* Cartes horizontales : vignette 76px, titre et bouton à droite. */
	.mh-affil .syj-hama-carousel__track {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.mh-affil .syj-hama-card {
		flex-direction: row;
		align-items: center;
		gap: 12px;
	}

	.mh-affil .syj-hama-card__media {
		width: 76px;
		flex-shrink: 0;
	}

	.mh-affil .syj-hama-card__body {
		padding: 0;
		min-width: 0;
		gap: 8px;
	}

	.mh .mh-affil .syj-hama-card__cta {
		margin-top: 0;
		width: auto;
		align-self: flex-start;
		padding: 0 14px;
	}

	.mh-collection-strip {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------ Signature
 * Encart de fin d'article. La feuille d'archive d'auteur n'est pas chargée
 * ici : cette carte a son propre balisage, plus compact que le portrait.
 */

.mh-sign {
	margin-top: 44px;
}

.mh-sign-card {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	padding: 22px 24px;
}

.mh-sign-portrait {
	display: block;
	border-radius: var(--mh-r-sm);
	overflow: hidden;
	border: 1px solid var(--mh-line);
	background: var(--mh-peg);
}

.mh-sign-portrait img {
	display: block;
	width: 100%;
	height: auto;
}

.mh-sign-txt > .mh-eyebrow {
	display: block;
	margin-bottom: 6px;
}

.mh-sign-txt h2 {
	font-family: var(--mh-display);
	font-size: 22px;
	line-height: 1.15;
	margin: 0;
}

.mh .mh-sign-txt h2 a {
	color: var(--mh-ink);
	text-decoration: none;
}

.mh .mh-sign-txt h2 a:hover,
.mh .mh-sign-txt h2 a:focus {
	color: var(--mh-red);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mh-sign-bio {
	margin: 12px 0 0;
	color: var(--mh-ink-2);
}

.mh-sign-more {
	margin: 10px 0 0;
	font-weight: 600;
}

@media (max-width: 600px) {
	.mh-sign-card {
		grid-template-columns: 56px minmax(0, 1fr);
		gap: 14px;
		padding: 18px 18px;
	}

	.mh-sign-txt h2 {
		font-size: 20px;
	}
}
