/* =============================================================
   RC Bundles — Frontend CSS
   Charte RC : dark navy, accent #FF5C1B, glassmorphism
   ============================================================= */

:root {
  --rcb-accent:     #FF5C1B;
  --rcb-accent-dim: rgba(255, 92, 27, .12);
  --rcb-glass-bg:   rgba(255, 255, 255, .85);
  --rcb-glass-bdr:  rgba(0, 0, 0, .08);
  /* Textes adaptés au fond clair du front-end */
  --rcb-text:       #1a2533;
  --rcb-text-muted: rgba(26, 37, 51, .58);
  --rcb-green:      #1a9e3f;
  --rcb-red:        #c53030;
  --rcb-radius:     10px;
  --rcb-blur:       14px;
}

/* ---- Conteneur global ---- */
.rc-bundle-product {
  display:  flex;
  flex-direction: column;
  gap: 20px;
  color: var(--rcb-text);
  font-family: 'DM Sans', sans-serif;
}

/* =============================================================
   BADGE &Eacute;CONOMIE
   ============================================================= */
.rc-bundle-badge {
  display:     flex;
  align-items: center;
  gap:         14px;
  padding:     12px 18px;
  background:  linear-gradient(135deg, rgba(255,92,27,.16), rgba(255,92,27,.04));
  border:      1px solid rgba(255,92,27,.35);
  border-radius: var(--rcb-radius);
  animation:   rcb-fadein .4s ease;
}

.rc-bundle-badge__pct {
  flex-shrink: 0;
  background:  var(--rcb-accent);
  color:       #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size:   1.25rem;
  font-weight: 700;
  padding:     4px 12px;
  border-radius: 6px;
  letter-spacing: .02em;
}

.rc-bundle-badge__text {
  font-size: .92rem;
  color:     var(--rcb-text-muted);
  line-height: 1.4;
}

.rc-bundle-badge__text strong {
  color:       var(--rcb-accent);
  font-weight: 700;
}

/* =============================================================
   LISTE DES ARTICLES
   ============================================================= */
.rc-bundle-items {
  display:        flex;
  flex-direction: column;
  gap:            10px;
}

/* ---- Article ---- */
.rc-bundle-item {
  display:     flex;
  gap:         14px;
  align-items: flex-start;
  padding:     14px 16px;
  background:  var(--rcb-glass-bg);
  backdrop-filter: blur(var(--rcb-blur));
  -webkit-backdrop-filter: blur(var(--rcb-blur));
  border:      1px solid var(--rcb-glass-bdr);
  border-radius: var(--rcb-radius);
  transition:  border-color .2s;
}

.rc-bundle-item:hover {
  border-color: rgba(255,255,255,.14);
}

.rc-bundle-item--oos {
  opacity: .58;
}

/* Vignette produit */
.rc-bundle-item__thumb {
  position:    relative;
  flex-shrink: 0;
  width:       72px;
  height:      72px;
}

.rc-bundle-item__thumb img {
  width:         72px;
  height:        72px;
  object-fit:    contain;
  border-radius: 6px;
  display:       block;
}

/* Badge rupture */
.rc-bundle-item__oos-badge,
.rc-bundle-item__opt-badge {
  position:      absolute;
  top:           -6px;
  right:         -6px;
  font-size:     .6rem;
  font-weight:   700;
  padding:       2px 6px;
  border-radius: 4px;
  line-height:   1.4;
  white-space:   nowrap;
}

.rc-bundle-item__oos-badge {
  background: #c53030;
  color: #fff;
}

.rc-bundle-item__opt-badge {
  background: rgba(255,255,255,.12);
  color: var(--rcb-text-muted);
  top: auto;
  bottom: -6px;
}

/* Infos texte */
.rc-bundle-item__info {
  flex:           1;
  min-width:      0;
  display:        flex;
  flex-direction: column;
  gap:            4px;
}

.rc-bundle-item__name {
  font-weight:     600;
  font-size:       .92rem;
  color:           var(--rcb-text);
  text-decoration: none;
  line-height:     1.35;
  display:         block;
}

.rc-bundle-item__name:hover {
  color: var(--rcb-accent);
}

.rc-bundle-item__sku {
  font-size:  .75rem;
  color:      var(--rcb-text-muted);
  font-family: 'DM Mono', monospace, sans-serif;
}

/* Pricing inline */
.rc-bundle-item__pricing {
  display:     flex;
  align-items: baseline;
  flex-wrap:   wrap;
  gap:         6px;
  margin-top:  4px;
}

.rc-bundle-item__qty {
  font-size: .82rem;
  color:     var(--rcb-text-muted);
}

.rc-bundle-item__base {
  font-size:  .85rem;
  color:      var(--rcb-text-muted);
  text-decoration: line-through;
}

.rc-bundle-item__final {
  font-weight: 600;
  font-size:   .92rem;
  color:       var(--rcb-text);
  text-decoration: none;
}

