/*
 * Thème LaboMarket 2.0 — éléments propres à LaboMarket.
 *
 * Les couleurs, polices, tailles et espacements sont dans theme.json :
 * réglables dans Apparence → Éditeur → Styles. Ce fichier ne fait que la mise en page
 * (en-tête, menu de gauche, cartes, fiche produit…) et réutilise ces réglages
 * (variables --wp--preset--…), donc un changement de couleur dans l'éditeur s'applique partout.
 *
 * Sommaire : 1. Bases · 2. En-tête · 3. Mise en page et menu de gauche · 4. Accueil
 * · 5. Cartes produit · 6. Familles et marques · 7. Styles de blocs · 8. Fiche produit
 * · 9. Pied de page · 10. Pages · 11. Téléphone et tablette
 */

/* ---------- 1. Bases ---------- */

:root {
	--lm-navy: var(--wp--preset--color--navy);
	--lm-navy-dark: var(--wp--preset--color--navy-dark);
	--lm-cyan: var(--wp--preset--color--cyan);
	--lm-ink: var(--wp--preset--color--ink);
	--lm-muted: var(--wp--preset--color--muted);
	--lm-line: var(--wp--preset--color--line);
	--lm-line-strong: var(--wp--preset--color--line-strong);
	--lm-surface: var(--wp--preset--color--surface);
	--lm-tint: var(--wp--preset--color--tint);
	--lm-graphite: var(--wp--preset--color--graphite);
	--lm-mono: var(--wp--preset--font-family--mono);
	--lm-side: var(--wp--custom--side-width, 268px);
	--lm-r-sm: var(--wp--custom--radius--small, 4px);
	--lm-r-md: var(--wp--custom--radius--medium, 6px);
	--lm-r-lg: var(--wp--custom--radius--large, 14px);
	--lm-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--lm-gutter: var(--wp--style--root--padding-left, clamp(16px, 3vw, 40px));
}

body {
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
}

html.lm-no-scroll {
	overflow: hidden;
}

.lm-mono {
	font-family: var(--lm-mono);
	letter-spacing: 0.02em;
}

.lm-count {
	font-family: var(--lm-mono);
	font-size: 13px;
	color: var(--lm-muted);
}

.lm-muted,
p.lm-muted {
	color: var(--lm-muted);
}

/* Pictos du thème : traits fins, couleur du texte */
.lm-icon,
.lm-catnav svg,
.lm-side-link svg,
.lm-pp svg,
.lm-drawer-toggle svg,
.lm-quote-btn svg {
	flex: none;
}

.lm-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--lm-navy);
}

.lm-icon svg {
	width: 100%;
	height: 100%;
}

.lm-icon--small {
	width: 24px;
	height: 24px;
}

.lm-icon--medium {
	width: 40px;
	height: 40px;
}

.lm-icon--large {
	width: 56px;
	height: 56px;
}

.lm-icon--round,
.lm-icon--square {
	padding: 9px;
	background: var(--lm-tint);
}

.lm-icon--round {
	border-radius: 50%;
}

.lm-icon--square {
	border-radius: var(--lm-r-md);
}

/* Focus clavier bien visible */
:where(a, button, input, summary):focus-visible {
	outline: 2px solid var(--lm-navy);
	outline-offset: 2px;
}

/* ---------- 2. En-tête ---------- */

/* En-tête collant : WordPress enveloppe l'en-tête dans un bloc <header class="wp-block-template-part">
   exactement aussi haut que lui ; c'est donc cette enveloppe qui doit rester collée en haut de l'écran
   (la règle sur .lm-header seul n'avait pas de place pour coller). */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 30;
}

/* Liens vers une section de la page (#acheter…) : la section s'arrête sous l'en-tête collant, pas derrière. */
html {
	scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px);
}

@media (max-width: 920px) {
	html {
		scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 140px);
	}
}

/* 2.0.17 : défilement doux vers les ancres (#devis, #deroulement…), demande de Fabien.
   Rien si le visiteur a demandé de limiter les animations dans son système. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

.lm-header {
	position: relative;
	z-index: 30;
	padding-top: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--lm-line);
	background: var(--wp--preset--color--white);
}

.lm-header__row {
	gap: clamp(12px, 2vw, 24px);
}

/* Logo et « .ch » : le « .ch » se pose sur le bas des lettres du logo */
.lm-brand {
	flex: none;
	align-items: baseline !important;
	gap: 2px;
	width: calc(var(--lm-side) - 16px);
}

.lm-logo {
	margin: 0;
}

.lm-logo img {
	display: block;
	width: auto !important;
	height: 26px;
}

.lm-tld {
	margin: 0;
	color: var(--lm-navy);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
}

/* Recherche (bloc Rechercher, limité aux appareils) */
.lm-search {
	flex: 1;
	max-width: 760px;
	margin: 0;
}

.lm-search .wp-block-search__inside-wrapper {
	position: relative;
	padding: 0;
	border: 0;
}

.lm-search .wp-block-search__inside-wrapper::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 14px;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	background: var(--lm-muted);
	-webkit-mask: url("../icons/loupe.svg") center / contain no-repeat;
	mask: url("../icons/loupe.svg") center / contain no-repeat;
	pointer-events: none;
}

.lm-search .wp-block-search__input {
	height: 44px;
	padding: 0 16px 0 44px;
	border: 1px solid var(--lm-line-strong);
	border-radius: var(--lm-r-md);
	background: var(--wp--preset--color--white);
	color: var(--lm-ink);
	font-size: 16px;
	transition: border-color 0.2s var(--lm-ease);
}

.lm-search .wp-block-search__input::placeholder {
	color: #6b7480;
}

.lm-search .wp-block-search__input:hover {
	border-color: #a9b2bd;
}

.lm-search .wp-block-search__input:focus {
	border-color: var(--lm-navy);
	outline: 2px solid var(--lm-navy);
	outline-offset: 1px;
}

/* Recherche instantanée : champ d'Advanced Woo Search mis à la place du bloc
   Rechercher quand l'extension est active (functions.php, section 10).
   Même aspect que le champ d'origine ; liste des résultats aux couleurs du site. */
.lm-search--aws .aws-container .aws-search-form {
	height: 44px;
	background: transparent;
}

