/*
Theme Name: BrickMafia
Description: Thème enfant de Storefront pour brickmafia.com. Boutique LEGO et compatibles LEGO par thèmes, blog MOC et customs. Allure de l'ancien thème Nexus (bandeau orange, logo BD).
Template: storefront
Version: 1.0.0
Requires PHP: 7.4
Text Domain: brickmafia
*/

:root {
	--bm-orange: #fc8d00;
	--bm-orange-dark: #d97600;
	--bm-ink: #030303;
	--bm-text: #333;
	--bm-muted: #6b6b6b;
	--bm-paper: #f7f7f7;
	--bm-card: #fff;
	--bm-line: #e0e0e0;
	--bm-link: #a85a00; /* orange assombri : contraste suffisant sur blanc (l'orange du bandeau ne l'est pas) */
	--bm-link-hover: #7a4100;
	--bm-footer: #333;
	--bm-radius: 4px;
	--bm-wrap: 1240px;
	--bm-gutter: clamp(16px, 3vw, 32px);
	--bm-sans: Arimo, "Helvetica Neue", Helvetica, Arial, sans-serif;
	--bm-nav: "Open Sans", "Segoe UI", Roboto, Arial, sans-serif;
}

/* Base */
body,
button,
input,
select,
textarea {
	font-family: var(--bm-sans);
}

body {
	background: var(--bm-paper);
	color: var(--bm-text);
	line-height: 1.6;
}

h1,
h2,
h3,
h4 {
	color: var(--bm-ink);
	font-weight: 700;
	letter-spacing: 0;
}

a {
	color: var(--bm-link);
}

a:hover,
a:focus {
	color: var(--bm-link-hover);
}

.col-full {
	box-sizing: border-box;
	max-width: var(--bm-wrap);
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--bm-gutter);
	padding-left: var(--bm-gutter);
}

.col-full .col-full {
	padding-right: 0;
	padding-left: 0;
}

/* ===== En-tête « Brique » (inc/menu.php) =====
   Bandeau orange, rangée blanche (menu mobile, marque, recherche, compte, panier), puis barre des rayons en
   pastilles à picto avec méga-menus. Storefront : .site-header > .col-full (rangée du haut), puis .bm-nav. */
