/* Section principale */
.promotion-price-formatter {
  display: flex;
  align-items: center; /* Aligne les éléments verticalement */
  gap: 15px; /* Espace entre les éléments */
  font-family: Arial, sans-serif;
  margin: 10px 0;
  position: relative; /* Nécessaire pour positionner le badge */
}

/* Prix barré */
.promotion-price-formatter .base-price {
  font-size: 0.9em; /* Plus petit */
  color: #b0b0b0; /* Gris clair */
  text-decoration: line-through;
  vertical-align: top; /* Légèrement au-dessus du prix remisé */
  margin-right: 10px; /* Espace avec le prix remisé */
  font-weight: 400; /* Moins épais */
}

/* Prix remisé */
.promotion-price-formatter .discounted-price {
  font-size: 1.5em; /* Plus grand */
  font-weight: 700; /* Très épais */
  color: #2c3e50; /* Bleu foncé élégant */
  margin-right: 15px; /* Espace avec le badge */
}

/* Badge */
.promotion-price-formatter .discount-badge {
  position: absolute; /* Place le badge dans le coin du conteneur */
  top: -10px; /* Ajusté pour qu'il reste bien visible */
  left: 240px; /* Ajusté pour qu'il reste dans le cadre */
  background: #2c3e50; /* Couleur principale (bleu foncé) */
  height: 70px; /* Taille initiale */
  width: 70px; /* Taille initiale */
  border-radius: 50%; /* Cercle parfait */
  text-align: center;
  line-height: 70px; /* Centre le texte verticalement */
  color: white; /* Couleur du texte */
  font-size: 1em; /* Taille ajustée pour le badge plus petit */
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Ombre pour donner du relief */
  z-index: 2; /* Assure que le badge est au-dessus des autres éléments */
  transition: background-color 0.3s ease-in-out; /* Transition pour le hover */
}

/* Rubans sous le badge */
.promotion-price-formatter .discount-badge::before,
.promotion-price-formatter .discount-badge::after {
  content: '';
  position: absolute;
  border-bottom: 50px solid #2c3e50; /* Réduction de la hauteur des rubans */
  border-left: 30px solid transparent; /* Réduction de la largeur */
  border-right: 30px solid transparent;
  top: 60px; /* Positionné légèrement en dessous du cercle */
  transition: border-bottom-color 0.3s ease-in-out; /* Ajoute la transition pour le hover */
}

.promotion-price-formatter .discount-badge::before {
  left: -10px;
  transform: rotate(-140deg); /* Inclinaison gauche */
}

.promotion-price-formatter .discount-badge::after {
  right: -10px;
  transform: rotate(140deg); /* Inclinaison droite */
}

/* Texte du badge toujours au premier plan */
.promotion-price-formatter .discount-badge span {
  display: inline-block;
  position: relative;
  z-index: 1; /* Texte toujours au-dessus */
}

/* Survol */
.promotion-price-formatter .discount-badge:hover {
  background: #3498db; /* Couleur plus claire au survol */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3); /* Accentuation de l'ombre */
}

.promotion-price-formatter .discount-badge:hover::before,
.promotion-price-formatter .discount-badge:hover::after {
  border-bottom-color: #3498db; /* Les rubans changent de couleur au survol */
}

/* Responsive pour mobile */
.grid-wrapper .promotion-price-formatter .discount-badge {
  height: 60px; /* Taille réduite pour mobile */
  width: 60px;
  font-size: 0.9em; /* Taille du texte ajustée */
  line-height: 60px; /* Alignement vertical */
  top: -5px; /* Ajusté pour rester bien visible */
  left: 170px;
  transition: background-color 0.3s ease-in-out; /* Ajoute la transition sur mobile */
}

/* GRID LIST VIEW */

.grid-wrapper .promotion-price-formatter .discount-badge::before,
.grid-wrapper .promotion-price-formatter .discount-badge::after {
  border-bottom: 40px solid #2c3e50; /* Taille réduite des rubans */
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  top: 50px; /* Ajuste la position sous le badge */
  transition: border-bottom-color 0.3s ease-in-out; /* Transition hover pour les rubans sur mobile */
}