.lm-search--aws .aws-container .aws-search-form .aws-wrapper {
	overflow: visible; /* garde le contour de focus entier */
}

.lm-search--aws .aws-container .aws-search-form .aws-wrapper::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 14px;
	z-index: 3; /* au-dessus du champ, que l'extension place au niveau 2 */
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	background: var(--lm-muted);
	-webkit-mask: url("../icons/loupe.svg") center / contain no-repeat;
	mask: url("../icons/loupe.svg") center / contain no-repeat;
	pointer-events: none;
}

.lm-search--aws .aws-container .aws-search-field {
	height: 44px;
	padding: 0 40px 0 44px;
	border: 1px solid var(--lm-line-strong);
	border-radius: var(--lm-r-md);
	background: var(--wp--preset--color--white);
	color: var(--lm-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 42px;
	transition: border-color 0.2s var(--lm-ease);
}

.lm-search--aws .aws-container .aws-search-field::placeholder {
	color: #6b7480;
}

.lm-search--aws .aws-container .aws-search-field:hover {
	border-color: #a9b2bd;
}

.lm-search--aws .aws-container .aws-search-field:focus {
	border-color: var(--lm-navy);
	outline: 2px solid var(--lm-navy);
	outline-offset: 1px;
}

/* Pas de bouton à côté du champ (Entrée lance la recherche), comme le bloc d'origine. */
.lm-search--aws .aws-container .aws-search-form .aws-form-btn {
	display: none;
}

.lm-search--aws .aws-container .aws-search-form .aws-search-clear {
	color: var(--lm-muted);
}

/* Liste des résultats (ajoutée par l'extension à la fin de la page) */
.aws-search-result {
	margin-top: 6px;
	overflow: hidden;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-md);
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--lift);
	font-family: var(--wp--preset--font-family--archivo);
}

.aws-search-result .aws_results .aws_result_item {
	border-bottom: 1px solid var(--lm-line);
}

.aws-search-result .aws_result_item.hovered,
.aws-search-result .aws_result_item:hover {
	background: var(--lm-surface);
}

.aws-search-result .aws_result_link {
	padding: 10px 12px;
}

.aws-search-result .aws_result_image img {
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-sm);
	background: var(--wp--preset--color--white);
}

.aws-search-result .aws_result_title {
	color: var(--lm-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.aws-search-result .aws_result_item:hover .aws_result_title {
	color: var(--lm-navy);
}

.aws-search-result .aws_result_sku {
	color: var(--lm-muted);
	font-family: var(--lm-mono);
	font-size: 12px;
	letter-spacing: 0.02em;
}

.aws-search-result .aws_result_price {
	color: var(--lm-navy);
	font-family: var(--lm-mono);
	font-size: 14px;
	font-weight: 600;
}

.aws-search-result .aws_result_excerpt {
	color: var(--lm-muted);
	font-size: 13px;
}

.aws-search-result .aws_search_more a,
.aws-search-result .aws_no_result {
	color: var(--lm-navy);
	font-size: 14px;
	font-weight: 600;
}

.lm-header__row > .lm-tools {
	gap: 6px;
	margin-left: auto !important; /* compte et panier calés à droite */
}

.lm-tools .wc-block-customer-account a,
.lm-tools .wc-block-mini-cart__button {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 6px;
	border-radius: var(--lm-r-md);
	color: var(--lm-ink);
}

.lm-tools .wc-block-customer-account a:hover,
.lm-tools .wc-block-mini-cart__button:hover {
	background: var(--lm-surface);
	text-decoration: none;
}

.lm-tools .wc-block-mini-cart__badge {
	background: var(--lm-navy);
	color: var(--wp--preset--color--white);
	font-family: var(--lm-mono);
}

/* Langues FR · DE (bloc « Langues », avec TranslatePress) */
.lm-lang {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	font-family: var(--lm-mono);
	font-size: 13px;
}

.lm-lang a {
	padding: 5px 7px;
	border-radius: var(--lm-r-sm);
	color: var(--lm-muted);
	letter-spacing: 0.04em;
	text-decoration: none;
}

.lm-lang a:hover {
	color: var(--lm-navy);
	text-decoration: none;
}

.lm-lang a[aria-current] {
	background: var(--lm-surface);
	color: var(--lm-ink);
	font-weight: 700;
}

/* Version « téléphone » : dans le menu de gauche, sous les liens */
.lm-lang--mobile {
	display: none;
	margin-top: 22px !important;
	padding: 0 8px;
}

/* Bouton du menu (téléphone et tablette seulement) */
.lm-drawer-toggle {
	display: none;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: var(--lm-r-md);
	background: none;
	color: var(--lm-ink);
	cursor: pointer;
}

.lm-drawer-toggle:hover {
	background: var(--lm-surface);
}

.lm-drawer-toggle svg {
	width: 24px;
	height: 24px;
}

/* ---------- 3. Mise en page (menu de gauche + contenu) ---------- */

.lm-layout,
.lm-front {
	box-sizing: border-box;
	max-width: calc(var(--wp--style--global--wide-size, 1320px) + 2 * var(--lm-gutter));
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--lm-gutter);
	padding-right: var(--lm-gutter);
}

.lm-front > .lm-hero {
	max-width: none;
}

.lm-layout {
	display: grid;
	grid-template-columns: var(--lm-side) minmax(0, 1fr);
	gap: clamp(24px, 3vw, 48px);
	align-items: stretch;
	margin-top: 0;
	padding-top: 28px;
	padding-bottom: 72px;
}

.lm-layout > * {
	margin: 0 !important;
}

.lm-layout__main {
	min-width: 0;
}

/* La colonne du menu prend toute la hauteur du contenu :
   le panneau du menu peut ainsi rester visible pendant le défilement. */
.lm-layout__side,
.lm-layout__side > .lm-side {
	height: 100%;
}

/* Le menu de gauche : panneau blanc à coins arrondis, qui suit le défilement */
.lm-side__inner {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px);
	max-height: calc(100vh - 120px - var(--wp-admin--admin-bar--height, 0px));
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--lm-line-strong) transparent;
	padding: 14px 12px 18px;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-lg);
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--soft);
}

.lm-side__inner > *,
.lm-side__group > * {
	margin-block: 0 !important;
}

.lm-drawer-toggle--close {
	margin-left: auto !important;
}

