/* ------------------------------------------------------------------
   Variations WooCommerce : layout flex + boutons radio
   ------------------------------------------------------------------ */

/* --- Layout général (remplace l'ancien <table class="variations">) --- */

.variations {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0 0 22px;
  color: var(--e-global-color-secondary);
}

.variations .variation {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Ligne du libellé : « Montant du chèque cadeau ········· Effacer » */
.variations .variation__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.variations .variation__label {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 500;
}

.variations .variation__leader {
  flex: 1 1 auto;
  min-width: 20px;
  border-bottom: 1px dotted currentColor;
  opacity: 0.35;
  transform: translateY(-0.25em);
}

.variations .reset_variations {
  flex: 0 0 auto;
  font-size: 0.85em;
  text-decoration: underline;
  color: var(--e-global-color-secondary);
}

/* Masqué tant qu'aucune option n'est sélectionnée (comportement WooCommerce) */
.variations .reset_variations:not([style*="visible"]) {
  display: none;
}

.variations .value {
  position: relative;
}

/* --- Le <select> natif : conservé pour WooCommerce, invisible à l'écran --- */

.variations select.wc-radio-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* --- Les boutons radio --- */

.wc-radio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.wc-radio-list__item {
  margin: 0;
}

.wc-radio-list__item input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.wc-radio-list__item label {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  line-height: 1.2;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.wc-radio-list__item label:hover {
  border-color: #333;
}

.wc-radio-list__item input:checked + label {
  border-color: var(--e-global-color-secondary);
  background: var(--e-global-color-secondary);
  color: #fff;
}

.wc-radio-list__item input:focus-visible + label {
  outline: 2px solid var(--e-global-color-secondary);
  outline-offset: 2px;
}

.wc-radio-list__item.is-disabled label {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.wc-radio-list__item.is-disabled label:hover {
  border-color: #ccc;
}

/* --- Fallback sans JavaScript --- */

.no-js .variations select.wc-radio-hidden {
  position: static !important;
  width: auto;
  height: auto;
  opacity: 1;
  pointer-events: auto;
}

.no-js .wc-radio-list {
  display: none;
}
.woocommerce-variation-price bdi {
  font-family: var(--e-global-typography-50ed8ce-font-family), Sans-serif;
  font-weight: var(--e-global-typography-50ed8ce-font-weight);
  font-size: var(--e-global-typography-50ed8ce-font-size);
  color: var(--e-global-color-accent) !important;
  font-style: var(--e-global-typography-50ed8ce-font-style);
}

.woocommerce-variation-price {
  margin-bottom: 2rem;
}
