.hehocom-echantillons-wrapper {
	margin-top: 25px;
	padding: 25px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.03);
}

.hehocom-echantillons-wrapper h3 {
	margin: 0 0 15px;
	font-size: 20px;
}

.hehocom-echantillons-notice {
	margin-bottom: 14px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #eef4ff;
	color: #315fba;
	font-weight: 600;
	font-size: 14px;
}

.hehocom-echantillons-notice.is-error {
	background: #fff0f0;
	color: #b00020;
}

.hehocom-echantillons-notice.is-success {
	background: #effaf2;
	color: #087f23;
}

.hehocom-echantillons-progress {
	width: 100%;
	height: 8px;
	margin-bottom: 15px;
	background: #ededed;
	border-radius: 999px;
	overflow: hidden;
}

.hehocom-echantillons-progress-bar {
	width: 0%;
	height: 100%;
	background: #7f9bdd;
	border-radius: 999px;
	transition: width 0.2s ease;
}

.hehocom-echantillons-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 15px;
}

.hehocom-echantillons-counter {
	margin: 0;
	font-weight: 700;
	line-height: 1.25;
}

#hehocom-echantillons-search {
	width: 100%;
	max-width: 280px;
	min-height: 38px;
	padding: 8px 12px;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	background: #fff;
}

.hehocom-echantillons-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 20px;
	max-height: 420px;
	overflow-y: auto;
	padding-right: 10px;
}

.hehocom-echantillon-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
	padding: 6px 8px;
	border-radius: 6px;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.hehocom-echantillon-item:hover {
	background: #f6f8ff;
}

.hehocom-echantillon-item input {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.hehocom-echantillon-item.is-out-of-stock,
.hehocom-echantillon-item.is-disabled-by-limit {
	opacity: 0.45;
	cursor: not-allowed;
}

.hehocom-echantillon-item small {
	color: #b00020;
}

.hehocom-echantillon-item.is-hidden {
	display: none;
}

.single_add_to_cart_button.hehocom-samples-disabled {
	opacity: 0.55 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

.hehocom-echantillons-cart-compact,
.hehocom-echantillons-cart-summary {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.45;
	color: inherit;
}

.hehocom-echantillons-cart-summary strong {
	display: block;
	margin-bottom: 2px;
	font-weight: 700;
}

.hehocom-echantillons-cart-summary span {
	display: block;
	color: #777;
}

.wc-block-components-product-metadata .hehocom-echantillons-cart-compact,
.wc-block-cart-items .hehocom-echantillons-cart-compact,
.wc-block-components-order-summary-item .hehocom-echantillons-cart-compact {
	font-size: 12px;
	line-height: 1.35;
}

@media (max-width: 768px) {
	.hehocom-echantillons-top {
		display: block;
	}

	#hehocom-echantillons-search {
		max-width: none;
		margin-top: 10px;
	}

	.hehocom-echantillons-list {
		grid-template-columns: 1fr;
	}
}


.hehocom-echantillons-cart-details {
	margin-top: 7px;
	font-size: 13px;
	line-height: 1.45;
	color: inherit;
}

.hehocom-echantillons-cart-details summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	list-style: none;
	padding: 7px 9px;
	border-radius: 8px;
	background: rgba(127, 155, 221, 0.08);
}

.hehocom-echantillons-cart-details summary::-webkit-details-marker {
	display: none;
}

.hehocom-echantillons-cart-summary-title {
	display: block;
	font-weight: 600;
	color: inherit;
}

.hehocom-echantillons-cart-summary-action {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 700;
	text-decoration: underline;
	white-space: nowrap;
	color: inherit;
	opacity: 0.75;
}

.hehocom-echantillons-cart-details[open] .hehocom-echantillons-cart-summary-action {
	font-size: 0;
}

.hehocom-echantillons-cart-details[open] .hehocom-echantillons-cart-summary-action::after {
	content: "Masquer";
	font-size: 12px;
}

.hehocom-echantillons-cart-details-inner {
	max-height: 180px;
	overflow-y: auto;
	margin-top: 8px;
	padding: 8px 10px;
	border-left: 2px solid rgba(127, 155, 221, 0.45);
	background: rgba(0, 0, 0, 0.02);
	border-radius: 6px;
}

.hehocom-echantillons-cart-details-inner ul {
	margin: 0 0 0 17px;
	padding: 0;
	columns: 2;
	column-gap: 25px;
}