.lm-catnav__all {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
	padding: 8px 10px;
	border-radius: var(--lm-r-md);
	color: var(--lm-ink);
	font-weight: 650;
}

.lm-catnav__all:hover {
	background: var(--lm-surface);
	text-decoration: none;
}

.lm-catnav svg,
.lm-side-link svg {
	width: 20px;
	height: 20px;
	color: var(--lm-navy);
}

.lm-catnav__label,
.lm-side-link__label {
	flex: 1;
	line-height: 1.3;
}

.lm-tree,
.lm-tree__cats,
.lm-acc__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lm-tree {
	border-top: 1px solid var(--lm-line);
}

.lm-tree > li {
	border-bottom: 1px solid var(--lm-line);
}

.lm-tree > li:last-child {
	border-bottom: 0;
}

.lm-tree__fam,
.lm-acc__list a,
.lm-side-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	color: var(--lm-ink);
	font-size: 15px;
}

.lm-tree__fam:hover,
.lm-acc__list a:hover,
.lm-side-link:hover {
	background: var(--lm-surface);
	text-decoration: none;
}

.lm-tree li.is-open > .lm-tree__fam {
	font-weight: 650;
}

/* Famille ouverte : son picto passe en cyan */
.lm-tree li.is-open > .lm-tree__fam svg {
	color: var(--lm-cyan);
}

.lm-tree__cats {
	padding: 0 0 8px 38px;
}

.lm-tree__cats a {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 10px 4px 0;
	color: var(--lm-muted);
	font-size: 14.5px;
}

.lm-tree__cats a:hover {
	color: var(--lm-navy);
}

.lm-tree__cats a[aria-current] {
	color: var(--lm-ink);
	font-weight: 650;
}

/* « Marques » en accordéon (élément <details>, sans script) */
.lm-acc {
	margin-top: 22px;
}

.lm-acc > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border-top: 1px solid var(--lm-line);
	border-bottom: 1px solid var(--lm-line);
	color: var(--lm-ink);
	font-size: 15px;
	font-weight: 650;
	cursor: pointer;
	list-style: none;
}

.lm-acc > summary::-webkit-details-marker {
	display: none;
}

.lm-acc > summary:hover {
	background: var(--lm-surface);
}

.lm-acc > summary svg {
	width: 16px;
	height: 16px;
	color: var(--lm-muted);
	transition: transform 0.2s var(--lm-ease);
}

.lm-acc[open] > summary {
	border-bottom-color: transparent;
}

.lm-acc[open] > summary svg {
	transform: rotate(180deg);
}

.lm-acc[open] .lm-acc__list {
	border-bottom: 1px solid var(--lm-line);
}

.lm-acc__list li + li a {
	border-top: 1px solid var(--lm-line);
}

.lm-acc__list a {
	padding-left: 38px;
}

/* Groupes « Sélections » et « LaboMarket » */
.lm-side__group {
	margin-top: 22px !important;
}

.lm-side__title {
	margin: 0 0 6px !important;
	padding: 0 8px;
	color: var(--lm-muted);
	font-size: 13.5px;
	font-weight: 650;
	letter-spacing: 0.01em;
}

.lm-side-link {
	border-top: 1px solid var(--lm-line);
}

.lm-side-link__chev svg {
	width: 16px;
	height: 16px;
	color: var(--lm-line-strong);
	transform: rotate(-90deg);
	transition: color 0.2s var(--lm-ease), transform 0.2s var(--lm-ease);
}

.lm-side-link:hover .lm-side-link__chev svg {
	color: var(--lm-navy);
	transform: rotate(-90deg) translateY(2px);
}

/* ---------- 4. Accueil ---------- */

/* 2.0.14 : padding-top du hero retiré (demande de Fabien) */

.lm-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
}

.lm-hero__grid > *,
.lm-hero__text > * {
	margin-block: 0;
}

.lm-hero__text > * + * {
	margin-top: 20px !important;
}

.lm-hero__title {
	/* 2.0.14 : plus de largeur maximale (17ch retiré à la demande de Fabien) : le titre occupe toute sa colonne */
	font-size: var(--wp--preset--font-size--huge);
	line-height: 1.06;
	letter-spacing: -0.02em;
}

.lm-hero__title + * {
	margin-top: 20px !important;
}

.lm-hero__lede {
	max-width: 46ch;
	color: #3f4a57;
	font-size: clamp(17px, 1.3vw, 19px);
}

.lm-hero .wp-block-buttons {
	margin-top: 30px !important;
	gap: 12px;
}

.lm-hero .wp-block-button__link {
	padding: 15px 22px;
	font-size: 16.5px;
}

/* Photo du hero (2.0.12) : photo de l'atelier à coins arrondis, remplaçable dans l'éditeur */
.lm-hero__img {
	margin: 0;
}

.lm-hero__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	box-shadow: 0 24px 60px rgba(16, 24, 40, 0.1);
}

/* Photo dans l'objectif d'un microscope : champ rond, réticule gradué, bague graduée
   (bloc « Objectif » toujours disponible dans l'éditeur, plus utilisé par le hero depuis 2.0.12) */
.lm-scope {
	position: relative;
	justify-self: center;
	width: min(100%, 480px);
	aspect-ratio: 1;
	padding: 14px;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	box-shadow: 0 0 0 1px var(--lm-line), 0 24px 60px rgba(16, 24, 40, 0.1);
}

.lm-scope::before {
	content: "";
	position: absolute;
	inset: -16px;
	border-radius: 50%;
	background: repeating-conic-gradient(var(--lm-line-strong) 0deg 0.5deg, transparent 0.5deg 6deg);
	-webkit-mask: radial-gradient(circle, transparent calc(50% - 8px), #000 calc(50% - 7px));
	mask: radial-gradient(circle, transparent calc(50% - 8px), #000 calc(50% - 7px));
	opacity: 0.8;
}

.lm-scope__lens {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(0, 51, 102, 0.12);
}

.lm-scope__lens img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 42% 50%;
	/* --lm-x / --lm-y : déplacement suivant la souris (assets/js/labomarket.js) */
	translate: var(--lm-x, 0px) var(--lm-y, 0px);
	scale: 1.15;
}

.lm-scope__lens::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: inset 0 0 40px 10px rgba(0, 31, 61, 0.18);
}

