/* ============================================================
   IR — Mini-cart styling (pack headers + visibility helpers)
   Remplace :
   - ton CSS mini-panier (collé)
   - l'injection JS injectIRMiniCartCSS()
   ============================================================ */








/* =========================================
   Mini-panier : comportement par défaut
   quand la page n'a PAS de bundles JSON
   ========================================= */

/* 1) Cacher la corbeille de ligne quand il n'y a PAS de bundles sur la page */
body:not(.has-bundles) .widget_shopping_cart_content .mini_cart_item a.remove,
body:not(.has-bundles) .widget_shopping_cart_content .woocommerce-mini-cart-item a.remove,
body:not(.has-bundles) .widget_shopping_cart_content .mini_cart_item .remove_from_cart_button,
body:not(.has-bundles) .widget_shopping_cart_content .woocommerce-mini-cart-item .remove_from_cart_button{
  display: none !important;
}

/* 2) Cacher les sélecteurs de quantité dans le mini-panier
      (pour éviter de casser les packs) */
body:not(.has-bundles) .widget_shopping_cart_content .quantity,
body:not(.has-bundles) .widget_shopping_cart_content input.qty{
  display: none !important;
}

/* 3) Garder les prix / remises visibles (tu les as déjà configurés
      via le JSON → appliqués dès que bundle-script a fait son travail)
   (rien à faire de spécial ici, on les laisse tels quels)
*/









/* ------------------------------------------------------------
   1) Masquer la corbeille LIGNE si flag global actif
   (le JS ajoute/retire .ir-hide-line-removes sur .widget_shopping_cart_content)
   ------------------------------------------------------------ */
.widget_shopping_cart_content.ir-hide-line-removes .mini_cart_item a.remove,
.widget_shopping_cart_content.ir-hide-line-removes .woocommerce-mini-cart-item a.remove,
.widget_shopping_cart_content.ir-hide-line-removes .mini_cart_item .remove_from_cart_button,
.widget_shopping_cart_content.ir-hide-line-removes .woocommerce-mini-cart-item .remove_from_cart_button{
  display: none !important;
}


/* ------------------------------------------------------------
   2) Header de pack
   ------------------------------------------------------------ */
