.cqq-calculator {
	--cqq-accent: #8da051;
	--cqq-accent-dark: #7a9233;
	--cqq-accent-soft: #fafcf5;
	--cqq-accent-panel: #f4f7eb;
	--cqq-accent-border: #c8d6a0;
	--cqq-input-bg: #ececec;
	--cqq-border: #e4e4e4;
	--cqq-text: #333;
	--cqq-muted: #777;

	display: block;
	clear: both;
	margin: 0;
	max-width: 100%;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.45;
}

.cqq-calculator__intro {
	margin: 0 0 1.15em;
	padding: 0;
	font-size: 0.94em;
	line-height: 1.5;
	color: var( --cqq-text );
}

.cqq-calculator__step {
	margin: 0;
	padding: 0;
}

.cqq-calculator__step-title,
.cqq-quantity-step__title,
.cqq-combined-total__step-title {
	display: block;
	margin: 0 0 0.55em;
	font-size: 0.76em;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var( --cqq-accent );
}

.cqq-quantity-step__title {
	padding: 0;
}

.cqq-calculator__main {
	display: flex;
	align-items: center;
	gap: 1.1em;
	flex-wrap: nowrap;
	margin-top: 0.1em;
}

.cqq-calculator__summary {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.25em;
	min-width: 0;
}

.cqq-calculator__meta {
	margin: 0;
	font-size: 0.94em;
	color: var( --cqq-text );
	line-height: 1.35;
}

.cqq-calculator__unit::after {
	content: '\00a0';
}

.cqq-calculator__unit-total-line {
	margin: 0.2em 0 0;
	padding: 0;
	font-size: 0.94em;
	color: var( --cqq-text );
	line-height: 1.35;
}

.cqq-calculator__unit-total-label::after {
	content: '\00a0';
}

.cqq-calculator__unit-total-value {
	font-weight: 700;
}

.cqq-calculator:not( .cqq-calculator--ready ) .cqq-calculator__unit-total-value {
	font-weight: 600;
	color: #bbb;
}

.cqq-calculator__formula {
	margin: 0;
	font-size: 0.85em;
	color: var( --cqq-muted );
	line-height: 1.35;
}

.cqq-calculator__formula:empty {
	display: none;
}

.cqq-calculator__hint {
	margin: 0.4em 0 0;
	padding: 0.45em 0 0;
	font-size: 0.84em;
	font-style: italic;
	color: var( --cqq-muted );
	line-height: 1.4;
	border-top: 1px dashed #e8e8e8;
}

.cqq-calculator__hint[hidden] {
	display: none;
}

.cqq-calculator--ready .cqq-calculator__hint {
	display: none;
}

/* ── Étapes 2 + 3 empilées verticalement ── */
.cqq-checkout-steps {
	display: flex;
	flex-direction: column;
	gap: 1.25em;
	margin: 1.4em 0 0.75em;
	max-width: 320px;
}

.cqq-checkout-steps__step--qty {
	display: block;
}

.cqq-checkout-steps__qty-field {
	margin-top: 0.55em;
}

.cqq-checkout-steps__step--total {
	display: block;
}

.cqq-quantity-step__hint {
	margin: 0;
	font-size: 0.84em;
	line-height: 1.4;
	color: var( --cqq-muted );
	font-weight: 400;
}