.grid-wrapper .promotion-price-formatter .discount-badge:hover {
  background: #3498db; /* Couleur plus claire au survol (mobile) */
}

.grid-wrapper .promotion-price-formatter .discount-badge:hover::before,
.grid-wrapper .promotion-price-formatter .discount-badge:hover::after {
  border-bottom-color: #3498db; /* Les rubans changent aussi de couleur sur mobile */
}

/* CATALOG VIEW */

/* Version compacte pour la vue catalogue */
.product-catalog .promotion-price-formatter .discount-badge {
  position: absolute;
  top: -5px; /* Position légèrement en haut */
  right: 5px; /* Aligné à droite dans le cadre */
  height: 40px; /* Badge réduit */
  width: 40px; /* Badge réduit */
  font-size: 0.8em; /* Texte ajusté pour le badge */
  line-height: 40px; /* Centre le texte verticalement */
  background: #2c3e50; /* Couleur principale */
  border-radius: 50%; /* Cercle parfait */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ombre réduite */
  z-index: 2;
  transition: all 0.3s ease-in-out;
}

/* Rubans ajustés pour le badge compact */
/* Badge compact pour la vue catalogue */
.product-catalog .promotion-price-formatter .discount-badge {
  position: absolute;
  top: -5px; /* Position légèrement en haut */
  right: 5px; /* Aligné à droite dans le cadre */
  height: 40px; /* Taille réduite */
  width: 40px; /* Taille réduite */
  font-size: 0.8em; /* Texte ajusté pour le badge */
  line-height: 40px; /* Centre le texte verticalement */
  background: #2c3e50; /* Couleur principale */
  border-radius: 50%; /* Cercle parfait */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ombre réduite */
  z-index: 2;
  transition: all 0.3s ease-in-out;
}

/* Rubans ajustés pour le badge compact */
/* Badge compact pour la vue catalogue */
.product-catalog .promotion-price-formatter .discount-badge {
  position: absolute;
  top: -5px; /* Position légèrement en haut */
  right: 5px; /* Aligné à droite dans le cadre */
  height: 40px; /* Taille réduite */
  width: 40px; /* Taille réduite */
  font-size: 0.8em; /* Texte ajusté pour le badge */
  line-height: 40px; /* Centre le texte verticalement */
  background: #2c3e50; /* Couleur principale */
  border-radius: 50%; /* Cercle parfait */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ombre réduite */
  z-index: 2;
  transition: all 0.3s ease-in-out;
}

/* Rubans ajustés pour le badge compact */
/* Badge simple pour la vue catalogue */
/* Badge simple pour la vue catalogue */
.product-catalog .promotion-price-formatter .discount-badge {
  position: absolute;
  top: -5px; /* Position légèrement en haut */
  right: 5px; /* Aligné à droite dans le cadre */
  height: 40px; /* Taille réduite */
  width: 40px; /* Taille réduite */
  font-size: 0.8em; /* Taille ajustée pour le texte */
  line-height: 40px; /* Centre le texte verticalement */
  background: #2c3e50; /* Couleur principale */
  border-radius: 50%; /* Cercle parfait */
  color: white; /* Couleur du texte */
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute un peu de relief */
  z-index: 2; /* Assure que le badge est visible */
  transition: background-color 0.3s ease-in-out; /* Animation au survol */
}

/* Supprime les rubans */
.product-catalog .promotion-price-formatter .discount-badge::before,
.product-catalog .promotion-price-formatter .discount-badge::after {
  content: none; /* Désactive les rubans */
}

/* Texte du badge */
.product-catalog .promotion-price-formatter .discount-badge span {
  display: inline-block;
  position: relative;
  z-index: 1;
}

/* Hover pour le badge */
.product-catalog .promotion-price-formatter .discount-badge:hover {
  background: #3498db; /* Couleur plus claire au survol */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Accentuation de l'ombre */
}
