/*
 * fvce-cart-auto-booting est rendu directement dans le HTML par WordPress : le bouton
 * est donc caché dès le premier affichage, sans attendre le JavaScript.
 * fvce-cart-auto-ready prend ensuite le relais. Si l'initialisation échoue, le garde-fou
 * retire fvce-cart-auto-booting et le bouton WooCommerce natif redevient visible.
 */
body.fvce-cart-auto-booting .woocommerce-cart-form :is(button, input)[name="update_cart"],
body.fvce-cart-auto-ready .woocommerce-cart-form :is(button, input)[name="update_cart"] {
    display: none !important;
}

/*
 * Le message générique de succès est filtré précisément par JavaScript. Aucun
 * sélecteur large ne masque les autres messages WooCommerce.
 */
body.fvce-cart-auto-in-flight .woocommerce-cart-form {
    min-height: var(--fvce-cart-auto-form-min-height, auto);
}

body.fvce-cart-auto-in-flight .cart_totals {
    min-height: var(--fvce-cart-auto-totals-min-height, auto);
}

/* WooCommerce conserve son verrou fonctionnel, mais sans voile blanc. */
body.fvce-cart-auto-in-flight .woocommerce-cart-form .blockUI.blockOverlay,
body.fvce-cart-auto-in-flight .cart_totals .blockUI.blockOverlay {
    background: transparent !important;
    opacity: 0 !important;
}

/*
 * Aucun indicateur de chargement n'est affiché sur le sélecteur de quantité.
 * La valeur change immédiatement ; WooCommerce et Carton Engine se mettent à
 * jour silencieusement en arrière-plan. Les erreurs métier restent visibles.
 */
