/*
 * Bocolis — pages rayons [BOC-022]
 * Puces de sous-catégories (ex-snippet 27) et titres des groupes de l'onglet « Tout » (ex-snippet 36).
 */

/* Puces */
.bocolis-filtre-souscat {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 30px;
}

.bocolis-filtre-souscat:empty {
	display: none;
	margin: 0;
}

.bfs-chip {
	display: inline-block;
	padding: 8px 18px;
	border: 2px solid #108501;
	border-radius: 999px;
	background: #fff;
	color: #108501;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.bfs-chip:hover {
	background: #e6f3e3;
	color: #108501;
}

.bfs-chip.is-active,
.bfs-chip.is-active:hover {
	background: #108501;
	color: #fff;
}

.bfs-chip--recherche {
	border-color: #0a3d10;
	background: #0a3d10;
	color: #fff;
}

.bfs-chip--recherche:hover {
	background: #155d1f;
	color: #fff;
}

.bfs-chip:focus-visible {
	outline: 2px solid #108501;
	outline-offset: 2px;
}

/* Grille pendant un changement de filtre */
.bocolis-ajax-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.2s;
}

.bocolis-no-products {
	padding: 40px 0;
	font-size: 18px;
}

/* Titres des groupes de l'onglet « Tout » */
.bocolis-products-zone ul.products li.bocolis-groupe-titre {
	flex: 0 0 100% !important;
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 20px 0 0 !important;
	padding: 0 0 10px !important;
	border-bottom: 2px solid #e6f3e3;
	background: transparent !important;
	box-shadow: none !important;
	list-style: none !important;
	transform: none !important;
	cursor: default !important;
}

.bocolis-products-zone ul.products li.bocolis-groupe-titre:first-child {
	margin-top: 0 !important;
}

.bocolis-products-zone ul.products li.bocolis-groupe-titre h2 {
	margin: 0 !important;
	padding: 0 !important;
	color: #108501 !important;
	font-family: "Afacad", sans-serif !important;
	font-size: 24px !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
}