.bm-bandeau {
	background: var(--bm-orange);
	color: var(--bm-ink);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.bm-bandeau .col-full {
	padding-top: 7px;
	padding-bottom: 7px;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	margin-bottom: 0;
	padding: 0;
	border-bottom: 0;
	background: #fff;
	color: var(--bm-text);
	transition: box-shadow 0.25s;
}

.admin-bar .site-header {
	top: 32px;
}

.site-header.bm-reduit {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.site-header > .col-full {
	display: flex;
	align-items: center;
	gap: 12px clamp(12px, 3vw, 32px);
	padding-top: 14px;
	padding-bottom: 14px;
	transition: padding 0.25s;
}

.site-header > .col-full::before,
.site-header > .col-full::after {
	display: none;
}

.site-header.bm-reduit > .col-full {
	padding-top: 7px;
	padding-bottom: 7px;
}

/* Storefront donne des largeurs en % (.woocommerce-active .site-header …) : on les annule. */
.site-header .site-branding,
.woocommerce-active .site-header .site-branding {
	flex: none;
	float: none;
	width: auto;
	margin: 0;
}

.bm-logo__titre {
	margin: 0;
	font-size: inherit;
	line-height: 0;
}

.site-header .bm-logo {
	display: inline-block;
	line-height: 0;
}

.site-header .bm-logo img {
	width: auto;
	height: 30px;
	transition: height 0.25s;
}

.site-header.bm-reduit .bm-logo img {
	height: 24px;
}

/* Recherche en pilule */
.site-header .site-search,
.woocommerce-active .site-header .site-search {
	flex: 1;
	float: none;
	width: auto;
	max-width: 560px;
	margin: 0 auto;
	clear: none;
}

.site-header .site-search .widget,
.site-header .site-search form {
	margin: 0;
}

.site-header .woocommerce-product-search {
	position: relative;
	display: flex;
	align-items: center;
	height: 46px;
	padding: 0 5px 0 18px;
	border: 2px solid var(--bm-line);
	border-radius: 999px;
	background: var(--bm-paper);
	transition: border-color 0.15s;
}

.site-header .woocommerce-product-search:focus-within {
	border-color: var(--bm-orange);
}

.site-header .widget_product_search form:not(.wp-block-search)::before,
.site-header .woocommerce-product-search::before {
	position: static;
	margin-right: 10px;
	color: var(--bm-muted);
}

.site-header .woocommerce-product-search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 !important;
	border: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
}

.site-header .woocommerce-product-search button[type="submit"] {
	position: static !important;
	width: auto !important;
	height: 36px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	overflow: visible !important;
	clip: auto !important;
	clip-path: none !important;
	border-radius: 999px;
	background: var(--bm-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 36px;
	white-space: nowrap;
}

.site-header .woocommerce-product-search button[type="submit"]:hover {
	background: var(--bm-orange-dark);
}

/* Compte, panier, menu mobile */
.bm-icones {
	display: flex;
	flex: none;
	gap: 4px;
}

.bm-icone {
	position: relative;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--bm-text);
	cursor: pointer;
	transition: background 0.2s;
}

.bm-icone:hover,
.bm-icone:focus {
	background: var(--bm-paper);
	color: var(--bm-text);
}

.bm-icone svg {
	width: 22px;
	height: 22px;
}

.bm-pastille {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--bm-orange);
	color: var(--bm-ink);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.bm-pastille[hidden] {
	display: none;
}

.bm-burger {
	display: none;
}

/* Barre des rayons */
.bm-picto {
	width: 26px;
	height: 26px;
	flex: none;
}

.bm-nav {
	position: relative;
	border-top: 1px solid var(--bm-line);
	background: #fff;
	font-family: var(--bm-nav);
}

.bm-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bm-nav > .col-full > ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 0;
}

.bm-lien {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 7px;
	border-radius: 999px;
	background: var(--bm-paper);
	color: var(--bm-text);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}

.bm-lien:hover,
.bm-lien:focus,
.bm-item:hover > .bm-lien,
.bm-item.ouvert > .bm-lien,
.bm-item.actif > .bm-lien {
	background: var(--bm-ink);
	color: #fff;
}

.bm-fleche {
	width: 10px;
	height: 10px;
	transition: transform 0.2s;
}

.bm-item:hover .bm-fleche,
.bm-item.ouvert .bm-fleche {
	transform: rotate(180deg);
}

/* Méga-menu (rayons) et menu déroulant simple (blog) */
.bm-item {
	position: relative;
}

.bm-item.bm-a-mega {
	position: static;
}

.bm-mega,
.bm-deroulant {
	position: absolute;
	z-index: 40;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	background: #fff;
	box-shadow: 0 24px 40px rgba(0, 0, 0, 0.12);
}

.bm-mega {
	top: 100%;
	right: 0;
	left: 0;
	border-top: 1px solid var(--bm-line);
	border-radius: 0 0 22px 22px;
}

.bm-deroulant {
	top: calc(100% + 6px);
	right: 0;
	min-width: 240px;
	padding: 8px !important;
	border-radius: 14px;
}

.bm-deroulant a {
	display: block;
	padding: 8px 12px;
	border-radius: 10px;
	color: var(--bm-text);
	font-size: 14px;
}

.bm-deroulant a:hover {
	background: var(--bm-paper);
}

.bm-deroulant:has(.bm-groupe) {
	display: grid;
	grid-template-columns: repeat(3, minmax(190px, 1fr));
	gap: 4px 12px;
	padding: 16px !important;
}

