/**
 * Brico Kitchen - fiche produit :
 * 1) bouton Commander maintenant sur produits variables et simples ;
 * 2) hiérarchie UX des actions ;
 * 3) animation Ajout au panier : chargement -> validation -> retour normal.
 */

/* =========================================================
   STRUCTURE
========================================================= */
body.single-product .single-product-simple-cart {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
}

body.single-product
.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button {
  flex-wrap: wrap !important;
}

body.single-product .bk-buy-now-row {
  width: 100% !important;
  min-width: 0 !important;
}

body.single-product
.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
.bk-buy-now-row {
  order: 20 !important;
  flex: 0 0 100% !important;
  grid-column: 1 / -1 !important;
  margin-top: 2px !important;
}

body.single-product .single-product-simple-cart .bk-buy-now-row {
  margin-top: 0 !important;
}

/* =========================================================
   COMMANDER MAINTENANT — ACTION PRINCIPALE
========================================================= */
body.single-product .bk-buy-now-button,
body.single-product .bk-buy-now-button.button {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 24px !important;
  align-items: center !important;
  gap: 13px !important;

  width: 100% !important;
  min-width: 0 !important;
  min-height: 66px !important;
  margin: 0 !important;
  padding: 9px 18px !important;

  border: 1px solid #1e44bc !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #172554 0%, #1e44bc 62%, #4e5fc6 100%) !important;
  color: #ffffff !important;

  font-family: "Segoe UI", Arial, sans-serif !important;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: 0 !important;

  box-shadow: 0 16px 34px rgba(30, 68, 188, 0.22) !important;
  cursor: pointer !important;
  overflow: hidden !important;
  position: relative !important;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease !important;
}