.rc-bundle-item__disc {
  font-size:   .72rem;
  font-weight: 700;
  color:       var(--rcb-accent);
  background:  var(--rcb-accent-dim);
  padding:     1px 6px;
  border-radius: 4px;
}

/* Toggle optionnel */
.rc-bundle-item__opt-toggle {
  display:     flex;
  align-items: center;
  gap:         8px;
  margin-top:  8px;
  font-size:   .82rem;
  color:       var(--rcb-text-muted);
  cursor:      pointer;
  user-select: none;
}

.rc-bundle-item__opt-toggle input {
  accent-color: var(--rcb-accent);
  width:        15px;
  height:       15px;
  cursor:       pointer;
}

.rc-bundle-item--deselected {
  opacity: .45;
  filter: grayscale(.4);
}

/* =============================================================
   TOTAUX
   ============================================================= */
.rc-bundle-totals {
  background:  var(--rcb-glass-bg);
  backdrop-filter: blur(var(--rcb-blur));
  -webkit-backdrop-filter: blur(var(--rcb-blur));
  border:      1px solid var(--rcb-glass-bdr);
  border-radius: var(--rcb-radius);
  padding:     18px 20px;
  display:     flex;
  flex-direction: column;
  gap:         10px;
}

.rc-bundle-totals__row {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  font-size:       .9rem;
}

.rc-bundle-totals__base {
  color:       var(--rcb-text-muted);
  font-size:   .85rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rcb-glass-bdr);
}

.rc-bundle-totals__base del {
  color: rgba(255,255,255,.35);
}

.rc-bundle-totals__pack span:first-child {
  color:      var(--rcb-text-muted);
  font-size:  .9rem;
}

.rc-bundle-totals__price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size:   1.6rem;
  font-weight: 700;
  color:       var(--rcb-text);
  letter-spacing: .01em;
}

.rc-bundle-totals__savings {
  color:      var(--rcb-green);
  font-weight: 600;
  font-size:   .85rem;
}

.rc-bundle-totals__savings-amount em {
  font-style: normal;
  opacity:    .75;
  margin-left: 4px;
}

/* =============================================================
   ADD TO CART
   ============================================================= */
.rc-bundle-add-to-cart {
  display:     flex;
  gap:         12px;
  align-items: stretch;
}

.rc-bundle-add-to-cart .quantity {
  flex-shrink: 0;
}

.rc-bundle-add-to-cart .qty {
  height: 100%;
}

.rc-bundle-add-to-cart .rc-btn-primary {
  flex:        1;
  display:     flex;
  align-items: center;
  justify-content: center;
  gap:         10px;
  padding:     14px 24px;
  font-size:   1rem;
  font-weight: 700;
  letter-spacing: .04em;
  background:  var(--rcb-accent);
  color:       #fff;
  border:      none;
  border-radius: 8px;
  cursor:      pointer;
  transition:  background .2s, transform .1s;
  white-space: nowrap;
}

.rc-bundle-add-to-cart .rc-btn-primary:hover {
  background: #e04e12;
}

.rc-bundle-add-to-cart .rc-btn-primary:active {
  transform: scale(.98);
}

.rc-bundle-cart-icon {
  flex-shrink: 0;
  line-height: 0;
}

/* Message rupture */
.rc-bundle-oos-msg {
  display:     flex;
  align-items: center;
  gap:         10px;
  padding:     14px 18px;
  background:  rgba(197, 48, 48, .10);
  border:      1px solid rgba(197, 48, 48, .30);
  border-radius: var(--rcb-radius);
  color:       var(--rcb-red);
  font-size:   .9rem;
  margin:      0;
}

/* =============================================================
   MINI-CART / PANIER — liste articles
   ============================================================= */
.rc-bundle-cart-list {
  list-style:  none;
  margin:      6px 0 0;
  padding:     0;
  font-size:   .8rem;
  color:       rgba(0,0,0,.55);
}

.woocommerce-cart .rc-bundle-cart-list,
.widget_shopping_cart .rc-bundle-cart-list {
  color: rgba(0,0,0,.55);
}

.rc-bundle-cart-list li {
  padding:    2px 0;
  line-height: 1.4;
}

.rc-bundle-cart-list li span {
  margin-right: 4px;
  opacity: .45;
}

.rc-bundle-cart-item.rc-bundle-cart-oos {
  color: #e53e3e;
}

/* =============================================================
   ANIMATIONS
   ============================================================= */
@keyframes rcb-fadein {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 600px) {

  .rc-bundle-item {
    flex-wrap: wrap;
  }

  .rc-bundle-item__thumb {
    width:  56px;
    height: 56px;
  }

  .rc-bundle-item__thumb img {
    width:  56px;
    height: 56px;
  }

  .rc-bundle-add-to-cart {
    flex-direction: column;
  }

  .rc-bundle-add-to-cart .quantity {
    width: 100%;
  }

  .rc-bundle-totals__price {
    font-size: 1.35rem;
  }
}

@media (max-width: 380px) {
  .rc-bundle-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
