/* BME Wow — Blocksy + Woo */
:root {
	--bme-wow-bg: #050816;
	--bme-wow-accent: #38bdf8;
	--bme-wow-accent2: #818cf8;
	--bme-wow-glow: rgba(56, 189, 248, 0.35);
}

/* Remove custom hero slider block */
.bme-auto-slider {
	display: none !important;
}

.bme-hero-wow {
	position: relative;
	isolation: isolate;
	color: #e2e8f0;
	padding: clamp(2.5rem, 6vw, 5rem) 1.25rem clamp(2rem, 5vw, 4rem);
	margin: 0 0 2rem;
	overflow: hidden;
	border-radius: 0 0 24px 24px;
}

.bme-hero-wow .bme-hero-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(1200px 600px at 10% 20%, rgba(56, 189, 248, 0.22), transparent 55%),
		radial-gradient(900px 500px at 90% 10%, rgba(129, 140, 248, 0.25), transparent 50%),
		radial-gradient(700px 400px at 70% 90%, rgba(14, 165, 233, 0.12), transparent 45%),
		linear-gradient(165deg, #020617 0%, #0f172a 45%, #020617 100%);
}

.bme-hero-wow .bme-hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0.35;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
	mix-blend-mode: overlay;
}

.bme-hero-inner {
	max-width: 1100px;
	margin: 0 auto;
}

.bme-hero-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #94a3b8;
	margin: 0 0 0.75rem;
}

.bme-hero-kicker::before {
	content: "";
	width: 28px;
	height: 2px;
	background: linear-gradient(90deg, var(--bme-wow-accent), transparent);
	border-radius: 2px;
}

.bme-hero-title {
	font-size: clamp(1.85rem, 4.2vw, 3.25rem);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.03em;
	margin: 0 0 1rem;
	color: #f8fafc;
}