body.single-product .bk-buy-now-button:hover,
body.single-product .bk-buy-now-button:focus-visible {
  border-color: #5567cf !important;
  background: linear-gradient(135deg, #1e3a8a 0%, #3155c6 58%, #6679e2 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 19px 40px rgba(30, 68, 188, 0.28) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

body.single-product .bk-buy-now-button__icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 40px !important;
  height: 40px !important;

  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

body.single-product .bk-buy-now-button__icon svg {
  width: 21px !important;
  height: 21px !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.single-product .bk-buy-now-button__text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  color: #ffffff !important;
}

body.single-product .bk-buy-now-button__title {
  display: block !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  line-height: 1.12 !important;
}

body.single-product .bk-buy-now-button__text small {
  display: block !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

body.single-product .bk-buy-now-button__arrow {
  color: #ffffff !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  transition: transform 0.2s ease !important;
}

body.single-product .bk-buy-now-button:hover .bk-buy-now-button__arrow {
  transform: translateX(3px) !important;
}

/* Désactivé tant qu'une variation complète n'est pas sélectionnée. */
body.single-product .bk-buy-now-button:disabled,
body.single-product .bk-buy-now-button[aria-disabled="true"] {
  border-color: #dfe4ee !important;
  background: #f2f4f8 !important;
  color: #929cad !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  transform: none !important;
}

body.single-product .bk-buy-now-button:disabled .bk-buy-now-button__icon,
body.single-product .bk-buy-now-button[aria-disabled="true"] .bk-buy-now-button__icon {
  border-color: #dfe4ee !important;
  background: #e7eaf0 !important;
  color: #929cad !important;
}

body.single-product .bk-buy-now-button:disabled .bk-buy-now-button__text,
body.single-product .bk-buy-now-button:disabled .bk-buy-now-button__title,
body.single-product .bk-buy-now-button:disabled .bk-buy-now-button__text small,
body.single-product .bk-buy-now-button:disabled .bk-buy-now-button__arrow {
  color: #929cad !important;
}

/* Chargement de la commande directe. */
body.single-product .bk-buy-now-button.is-loading {
  pointer-events: none !important;
  opacity: 0.86 !important;
}

body.single-product .bk-buy-now-button.is-loading:disabled {
  border-color: #1e44bc !important;
  background: linear-gradient(135deg, #172554 0%, #1e44bc 62%, #4e5fc6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 16px 34px rgba(30, 68, 188, 0.22) !important;
}

body.single-product .bk-buy-now-button.is-loading:disabled .bk-buy-now-button__icon,
body.single-product .bk-buy-now-button.is-loading:disabled .bk-buy-now-button__text,
body.single-product .bk-buy-now-button.is-loading:disabled .bk-buy-now-button__title,
body.single-product .bk-buy-now-button.is-loading:disabled .bk-buy-now-button__text small,
body.single-product .bk-buy-now-button.is-loading:disabled .bk-buy-now-button__arrow {
  color: #ffffff !important;
}

body.single-product .bk-buy-now-button.is-loading .bk-buy-now-button__icon {
  animation: bk-buy-now-pulse 0.75s ease-in-out infinite alternate !important;
}

body.single-product .bk-buy-now-notice {
  width: 100% !important;
  margin: 9px 0 0 !important;
  padding: 10px 13px !important;
  border: 1px solid #fecaca !important;
  border-radius: 12px !important;
  background: #fff7f7 !important;
  color: #b42318 !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

body.single-product .bk-buy-now-notice[hidden] {
  display: none !important;
}

/* =========================================================
   AJOUTER AU PANIER — ACTION SECONDAIRE
========================================================= */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart),
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).button,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).btn {
  position: relative !important;
  overflow: hidden !important;

  border: 1.5px solid rgba(47, 59, 159, 0.30) !important;
  background: #ffffff !important;
  color: #2f3b9f !important;
  box-shadow: 0 8px 20px rgba(47, 59, 159, 0.08) !important;

  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):hover,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):focus-visible {
  border-color: #4e5fc6 !important;
  background: #f4f6ff !important;
  color: #26348d !important;
  box-shadow: 0 11px 24px rgba(47, 59, 159, 0.13) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

/* Le texte reste visible malgré les anciennes règles globales du thème. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.add-to-cart-label {
  display: inline-block !important;
  min-width: 118px !important;
  color: inherit !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.18s ease, transform 0.18s ease !important;
}

/* Zone d'icône stable : évite tout déplacement du texte entre les états. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.ui-icon {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 34px !important;

  width: 34px !important;
  height: 34px !important;

  border: 1px solid rgba(47, 59, 159, 0.12) !important;
  border-radius: 11px !important;
  background: rgba(78, 95, 198, 0.09) !important;
  color: #2f3b9f !important;
  overflow: hidden !important;

  transition:
    border-color 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease !important;
}

/* Les SVG/spinners injectés par l'ancien JS sont masqués : l'état visuel est
   piloté de manière cohérente par le pseudo-élément ci-dessous. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.ui-icon > * {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Icône par défaut : sac + */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.ui-icon::before {
  content: "" !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  background-color: currentColor !important;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5h11l1 11h-13l1-11Zm3 0V6.75a2.5 2.5 0 0 1 5 0V8.5M12 11.5v5M9.5 14h5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5h11l1 11h-13l1-11Zm3 0V6.75a2.5 2.5 0 0 1 5 0V8.5M12 11.5v5M9.5 14h5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  transform: scale(1) rotate(0deg) !important;
  opacity: 1 !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):hover
.ui-icon {
  border-color: rgba(78, 95, 198, 0.20) !important;
  background: rgba(78, 95, 198, 0.14) !important;
  color: #26348d !important;
  transform: scale(1.03) !important;
}

/* Produit/variation indisponible. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).disabled,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).wc-variation-selection-needed,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):disabled:not(.is-loading):not(.bk-loading-min):not(.is-verified) {
  border-color: #e1e4eb !important;
  background: #f4f5f8 !important;
  color: #9da5b4 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).disabled
.ui-icon,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).wc-variation-selection-needed
.ui-icon,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):disabled:not(.is-loading):not(.bk-loading-min):not(.is-verified)
.ui-icon {
  border-color: #e0e3e9 !important;
  background: #e9ebf0 !important;
  color: #a4abb7 !important;
}

/* =========================================================
   ÉTAT 1 — CHARGEMENT
========================================================= */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min) {
  border-color: rgba(78, 95, 198, 0.46) !important;
  background: linear-gradient(110deg, #f8f9ff 10%, #eef1ff 45%, #f8f9ff 80%) !important;
  background-size: 220% 100% !important;
  color: #2f3b9f !important;
  box-shadow: 0 9px 22px rgba(47, 59, 159, 0.11) !important;
  cursor: wait !important;
  transform: none !important;
  animation: bk-cart-button-shimmer 1.2s linear infinite !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon {
  border-color: rgba(78, 95, 198, 0.20) !important;
  background: rgba(78, 95, 198, 0.10) !important;
  color: #3346ad !important;
  transform: scale(1) !important;
}

/* Spinner circulaire. Cette règle vient après la validation afin que la
   durée minimale de chargement reste visuellement respectée. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon::before {
  width: 18px !important;
  height: 18px !important;
  border: 2px solid rgba(51, 70, 173, 0.24) !important;
  border-top-color: currentColor !important;
  border-right-color: currentColor !important;
  border-radius: 50% !important;
  background: transparent !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  animation: bk-cart-spinner 0.72s linear infinite !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.add-to-cart-label {
  animation: bk-cart-label-in 0.28s ease both !important;
}

/* =========================================================
   ÉTAT 2 — PRODUIT AJOUTÉ
========================================================= */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).is-verified {
  border-color: rgba(20, 145, 96, 0.42) !important;
  background: #effaf5 !important;
  color: #0b7650 !important;
  box-shadow: 0 10px 24px rgba(20, 145, 96, 0.14) !important;
  transform: translateY(-1px) !important;
  animation: bk-cart-success-button 0.46s cubic-bezier(0.2, 0.9, 0.2, 1) both !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).is-verified
.ui-icon {
  border-color: rgba(20, 145, 96, 0.22) !important;
  background: rgba(20, 145, 96, 0.10) !important;
  color: #0b7650 !important;
  transform: scale(1.04) !important;
}

/* Icône de validation distincte du panier. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).is-verified
.ui-icon::before {
  width: 21px !important;
  height: 21px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: currentColor !important;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='m8 12.2 2.7 2.7L16.5 9' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='m8 12.2 2.7 2.7L16.5 9' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  animation: bk-cart-check-pop 0.46s cubic-bezier(0.2, 0.9, 0.2, 1) both !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).is-verified
.add-to-cart-label {
  animation: bk-cart-label-in 0.32s ease both !important;
}

/* Priorité visuelle : si la réponse est très rapide, le spinner garde sa
   durée minimale avant d'afficher la coche de succès. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min) {
  border-color: rgba(78, 95, 198, 0.46) !important;
  background: linear-gradient(110deg, #f8f9ff 10%, #eef1ff 45%, #f8f9ff 80%) !important;
  background-size: 220% 100% !important;
  color: #2f3b9f !important;
  box-shadow: 0 9px 22px rgba(47, 59, 159, 0.11) !important;
  transform: none !important;
  animation: bk-cart-button-shimmer 1.2s linear infinite !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon {
  border-color: rgba(78, 95, 198, 0.20) !important;
  background: rgba(78, 95, 198, 0.10) !important;
  color: #3346ad !important;
  transform: scale(1) !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon::before {
  width: 18px !important;
  height: 18px !important;
  border: 2px solid rgba(51, 70, 173, 0.24) !important;
  border-top-color: currentColor !important;
  border-right-color: currentColor !important;
  border-radius: 50% !important;
  background: transparent !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  animation: bk-cart-spinner 0.72s linear infinite !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.add-to-cart-label {
  animation: bk-cart-label-in 0.28s ease both !important;
}

/* Neutralise l'ancien état bleu permanent .is-added après le feedback. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).is-added:not(.is-verified):not(.is-loading):not(.bk-loading-min) {
  border-color: rgba(47, 59, 159, 0.30) !important;
  background: #ffffff !important;
  color: #2f3b9f !important;
  box-shadow: 0 8px 20px rgba(47, 59, 159, 0.08) !important;
}

/* =========================================================
   ANIMATIONS
========================================================= */
@keyframes bk-buy-now-pulse {
  from {
    transform: scale(0.92);
    opacity: 0.65;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bk-cart-spinner {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bk-cart-button-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes bk-cart-check-pop {
  0% {
    opacity: 0;
    transform: scale(0.45) rotate(-12deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.12) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes bk-cart-success-button {
  0% {
    transform: scale(0.985);
  }
  65% {
    transform: scale(1.012);
  }
  100% {
    transform: translateY(-1px) scale(1);
  }
}

@keyframes bk-cart-label-in {
  from {
    opacity: 0.45;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 420px) {
  body.single-product .bk-buy-now-button,
  body.single-product .bk-buy-now-button.button {
    grid-template-columns: 38px minmax(0, 1fr) 20px !important;
    gap: 11px !important;
    min-height: 62px !important;
    padding: 8px 14px !important;
    border-radius: 16px !important;
  }

  body.single-product .bk-buy-now-button__icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
  }

  body.single-product .bk-buy-now-button__title {
    font-size: 14px !important;
  }

  body.single-product .bk-buy-now-button__text small {
    font-size: 10px !important;
  }

  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart)
  .ui-icon {
    flex-basis: 32px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
  }

  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart)
  .ui-icon::before {
    width: 19px !important;
    height: 19px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.single-product .bk-buy-now-button,
  body.single-product .bk-buy-now-button__arrow,
  body.single-product .bk-buy-now-button__icon,
  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart),
  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart)
  .ui-icon,
  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart)
  .ui-icon::before,
  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart)
  .add-to-cart-label {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   V4 — ALIGNEMENT FINAL DES ACTIONS + ÉTATS AJAX FIABLES
   ========================================================= */

/* Tous les calculs de largeur restent contenus dans la colonne produit. */
body.single-product .single-product-variable-cart--classic *,
body.single-product .single-product-simple-cart * {
  box-sizing: border-box !important;
}

/* ---------------------------------------------------------
   PRODUIT VARIABLE : quantité + panier sur une ligne,
   Commander maintenant en dessous, mêmes bords partout.
--------------------------------------------------------- */
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button {
  display: grid !important;
  grid-template-columns: minmax(118px, 154px) minmax(0, 1fr) !important;
  align-items: stretch !important;
  column-gap: 14px !important;
  row-gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
.quantity,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
.quantity.bk-variable-qty-enhanced {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
}

body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.alt.bk-variable-ajax-add-btn,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.bk-variable-ajax-add-btn,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
}

body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
.bk-buy-now-row {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  margin: 0 !important;
}

/* ---------------------------------------------------------
   PRODUIT SIMPLE : mêmes marges que le bloc variable.
--------------------------------------------------------- */
body.single-product .single-product-simple-cart {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 18px 28px 0 !important;
  padding: 0 !important;
}

body.single-product .single-product-simple-cart .single-product-purchase-row {
  display: grid !important;
  grid-template-columns: minmax(118px, 154px) minmax(0, 1fr) !important;
  align-items: stretch !important;
  column-gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product .single-product-simple-cart .single-product-qty {
  grid-column: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
}

body.single-product
.single-product-simple-cart
button.single-product-add-to-cart.btn.add-to-cart {
  grid-column: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
}

body.single-product .single-product-simple-cart .bk-buy-now-row {
  width: 100% !important;
  margin: 0 !important;
}

/* ---------------------------------------------------------
   AJOUTER AU PANIER : action secondaire blanche.
   Sélecteurs volontairement précis pour neutraliser les
   anciennes variantes bleues du thème.
--------------------------------------------------------- */
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.alt.bk-variable-ajax-add-btn,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.bk-variable-ajax-add-btn,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-grid !important;
  grid-template-columns: 36px minmax(112px, auto) !important;
  align-items: center !important;
  justify-content: center !important;
  column-gap: 10px !important;
  padding: 6px 18px !important;
  border: 1.5px solid rgba(47, 59, 159, 0.30) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #2f3b9f !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: 0 8px 20px rgba(47, 59, 159, 0.08) !important;
  transform: none !important;
  overflow: hidden !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transition:
    border-color 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease !important;
}

body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.alt.bk-variable-ajax-add-btn:hover,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.bk-variable-ajax-add-btn:hover,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button:hover,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart:hover,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button:focus-visible,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart:focus-visible {
  border-color: #4e5fc6 !important;
  background: #f5f7ff !important;
  background-image: none !important;
  color: #26348d !important;
  box-shadow: 0 11px 24px rgba(47, 59, 159, 0.13) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

/* Le groupe icône + libellé reste parfaitement centré. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.add-to-cart-label {
  display: block !important;
  min-width: 112px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font: inherit !important;
  line-height: 1.15 !important;
  text-align: left !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Réinitialisation complète des anciennes positions d'icône. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.ui-icon {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  justify-self: center !important;
  align-self: center !important;
  display: block !important;
  flex: none !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(47, 59, 159, 0.12) !important;
  border-radius: 11px !important;
  background: rgba(78, 95, 198, 0.09) !important;
  color: #2f3b9f !important;
  line-height: 0 !important;
  overflow: hidden !important;
  transform: none !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.ui-icon > * {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart)
.ui-icon::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background-color: currentColor !important;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5h11l1 11h-13l1-11Zm3 0V6.75a2.5 2.5 0 0 1 5 0V8.5M12 11.5v5M9.5 14h5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5h11l1 11h-13l1-11Zm3 0V6.75a2.5 2.5 0 0 1 5 0V8.5M12 11.5v5M9.5 14h5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  opacity: 1 !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center !important;
}

/* État désactivé avant le choix complet d'une variation. */
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.disabled:not(.is-loading):not(.bk-loading-min):not(.bk-feedback-success),
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.wc-variation-selection-needed:not(.is-loading):not(.bk-loading-min):not(.bk-feedback-success),
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):disabled:not(.is-loading):not(.bk-loading-min):not(.bk-feedback-success) {
  border-color: #e1e4eb !important;
  background: #f4f5f8 !important;
  background-image: none !important;
  color: #9da5b4 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  transform: none !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):disabled:not(.is-loading):not(.bk-loading-min):not(.bk-feedback-success)
.ui-icon,
body.single-product
.single-product-variable-cart--classic
.single_add_to_cart_button.wc-variation-selection-needed:not(.is-loading):not(.bk-loading-min):not(.bk-feedback-success)
.ui-icon {
  border-color: #e0e3e9 !important;
  background: #e9ebf0 !important;
  color: #a4abb7 !important;
}

/* ---------------------------------------------------------
   CHARGEMENT : spinner centré, sans déplacement horizontal.
--------------------------------------------------------- */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min) {
  border-color: rgba(78, 95, 198, 0.46) !important;
  background: linear-gradient(110deg, #f8f9ff 10%, #eef1ff 45%, #f8f9ff 80%) !important;
  background-size: 220% 100% !important;
  color: #2f3b9f !important;
  box-shadow: 0 9px 22px rgba(47, 59, 159, 0.11) !important;
  cursor: wait !important;
  pointer-events: none !important;
  transform: none !important;
  animation: bk-cart-button-shimmer 1.2s linear infinite !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon {
  border-color: rgba(78, 95, 198, 0.20) !important;
  background: rgba(78, 95, 198, 0.10) !important;
  color: #3346ad !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon::before {
  width: 18px !important;
  height: 18px !important;
  border: 2px solid rgba(51, 70, 173, 0.24) !important;
  border-top-color: currentColor !important;
  border-right-color: currentColor !important;
  border-radius: 50% !important;
  background: transparent !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  animation: bk-cart-spinner-centered 0.72s linear infinite !important;
}

/* ---------------------------------------------------------
   SUCCÈS : coche centrée puis retour automatique au repos.
--------------------------------------------------------- */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.bk-feedback-success, .is-verified) {
  border-color: rgba(20, 145, 96, 0.42) !important;
  background: #effaf5 !important;
  background-image: none !important;
  color: #0b7650 !important;
  box-shadow: 0 10px 24px rgba(20, 145, 96, 0.14) !important;
  cursor: default !important;
  transform: translateY(-1px) !important;
  animation: bk-cart-success-button 0.46s cubic-bezier(0.2, 0.9, 0.2, 1) both !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.bk-feedback-success, .is-verified)
.ui-icon {
  border-color: rgba(20, 145, 96, 0.22) !important;
  background: rgba(20, 145, 96, 0.10) !important;
  color: #0b7650 !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.bk-feedback-success, .is-verified)
.ui-icon::before {
  width: 21px !important;
  height: 21px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: currentColor !important;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='m8 12.2 2.7 2.7L16.5 9' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='m8 12.2 2.7 2.7L16.5 9' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  animation: bk-cart-check-centered 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) both !important;
}

/* L'ancien .is-added ne doit jamais laisser le bouton vert ou bleu. */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart).is-added:not(.is-loading):not(.bk-loading-min):not(.bk-feedback-success):not(.is-verified) {
  border-color: rgba(47, 59, 159, 0.30) !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #2f3b9f !important;
  box-shadow: 0 8px 20px rgba(47, 59, 159, 0.08) !important;
}

@keyframes bk-cart-spinner-centered {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes bk-cart-check-centered {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45) rotate(-12deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

/* ---------------------------------------------------------
   RESPONSIVE : marges identiques et aucune sortie du bloc.
--------------------------------------------------------- */
@media (max-width: 767px) {
  body.single-product .single-product-simple-cart {
    margin: 16px 22px 0 !important;
  }

  body.single-product
  .single-product-variable-cart.single-product-variable-cart--classic
  .woocommerce-variation-add-to-cart.variations_button,
  body.single-product .single-product-simple-cart .single-product-purchase-row {
    grid-template-columns: minmax(118px, 132px) minmax(0, 1fr) !important;
    column-gap: 12px !important;
  }
}

@media (max-width: 420px) {
  body.single-product .single-product-simple-cart {
    margin-left: 18px !important;
    margin-right: 18px !important;
  }

  body.single-product
  .single-product-variable-cart.single-product-variable-cart--classic
  .woocommerce-variation-add-to-cart.variations_button,
  body.single-product .single-product-simple-cart .single-product-purchase-row {
    grid-template-columns: 118px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    row-gap: 10px !important;
  }

  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart) {
    grid-template-columns: 32px minmax(96px, auto) !important;
    column-gap: 8px !important;
    padding-left: 11px !important;
    padding-right: 11px !important;
    font-size: 14px !important;
  }

  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart)
  .ui-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  body.single-product
  :is(.single-product-variable-cart--classic, .single-product-simple-cart)
  :is(.single_add_to_cart_button, .single-product-add-to-cart)
  .add-to-cart-label {
    min-width: 96px !important;
  }
}

@media (max-width: 350px) {
  body.single-product
  .single-product-variable-cart.single-product-variable-cart--classic
  .woocommerce-variation-add-to-cart.variations_button,
  body.single-product .single-product-simple-cart .single-product-purchase-row {
    grid-template-columns: 1fr !important;
  }

  body.single-product
  .single-product-variable-cart.single-product-variable-cart--classic
  .woocommerce-variation-add-to-cart.variations_button
  .quantity,
  body.single-product
  .single-product-variable-cart.single-product-variable-cart--classic
  .woocommerce-variation-add-to-cart.variations_button
  button.single_add_to_cart_button,
  body.single-product .single-product-simple-cart .single-product-qty,
  body.single-product .single-product-simple-cart button.single-product-add-to-cart {
    grid-column: 1 !important;
  }

  body.single-product
  .single-product-variable-cart.single-product-variable-cart--classic
  .woocommerce-variation-add-to-cart.variations_button
  .bk-buy-now-row {
    grid-row: 3 !important;
  }
}

/* =========================================================
   V5 — AJOUTER AU PANIER : icône + texte à gauche, flèche à
   droite (même logique que Commander maintenant), hover vert.
   ========================================================= */
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.alt.bk-variable-ajax-add-btn,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.bk-variable-ajax-add-btn,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart {
  grid-template-columns: 36px minmax(0, 1fr) 20px !important;
  justify-content: normal !important;
}

/* Flèche générée (identique à Commander maintenant), 3e colonne de la grille. */
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button::after,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart::after {
  content: "\2192" !important;
  justify-self: end !important;
  color: currentColor !important;
  font-size: 18px !important;
  line-height: 1 !important;
  transition: transform 0.2s ease !important;
}

body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button:hover::after,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart:hover::after {
  transform: translateX(3px) !important;
}

/* Hover vert « validé » à la place du bleu clair, même structure de
   sélecteurs que le hover existant pour garantir la priorité. */
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.alt.bk-variable-ajax-add-btn:hover,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button.button.bk-variable-ajax-add-btn:hover,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button:hover,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart:hover,
body.single-product
.single-product-variable-cart.single-product-variable-cart--classic
.woocommerce-variation-add-to-cart.variations_button
button.single_add_to_cart_button:focus-visible,
body.single-product
.single-product-simple-cart
.single-product-purchase-row
button.single-product-add-to-cart.btn.add-to-cart:focus-visible {
  border-color: rgba(20, 145, 96, 0.42) !important;
  background: #effaf5 !important;
  background-image: none !important;
  color: #0b7650 !important;
  box-shadow: 0 11px 24px rgba(20, 145, 96, 0.14) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):hover
.ui-icon,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):focus-visible
.ui-icon {
  border-color: rgba(20, 145, 96, 0.22) !important;
  background: rgba(20, 145, 96, 0.10) !important;
  color: #0b7650 !important;
}

@media (max-width: 420px) {
  body.single-product
  .single-product-variable-cart.single-product-variable-cart--classic
  .woocommerce-variation-add-to-cart.variations_button
  button.single_add_to_cart_button,
  body.single-product
  .single-product-simple-cart
  .single-product-purchase-row
  button.single-product-add-to-cart.btn.add-to-cart {
    grid-template-columns: 32px minmax(0, 1fr) 18px !important;
  }
}

/* =========================================================
   FIX — L'état "Ajouté" (succès) doit toujours rester vert et
   transitionner en douceur, même si le bouton est désactivé à
   ce moment précis (une ancienne règle "disabled" grise sans
   exclusion sur .bk-feedback-success reprenait le dessus).
   Sélecteur volontairement plus spécifique (+.is(.bk-feedback-
   success, .is-verified) positif) pour gagner face à toutes les
   variantes grises, quel que soit leur ordre dans le fichier.
   ========================================================= */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.bk-feedback-success, .is-verified),
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):disabled:is(.bk-feedback-success, .is-verified) {
  border-color: rgba(20, 145, 96, 0.42) !important;
  background: #effaf5 !important;
  background-image: none !important;
  color: #0b7650 !important;
  box-shadow: 0 10px 24px rgba(20, 145, 96, 0.14) !important;
  opacity: 1 !important;
  cursor: default !important;
  transition:
    border-color 0.35s ease,
    background-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.bk-feedback-success, .is-verified)
.ui-icon,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):disabled:is(.bk-feedback-success, .is-verified)
.ui-icon {
  border-color: rgba(20, 145, 96, 0.22) !important;
  background: rgba(20, 145, 96, 0.10) !important;
  color: #0b7650 !important;
  transition: border-color 0.35s ease, background-color 0.35s ease, color 0.35s ease !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.bk-feedback-success, .is-verified)