.lm-scope__reticle {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: var(--lm-navy);
	stroke-width: 0.9;
	opacity: 0.55;
	transition: opacity 0.4s var(--lm-ease);
}

/* Survol : le réticule se précise, la bague tourne avec la souris */
.lm-scope.is-active .lm-scope__reticle {
	opacity: 0.8;
}

.lm-scope__ring {
	transform-origin: 200px 200px;
	rotate: var(--lm-r, 0deg);
}

.lm-scope__ring {
	stroke: var(--lm-cyan);
	stroke-dasharray: 2 4;
}

/* Mise au point à l'arrivée (rien si l'utilisateur limite les animations) */
@media (prefers-reduced-motion: no-preference) {
	.lm-scope__lens img {
		animation: lm-focus 1.6s var(--lm-ease) both;
	}
}

@keyframes lm-focus {
	from { filter: blur(6px); scale: 1.3; }
	to { filter: none; scale: 1.15; }
}

/* Les 4 engagements */
.lm-facts {
	gap: 0 !important;
	/* 2.0.14 : margin-top retiré (demande de Fabien) */
	border-top: 1px solid var(--lm-line);
	border-bottom: 1px solid var(--lm-line);
}

.lm-fact {
	gap: 12px !important;
	padding: 18px clamp(14px, 2vw, 28px);
}

.lm-facts > .lm-fact:first-child {
	padding-left: 0;
}

.lm-facts > .lm-fact + .lm-fact {
	border-left: 1px solid var(--lm-line);
}

.lm-fact .lm-icon {
	color: var(--lm-cyan);
}

.lm-fact__text {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: var(--lm-muted);
	font-size: 14.5px;
	line-height: 1.4;
}

.lm-fact__text strong {
	color: var(--lm-ink);
	font-size: 15.5px;
	font-weight: 650;
}

/* Sections et en-têtes de section */
.lm-section {
	margin-top: var(--wp--preset--spacing--70) !important;
}

.lm-layout__main > .lm-section:first-child,
.lm-layout__main > .wp-block-post-content > .lm-section:first-child {
	margin-top: 12px !important;
}

.lm-section-head {
	gap: 16px;
	margin-bottom: 16px !important;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--lm-line);
}

.lm-section-head > * {
	margin: 0 !important;
}

.lm-section-head h2 {
	font-size: var(--wp--preset--font-size--x-large);
}

.lm-more {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

/* Bandeau « Réparations sur devis » */
.lm-repair {
	display: grid !important;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	align-items: center;
	gap: clamp(20px, 3vw, 40px) !important;
	margin-top: var(--wp--preset--spacing--70) !important;
}

.lm-repair > * {
	margin: 0 !important;
}

.lm-repair__img img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.lm-repair__text {
	padding: clamp(4px, 1vw, 12px) clamp(4px, 1.6vw, 24px) clamp(4px, 1vw, 12px) 0;
}

.lm-repair__text > * {
	margin-block: 0;
}

.lm-repair__text h2 {
	max-width: 24ch;
	margin-top: 10px;
	font-size: clamp(22px, 1.9vw, 27px);
	line-height: 1.2;
}

.lm-repair__text p:not(.is-style-lm-kicker) {
	max-width: 52ch;
	margin-top: 10px;
}

.lm-repair .wp-block-buttons {
	margin-top: 20px;
	gap: 12px 22px;
	align-items: center;
}

/* Deux façons d'acheter */
.lm-ways {
	gap: 0 !important;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-md);
}

.lm-way {
	padding: 22px 24px 24px;
}

.lm-way > * {
	margin-block: 0;
}

.lm-way > * + * {
	margin-top: 8px;
}

.lm-way h3 {
	margin-top: 10px;
	font-size: 18px;
}

.lm-ways > .lm-way + .lm-way {
	border-left: 1px solid var(--lm-line);
}

/* L'atelier de réparation */
.lm-workshop {
	gap: clamp(24px, 3vw, 40px) !important;
	align-items: start;
}

.lm-workshop__img img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.lm-workshop__text > * {
	margin-block: 0;
}

.lm-workshop__text > * + * {
	margin-top: 18px;
}

/* ---------- 5. Cartes produit (Collection de produits) ---------- */

.lm-cards .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px !important;
	margin: 0;
	padding: 0;
}

.lm-cards .wc-block-product {
	position: relative;
	display: flex;
	flex-direction: column;
	width: auto !important;
	margin: 0 !important;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-md);
	background: var(--wp--preset--color--white);
	transition: border-color 0.2s var(--lm-ease);
}

.lm-cards .wc-block-product:hover {
	border-color: #9aa5b1;
}

.lm-cards .wc-block-components-product-image {
	margin: 6px 6px 0 !important;
	border-radius: var(--lm-r-sm);
	background: var(--lm-surface);
	overflow: hidden;
}

.lm-cards .wc-block-components-product-image img {
	transition: transform 0.5s var(--lm-ease);
}

.lm-cards .wc-block-product:hover .wc-block-components-product-image img {
	transform: scale(1.03);
}

.lm-card__body {
	display: flex !important;
	flex-direction: column;
	flex: 1;
	gap: 3px;
	margin: 0 !important;
	padding: 12px 14px 14px;
}

.lm-card__body > * {
	min-width: 0;
	margin: 0 !important;
	overflow-wrap: anywhere;
}

/* Ordre des cartes depuis 2.0.13 : catégorie, nom, prix (en bas de la carte) */
.lm-card__body .wc-block-components-product-price {
	margin-top: auto !important;
	padding-top: 10px;
	font-family: var(--lm-mono);
	font-size: 18px !important;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-align: left !important;
	color: var(--lm-ink);
}

.lm-card__body .wp-block-post-title {
	font-size: 16px !important;
	font-weight: 650;
	line-height: 1.35;
}

/* Toute la carte est cliquable (le lien du titre la recouvre) */
.lm-card__body .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--lm-r-md);
}

.lm-card__body .wp-block-post-title a:hover {
	color: var(--lm-navy);
	text-decoration: none;
}

.lm-card__cats {
	margin-bottom: 4px !important;
	color: var(--lm-muted);
	font-family: var(--lm-mono);
	font-size: 13px;
	letter-spacing: 0.01em;
	line-height: 1.4;
	overflow-wrap: break-word !important; /* coupe seulement si un mot ne tient vraiment pas */
}