.widget_shopping_cart_content .ir-bundle-header{
  list-style: none;

  display: flex;
  align-items: center;
  gap: 6px;

  font-weight: 500;
  color: #4a4a4a;

  margin: .5rem 0 .25rem;
  padding: 0 0 .35rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Titre */
.widget_shopping_cart_content .ir-bundle-header .ir-bundle-title{
  flex: 0 1 auto;
  font-weight: 600;
}

/* Totaux à droite */
.widget_shopping_cart_content .ir-bundle-header .ir-bundle-total{
  margin-left: auto;
  text-align: right;
}

/* Spacer : header “vide” quand pas de titre ni totaux */
.widget_shopping_cart_content .ir-bundle-header.ir-bundle-spacer{
  padding: 6px 0;
  border: 0;
  line-height: 1;
}

/* Totaux pack : del/ins */
.widget_shopping_cart_content .ir-bundle-header .ir-bundle-total del.ir-pack-del{
  opacity: .7;
  margin-right: .35rem;
}
.widget_shopping_cart_content .ir-bundle-header .ir-bundle-total ins.ir-pack-ins{
  text-decoration: none;
  font-weight: 700;
  color: #2a2a2a;
}


/* ------------------------------------------------------------
   3) Bouton corbeille PACK (SVG)
   ------------------------------------------------------------ */
.widget_shopping_cart_content .ir-bundle-header .ir-pack-remove{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  border-radius: 999px;

  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  cursor: pointer;

  line-height: 0;
}

.widget_shopping_cart_content .ir-bundle-header .ir-pack-remove.loading{
  opacity: .6;
  pointer-events: none;
}

.widget_shopping_cart_content .ir-bundle-header .ir-pack-remove .ir-pack-remove-ic{
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;

  fill: #555; /* noir adouci */
}

.widget_shopping_cart_content .ir-bundle-header .ir-pack-remove:hover .ir-pack-remove-ic{
  fill: #222;
}


/* ------------------------------------------------------------
   4) Masquer tous les prix d’une ligne (quand le JS ajoute la classe)
   Utilisé par applyMiniCartLinePriceVisibility()
   ------------------------------------------------------------ */
.widget_shopping_cart_content li.ir-hide-all-line-prices .woocommerce-Price-amount,
.widget_shopping_cart_content li.ir-hide-all-line-prices .amount,
.widget_shopping_cart_content li.ir-hide-all-line-prices del,
.widget_shopping_cart_content li.ir-hide-all-line-prices ins,
.widget_shopping_cart_content li.ir-hide-all-line-prices bdi,
.widget_shopping_cart_content li.ir-hide-all-line-prices .price{
  display: none !important;
}


/* ------------------------------------------------------------
   5) “Strike” mini-panier (ton bloc .discounts-total del)
   (je le garde séparé : ça ne double pas avec le pack header)
   ------------------------------------------------------------ */
.widget_shopping_cart_content .discounts-total del bdi{
  text-decoration: line-through !important;
  opacity: .8;
  color: #999;
}
.widget_shopping_cart_content .discounts-total del,
.widget_shopping_cart_content .discounts-total del .woocommerce-Price-amount,
.widget_shopping_cart_content .discounts-total del .amount,
.widget_shopping_cart_content .discounts-total del bdi{
  text-decoration: line-through !important;
}





/* ==    Checkout (classique & Blocks) — Pack headers  == */


/* Checkout classique : entête de pack en ligne de tableau */
.ir-bundle-header-row > td{
  padding:.35rem 0 .25rem;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.ir-bundle-header-row .ir-bundle-title{ font-weight:600; color:#444; }
.ir-bundle-header-row del.ir-pack-del{ opacity:.7; margin-right:.35rem; }
.ir-bundle-header-row ins.ir-pack-ins{ text-decoration:none; font-weight:700; color:#2a2a2a; }
tr.cart_item.ir-bundle-first-row{ border-top:none !important; }

/* Petit highlight optionnel d’un récap (si utilisé) */
/* #ir-chk-pack-summary { background: rgba(255,215,0,.12); outline: 1px dashed #c9a400; } */

/* Woo Blocks — titre pack dans la colonne résumé */
.wc-block-components-order-summary__content .ir-bundle-header--checkout .ir-bundle-title{
  color:#444;
}

/* Si des en-têtes de packs sont rendus, masque les prix par ligne (bruit) */
.wc-block-components-order-summary__content.ir-has-pack-headers
  .wc-block-components-order-summary-item__individual-prices,
.wc-block-components-order-summary__content.ir-has-pack-headers
  .wc-block-components-order-summary-item__total-price{
  display:none !important;
}

/* Adoucir la couleur du prix final de pack dans l'entête */
.wc-block-components-order-summary__content .ir-bundle-header--checkout ins.ir-pack-ins{
  color:#555 !important;
  font-weight:600;
}

/* Quand AU MOINS un pack affiche des totaux, cache les prix par produit */
.wc-block-components-order-summary__content.ir-has-pack-totals
  .wc-block-components-order-summary-item__individual-prices,
.wc-block-components-order-summary__content.ir-has-pack-totals
  .wc-block-components-order-summary-item__total-price{
  display:none !important;
}

/* (Optionnel) resserrer les lignes quand on masque les prix ligne */
.wc-block-components-order-summary__content.ir-has-pack-totals
  .wc-block-components-order-summary-item{
  padding-top:.25rem;
  padding-bottom:.25rem;
}

/* Header de pack en mode Blocks (ligne flex) */
.ir-bundle-header--checkout{
  display:flex; justify-content:space-between; align-items:baseline;
  padding:.35rem 0 .25rem; margin:.35rem 0 .25rem;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.ir-bundle-header--checkout .ir-bundle-title{ font-weight:600; color:#444; }
.ir-bundle-header--checkout del.ir-pack-del{ opacity:.7; margin-right:.35rem; }
.ir-bundle-header--checkout ins.ir-pack-ins{ text-decoration:none; font-weight:700; color:#2a2a2a; }