.bm-deroulant h4 {
	margin: 0 0 4px;
	padding: 0 12px;
	color: var(--bm-muted);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bm-deroulant h4 a {
	padding: 0;
	color: inherit;
	font-size: inherit;
}

.bm-item:hover > .bm-mega,
.bm-item.ouvert > .bm-mega,
.bm-item:focus-within > .bm-mega,
.bm-item:hover > .bm-deroulant,
.bm-item.ouvert > .bm-deroulant,
.bm-item:focus-within > .bm-deroulant {
	visibility: visible;
	opacity: 1;
	transform: none;
}

.bm-mega > .col-full {
	display: grid;
	grid-template-columns: 1fr 1.25fr 0.9fr 0.8fr;
	gap: 28px;
	padding-top: 24px;
	padding-bottom: 28px;
}

/* Le « clearfix » de Storefront (.col-full::before/::after) prendrait une case de la grille. */
.bm-mega > .col-full::before,
.bm-mega > .col-full::after {
	display: none;
}

.bm-mega h4 {
	margin: 0 0 10px;
	color: var(--bm-muted);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bm-liste {
	display: grid;
	gap: 2px;
}

.bm-armees {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 10px;
}

.bm-entree {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 8px;
	border-radius: 12px;
	color: var(--bm-text);
	transition: background 0.15s, transform 0.15s;
}

.bm-entree .bm-picto {
	width: 32px;
	height: 32px;
}

.bm-entree:hover,
.bm-entree:focus {
	background: var(--bm-paper);
	color: var(--bm-text);
	transform: translateX(3px);
}

.bm-entree.actif {
	background: #fff2e0;
}

.bm-entree b {
	display: block;
	font-size: 14px;
	line-height: 1.2;
}

.bm-entree small {
	color: var(--bm-muted);
	font-size: 12px;
}

.bm-tout {
	display: inline-flex;
	margin-top: 10px;
	padding-left: 8px;
	color: var(--bm-orange-dark);
	font-size: 14px;
	font-weight: 700;
}

.bm-tout::after {
	content: "→";
	margin-left: 6px;
	transition: margin 0.2s;
}

.bm-tout:hover::after {
	margin-left: 10px;
}

.bm-grande {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: 14px;
	background: var(--bm-paper);
}

.bm-grande img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.bm-grande:hover img {
	transform: scale(1.05);
}

.bm-grande span {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 28px 14px 12px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
	color: #fff;
	font-weight: 700;
}

.bm-vedette {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px;
	border-radius: 14px;
	background: var(--bm-paper);
	color: var(--bm-text);
}

.bm-vedette:hover {
	color: var(--bm-text);
}

.bm-vedette img {
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 10px;
	background: #fff;
}

.bm-etiq {
	align-self: flex-start;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--bm-orange);
	color: var(--bm-ink);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bm-vedette b {
	font-size: 14px;
	line-height: 1.3;
}

.bm-prix {
	font-size: 17px;
	font-weight: 800;
}

/* La navigation et le panier de Storefront ne servent plus (sa barre du bas reste sur mobile). */
.storefront-primary-navigation,
.site-header .site-header-cart {
	display: none;
}

/* Contenu : cartes blanches sur fond gris clair. */
.site-content {
	padding-top: 2em;
}

.page-template-template-homepage:not(.has-post-thumbnail) .site-main {
	padding-top: 0; /* Storefront réserve ~4em pour un en-tête de page qu'on n'affiche pas */
}

.page-template-template-homepage .type-page {
	display: none; /* contenu de la page Accueil vide : pas de carte blanche vide */
}

.storefront-breadcrumb {
	margin-bottom: 1.5em;
	padding: 0.8em 0;
	background: transparent;
}

.hentry,
.storefront-product-section,
.woocommerce-products-header,
.widget-area .widget {
	box-sizing: border-box;
	margin-bottom: 2em;
	padding: 1.6em clamp(16px, 2.5vw, 2em);
	border: 1px solid var(--bm-line);
	border-radius: var(--bm-radius);
	background: var(--bm-card);
}

/* Blocs « larges » (panier et commande WooCommerce) : Storefront les étire hors du contenu par une marge négative
   (calc(25% - 25vw)) ; ici le contenu est une carte blanche, ils restent dedans. */
body.storefront-align-wide .site-main .hentry .entry-content .alignwide,
body.storefront-align-wide .site-main .hentry .entry-content .alignfull {
	width: auto;
	max-width: 100%;
	margin-right: 0;
	margin-left: 0;
	padding-right: 0;
	padding-left: 0;
}

.hentry .entry-header {
	margin-bottom: 1em;
	padding-bottom: 0.6em;
	border-bottom: 1px solid var(--bm-line);
}

.section-title,
.widget .widget-title,
.widget .widgettitle {
	padding-bottom: 0.5em;
	border-bottom: 3px solid var(--bm-orange);
	font-size: 1.25em;
}

/* En-tête des pages de rayon et d'étiquette : titre à gauche, description dessous, sans grand vide quand il n'y a
   pas de description (Storefront centre le titre et réserve ~4em en bas ; sa feuille WooCommerce est chargée après
   celle-ci, d'où le préfixe .site-main pour l'emporter). */
.site-main .woocommerce-products-header {
	margin-bottom: 1.5em;
	padding: 1em clamp(16px, 2.5vw, 1.6em);
	text-align: left;
}

.site-main .woocommerce-products-header__title.page-title {
	margin: 0;
	font-size: clamp(1.4em, 3vw, 1.9em);
}

.woocommerce-products-header .term-description {
	margin-top: 0.4em;
	color: var(--bm-muted);
}

.woocommerce-products-header .term-description p {
	margin: 0;
}

/* En-tête des pages de rayon (inc/rayon.php) : carte blanche à liseré orange, picto en filigrane, sous-rayons en
   ronds à picto. */
.bm-page-rayon .site-main .woocommerce-products-header {
	padding: 0;
	border: 0;
	background: transparent;
}

.bm-rayon {
	position: relative;
	overflow: hidden;
	padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 30px) clamp(14px, 2vw, 18px);
	border: 1px solid var(--bm-line);
	border-left: 6px solid var(--bm-orange);
	border-radius: 14px;
	background: #fff;
}

.bm-rayon__fond {
	position: absolute;
	top: -30px;
	right: -30px;
	width: 220px;
	height: 220px;
	opacity: 0.07;
	pointer-events: none;
}

.bm-rayon__parent {
	color: var(--bm-orange-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bm-rayon__parent:hover {
	color: var(--bm-ink);
}

.site-main .bm-rayon h1.page-title {
	margin: 2px 0 0;
	color: var(--bm-ink);
	font-size: clamp(1.6em, 3.4vw, 2.15em);
	line-height: 1.1;
}

.bm-rayon__description {
	position: relative;
	max-width: 70ch;
	margin: 6px 0 0;
	color: var(--bm-muted);
}

.bm-rayon__description b {
	color: var(--bm-text);
}

/* Sous-rayons (ou rayons voisins) en ronds à picto */
.bm-ronds {
	display: flex;
	gap: 18px;
	margin-top: 16px;
	padding-top: 14px;
	overflow-x: auto;
	border-top: 1px dashed var(--bm-line);
	scrollbar-width: none;
}

.bm-rond {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	width: 84px;
	color: var(--bm-ink);
	text-align: center;
}

.bm-rond:hover,
.bm-rond:focus {
	color: var(--bm-ink);
}

.bm-rond__anneau {
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--bm-paper);
	box-shadow: 0 0 0 3px var(--bm-orange);
	transition: transform 0.15s, box-shadow 0.15s;
}

.bm-rond__anneau .bm-picto {
	width: 36px;
	height: 36px;
}

.bm-rond:hover .bm-rond__anneau,
.bm-rond:focus .bm-rond__anneau {
	transform: scale(1.06);
}

.bm-rond.actif .bm-rond__anneau {
	background: #fff2e0;
	box-shadow: 0 0 0 3px var(--bm-ink);
}

.bm-rond b {
	margin-top: 7px;
	font-size: 12.5px;
	line-height: 1.2;
}

.bm-rond small {
	color: var(--bm-muted);
	font-size: 11.5px;
}

/* Sous-rayons affichés en tête de rayon : vignettes plus petites que les produits. */
ul.products li.product-category h2 {
	font-size: 0.95em;
}

ul.products li.product-category mark.count {
	background: transparent;
	color: var(--bm-muted);
}

/* Boutons : noir sur orange, comme le logo. */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.added_to_cart,
.widget a.button {
	border-radius: var(--bm-radius);
	background: var(--bm-orange);
	color: var(--bm-ink);
	font-weight: 700;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.added_to_cart:hover,
.widget a.button:hover {
	background: var(--bm-orange-dark);
	color: var(--bm-ink);
}

button.alt,
.button.alt,
.single-product div.product .single_add_to_cart_button,
.checkout-button,
#place_order {
	background: var(--bm-ink);
	color: #fff;
}

button.alt:hover,
.button.alt:hover,
.single-product div.product .single_add_to_cart_button:hover,
.checkout-button:hover,
#place_order:hover {
	background: #333;
	color: #fff;
}

/* Produits */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2,
ul.products li.product h3 {
	color: var(--bm-text);
	font-size: 0.95em;
}

ul.products li.product .price {
	color: var(--bm-ink);
	font-weight: 700;
}

.onsale {
	border-color: var(--bm-orange-dark);
	color: var(--bm-orange-dark);
}

/* Accueil : derniers articles du blog en cartes. */
.bm-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 20px;
	margin: 0;
	list-style: none;
}