.lm-card__cats a {
	position: relative;
	z-index: 1;
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	white-space: normal; /* WordPress l'empêche de passer à la ligne : on l'autorise */
}

.lm-card__cats a:hover {
	color: var(--lm-navy);
}

.lm-card__inv {
	margin-top: auto !important;
	padding-top: 8px;
	font-family: var(--lm-mono);
	font-size: 12.5px !important;
	letter-spacing: 0.02em;
	color: var(--lm-muted);
}

/* Badge « Sur offre » sur la photo */
.lm-img-wrap {
	position: relative;
}

.lm-quote-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 1;
}

.lm-quote-badge,
.lm-badge,
p.is-style-lm-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 22px;
	padding: 0 7px;
	border: 1px solid var(--lm-line-strong);
	border-radius: 3px;
	background: var(--wp--preset--color--white);
	color: var(--lm-ink);
	font-family: var(--lm-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.lm-quote-badge,
.lm-badge--offer,
p.is-style-lm-badge.lm-badge--offer {
	border-color: var(--lm-navy);
	color: var(--lm-navy);
}

.lm-badge--solid,
p.is-style-lm-badge.lm-badge--solid {
	border-color: var(--lm-ink);
	background: var(--lm-ink);
	color: var(--wp--preset--color--white);
}

.lm-badge svg {
	width: 14px;
	height: 14px;
	stroke-width: 2;
	color: var(--lm-cyan);
}

.lm-toolbar {
	margin: 8px 0 20px !important;
	color: var(--lm-muted);
	font-size: 15px;
}

.wp-block-query-pagination {
	margin-top: 32px !important;
}

/* ---------- 6. Familles et marques ---------- */

.lm-fams {
	display: grid;
	grid-template-columns: repeat(var(--lm-cols, 3), minmax(0, 1fr));
	gap: 16px;
}

.lm-fam {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	align-content: start;
	column-gap: 14px;
	padding: 18px;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-md);
	background: var(--wp--preset--color--white);
}

.lm-fam__ico {
	grid-row: span 2;
	padding-top: 1px;
	color: var(--lm-navy);
}

.lm-fam__ico svg {
	width: 30px;
	height: 30px;
	stroke-width: 1.35;
}

.lm-fam__name {
	margin: 0;
	font-size: 18px;
}

.lm-fam__name a {
	color: var(--lm-ink);
}

.lm-fam__name a:hover {
	color: var(--lm-navy);
}

.lm-fam__meta {
	margin: 2px 0 0;
	color: var(--lm-muted);
	font-size: 14px;
}

.lm-fam__cats {
	grid-column: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.lm-fam__cats a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	min-height: 28px;
	padding: 0 10px;
	border: 1px solid var(--lm-line);
	border-radius: 14px;
	color: var(--lm-ink);
	font-size: 14px;
	white-space: nowrap;
}

.lm-fam__cats a:hover {
	border-color: var(--lm-navy);
	color: var(--lm-navy);
	text-decoration: none;
}

.lm-fam__cats .lm-count {
	font-size: 12.5px;
}

.lm-brands {
	/* Nombre de colonnes calculé par le bloc selon le nombre de marques (blocks/brand-list/render.php). */
	display: grid;
	grid-template-columns: repeat(var(--lm-bc-d, 6), minmax(0, 1fr));
	margin: 0;
	padding: 0;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-md);
	list-style: none;
	overflow: hidden;
	background: var(--wp--preset--color--white);
}

.lm-brands li {
	margin: 0 -1px -1px 0;
	border-right: 1px solid var(--lm-line);
	border-bottom: 1px solid var(--lm-line);
}

.lm-brands a {
	display: grid;
	place-items: center;
	height: 64px;
	padding: 0 8px;
	color: var(--lm-ink);
	font-size: 17px;
	font-weight: 750;
	font-stretch: 112%;
	letter-spacing: -0.01em;
	text-align: center;
}

.lm-brands a:hover {
	background: var(--lm-surface);
	color: var(--lm-navy);
	text-decoration: none;
}

@media (max-width: 920px) {
	.lm-brands {
		grid-template-columns: repeat(var(--lm-bc-t, 4), minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.lm-brands {
		grid-template-columns: repeat(var(--lm-bc-m, 3), minmax(0, 1fr));
	}

	.lm-brands a {
		font-size: 15px;
	}
}

/* ---------- 7. Styles de blocs (panneau « Styles » de l'éditeur) ---------- */

/* Groupe : panneau blanc à coins arrondis */
.wp-block-group.is-style-lm-panel {
	padding: clamp(16px, 2.4vw, 32px);
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-lg);
	background: var(--wp--preset--color--white);
}

/* Groupe : bandeau gris clair */
.wp-block-group.is-style-lm-band {
	padding: clamp(14px, 1.6vw, 20px);
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-lg);
	background: var(--lm-surface);
}

/* Groupe : encadré avec ombre (encadré d'achat) */
.wp-block-group.is-style-lm-box {
	padding: 22px;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-lg);
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--lift);
}

/* Bouton : contour */
.wp-block-button.is-style-lm-outline .wp-block-button__link,
.lm-btn-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid var(--lm-line-strong);
	background: var(--wp--preset--color--white);
	color: var(--lm-ink);
}

.wp-block-button.is-style-lm-outline .wp-block-button__link:hover,
.lm-btn-outline:hover {
	border-color: var(--lm-ink);
	background: var(--wp--preset--color--white);
	color: var(--lm-ink);
}

/* Bouton : lien souligné */
.wp-block-button.is-style-lm-link .wp-block-button__link {
	padding: 0;
	background: none;
	color: var(--lm-navy);
	font-size: 15.5px;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wp-block-button.is-style-lm-link .wp-block-button__link:hover {
	background: none;
	color: var(--lm-navy-dark);
}

/* Paragraphe : sur-titre technique */
p.is-style-lm-kicker {
	margin: 0;
	color: var(--lm-muted);
	font-family: var(--lm-mono);
	font-size: 14px;
	letter-spacing: 0.02em;
}

/* Liste : coches cyan */
ul.is-style-lm-checks {
	display: grid;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

ul.is-style-lm-checks li {
	position: relative;
	padding-left: 28px;
}

ul.is-style-lm-checks li::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 0;
	width: 18px;
	height: 18px;
	background: var(--lm-cyan);
	-webkit-mask: url("../icons/coche.svg") center / contain no-repeat;
	mask: url("../icons/coche.svg") center / contain no-repeat;
}

/* Liste : étapes numérotées (01, 02…) */
ol.is-style-lm-steps {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--lm-line);
	list-style: none;
	counter-reset: lm-step;
}

