/*
 * Panier et tunnel de commande (blocs WooCommerce) aux couleurs de Mouv'Spa.
 * Chargée uniquement sur les pages Panier et Commande (functions.php). Mode « tâche à accomplir » : la marque vit dans
 * les détails (Dosis, pilules, orange et bleu de la charte), la lisibilité et les repères natifs passent avant l'effet.
 */

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
	--mv-ink: #2A3448;
	--mv-muted: #556079;
	--mv-orange: #F37D45;
	--mv-red: #F03B36;
	--mv-blue: #48B6E6;
	--mv-blue-deep: #2972C3;
	--mv-line: #D3E0F1;
	--mv-calm: #F3F8FE;
	--mv-warm: #FFF5EF;
	--mv-radius-field: 14px;
	--mv-radius-card: 22px;
	--mv-shadow: 0 18px 44px -26px rgba(42, 52, 72, .45);
	--mv-focus: 0 0 0 4px rgba(72, 182, 230, .25);
	color: var(--mv-ink);
	font-family: 'Roboto', sans-serif;
	caret-color: var(--mv-orange);
}

.wp-block-woocommerce-cart ::selection,
.wp-block-woocommerce-checkout ::selection {
	background: rgba(243, 125, 69, .22);
	color: var(--mv-ink);
}

/* ---------- Titres d'étapes et de blocs */