/* Quantité WooCommerce */
form.cart .cqq-checkout-steps .quantity,
.cqq-checkout-steps .quantity {
	display: inline-flex !important;
	align-items: center !important;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

form.cart .cqq-checkout-steps .quantity input.qty,
form.cart .cqq-checkout-steps .quantity input[type='number'],
.cqq-checkout-steps .quantity input.qty {
	display: block !important;
	width: 42px !important;
	min-width: 42px !important;
	max-width: 42px !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var( --cqq-input-bg ) !important;
	box-shadow: none !important;
	text-align: center !important;
	font-size: 1.05rem !important;
	font-weight: 400 !important;
	color: #888 !important;
	box-sizing: border-box !important;
	-moz-appearance: textfield;
	appearance: textfield;
}

form.cart .cqq-checkout-steps .quantity input.qty::-webkit-outer-spin-button,
form.cart .cqq-checkout-steps .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

form.cart .cqq-checkout-steps .quantity .minus,
form.cart .cqq-checkout-steps .quantity .plus {
	display: none !important;
}

/* Bloc total */
.cqq-combined-total {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 0;
	padding: 0.85em 1em 0.8em;
	border: 1px solid var( --cqq-accent-border );
	border-radius: 4px;
	background: var( --cqq-accent-panel );
	box-sizing: border-box;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.cqq-combined-total--ready {
	border-color: var( --cqq-accent );
	background: var( --cqq-accent-soft );
}

.cqq-combined-total__body {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	flex: 1 1 auto;
	margin-top: auto;
	padding-top: 0.35em;
}

.cqq-combined-total__formula {
	margin: 0 0 0.5em;
	font-size: 0.82em;
	color: var( --cqq-muted );
	line-height: 1.45;
}

.cqq-combined-total__formula:empty {
	display: none;
	margin: 0;
}

.cqq-combined-total__line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75em;
	margin: 0;
	font-size: 0.94em;
	color: var( --cqq-text );
}

.cqq-combined-total__value {
	font-size: 1.5rem;
	font-weight: 700;
	color: var( --cqq-text );
	white-space: nowrap;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.cqq-combined-total:not( .cqq-combined-total--ready ) .cqq-combined-total__value {
	font-size: 1.15rem;
	color: #bbb;
}

/* Bouton ajouter au panier — espacement */
form.cart:has( .cqq-calculator ) .single_add_to_cart_button,
form.cart:has( .cqq-checkout-steps ) .single_add_to_cart_button {
	margin-top: 0.35em;
}

/* Stepper longueur */
.cqq-calculator .cqq-stepper {
	display: inline-flex !important;
	align-items: center;
	gap: 0 !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

.cqq-calculator .cqq-stepper__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 30px !important;
	min-width: 30px !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid #d8d8d8 !important;
	background: #fff !important;
	color: #c4c4c4 !important;
	font-size: 1.15rem;
	font-weight: 300;
	line-height: 1 !important;
	cursor: pointer;
	box-sizing: border-box;
}

.cqq-calculator .cqq-stepper__btn:hover:not( :disabled ) {
	color: #888 !important;
	border-color: #ccc !important;
}

.cqq-calculator .cqq-stepper__btn:focus-visible {
	box-shadow: 0 0 0 2px rgba( 141, 160, 81, 0.35 );
	outline: none;
}

.cqq-calculator input.cqq-measurement-input.cqq-stepper__input,
.cqq-calculator .cqq-stepper__input {
	width: 42px !important;
	min-width: 42px !important;
	max-width: 42px !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: var( --cqq-input-bg ) !important;
	text-align: center;
	font-size: 1.05rem;
	font-weight: 400;
	color: #888;
	box-sizing: border-box;
}

.cqq-stepper__input::-webkit-outer-spin-button,
.cqq-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.cqq-calculator-variable-wrap {
	display: block;
	clear: both;
}

.cqq-validation-notice {
	margin: 0 0 1em;
	clear: both;
}

.cqq-validation-notice .woocommerce-error {
	margin: 0;
}

.cqq-cart-measurement {
	margin-top: 0.75em;
}

.cqq-cart-measurement--inline {
	display: inline-block;
}

.cqq-cart-measurement--inline .cqq-cart-measurement-input {
	width: 90px;
	min-height: 36px;
	padding: 0.35em 0.5em;
	border: 1px solid #cfcfcf;
	border-radius: 2px;
	background: #fff;
	text-align: center;
}

.cqq-cart-measurement-input-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.cqq-cart-measurement-input {
	width: 110px;
	text-align: right;
}

.cqq-cart-measurement-unit {
	font-weight: 600;
}

.cqq-cart-measurement--changed .cqq-cart-measurement-input {
	border-color: #dba617;
	box-shadow: 0 0 0 1px #dba617;
}

.et-db #et-boc .et-l form.cart .cqq-checkout-steps .quantity input.qty,
body.woocommerce div.product form.cart .cqq-checkout-steps .quantity input.qty,
.et-db #et-boc .et-l .cqq-calculator input.cqq-measurement-input,
body.woocommerce div.product .cqq-calculator input.cqq-measurement-input {
	width: 42px !important;
	min-width: 42px !important;
	max-width: 42px !important;
	height: 42px !important;
	border: 0 !important;
	background: #ececec !important;
}

@media ( max-width: 480px ) {
	.cqq-checkout-steps {
		max-width: none;
	}

	.cqq-calculator__main {
		flex-wrap: wrap;
		gap: 0.85em;
	}
}