@media (max-width: 767px) {
	.bocolis-products-zone ul.products li.bocolis-groupe-titre {
		margin-top: 12px !important;
		padding-bottom: 6px !important;
	}

	.bocolis-products-zone ul.products li.bocolis-groupe-titre h2 {
		font-size: 18px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bfs-chip,
	.bocolis-ajax-loading {
		transition: none;
	}
}

/* [BOC-050] Cartes illustrées des sous-catégories (rayon Noël) */
.bocolis-filtre-souscat .bocolis-cartes-rayon {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	flex: 0 0 100%;
	width: 100%;
	margin: 0 0 20px;
}

.bocolis-carte-rayon {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid #e6e2d6;
	border-radius: 14px;
	background: #fff;
	color: #0a3d10;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}

.bocolis-carte-rayon:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(10, 61, 16, 0.1);
	color: #0a3d10;
}

.bocolis-carte-rayon__photo {
	display: block;
	aspect-ratio: 3 / 2;
	background: #f3f1ea;
}

.bocolis-carte-rayon__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bocolis-carte-rayon__nom {
	padding: 12px 14px 14px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
}

@media (max-width: 600px) {
	.bocolis-filtre-souscat .bocolis-cartes-rayon {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.bocolis-carte-rayon__nom {
		padding: 9px 10px 11px;
		font-size: 15px;
	}
}

/* [BOC-071] Suite des produits au défilement : la pagination reste dans la page pour Google, masquée à l'écran. */
nav.woocommerce-pagination.bocolis-pagination--auto {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
}
.bocolis-suite {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 64px;
	margin: 28px 0 8px;
}
.bocolis-suite__bouton {
	padding: 10px 24px !important;
	border: 1.5px solid #108501 !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #0e4806 !important;
	font-family: "Afacad", sans-serif !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	cursor: pointer;
}
.bocolis-suite__bouton:hover {
	background: #e6f4dd !important;
}
.bocolis-suite__roue {
	display: none;
	width: 30px;
	height: 30px;
	border: 3px solid #d7ead0;
	border-top-color: #108501;
	border-radius: 50%;
	animation: bocolis-suite-tourne 0.8s linear infinite;
}
.bocolis-suite.is-chargement .bocolis-suite__roue {
	display: block;
}
.bocolis-suite.is-chargement .bocolis-suite__bouton {
	display: none;
}
@keyframes bocolis-suite-tourne {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.bocolis-suite__roue { animation-duration: 2s; }
}

/* ==========================================================================
 * [BOC-076] Barre « Affiner » : filtres et tri du rayon
 * ========================================================================== */
html body .bocolis-affiner {
	--ba-vert: #108501;
	--ba-vert-fonce: #0e4806;
	--ba-bord: #cfe0c8;
	--ba-gris: #5b6b55;
	font-family: "Afacad", sans-serif;
	margin: 18px 0 22px;
}
html body .bocolis-affiner .ba {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0 0;
	border-top: 1px solid #e3e9dd;
	box-sizing: border-box;
}
html body .bocolis-affiner.is-colle .ba {
	position: fixed;
	z-index: 90;
	padding: 10px 0;
	border-top: 0;
	background: var(--ba-fond, #fff);
	/* bande pleine largeur derrière la barre */
	box-shadow: 0 0 0 100vmax var(--ba-fond, #fff), 0 10px 14px -10px rgba(14, 72, 6, 0.35);
	clip-path: inset(0 -100vmax -24px);
}
html body .bocolis-affiner.is-chargement .ba { opacity: 0.6; pointer-events: none; }
html body .ba__filtres {
	display: flex;
	flex: 1 1 auto;
	gap: 8px;
	min-width: 0;
	padding: 2px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
html body .ba__filtres::-webkit-scrollbar { display: none; }
html body .ba-puce {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 7px;
	height: 38px;
	margin: 0;
	padding: 0 15px 0 11px;
	border: 1.5px solid var(--ba-bord);
	border-radius: 999px;
	background: #fff;
	color: var(--ba-vert-fonce);
	font: 600 15px/1 "Afacad", sans-serif;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
html body .ba-puce:hover { border-color: var(--ba-vert); background: #f3faef; color: var(--ba-vert-fonce); }
html body .ba-puce i {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	border: 1.5px solid #9fbf93;
	border-radius: 5px;
	box-sizing: border-box;
}
html body .ba-puce b { font-weight: 500; opacity: 0.6; }
html body .ba-puce[aria-pressed="true"] { border-color: var(--ba-vert); background: #e9f5e3; }
html body .ba-puce[aria-pressed="true"] i {
	border-color: var(--ba-vert);
	background: var(--ba-vert) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}
html body .ba__sep { flex: 0 0 1px; width: 1px; height: 24px; align-self: center; background: #dbe6d4; }
html body .ba__droite { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; }
html body .ba__nb { color: var(--ba-vert-fonce); font-size: 15px; white-space: nowrap; }
html body .ba__nb strong { font-weight: 700; }
html body .ba__effacer,
html body .ba-panneau__effacer {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ba-vert);
	font: 500 15px/1 "Afacad", sans-serif;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
	cursor: pointer;
}
html body .ba__effacer:hover,
html body .ba__effacer:focus,
html body .ba-panneau__effacer:hover { background: none; color: var(--ba-vert-fonce); }
html body .ba__tri { display: inline-flex; align-items: center; margin: 0; position: relative; }
html body .ba__tri span {
	position: absolute;
	left: 14px;
	color: var(--ba-gris);
	font-size: 15px;
	font-weight: 500;
	pointer-events: none;
}
html body .ba__tri select {
	height: 38px;
	margin: 0;
	padding: 0 36px 0 62px;
	border: 1.5px solid var(--ba-bord);
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e4806' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 13px center / 14px no-repeat;
	color: var(--ba-vert-fonce);
	font: 600 15px/1 "Afacad", sans-serif;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}
html body .ba-puce:focus-visible,
html body .ba__tri select:focus-visible,
html body .ba__effacer:focus-visible,
html body .ba__bouton:focus-visible { outline: 3px solid var(--ba-vert); outline-offset: 2px; }
html body .ba__tel,
html body .ba__resume { display: none; }

/* Téléphone : deux boutons, résumé dessous, panneau par le bas. */
@media (max-width: 767px) {
	html body .bocolis-affiner { margin: 12px 0 16px; }
	html body .bocolis-affiner .ba { padding-top: 12px; }
	html body .ba__filtres,
	html body .ba__droite { display: none; }
	html body .ba__tel { display: flex; gap: 8px; width: 100%; }
	html body .ba__bouton {
		display: inline-flex;
		flex: 1 1 0;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-width: 0;
		height: 44px;
		margin: 0;
		padding: 0 10px;
		border: 1.5px solid var(--ba-bord);
		border-radius: 12px;
		background: #fff;
		color: var(--ba-vert-fonce);
		font: 600 15px/1 "Afacad", sans-serif;
		white-space: nowrap;
		cursor: pointer;
	}
	html body .ba__bouton:hover,
	html body .ba__bouton:focus { background: #fff; color: var(--ba-vert-fonce); border-color: var(--ba-vert); }
	html body .ba__bouton[hidden] { display: none; }
	html body .ba__bouton em {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		border-radius: 999px;
		background: var(--ba-vert);
		color: #fff;
		font-size: 12px;
		font-style: normal;
	}
	html body .ba__bouton small { overflow: hidden; color: var(--ba-gris); font-size: 14px; font-weight: 500; text-overflow: ellipsis; }
	html body .ba__resume {
		display: flex;
		justify-content: space-between;
		gap: 10px;
		margin: 12px 0 0;
		color: var(--ba-gris);
		font-size: 14px;
		line-height: 1.3;
	}
	html body .ba__resume strong { color: var(--ba-vert-fonce); }
	html body .ba__resume .ba__effacer { font-size: 14px; }
}

html body .ba-panneau { position: fixed; inset: 0; z-index: 100000; font-family: "Afacad", sans-serif; }
html body .ba-panneau[hidden] { display: none; }
html.ba-ouvert,
html.ba-ouvert body { overflow: hidden; }
html body .ba-panneau__voile { position: absolute; inset: 0; background: rgba(10, 30, 8, 0.45); }
html body .ba-panneau__boite {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	max-height: 86vh;
	max-height: 86dvh;
	border-radius: 20px 20px 0 0;
	background: #fff;
	color: var(--ba-vert-fonce, #0e4806);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
	animation: ba-monte 0.22s ease-out;
}
@keyframes ba-monte { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ba-panneau__boite { animation: none; } }
@media (min-width: 768px) {
	html body .ba-panneau__boite { right: auto; left: 50%; bottom: 50%; width: 440px; border-radius: 20px; transform: translate(-50%, 50%); animation: none; }
}
html body .ba-panneau__poignee { width: 40px; height: 4px; margin: 10px auto 0; border-radius: 4px; background: #d6e2d0; }
html body .ba-panneau__tete { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #edf2ea; }
html body .ba-panneau__tete h3 { margin: 0; color: #0e4806; font: 700 20px/1.2 "Afacad", sans-serif; }
html body .ba-panneau__x { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; background: none; color: #0e4806; cursor: pointer; }
html body .ba-panneau__x:hover,
html body .ba-panneau__x:focus { background: #f1f6ee; color: #0e4806; border-radius: 50%; }
html body .ba-panneau__corps { overflow: auto; padding: 4px 20px 12px; overscroll-behavior: contain; }
html body .ba-panneau fieldset { margin: 0; padding: 0; border: 0; }
html body .ba-panneau legend { margin: 16px 0 4px; padding: 0; color: #0e4806; font: 700 16px/1 "Afacad", sans-serif; }
html body .ba-ligne {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 46px;
	margin: 0;
	border-bottom: 1px solid #f0f4ee;
	color: #0e4806;
	font: 500 16px/1.2 "Afacad", sans-serif;
	cursor: pointer;
}
html body .ba-ligne:last-child { border-bottom: 0; }
html body .ba-ligne span { flex: 1; }
html body .ba-ligne b { color: #7a8a74; font-size: 15px; font-weight: 500; }
html body .ba-ligne input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: #108501; cursor: pointer; }
html body .ba-panneau__pied { display: flex; align-items: center; gap: 12px; padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #edf2ea; }
html body .ba-panneau__effacer { padding: 0 6px; color: #0e4806; font-size: 16px; font-weight: 600; }
html body .ba-panneau__ok {
	flex: 1;
	height: 50px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: #108501;
	color: #fff;
	font: 700 17px/1 "Afacad", sans-serif;
	cursor: pointer;
}
html body .ba-panneau__ok:hover,
html body .ba-panneau__ok:focus { background: #0e4806; color: #fff; }

/* Réglages du thème sur les boutons (bordure rose, coins carrés) neutralisés dans la barre et le panneau. */
html body .bocolis-affiner button,
html body .ba-panneau button {
	min-height: 0;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	line-height: 1;
}
html body .bocolis-affiner .ba-puce i { display: inline-block; }
html body .bocolis-affiner .ba-puce:focus,
html body .bocolis-affiner .ba-puce:active { color: var(--ba-vert-fonce); background: #fff; }
html body .bocolis-affiner .ba-puce[aria-pressed="true"]:focus,
html body .bocolis-affiner .ba-puce[aria-pressed="true"]:hover { background: #e9f5e3; }
html body .bocolis-affiner .ba-puce:disabled { opacity: 0.45; cursor: default; background: #fff; border-color: var(--ba-bord); }
/* Le thème affiche tous les boutons (display: inline-block), même masqués : « Effacer » restait visible sans filtre. */
html body .bocolis-affiner [hidden],
html body .ba-panneau [hidden] { display: none !important; }