ol.is-style-lm-steps li {
	position: relative;
	padding: 14px 0 14px 44px;
	border-bottom: 1px solid var(--lm-line);
	color: var(--lm-muted);
	font-size: 15px;
	line-height: 1.45;
	counter-increment: lm-step;
}

ol.is-style-lm-steps li::before {
	content: counter(lm-step, decimal-leading-zero);
	position: absolute;
	top: 14px;
	left: 0;
	color: var(--lm-navy);
	font-family: var(--lm-mono);
	font-size: 15px;
	font-weight: 700;
}

ol.is-style-lm-steps strong {
	color: var(--lm-ink);
	font-size: 16px;
	font-weight: 650;
}

/* Liste : filets */
ul.is-style-lm-lines {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--lm-line);
	list-style: none;
}

ul.is-style-lm-lines li {
	padding: 9px 0;
	border-bottom: 1px solid var(--lm-line);
}

/* Image : coins arrondis */
.wp-block-image.is-style-lm-rounded img {
	border-radius: 10px;
}

/* ---------- 8. Fiche produit ---------- */

.wp-block-woocommerce-breadcrumbs {
	margin: 0 0 18px !important;
	color: var(--lm-muted);
}

.lm-product {
	margin-top: 0 !important;
}

/* Mosaïque de photos */
.lm-mosaic {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: repeat(2, clamp(150px, 15vw, 230px));
	gap: 8px;
}

.lm-mosaic--1 {
	grid-template-columns: 1fr;
	grid-template-rows: clamp(260px, 32vw, 468px);
}

.lm-mosaic--2 {
	grid-template-columns: 2fr 1fr;
}

.lm-mosaic--3 {
	grid-template-columns: 2fr 1fr;
}

.lm-mosaic__item {
	position: relative;
	display: block;
	border-radius: 10px;
	background: var(--lm-surface);
	overflow: hidden;
}

.lm-mosaic__item[hidden] {
	display: none;
}

.lm-mosaic__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--lm-ease);
}

.lm-mosaic__item:hover img {
	transform: scale(1.03);
}

.lm-mosaic__main {
	grid-row: span 2;
}

.lm-mosaic--4 .lm-mosaic__item:nth-child(4) {
	grid-column: span 2;
}

/* Une seule photo : une seule rangée, photo entière (sans recadrage) */
.lm-mosaic--1 .lm-mosaic__main {
	grid-row: auto;
}

.lm-mosaic--1 .lm-mosaic__item img {
	object-fit: contain;
}

/* Deux photos : la seconde occupe toute la hauteur */
.lm-mosaic--2 .lm-mosaic__item:nth-child(2) {
	grid-row: span 2;
}

.lm-mosaic__more {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-md);
	background: var(--wp--preset--color--white);
	color: var(--lm-ink);
	font-size: 14.5px;
	font-weight: 650;
}

.lm-mosaic__more svg {
	width: 17px;
	height: 17px;
}

/* Corps : infos à gauche, encadré d'achat à droite */
.lm-product__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
	gap: clamp(24px, 3.4vw, 48px);
	align-items: start;
	margin-top: clamp(20px, 2.4vw, 32px) !important;
}

.lm-product__body > *,
.lm-product__info > *,
.lm-buybox > * {
	margin-block: 0 !important;
}

.lm-product__info {
	display: grid;
	gap: 18px;
}

.lm-pp--badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lm-pp__title {
	margin: 0;
	font-size: clamp(26px, 2.2vw, 32px);
	font-weight: 400;
	letter-spacing: -0.01em;
}

.lm-pp__title b {
	font-weight: 750;
	font-stretch: 106%;
}

.lm-pp__sub {
	margin: 4px 0 0;
	color: var(--lm-muted);
	font-size: 15px;
}

.lm-pp--chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lm-pp--chips li {
	padding: 8px 14px 9px;
	border: 1px solid var(--lm-line);
	border-radius: 8px;
	line-height: 1.3;
}

.lm-pp--chips span {
	display: block;
	color: var(--lm-muted);
	font-size: 12.5px;
}

.lm-pp--chips b {
	font-size: 14.5px;
	font-weight: 650;
}

.lm-product__lede {
	color: #3f4a57;
	font-size: 16.5px;
}

.lm-product__lede p {
	margin: 0;
}

.lm-seller {
	gap: 12px !important;
	padding: 12px 0;
	border-top: 1px solid var(--lm-line);
	border-bottom: 1px solid var(--lm-line);
}

.lm-seller .lm-icon {
	width: 40px;
	height: 40px;
}

.lm-seller__text {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 14.5px;
	line-height: 1.4;
	color: var(--lm-muted);
}

.lm-seller__text strong {
	color: var(--lm-ink);
}

/* Encadré d'achat */
.lm-buybox {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px);
	display: grid;
	gap: 16px;
}

.lm-buybox__price,
.lm-buybox .wc-block-components-product-price {
	font-family: var(--lm-mono);
	font-size: 34px !important;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--lm-ink);
}

.lm-pp--availability {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.lm-pp--availability li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	line-height: 1.4;
}

.lm-pp--availability svg {
	width: 19px;
	height: 19px;
	color: var(--lm-navy);
}

.lm-dot {
	flex: none;
	width: 9px;
	height: 9px;
	margin: 5px 5px 0;
	border-radius: 50%;
	background: var(--lm-navy);
}

.lm-dot--out {
	background: var(--lm-muted);
}

/* Bouton d'achat WooCommerce : pleine largeur, bleu marine */
.lm-buybox .wc-block-add-to-cart-form form.cart,
.lm-buybox form.cart {
	display: block;
	margin: 0 !important;
	padding: 0 !important;
}

.lm-buybox .quantity,
.lm-buybox .stock {
	display: none; /* quantité (pièce unique) et stock déjà affichés par « Disponibilité » */
}