.wp-block-woocommerce-checkout .wc-block-components-checkout-step__title,
.wp-block-woocommerce-checkout .wc-block-components-title.wc-block-components-title,
.wp-block-woocommerce-cart .wc-block-cart__totals-title.wc-block-cart__totals-title,
.wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-text {
	font-family: 'Dosis', sans-serif;
	font-weight: 700;
	font-size: 1.45rem;
	line-height: 1.2;
	letter-spacing: -.005em;
	color: var(--mv-ink);
	text-transform: none;
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-step {
	margin-bottom: 2.25rem;
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-step__heading {
	margin-bottom: .9rem;
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-step__description {
	color: var(--mv-muted);
}

/* ---------- Champs (sélecteurs renforcés : WooCommerce cible déjà `.wc-block-components-form … input[type=…]`) */

.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input:not([type=checkbox]):not([type=radio]),
.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-textarea,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-blocks-components-select .wc-blocks-components-select__select,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,
.wp-block-woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input input:not([type=checkbox]) {
	border: 1.5px solid var(--mv-line);
	border-radius: var(--mv-radius-field);
	background-color: #fff;
	color: var(--mv-ink);
	transition: border-color .2s ease, box-shadow .2s ease;
}

.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input:not([type=checkbox]):not([type=radio]):hover,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-blocks-components-select .wc-blocks-components-select__select:hover,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-textarea:hover {
	border-color: #B6CBE6;
}

.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input:not([type=checkbox]):not([type=radio]):focus,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-textarea:focus,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,
.wp-block-woocommerce-cart .wc-block-components-totals-coupon .wc-block-components-text-input input:not([type=checkbox]):focus {
	border-color: var(--mv-blue);
	box-shadow: var(--mv-focus);
	outline: none;
}

.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-text-input label,
.wp-block-woocommerce-checkout .wc-block-components-form .wc-blocks-components-select .wc-blocks-components-select__label {
	color: var(--mv-muted);
}

.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-text-input.has-error input:not([type=checkbox]),
.wp-block-woocommerce-checkout .wc-block-components-form .has-error .wc-blocks-components-select__select {
	border-color: var(--mv-red);
}

.wp-block-woocommerce-checkout .wc-block-components-validation-error {
	color: #C42A25;
}

/* ---------- Cases à cocher */

.wp-block-woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] {
	border: 1.5px solid #9FB4D1;
	border-radius: 6px;
}

.wp-block-woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked {
	background: var(--mv-orange);
	border-color: var(--mv-orange);
}

.wp-block-woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: #fff;
}

.wp-block-woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus-visible {
	box-shadow: var(--mv-focus);
	outline: none;
}

/* ---------- Options de livraison et de paiement : cartes, l'option choisie passe à l'orange */

/* Séparateurs de WooCommerce (barres de 1 px dessinées par ::after) : remplacés par les cartes ci-dessous. */
.wp-block-woocommerce-checkout .wc-block-components-radio-control--highlight-checked::after,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option::after,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__option::after,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option::after {
	content: none;
	display: none;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control--highlight-checked {
	border: 0;
	box-shadow: none;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
	border: 0;
	box-shadow: none;
	background: transparent;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control--highlight-checked {
	display: flex;
	flex-direction: column;
	gap: .65rem;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control--highlight-checked > .wc-block-components-radio-control__option,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option {
	border: 1.5px solid var(--mv-line);
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
	transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control--highlight-checked > .wc-block-components-radio-control__option:hover,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option:hover {
	border-color: #B6CBE6;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control--highlight-checked > .wc-block-components-radio-control__option-checked,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option:has(> .wc-block-components-radio-control__option-checked) {
	border-color: var(--mv-orange);
	background: var(--mv-warm);
	box-shadow: 0 10px 26px -20px rgba(243, 125, 69, .9);
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__input {
	border: 1.5px solid #9FB4D1;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__input:checked {
	border-color: var(--mv-orange);
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__input:checked::before {
	background: var(--mv-orange);
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__input:focus-visible {
	box-shadow: var(--mv-focus);
	outline: none;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__label {
	font-weight: 500;
	color: var(--mv-ink);
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__secondary-label,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__description {
	color: var(--mv-muted);
	font-variant-numeric: tabular-nums;
}

.wp-block-woocommerce-checkout .wc-block-checkout__shipping-option--free {
	color: #1F7A4F;
	font-weight: 600;
}

/* ---------- Boutons principaux : pilule orange → rouge, comme « Nous contacter » */

.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button,
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-cart .wc-block-components-button.contained {
	min-height: 3.5rem;
	border: 0;
	border-radius: 50rem;
	background-image: linear-gradient(to right, var(--mv-orange), var(--mv-red) 75%);
	background-color: var(--mv-orange);
	background-size: 100%;
	color: #fff;
	font-family: 'Dosis', sans-serif;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: .01em;
	box-shadow: 0 14px 28px -16px rgba(240, 59, 54, .75);
	transition: background-size .5s var(--easing, ease), box-shadow .25s ease, transform .25s ease;
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
.wp-block-woocommerce-cart .wc-block-cart__submit-button:hover {
	background-size: 450%;
	color: #fff;
	box-shadow: 0 18px 32px -16px rgba(240, 59, 54, .85);
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button:focus-visible,
.wp-block-woocommerce-cart .wc-block-cart__submit-button:focus-visible {
	outline: 3px solid var(--mv-blue);
	outline-offset: 3px;
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button:disabled,
.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button[aria-disabled=true] {
	opacity: .55;
	box-shadow: none;
	cursor: not-allowed;
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-return-to-cart-button {
	color: var(--mv-blue-deep);
	font-weight: 500;
}

/* ---------- Liens */

.wp-block-woocommerce-checkout .wc-block-checkout__terms a,
.wp-block-woocommerce-checkout .wc-block-components-checkout-step a,
.wp-block-woocommerce-cart .wc-block-cart a:not(.wc-block-components-button):not(.wc-block-components-product-name) {
	color: var(--mv-orange);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* ---------- Récapitulatif (colonne de droite) */

.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block,
.wp-block-woocommerce-cart .wp-block-woocommerce-cart-totals-block {
	border: 1px solid #E3ECF7;
	border-radius: var(--mv-radius-card);
	background: #fff;
	box-shadow: var(--mv-shadow);
	overflow: hidden;
}

.wp-block-woocommerce-cart .wp-block-woocommerce-cart-totals-block {
	padding: 1.25rem 1.5rem 1.5rem;
}

.wp-block-woocommerce-cart .wc-block-cart__totals-title {
	margin: .25rem 0 .75rem;
	padding: 0;
}

.wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__title {
	padding-top: .35rem;
}

.wp-block-woocommerce-checkout .wc-block-components-order-summary-item__image img,
.wp-block-woocommerce-cart .wc-block-cart-item__image img {
	border-radius: 12px;
}

.wp-block-woocommerce-checkout .wc-block-components-order-summary-item__quantity {
	background: var(--mv-ink);
	border-color: #fff;
	color: #fff;
}

.wp-block-woocommerce-checkout .wc-block-components-totals-item,
.wp-block-woocommerce-cart .wc-block-components-totals-item {
	color: var(--mv-ink);
}

.wp-block-woocommerce-checkout .wc-block-components-totals-item__value,
.wp-block-woocommerce-cart .wc-block-components-totals-item__value,
.wp-block-woocommerce-cart .wc-block-cart-item__total,
.wp-block-woocommerce-cart .wc-block-cart-item__prices {
	font-variant-numeric: tabular-nums;
}

.wp-block-woocommerce-checkout .wc-block-components-totals-item__description,
.wp-block-woocommerce-cart .wc-block-components-totals-item__description {
	color: var(--mv-muted);
}

.wp-block-woocommerce-checkout .wc-block-components-totals-footer-item,
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item {
	align-items: baseline;
}

.wp-block-woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-family: 'Dosis', sans-serif;
	font-weight: 700;
	font-size: 1.3rem;
}

.wp-block-woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: 'Dosis', sans-serif;
	font-weight: 700;
	font-size: 1.75rem;
	color: var(--mv-orange);
}

.wp-block-woocommerce-checkout .wc-block-components-totals-wrapper,
.wp-block-woocommerce-cart .wc-block-components-totals-wrapper {
	border-color: #E3ECF7;
}

/* ---------- Panier : lignes */

.wp-block-woocommerce-cart .wc-block-cart-items__header {
	color: var(--mv-muted);
	font-size: .78rem;
	letter-spacing: .08em;
	border-bottom-color: #E3ECF7;
}

.wp-block-woocommerce-cart .wc-block-cart-items__row {
	border-color: #E3ECF7;
}

.wp-block-woocommerce-cart .wc-block-components-product-name {
	font-family: 'Dosis', sans-serif;
	font-weight: 700;
	font-size: 1.2rem;
	line-height: 1.25;
	color: var(--mv-ink);
	text-decoration: none;
}

.wp-block-woocommerce-cart .wc-block-components-product-name:hover {
	color: var(--mv-orange);
}

.wp-block-woocommerce-cart .wc-block-components-product-details,
.wp-block-woocommerce-checkout .wc-block-components-product-details {
	color: var(--mv-muted);
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector {
	border: 1.5px solid var(--mv-line);
	border-radius: 50rem;
	overflow: hidden;
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector::after {
	border: 0;
}

.wp-block-woocommerce-cart .wc-block-components-quantity-selector__button {
	color: var(--mv-ink);
}

.wp-block-woocommerce-cart .wc-block-cart-item__remove-link {
	color: var(--mv-muted);
}

.wp-block-woocommerce-cart .wc-block-cart-item__remove-link:hover {
	color: var(--mv-red);
}

/* ---------- Avis et erreurs */

.wp-block-woocommerce-cart .wc-block-components-notice-banner,
.wp-block-woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: var(--mv-radius-field);
}

/* ---------- Petits écrans */

@media (max-width: 781px) {
	.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button,
	.wp-block-woocommerce-cart .wc-block-cart__submit-button {
		width: 100%;
	}

	.wp-block-woocommerce-cart .wp-block-woocommerce-cart-totals-block {
		padding: 1rem 1.1rem 1.25rem;
	}
}
