/*
 Theme Name:  JBTheme
 Theme URI:    https://jbouvier.com
 Description:  Le thème enfant pour palier à tout ce qui n'est pas possible avec Divi.
 Author:       Jérôme Bouvier
 Author URI:   https://jbouvier.com
 Template:     Divi
 Version:      1.0.0
*/

/***** Custom CSS Panier *****/

/* Conteneur global du module Code Divi */
#cart {
  position: relative;
  display: inline-block;
}

#cart .et_pb_code_inner {
  display: inline-block;
  position: relative;
}

/* Lien et Icône */
#cart .cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
}

#cart .cart-icon {
  display: inline-flex;
  line-height: 0;
}

/* Badge du compteur */
#cart .cart-count {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(40%, -40%);
  background: #1E293B; /* Ton gris/noir foncé */
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Masquage si vide (doublon de sécurité avec le PHP) */
#cart .cart-count[data-count="0"] {
  display: none !important;
}

/* Effet visuel lors de l'ajout au panier (via la classe native Woo) */
.adding-to-cart .cart-count {
  transform: translate(40%, -40%) scale(1.3);
}