.lm-buybox .single_add_to_cart_button,
.lm-buybox .lm-quote-btn {
	box-sizing: border-box; /* la largeur 100 % inclut les marges intérieures : le bouton ne déborde plus */
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 50px;
	margin: 0 !important;
	font-size: 17px !important;
}

.lm-quote-btn svg {
	width: 19px;
	height: 19px;
}

.lm-quote-note {
	margin: 10px 0 0;
	color: var(--lm-muted);
	font-size: 14px;
}

.lm-pp--ask .lm-btn-outline {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 0 12px;
	font-size: 15px;
	font-weight: 600;
}

.lm-pp--ask svg {
	width: 19px;
	height: 19px;
}

.lm-buybox__pay {
	color: var(--lm-muted);
	font-size: 14px;
}

/* Sur offre : pas de « Paiement par virement » sous le bouton d'offre */
.lm-single-on-quote .lm-buybox__pay {
	display: none;
}

/* Sections sous la fiche : description, fiche technique, conditions */
.lm-product-section {
	margin-top: 24px !important;
}

.lm-product-section > h2 {
	margin: 0 0 12px;
	font-size: var(--wp--preset--font-size--x-large);
}

.lm-desc > * + * {
	margin-top: 12px;
}

.lm-desc ul {
	padding-left: 18px;
}

.lm-desc li::marker {
	color: var(--lm-navy);
}

.lm-pp--specs {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.lm-pp--specs th,
.lm-pp--specs td {
	padding: 10px 0;
	border-bottom: 1px solid var(--lm-line);
	text-align: left;
	vertical-align: top;
}

.lm-pp--specs tr:first-child th,
.lm-pp--specs tr:first-child td {
	border-top: 1px solid var(--lm-line);
}

.lm-pp--specs th {
	width: 38%;
	padding-right: 16px;
	color: var(--lm-muted);
	font-weight: 400;
}

.lm-pp--specs td {
	font-family: var(--lm-mono);
	font-size: 14.5px;
	line-height: 1.5;
}

.lm-terms {
	gap: 0 !important;
	border: 1px solid var(--lm-line);
	border-radius: var(--lm-r-md);
}

.lm-terms > .lm-fact {
	padding: 16px;
}

.lm-terms > .lm-fact + .lm-fact {
	border-left: 1px solid var(--lm-line);
}

.lm-terms .lm-icon {
	color: var(--lm-navy);
}

/* Repère dans l'éditeur de modèles (sans appareil) */
.lm-pp-placeholder {
	padding: 12px 14px;
	border: 1px dashed var(--lm-line-strong);
	border-radius: var(--lm-r-md);
	color: var(--lm-muted);
	font-size: 14px;
}

/* Visionneuse de photos */
.lm-viewer {
	width: min(1100px, 94vw);
	max-height: 92vh;
	padding: 0;
	border: 0;
	border-radius: var(--lm-r-lg);
	background: #0f1216;
	color: var(--wp--preset--color--white);
}

.lm-viewer::backdrop {
	background: rgba(10, 12, 16, 0.75);
}

.lm-viewer__fig {
	margin: 0;
}

.lm-viewer__fig img {
	display: block;
	width: 100%;
	max-height: 84vh;
	object-fit: contain;
}

.lm-viewer__count {
	padding: 10px 16px 14px;
	color: #c9cfd6;
	font-family: var(--lm-mono);
	font-size: 13px;
	text-align: center;
}

.lm-viewer__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--lm-ink);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.lm-viewer__prev,
.lm-viewer__next {
	top: 50%;
	transform: translateY(-50%);
}

.lm-viewer__prev {
	left: 12px;
}

.lm-viewer__next {
	right: 12px;
}

.lm-viewer__close {
	top: 12px;
	right: 12px;
}

/* ---------- 9. Pied de page ---------- */

.lm-footer {
	margin-top: 0;
	padding-top: 0;
	padding-bottom: 0;
	background: var(--lm-graphite);
	color: #c9cfd6;
	font-size: 15px;
}

.lm-footer a {
	color: #dfe5eb;
}

.lm-footer a:hover {
	color: #ffffff;
}

.lm-trust {
	gap: 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lm-trust > .lm-fact {
	padding: 22px 16px 22px 0;
}

.lm-trust .lm-icon {
	color: var(--lm-cyan);
}

.lm-trust .lm-fact__text {
	color: #a9b1ba;
	font-size: 14px;
}

.lm-trust .lm-fact__text strong {
	color: #ffffff;
	font-size: 15px;
}

.lm-footer__cols {
	gap: 32px !important;
	margin-top: 0 !important;
	padding: 36px 0 32px;
}

.lm-footer__logo img {
	width: auto !important;
	height: 24px;
}

.lm-footer__about {
	max-width: 36ch;
	color: #a9b1ba;
}

.lm-footer__title {
	margin-bottom: 10px;
	color: #ffffff;
	font-size: 15px;
	font-weight: 650;
}

.lm-footer__list {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lm-footer__base {
	margin-top: 0 !important;
	padding: 16px 0 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #8f98a3;
	font-size: 13.5px;
}

.lm-footer__base p {
	margin: 0;
}

/* ---------- 10. Pages (Contact…) ---------- */

.lm-page {
	padding-bottom: var(--wp--preset--spacing--70);
}

/* Formulaire Contact Form 7 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
	/* 2.0.17 : border-box, sinon les champs dépassent du panneau sur téléphone (largeur 100 % + marges intérieures) */
	box-sizing: border-box;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--lm-line-strong);
	border-radius: var(--lm-r-md);
	background: var(--wp--preset--color--white);
	color: var(--lm-ink);
	font: inherit;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
	border-color: var(--lm-navy);
	outline: 2px solid var(--lm-navy);
	outline-offset: 1px;
}

.wpcf7 input[type="submit"] {
	padding: 13px 22px;
	border: 0;
	border-radius: var(--lm-r-md);
	background: var(--lm-navy);
	color: var(--wp--preset--color--white);
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--lm-navy-dark);
}

/* ---------- 11. Téléphone et tablette ---------- */