.bme-hero-title .bme-hero-accent {
	background: linear-gradient(90deg, var(--bme-wow-accent), var(--bme-wow-accent2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.bme-hero-sub {
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	line-height: 1.55;
	color: #cbd5e1;
	max-width: 52ch;
	margin: 0 0 1.75rem;
}

.bme-hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.bme-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.35rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none !important;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.bme-btn-primary {
	color: #0f172a !important;
	background: linear-gradient(135deg, #38bdf8, #a5b4fc);
	box-shadow: 0 12px 40px var(--bme-wow-glow);
}

.bme-btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 48px rgba(56, 189, 248, 0.45);
	color: #020617 !important;
}

.bme-btn-ghost {
	color: #e2e8f0 !important;
	border: 1px solid rgba(148, 163, 184, 0.45);
	background: rgba(15, 23, 42, 0.35);
	backdrop-filter: blur(8px);
}

.bme-btn-ghost:hover {
	border-color: rgba(56, 189, 248, 0.65);
	color: #fff !important;
}

.bme-home-strip {
	border: 1px solid rgba(148, 163, 184, 0.2);
	backdrop-filter: blur(6px);
}

.bme-home-strip .bme-strip-title {
	font-weight: 800;
	letter-spacing: -0.02em;
}

.bme-home-strip-columns {
	gap: 1.25rem;
}

.bme-home-mini-card {
	border: 1px solid rgba(148, 163, 184, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bme-home-mini-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

body.home ul.products li.product {
	border-radius: 14px;
}

/* Grille produits WooCommerce: 2 colonnes mobile, 6 desktop */
.woocommerce ul.products,
body.woocommerce ul.products,
body.woocommerce-page ul.products,
ul.products.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.6rem, 2.2vw, 1.2rem);
	align-items: stretch;
	width: 100% !important;
	max-width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
	margin-bottom: 0 !important;
	padding: 0;
	list-style: none !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
body.woocommerce ul.products::before,
body.woocommerce ul.products::after {
	display: none !important;
	content: none !important;
}

ul.products li.product,
.woocommerce ul.products li.product {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	float: none !important;
}

@media (min-width: 901px) {
	.woocommerce ul.products,
	body.woocommerce ul.products,
	body.woocommerce-page ul.products,
	ul.products.products {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.bme-btn,
	.bme-home-mini-card,
	ul.products li.product,
	.bme-wide-search {
		transition: none;
	}
}

/* --- Barre top: encastrée en haut, style carte au scroll (.bme-wide-search--scrolled) --- */
.bme-wide-search {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	position: sticky;
	top: 0;
	z-index: 100060;
	width: 100vw;
	max-width: 100vw;
	margin: 0;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
	padding: 0.65rem clamp(0.9rem, 2.6vw, 1.45rem);
	background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
	border: none;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 0;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	transition: background 0.22s ease, box-shadow 0.22s ease, border-radius 0.22s ease, margin 0.22s ease, width 0.22s ease, max-width 0.22s ease, border 0.22s ease, padding 0.22s ease;
}

body.admin-bar .bme-wide-search {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .bme-wide-search {
		top: 46px;
	}
}

.bme-wide-search.bme-wide-search--scrolled {
	width: 100vw;
	max-width: 100vw;
	margin: 0;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 0.6rem clamp(0.9rem, 2.6vw, 1.45rem);
	background: rgba(255, 255, 255, 0.9);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-bottom: none;
	border-radius: 0;
	box-shadow: 0 14px 44px rgba(15, 23, 42, 0.14);
}

@media (min-width: 901px) {
	.bme-wide-search.bme-wide-search--scrolled {
		width: 100vw;
		max-width: 100vw;
		margin: 0;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		border-radius: 0;
		box-shadow: 0 18px 56px rgba(15, 23, 42, 0.16);
	}
}

/* Mobile: sticky est souvent brisée par overflow/transform du thème -> fixée au viewport */
.bme-wide-search-spacer {
	display: none;
}

@media (max-width: 900px) {
	.bme-wide-search-spacer {
		display: block;
		width: 100%;
		height: 6rem;
		pointer-events: none;
		flex-shrink: 0;
	}

	.bme-wide-search {
		position: fixed;
		left: 0 !important;
		right: 0 !important;
		top: 0 !important;
		margin: 0 !important;
		width: 100% !important;
		max-width: none !important;
		box-sizing: border-box;
		padding: calc(0.5rem + env(safe-area-inset-top, 0px)) clamp(0.55rem, 2.5vw, 1rem) 0.5rem;
		border-radius: 0 !important;
	}

	body.admin-bar .bme-wide-search {
		top: 32px !important;
	}

	@media screen and (max-width: 782px) {
		body.admin-bar .bme-wide-search {
			top: 46px !important;
		}
	}

	.bme-wide-search.bme-wide-search--scrolled {
		width: 100% !important;
		max-width: 100% !important;
		left: 0 !important;
		right: 0 !important;
		margin: 0 !important;
		padding: calc(0.45rem + env(safe-area-inset-top, 0px)) clamp(0.45rem, 1.8vw, 0.95rem)
			0.45rem;
		border-radius: 0 !important;
		box-shadow: 0 14px 44px rgba(15, 23, 42, 0.14);
	}
}

.bme-wide-search__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.85rem 1.1rem;
	max-width: 100%;
	margin: 0 auto;
	width: 100%;
}

.bme-wide-search__logoWrap {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.bme-wide-search__logo .custom-logo-link,
.bme-wide-search__logo a {
	display: inline-block;
	line-height: 0;
}

.bme-wide-search__logo img,
.bme-wide-search__logo .custom-logo {
	max-height: 42px;
	width: auto;
	height: auto;
	display: block;
}

.bme-wide-search__textLogo {
	font-weight: 800;
	font-size: 1.18rem;
	color: #0f172a;
	text-decoration: none !important;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.bme-wide-search__textLogo:hover {
	color: #2563eb;
}

.bme-wide-search__form {
	flex: 1 1 auto;
	position: relative;
	min-width: 0;
	margin: 0;
	width: 100%;
	max-width: none;
}

.bme-wide-search__fieldWrap {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	gap: 0.52rem;
	position: relative;
	box-sizing: border-box;
	min-height: 52px;
	padding: 0 1.05rem 0 0.95rem;
	border-radius: 10px;
	border: 1px solid rgba(15, 23, 42, 0.14);
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
	--bme-cycle-prefix-width: 72px;
}

.bme-wide-search__searchIcon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	color: #64748b;
	pointer-events: none;
}

.bme-wide-search__searchIcon .bme-ico--search {
	width: 22px;
	height: 22px;
}

.bme-wide-search__form .search-field,
.bme-wide-search__form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100% !important;
	box-sizing: border-box;
	min-height: 46px;
	height: 46px;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	font-size: 1.03rem;
	background: transparent !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	z-index: 2;
}

.bme-wide-search__form .search-field::placeholder,
.bme-wide-search__form input[type="search"]::placeholder {
	color: #94a3b8;
}

.bme-wide-search__cycleViewport {
	position: absolute;
	left: calc(2.5rem + var(--bme-cycle-prefix-width) + 0.42rem);
	right: 1rem;
	top: 50%;
	height: 1.35em;
	margin-top: -0.675em;
	overflow: hidden;
	pointer-events: none;
	z-index: 1;
	color: #94a3b8;
	font-size: 1.03rem;
	line-height: 1.35;
	white-space: nowrap;
}

.bme-wide-search__cyclePrefix {
	position: absolute;
	left: 2.5rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 1;
	color: #94a3b8;
	font-size: 1.03rem;
	line-height: 1.35;
	white-space: nowrap;
}

.bme-wide-search__cycleCurrent,
.bme-wide-search__cycleNext {
	position: absolute;
	left: 0;
	right: 0;
	display: block;
	transform: translateY(0);
	transition: transform 0.42s ease;
}

.bme-wide-search__cycleViewport.is-resetting .bme-wide-search__cycleCurrent,
.bme-wide-search__cycleViewport.is-resetting .bme-wide-search__cycleNext {
	transition: none !important;
}

.bme-wide-search__cycleNext {
	transform: translateY(-100%);
}

.bme-wide-search__cycleViewport.is-animating .bme-wide-search__cycleCurrent {
	transform: translateY(100%);
}

.bme-wide-search__cycleViewport.is-animating .bme-wide-search__cycleNext {
	transform: translateY(0);
}

.bme-wide-search__fieldWrap.bme-has-input .bme-wide-search__cycleViewport {
	opacity: 0;
}

.bme-wide-search__fieldWrap.bme-has-input .bme-wide-search__cyclePrefix {
	opacity: 0;
}

.bme-wide-search__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.22rem;
}

.bme-wide-search__action {
	position: relative;
	display: inline-flex;
	width: auto;
	min-width: 46px;
	height: 46px;
	padding: 0 0.62rem;
	align-items: center;
	justify-content: center;
	gap: 0.36rem;
	border-radius: 10px;
	color: #0f172a;
	text-decoration: none !important;
	font-size: 0.92rem;
	font-weight: 700;
	white-space: nowrap;
	line-height: 1;
}

.bme-wide-search__action:hover {
	background: rgba(15, 23, 42, 0.07);
	color: #0f172a;
}

.bme-wide-search__actionLabel {
	display: inline;
}

.bme-wide-search__cartBadge {
	position: absolute;
	top: 1px;
	right: 0;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	background: #2563eb;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	line-height: 17px;
	text-align: center;
	border-radius: 999px;
}

.bme-ico {
	display: block;
}

@media (max-width: 900px) {
	.bme-wide-search__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.55rem 0.6rem;
	}

	.bme-wide-search__action {
		width: 42px;
		min-width: 42px;
		height: 42px;
		padding: 0;
		gap: 0;
	}

	.bme-wide-search__fieldWrap {
		min-height: 48px;
		padding: 0 0.9rem 0 0.78rem;
		border-radius: 999px;
	}

	.bme-wide-search__form .search-field,
	.bme-wide-search__form input[type="search"] {
		min-height: 42px;
		height: 42px;
		font-size: 0.98rem;
	}

	.bme-wide-search__cycleViewport {
		left: calc(2.25rem + var(--bme-cycle-prefix-width) + 0.34rem);
		right: 0.86rem;
		font-size: 0.98rem;
	}

	.bme-wide-search__cyclePrefix {
		left: 2.25rem;
		font-size: 0.98rem;
	}

	.bme-wide-search__actionLabel {
		display: none;
	}

	.bme-wide-search__ordersLink {
		display: none !important;
	}
}

/* Pas de logo texte sur mobile */
@media (max-width: 900px) {
	.bme-wide-search__logoWrap {
		display: none !important;
	}
}

/* ----- Barre encastrée bas d’écran (mobile uniquement, fixe au scroll) ----- */
.bme-mobile-bottom {
	display: none;
}

@media (max-width: 900px) {
	html {
		box-sizing: border-box;
	}

	body {
		padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px)) !important;
		box-sizing: border-box;
	}

	.bme-mobile-bottom {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100070;
		margin: 0;
		padding: 0 env(safe-area-inset-right, 0px) calc(6px + env(safe-area-inset-bottom, 0px))
			env(safe-area-inset-left, 0px);
		background: rgba(255, 255, 255, 0.93);
		-webkit-backdrop-filter: blur(14px);
		backdrop-filter: blur(14px);
		border-top: 1px solid rgba(15, 23, 42, 0.1);
		box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.1);
	}

	.bme-mobile-bottom__safe {
		display: flex;
		flex-direction: row;
		align-items: stretch;
		justify-content: space-around;
		gap: 0.15rem;
		max-width: 520px;
		margin: 0 auto;
		min-height: 3.125rem;
		padding: 0.35rem 0.15rem;
		box-sizing: border-box;
	}

	.bme-mobile-bottom__link {
		flex: 1 1 0;
		min-width: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 0.2rem;
		padding: 0.2rem 0.35rem;
		text-decoration: none !important;
		color: #334155 !important;
		border-radius: 10px;
		font-size: 0.625rem;
		font-weight: 700;
		letter-spacing: 0.01em;
		line-height: 1.05;
		-webkit-tap-highlight-color: transparent;
	}

	.bme-mobile-bottom__link:active {
		background: rgba(15, 23, 42, 0.06);
	}

	.bme-mobile-bottom__trigger {
		flex: 1 1 0;
		min-width: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 0.2rem;
		padding: 0.2rem 0.35rem;
		margin: 0;
		font-family: inherit;
		font-size: 0.625rem;
		font-weight: 700;
		letter-spacing: 0.01em;
		line-height: 1.05;
		color: #334155;
		background: transparent;
		border: 0;
		border-radius: 10px;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
		-webkit-tap-highlight-color: transparent;
	}

	.bme-mobile-bottom__trigger:active {
		background: rgba(15, 23, 42, 0.06);
	}

	.bme-mobile-bottom__label {
		display: block;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.bme-mobile-bottom .bme-ico {
		flex-shrink: 0;
	}

	.bme-mobile-bottom__icoWrap {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.bme-mobile-bottom__badge {
		position: absolute;
		top: -4px;
		right: -8px;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		background: #2563eb;
		color: #fff;
		font-size: 9px;
		font-weight: 800;
		line-height: 16px;
		text-align: center;
		border-radius: 999px;
	}
}

@media print {
	.bme-mobile-bottom {
		display: none !important;
	}

	.bme-wide-search-spacer {
		display: none !important;
		height: 0 !important;
	}
}