.bm-card {
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--bm-line);
	border-radius: var(--bm-radius);
	background: var(--bm-card);
}

.bm-card__link {
	display: block;
	height: 100%;
	color: var(--bm-text);
	text-decoration: none;
}

.bm-card__link:hover {
	color: var(--bm-link-hover);
}

.bm-card__img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.bm-card__title {
	display: block;
	padding: 0.7em 0.9em 0.9em;
	font-weight: 700;
	line-height: 1.35;
}

.bm-more {
	margin: 1.5em 0 0;
	text-align: center;
}

/* Pied de page sombre */
.site-footer {
	background: var(--bm-footer);
	color: #ccc;
}

.site-footer a,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer .widget-title {
	color: #fff;
}

.site-footer .site-info {
	padding: 1.5em 0;
	font-size: 0.8125em;
}

/* Barre du bas sur mobile (Storefront) */
.storefront-handheld-footer-bar ul li > a,
.storefront-handheld-footer-bar ul li.search .site-search {
	background: var(--bm-ink);
	color: var(--bm-orange);
}

.storefront-handheld-footer-bar ul li.cart .count {
	border-color: var(--bm-ink);
	background: var(--bm-orange);
	color: var(--bm-ink);
}

/* En-tête sur tablette et mobile : menu, marque et icônes sur une ligne, recherche dessous, rayons en tiroir. */
@media (max-width: 900px) {
	.bm-bandeau {
		font-size: 11.5px;
	}

	.bm-bandeau .col-full {
		padding-top: 5px;
		padding-bottom: 5px;
	}

	.site-header > .col-full {
		flex-wrap: wrap;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.site-header .site-branding,
	.woocommerce-active .site-header .site-branding {
		flex: 1;
		min-width: 0;
	}

	.site-header .bm-logo img {
		height: 22px;
	}

	.site-header .site-search,
	.woocommerce-active .site-header .site-search {
		display: block;
		flex-basis: 100%;
		order: 3;
		max-width: none;
	}

	.site-header.bm-reduit .site-search {
		display: none;
	}

	.bm-burger {
		display: grid;
	}

	.bm-nav {
		display: none;
		max-height: calc(100vh - 120px);
		overflow-y: auto;
	}

	.bm-nav.ouvert {
		display: block;
	}

	.bm-nav > .col-full > ul {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 6px;
	}

	.bm-lien {
		padding: 8px 14px 8px 8px;
	}

	.bm-fleche {
		margin-left: auto;
	}

	.bm-mega,
	.bm-deroulant {
		position: static;
		display: none;
		visibility: visible;
		opacity: 1;
		transform: none;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.bm-item:hover > .bm-mega,
	.bm-item:hover > .bm-deroulant {
		display: none;
	}

	.bm-item.ouvert > .bm-mega,
	.bm-item.ouvert > .bm-deroulant {
		display: block;
	}

	.bm-item:hover:not(.ouvert):not(.actif) > .bm-lien {
		background: var(--bm-paper);
		color: var(--bm-text);
	}

	.bm-item:hover:not(.ouvert) .bm-fleche {
		transform: none;
	}

	.bm-deroulant:has(.bm-groupe) {
		grid-template-columns: 1fr;
		padding: 8px 0 !important;
	}

	.bm-deroulant h4 {
		margin-top: 10px;
	}

	.bm-mega > .col-full {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 10px 0 14px;
	}

	.bm-colonne-image,
	.bm-vedette {
		display: none !important;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 0;
	}
}


/* Articles connexes des pages d'histoire (List Category Posts) : cartes en grille, image, titre, extrait sur 3 lignes. */
.bm-connexes__titre {
	margin-top: 1.6em;
	padding-bottom: 0.4em;
	border-bottom: 3px solid var(--bm-orange);
	font-size: 1.35em;
}

ul.lcp_catlist {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 20px;
	margin: 1.2em 0 0;
	padding: 0;
	list-style: none;
}

ul.lcp_catlist > li {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	margin: 0;
	border: 1px solid var(--bm-line);
	border-radius: 12px;
	background: #fff;
	transition: box-shadow 0.2s, transform 0.2s;
}

ul.lcp_catlist > li:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

ul.lcp_catlist > li > a:has(img) {
	order: -1;
	display: block;
	line-height: 0;
}

ul.lcp_catlist img.lcp_thumbnail {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
}

ul.lcp_catlist > li > a:not(:has(img)),
.entry-content ul.lcp_catlist > li > a:not(:has(img)) {
	padding: 14px 16px 4px;
	color: var(--bm-ink);
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

ul.lcp_catlist > li > a:not(:has(img)):hover {
	color: var(--bm-link);
}

ul.lcp_catlist .lcp_excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 16px 16px;
	color: var(--bm-muted);
	font-size: 0.9em;
	line-height: 1.5;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

/* Accueil : « Nos univers » en tuiles à picto (inc/rayon.php). */
.bm-univers__grille {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.bm-tuile {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 20px 18px 16px;
	border: 1px solid var(--bm-line);
	border-radius: 16px;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.bm-tuile:hover {
	border-color: var(--bm-orange);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

.bm-tuile__lien {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	color: var(--bm-ink);
}

.bm-tuile__lien::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 16px;
}

.bm-tuile__lien:hover,
.bm-tuile__lien:focus {
	color: var(--bm-ink);
}

.bm-tuile__picto {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #fff2e0;
	box-shadow: 0 0 0 3px var(--bm-orange);
	transition: transform 0.2s;
}

.bm-tuile:hover .bm-tuile__picto {
	transform: rotate(-6deg) scale(1.06);
}

.bm-tuile__picto .bm-picto {
	width: 38px;
	height: 38px;
}

.bm-tuile b {
	font-size: 1.1em;
	line-height: 1.2;
}

.bm-tuile small {
	margin-top: 2px;
	color: var(--bm-muted);
}

.bm-tuile__sous {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

.bm-tuile__sous a {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--bm-paper);
	color: var(--bm-text);
	font-size: 12px;
	font-weight: 700;
}

.bm-tuile__sous a:hover {
	background: var(--bm-ink);
	color: #fff;
}

/* Barre de filtres des rayons (inc/filtres.php) : collante, type en boutons, nation et prix en listes. */
.bm-filtres {
	position: sticky;
	top: 70px;
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	padding: 10px 12px;
	border: 1px solid var(--bm-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.admin-bar .bm-filtres {
	top: 102px;
}

.bm-filtres__lab {
	color: var(--bm-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.bm-seg {
	display: inline-flex;
	flex-wrap: wrap;
	overflow: hidden;
	border: 1px solid var(--bm-line);
	border-radius: 10px;
}

.bm-seg a {
	padding: 7px 12px;
	border-right: 1px solid var(--bm-line);
	background: #fff;
	color: var(--bm-text);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.bm-seg a:last-child {
	border-right: 0;
}

.bm-seg a:hover {
	background: var(--bm-paper);
	color: var(--bm-text);
}

.bm-seg a.on {
	background: var(--bm-ink);
	color: #fff;
}

.bm-seg small {
	color: var(--bm-muted);
	font-weight: 400;
}

.bm-seg a.on small {
	color: var(--bm-orange);
}

.bm-filtres select {
	padding: 7px 10px;
	border: 1px solid var(--bm-line);
	border-radius: 10px;
	background: #fff;
	font-size: 13px;
}

.bm-champ {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.bm-filtres {
	flex: 1 1 100%;
}

.bm-filtres__raz {
	margin-left: auto;
	color: var(--bm-orange-dark);
	font-size: 13px;
	font-weight: 700;
}

@media (max-width: 900px) {
	.bm-filtres {
		position: static;
	}

	.bm-seg {
		flex-wrap: nowrap;
		max-width: 100%;
		overflow-x: auto;
	}

	.bm-filtres__raz {
		margin-left: 0;
	}
}

/* Étiquette de rupture sur les cartes produits. */
ul.products li.product {
	position: relative;
}

/* Cartes de même hauteur sur une rangée, bouton aligné en bas quelle que soit la longueur du titre ou du prix.
   Storefront place les cartes en flottant : la grille passe en flex (mêmes largeurs et marges que Storefront). */
ul.products {
	display: flex;
	flex-wrap: wrap;
}

ul.products::before,
ul.products::after {
	display: none; /* clearfix de Storefront, inutile en flex et compté sinon comme une carte */
}

ul.products li.product:not(.product-category) {
	display: flex;
	flex-direction: column;
}

ul.products li.product:not(.product-category) .woocommerce-LoopProduct-link {
	flex: 1;
}

ul.products li.product:not(.product-category) .button {
	align-self: center;
	margin-top: auto;
}

.bm-rupture {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--bm-ink);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

ul.products li.product.outofstock img {
	opacity: 0.55;
}

/* Mode affiliation (inc/affiliation.php) : prix AliExpress, choix du modèle et bouton vers AliExpress. */
.bm-prix-ali small {
	color: var(--bm-muted);
	font-size: 0.8em;
	font-weight: 400;
}

.bm-affiliation {
	display: grid;
	gap: 0.8em;
	max-width: 32em;
	margin: 1.2em 0 1.6em;
}

.bm-affiliation__choix {
	display: grid;
	gap: 0.3em;
	font-weight: 700;
}

.bm-affiliation__liste {
	width: 100%;
	padding: 0.6em 0.7em;
	border: 1px solid var(--bm-line);
	border-radius: var(--bm-radius);
	background: #fff;
	font-weight: 400;
}

.bm-affiliation__bouton {
	justify-self: start;
}

.bm-affiliation__mention,
.bm-mention-affiliation {
	margin: 0;
	color: var(--bm-muted);
	font-size: 0.82em;
}

.site-footer .bm-mention-affiliation {
	margin-top: 0.6em;
	color: inherit;
	opacity: 0.8;
}

/* Formulaire de contact (inc/contact.php). */
.bm-contact {
	display: grid;
	gap: 0.2em;
	max-width: 40em;
}

.bm-contact label {
	display: block;
	margin-bottom: 0.3em;
	font-weight: 700;
}

.bm-contact input[type="text"],
.bm-contact input[type="email"],
.bm-contact select,
.bm-contact textarea {
	width: 100%;
	padding: 0.6em 0.7em;
	border: 1px solid var(--bm-line);
	border-radius: var(--bm-radius);
	background: #fff;
}

.bm-contact__accord label {
	font-weight: 400;
}

.bm-contact__piege {
	position: absolute;
	left: -9999px;
}

.bm-contact__erreur {
	display: block;
	margin-top: 0.3em;
	color: #b3261e;
	font-size: 0.9em;
}

.bm-contact__retour {
	padding: 0.8em 1em;
	border-left: 4px solid #b3261e;
	background: #fdf1f0;
}

.bm-contact__retour--ok {
	border-left-color: #2e7d32;
	background: #eef7ee;
}

/* Bandeau de consentement (inc/consentement.php) : « Tout refuser » et « Accepter » de même poids. */
.bm-consentement {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	max-width: 26em;
	padding: 1em 1.2em;
	border: 1px solid var(--bm-line);
	border-left: 6px solid var(--bm-orange);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
	font-size: 0.9em;
}

.bm-consentement[hidden] {
	display: none;
}

.bm-consentement p {
	margin: 0 0 0.7em;
}

.bm-consentement__titre {
	color: var(--bm-ink);
	font-weight: 700;
}

.bm-consentement__boutons {
	display: flex;
	gap: 0.6em;
	margin: 0;
}

.bm-consentement__boutons .button {
	flex: 1;
	border: 2px solid var(--bm-ink);
	background: #fff;
	color: var(--bm-ink);
}

@media (max-width: 600px) {
	.bm-consentement {
		right: 16px;
		left: 16px;
		max-width: none;
	}
}

/* Photo de l'accueil (inc/rayon.php), au-dessus de « Nos univers » (« bm-bandeau » est la bande orange du haut). */
.bm-hero {
	margin-bottom: 2em;
	overflow: hidden;
	border-radius: var(--bm-radius);
	background: var(--bm-card);
}

.bm-hero img {
	display: block;
	width: 100%;
	height: auto;
}

/* Navigation entre articles avec image (functions.php, storefront_post_nav). */
.bm-nav-articles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em;
	margin: 2em 0;
}

.bm-nav-articles a {
	display: flex;
	align-items: center;
	gap: 0.9em;
	padding: 0.7em;
	border: 1px solid var(--bm-line);
	border-radius: var(--bm-radius);
	background: var(--bm-card);
	color: var(--bm-ink);
	text-decoration: none;
}

.bm-nav-articles a:hover {
	border-color: var(--bm-orange);
}

.bm-nav-articles__next {
	flex-direction: row-reverse;
	text-align: right;
}

.bm-nav-articles img {
	flex: 0 0 96px;
	width: 96px;
	height: 72px;
	border-radius: var(--bm-radius);
	object-fit: cover;
}

.bm-nav-articles__texte {
	display: grid;
	gap: 0.2em;
	font-weight: 700;
	line-height: 1.3;
}

.bm-nav-articles__texte small {
	color: var(--bm-link);
	font-weight: 400;
}

@media (max-width: 600px) {
	.bm-nav-articles {
		grid-template-columns: 1fr;
	}
}

/* Fiche produit : description sous le prix, détail de l'affiliation en bas de page (inc/affiliation.php). */
.bm-fiche-description {
	margin-bottom: 1.2em;
}

.bm-affiliation__detail {
	clear: both;
	max-width: 70ch;
	margin: 2em 0 0;
	color: var(--bm-muted);
	font-size: 0.8em;
}