@media (max-width: 1240px) {
	.lm-fams {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 1100px) {
	.lm-cards .wc-block-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.lm-fams {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lm-facts.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lm-facts > .lm-fact:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}

	.lm-facts > .lm-fact:nth-child(n + 3) {
		border-top: 1px solid var(--lm-line);
	}

	.lm-trust.is-layout-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.lm-hero__grid,
	.lm-repair,
	.lm-product__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.lm-scope {
		order: -1;
		width: min(78%, 360px);
		margin: 16px 0 8px;
	}

	.lm-hero__img {
		order: -1;
	}

	.lm-hero__img img {
		aspect-ratio: 16 / 8;
	}

	/*
	 * 2.0.15 : photo posée en « image de fond » du groupe du hero (réglage de l'éditeur).
	 * Sur tablette et téléphone, le fond est caché et la même photo s'affiche en bandeau
	 * arrondi au-dessus du titre (::before reprend l'image du groupe avec « inherit »),
	 * cadrée sur la droite de la photo. Rien ne change sur ordinateur.
	 * Pour changer le cadrage : modifier background-position ci-dessous (0% = gauche, 100% = droite).
	 */
	.lm-hero__grid[style*="background-image"] {
		row-gap: 24px;
		padding-top: 0 !important;
		padding-bottom: 8px !important;
		background-size: 0 0 !important;
		background-repeat: no-repeat !important;
	}

	.lm-hero__grid[style*="background-image"]::before {
		content: "";
		display: block;
		aspect-ratio: 2 / 1;
		border-radius: var(--lm-r-lg, 14px);
		background-image: inherit;
		background-repeat: no-repeat;
		background-size: cover;
		background-position: 82% center;
	}

	.lm-repair__img img {
		aspect-ratio: 16 / 8;
	}

	.lm-repair__text {
		padding: 0 4px 6px;
	}

	.lm-workshop.is-layout-grid,
	.lm-ways.is-layout-grid,
	.lm-terms.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.lm-ways > .lm-way + .lm-way,
	.lm-terms > .lm-fact + .lm-fact {
		border-left: 0;
		border-top: 1px solid var(--lm-line);
	}

	/* Sur tablette et mobile, l'encadré d'achat remonte juste après le titre */
	.lm-product__info {
		display: contents;
	}

	.lm-product__body {
		gap: 18px;
	}

	.lm-product__info > .lm-pp--badges { order: 1; }
	.lm-product__info > .lm-pp--heading { order: 2; }
	.lm-buybox { order: 3; position: static; }
	.lm-product__info > .lm-pp--chips { order: 4; }
	.lm-product__info > .lm-product__lede { order: 5; }
	.lm-product__info > .lm-seller { order: 6; }
}

@media (max-width: 920px) {
	.lm-layout {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 18px;
	}

	.lm-brand {
		width: auto;
	}

	.lm-logo img {
		height: 21px;
	}

	.lm-tld {
		font-size: 13px;
	}

	.lm-header__row {
		flex-wrap: wrap !important;
	}

	.lm-search {
		order: 3;
		flex-basis: 100%;
		max-width: none;
	}

	/* Langues : dans le menu de gauche plutôt que dans l'en-tête */
	.lm-header .lm-lang {
		display: none;
	}

	.lm-lang--mobile {
		display: flex;
	}

	.lm-drawer-toggle {
		display: grid;
	}

	/* Menu de gauche en tiroir */
	.lm-side {
		position: fixed;
		inset: 0;
		z-index: 100;
		display: none;
		background: rgba(18, 23, 31, 0.4);
	}

	.lm-side.is-open {
		display: block;
	}

	.lm-side__inner {
		position: static;
		width: min(340px, 88vw);
		height: 100%;
		max-height: none;
		padding: 16px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}
}

@media (min-width: 921px) {
	.lm-drawer-toggle--close {
		display: none !important;
	}
}

@media (max-width: 720px) {
	.lm-hero__title {
		font-size: clamp(30px, 8.4vw, 38px);
	}

	.lm-hero .wp-block-buttons,
	.lm-hero .wp-block-button {
		width: 100%;
	}

	.lm-hero .wp-block-button__link {
		width: 100%;
	}

	.lm-hero__grid[style*="background-image"]::before {
		aspect-ratio: 16 / 10;
	}

	.lm-scope {
		width: min(62%, 240px);
		padding: 10px;
		margin: 14px 0 4px;
	}

	.lm-scope::before {
		inset: -12px;
	}

	.lm-fact {
		gap: 8px !important;
		padding: 14px 10px;
	}

	.lm-fact__text {
		font-size: 13.5px;
	}

	.lm-fact__text strong {
		font-size: 14.5px;
	}

	.lm-cards .wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px !important;
	}

	.lm-card__body {
		padding: 10px 10px 12px;
	}

	/* Catégorie plus petite pour que les noms longs (Microcentrifugeuses) tiennent sur une ligne */
	.lm-card__cats {
		font-size: 11.5px;
		letter-spacing: 0;
	}

	.lm-card__body .wc-block-components-product-price {
		font-size: 16.5px !important;
	}

	.lm-card__body .wp-block-post-title {
		font-size: 15px !important;
	}

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

	.lm-section-head {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 6px;
	}

	.lm-repair .wp-block-buttons,
	.lm-repair .wp-block-button,
	.lm-repair .wp-block-button:not(.is-style-lm-link) .wp-block-button__link,
	.lm-workshop .wp-block-button,
	.lm-workshop .wp-block-button__link {
		width: 100%;
	}

	/* La mosaïque devient une bande de photos qu'on fait glisser */
	.lm-mosaic {
		grid-template-columns: none !important;
		grid-template-rows: none !important;
		grid-auto-flow: column;
		grid-auto-columns: 86%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.lm-mosaic__item {
		grid-row: auto !important;
		grid-column: auto !important;
		aspect-ratio: 4 / 3;
		scroll-snap-align: start;
	}

	.lm-mosaic__item[hidden] {
		display: none;
	}

	.wp-block-group.is-style-lm-box {
		padding: 16px;
	}

	.lm-pp--specs th,
	.lm-pp--specs td {
		display: block;
		width: auto;
		padding: 0;
		border: 0;
	}

	.lm-pp--specs tr {
		display: block;
		padding: 10px 0;
		border-bottom: 1px solid var(--lm-line);
	}

	.lm-pp--specs tr:first-child {
		border-top: 1px solid var(--lm-line);
	}

	.lm-pp--specs tr:first-child th,
	.lm-pp--specs tr:first-child td {
		border: 0;
	}

	.lm-trust.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lm-footer__cols {
		flex-wrap: wrap !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}