.hehocom-echantillons-cart-details-inner li {
	break-inside: avoid;
	margin: 0 0 3px;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-details-inner ul,
.wc-block-components-order-summary-item .hehocom-echantillons-cart-details-inner ul {
	columns: 1;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-details,
.wc-block-components-order-summary-item .hehocom-echantillons-cart-details {
	font-size: 12px;
}

@media (max-width: 768px) {
	.hehocom-echantillons-cart-details summary {
		display: block;
	}

	.hehocom-echantillons-cart-summary-action {
		display: block;
		margin-top: 4px;
	}

	.hehocom-echantillons-cart-details-inner ul {
		columns: 1;
	}
}


.hehocom-echantillons-actions {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 15px;
}

.hehocom-echantillons-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 8px 14px;
	border: 1px solid #d7d7d7;
	border-radius: 7px;
	background: #fff;
	color: #222;
	font-weight: 700;
	cursor: pointer;
}

.hehocom-echantillons-reset:hover {
	background: #f7f7f7;
}

.hehocom-echantillons-current-details {
	flex: 1;
	font-size: 13px;
}

.hehocom-echantillons-current-details summary {
	min-height: 38px;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	font-weight: 700;
	text-decoration: underline;
}

.hehocom-echantillons-current-list {
	max-height: 220px;
	overflow-y: auto;
	padding: 10px 12px;
	border-radius: 8px;
	background: #f8f8f8;
}

.hehocom-echantillons-current-list ul {
	margin: 0 0 0 18px;
	padding: 0;
	columns: 2;
	column-gap: 25px;
}

.hehocom-echantillons-current-list li {
	break-inside: avoid;
	margin-bottom: 3px;
}

.hehocom-echantillons-cart-details-inner {
	max-height: min(55vh, 520px);
}

.hehocom-echantillons-cart-details[open] .hehocom-echantillons-cart-details-inner {
	max-height: min(65vh, 680px);
}

.hehocom-echantillons-cart-details[data-total="10"] .hehocom-echantillons-cart-details-inner,
.hehocom-echantillons-cart-details[data-total="20"] .hehocom-echantillons-cart-details-inner {
	max-height: none;
	overflow-y: visible;
}

@media (max-width: 768px) {
	.hehocom-echantillons-actions {
		display: block;
	}

	.hehocom-echantillons-current-details {
		margin-top: 8px;
	}

	.hehocom-echantillons-current-list ul {
		columns: 1;
	}
}


/* v2.0.3 - UX sélection : le détail passe sous le bouton reset */
.hehocom-echantillons-actions {
	display: block;
	margin: 0 0 18px;
}

.hehocom-echantillons-reset {
	margin-bottom: 10px;
}

.hehocom-echantillons-current-details {
	display: block;
	width: 100%;
	margin-top: 0;
}

.hehocom-echantillons-current-details summary {
	display: inline-flex;
	min-height: auto;
	margin-bottom: 8px;
}

/* v2.0.3 - détail panier / mini-cart : liste réellement lisible et scrollable */
.hehocom-echantillons-cart-details {
	width: 100%;
	max-width: 100%;
}

.hehocom-echantillons-cart-details summary {
	align-items: center;
}

.hehocom-echantillons-cart-details-inner {
	width: 100%;
	max-height: 360px;
	overflow-y: auto;
	overflow-x: hidden;
	box-sizing: border-box;
	scrollbar-width: thin;
}

.hehocom-echantillons-cart-details[open] .hehocom-echantillons-cart-details-inner {
	max-height: min(70vh, 620px);
}

.hehocom-echantillons-cart-help {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	opacity: 0.7;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-details-inner,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-details-inner {
	max-height: 50vh !important;
	overflow-y: auto !important;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-details-inner ul,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-details-inner ul {
	columns: 1 !important;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-summary-title,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-summary-title {
	display: block;
	max-width: 100%;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-details summary,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-details summary {
	display: block;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-summary-action,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-summary-action {
	display: block;
	margin-top: 4px;
}


/* v2.0.3 - panier/checkout : résumé compact + pop-up, jamais la liste complète ouverte dans la ligne produit */
.hehocom-echantillons-cart-modal-summary {
	display: block;
	margin-top: 7px;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(127, 155, 221, 0.08);
	font-size: 13px;
	line-height: 1.4;
}

.hehocom-echantillons-cart-modal-summary .hehocom-echantillons-cart-summary-title {
	display: block;
	font-weight: 600;
	color: inherit;
}

.hehocom-echantillons-open-modal {
	display: inline-flex;
	margin-top: 5px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 12px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.8;
}

.hehocom-echantillons-open-modal:hover {
	opacity: 1;
}

.hehocom-echantillons-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.45);
}

.hehocom-echantillons-modal.is-open {
	display: flex;
}

.hehocom-echantillons-modal-box {
	width: min(760px, 100%);
	max-height: min(82vh, 760px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.hehocom-echantillons-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 18px 22px;
	border-bottom: 1px solid #ededed;
}

.hehocom-echantillons-modal-title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
}

.hehocom-echantillons-modal-close {
	width: 36px;
	height: 36px;
	border: 1px solid #ddd;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
}

.hehocom-echantillons-modal-body {
	padding: 18px 22px 22px;
	overflow-y: auto;
}

.hehocom-echantillons-modal-help {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	opacity: 0.7;
}

.hehocom-echantillons-modal-list {
	margin: 0;
	padding: 0 0 0 18px;
	columns: 2;
	column-gap: 35px;
}

.hehocom-echantillons-modal-list li {
	break-inside: avoid;
	margin: 0 0 5px;
	font-size: 14px;
	line-height: 1.35;
}

body.hehocom-echantillons-modal-open {
	overflow: hidden;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-modal-summary,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-modal-summary,
.wc-block-components-order-summary-item .hehocom-echantillons-cart-modal-summary {
	font-size: 12px;
}

@media (max-width: 768px) {
	.hehocom-echantillons-modal {
		padding: 12px;
	}

	.hehocom-echantillons-modal-box {
		max-height: 88vh;
	}

	.hehocom-echantillons-modal-list {
		columns: 1;
	}
}


/* v2.0.3 - données cachées utilisées pour ouvrir la pop-up depuis les blocs WooCommerce */
.hehocom-echantillons-modal-data {
	display: none !important;
}

.hehocom-echantillons-open-modal.is-js-created {
	display: inline-flex;
	align-items: center;
	width: fit-content;
}


/* v2.0.3 - bouton visible compatible WooCommerce Blocks */
.hehocom-echantillons-cart-modal-summary {
	display: block;
}

.hehocom-echantillons-open-modal {
	display: inline-flex !important;
	align-items: center;
	width: fit-content;
	margin-top: 5px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 12px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.85;
}

.hehocom-echantillons-open-modal:hover,
.hehocom-echantillons-open-modal:focus {
	opacity: 1;
	outline: none;
}

.hehocom-echantillons-modal-data,
.hehocom-echantillons-modal-data-list,
.hehocom-echantillons-modal-data-item,
.hehocom-echantillons-modal-data-title {
	display: none !important;
}


/* v2.0.3 - rendu spécifique mini-cart / drawer */
.wc-block-mini-cart__drawer .hehocom-echantillons-cart-modal-summary,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-modal-summary {
	margin-top: 6px;
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(127, 155, 221, 0.10);
	font-size: 12px;
	line-height: 1.35;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-cart-summary-title,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-cart-summary-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 700;
	color: #777;
}

.wc-block-mini-cart__drawer .hehocom-echantillons-open-modal,
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-open-modal {
	margin-top: 4px;
	font-size: 11px;
	font-weight: 800;
	color: #222;
	opacity: 0.85;
}

.wc-block-mini-cart__drawer .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean > .wc-block-components-product-details > span[aria-hidden="true"],
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean > .wc-block-components-product-details > span[aria-hidden="true"] {
	display: none !important;
}

.wc-block-mini-cart__drawer .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__échantillons .wc-block-components-product-details__name,
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__échantillons .wc-block-components-product-details__name {
	display: none !important;
}

.wc-block-mini-cart__drawer .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__échantillons,
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__échantillons {
	display: block !important;
	margin: 0;
}

.wc-block-mini-cart__drawer .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__échantillons .wc-block-components-product-details__value,
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__échantillons .wc-block-components-product-details__value {
	display: block;
}

.wc-block-mini-cart__drawer .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__contenance,
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__contenance {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #999;
}

.wc-block-mini-cart__drawer .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__contenance .wc-block-components-product-details__name,
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata.hehocom-echantillons-metadata-clean .wc-block-components-product-details__contenance .wc-block-components-product-details__name {
	display: none;
}


/* v2.0.3 - mini-cart WooCommerce Blocks : suppression robuste des séparateurs "/" */
.wc-block-mini-cart__drawer .hehocom-echantillons-metadata-clean span[aria-hidden="true"],
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-metadata-clean span[aria-hidden="true"],
.wc-block-mini-cart__drawer .hehocom-echantillons-product-details-clean span[aria-hidden="true"],
.wp-block-woocommerce-mini-cart-contents .hehocom-echantillons-product-details-clean span[aria-hidden="true"] {
	display: none !important;
}

/* Sécurité moderne : si WooCommerce garde les séparateurs dans les lignes contenant notre résumé */
.wc-block-mini-cart__drawer .wc-block-components-product-metadata:has(.hehocom-echantillons-cart-modal-summary) span[aria-hidden="true"],
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata:has(.hehocom-echantillons-cart-modal-summary) span[aria-hidden="true"] {
	display: none !important;
}
