/**
 * woocommerce.css — habillage esport/navy du tunnel de paiement.
 *
 * WooCommerce n'est présent QUE comme passerelle de paiement pour Amelia (pas de
 * boutique). On habille le CHECKOUT (Store API / block checkout) et l'espace compte.
 * Chargé via is_checkout() / is_account_page() (handle cc-woocommerce).
 *
 * Beaucoup de !important : on surcharge les styles core de WooCommerce (souvent
 * inline ou très spécifiques, dont le focus gris #2b2b2f hors palette).
 */

/* Cadre général : texte clair sur le fond navy du thème. */
.woocommerce-checkout,
.woocommerce-account,
.wc-block-checkout {
	color: var( --wp--preset--color--secondary );
}

.wc-block-components-title,
.wc-block-components-checkout-step__title,
.woocommerce-account h2,
.woocommerce-checkout h3 {
	color: var( --wp--preset--color--main );
}

/* -------------------------------------------------------------------------
 * Champs de formulaire — block checkout + sélecteurs classiques (secours)
 * ------------------------------------------------------------------------- */
.wc-block-components-text-input input,
.wc-block-components-combobox input,
.wc-block-components-select select,
.wc-block-components-address-form input,
.wc-block-checkout input[type="text"],
.wc-block-checkout input[type="email"],
.wc-block-checkout input[type="tel"],
.wc-block-checkout input[type="number"],
.wc-block-checkout input[type="password"],
.wc-block-checkout textarea,
.wc-block-checkout select,
.woocommerce-checkout .input-text,
.woocommerce-account .input-text,
.woocommerce-checkout select,
.woocommerce-account select,
.woocommerce-checkout textarea {
	background-color: var( --wp--preset--color--surface-2 ) !important;
	border: 1px solid var( --wp--preset--color--border-dark ) !important;
	border-radius: 12px !important;
	color: var( --wp--preset--color--main ) !important;
}

/* Focus : accent du thème (remplace le gris #2b2b2f de WooCommerce). */
.wc-block-components-text-input input:focus,
.wc-block-components-combobox input:focus,
.wc-block-components-select select:focus,
.wc-block-checkout input:focus,
.wc-block-checkout textarea:focus,
.wc-block-checkout select:focus,
.woocommerce-checkout .input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
	outline: none !important;
	border-color: var( --wp--preset--color--primary ) !important;
	box-shadow: 0 0 0 1px var( --wp--preset--color--primary ) !important;
}

/* Placeholder + libellés flottants lisibles. */
.wc-block-checkout input::placeholder,
.woocommerce-checkout input::placeholder {
	color: var( --wp--preset--color--faint ) !important;
}

.wc-block-components-text-input label,
.wc-block-components-checkout-step__description,
.woocommerce-checkout label {
	color: var( --wp--preset--color--secondary ) !important;
}

/* Le libellé flottant remonte sur fond de champ : garde-le lisible. */
.wc-block-components-text-input.is-active label {
	color: var( --wp--preset--color--faint ) !important;
}

/* -------------------------------------------------------------------------
 * Récapitulatif de commande + boutons
 * ------------------------------------------------------------------------- */
.wc-block-components-order-summary,
.wc-block-components-totals-item,
.wc-block-components-order-summary-item {
	color: var( --wp--preset--color--secondary );
}

.wc-block-components-totals-footer-item,
.wc-block-components-product-metadata,
.wc-block-components-order-summary-item__total-price {
	color: var( --wp--preset--color--main );
}

.wc-block-components-checkout-place-order-button,
.wc-block-components-button.contained,
.woocommerce-checkout button.button,
.woocommerce-account button.button,
.woocommerce #place_order {
	background-color: var( --wp--preset--color--primary ) !important;
	color: var( --wp--preset--color--accent-ink ) !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 18px 32px !important;
	font-family: var( --wp--preset--font-family--display ) !important;
	font-weight: 600 !important;
	font-size: var( --wp--preset--font-size--base ) !important;
	box-shadow: 0 0 0 0 var( --wp--custom--glow ), 0 10px 30px -10px var( --wp--custom--glow ) !important;
	transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease !important;
}

.wc-block-components-checkout-place-order-button .wc-block-components-button__text {
	color: var( --wp--preset--color--accent-ink ) !important;
}

.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button.contained:hover,
.woocommerce-checkout button.button:hover,
.woocommerce-account button.button:hover,
.woocommerce #place_order:hover {
	background-color: var( --wp--preset--color--primary-alt ) !important;
	color: var( --wp--preset--color--accent-ink ) !important;
	transform: translateY( -2px ) !important;
	box-shadow: 0 0 28px -2px var( --wp--custom--glow ), 0 16px 40px -12px var( --wp--custom--glow ) !important;
}

/* Liens (ex. « tu as un compte ? ») à l'accent. */
.wc-block-checkout a,
.woocommerce-checkout a,
.woocommerce-account a {
	color: var( --wp--preset--color--primary-alt );
}