.add-to-cart-label,
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):disabled:is(.bk-feedback-success, .is-verified)
.add-to-cart-label {
  color: #0b7650 !important;
}

/* =========================================================
   FIX 2 — Chargement "Ajouter au panier" aussi fluide/dynamique
   que "Commander maintenant". On retire le fond qui défile
   (shimmer) et l'anneau qui tourne (bordure), remplacés par un
   simple pulse (échelle + opacité) de l'icône panier d'origine —
   exactement la même technique que .bk-buy-now-button__icon.
   Animer uniquement transform/opacity (accéléré GPU) rend le
   mouvement nettement plus net qu'une animation de fond ou de
   bordure.
   ========================================================= */
body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min) {
  background: #f4f6ff !important;
  background-image: none !important;
  animation: none !important;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon {
  animation: bk-add-to-cart-pulse 0.75s ease-in-out infinite alternate !important;
}

body.single-product
:is(.single-product-variable-cart--classic, .single-product-simple-cart)
:is(.single_add_to_cart_button, .single-product-add-to-cart):is(.is-loading, .bk-loading-min)
.ui-icon::before {
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: currentColor !important;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5h11l1 11h-13l1-11Zm3 0V6.75a2.5 2.5 0 0 1 5 0V8.5M12 11.5v5M9.5 14h5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5h11l1 11h-13l1-11Zm3 0V6.75a2.5 2.5 0 0 1 5 0V8.5M12 11.5v5M9.5 14h5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  animation: none !important;
}

@keyframes bk-add-to-cart-pulse {
  from {
    transform: scale(0.90);
    opacity: 0.6;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
