/* ── CART COUNT BADGE ── */
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px;
  display: none; place-items: center;
  padding: 0 5px; border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #f43fbd);
  color: #fff; font-size: 10px; font-weight: 950; line-height: 1;
  box-shadow: 0 2px 8px rgba(244,63,189,.45);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.icon-action[aria-label="Panier"] { position: relative; }
.cart-count.is-visible { display: grid; }
.cart-count.bump { transform: scale(1.55); }

/* ── DRAWER WRAPPER ── */
.cart-drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; }
.cart-drawer.is-open { visibility: visible; pointer-events: auto; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .45s ease; }
.cart-drawer.is-open .cart-backdrop { opacity: 1; }

/* ── PANEL ── */
.cart-panel {
  position: absolute; top: 0; right: 0;
  width: min(420px, 100%); height: 100%;
  display: flex; flex-direction: column;
  background: #fff; color: #111;
  box-shadow: -4px 0 40px rgba(0,0,0,.15);
  transform: translateX(105%);
  transition: transform .55s cubic-bezier(.19,1,.22,1);
  will-change: transform;
  overflow: hidden;
}
.cart-drawer.is-open .cart-panel { transform: translateX(0); }
.cart-drawer.is-closing { visibility: visible; pointer-events: none; }

/* ── URGENCY BAR ── */
.cart-urgency {
  background: #111; color: #fff;
  text-align: center; padding: 10px 16px;
  font-size: 13px; font-weight: 800;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cart-urgency-time {
  background: linear-gradient(90deg, #f43fbd, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 15px; font-weight: 950;
}

/* ── HEAD ── */
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #f0ede8;
  flex: 0 0 auto;
}
.cart-head h2 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.cart-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #e9e4dc; background: #faf9f6; color: #666;
  cursor: pointer; font-size: 22px; display: grid; place-items: center;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.cart-close:hover { background: #111; color: #fff; transform: rotate(90deg); }

/* ── SCROLLABLE BODY ── */
.cart-body { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #e0dbd4 transparent; }

/* ── ITEMS ── */
.cart-items { padding: 14px 16px; }

.cart-empty {
  min-height: 180px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 10px; padding: 32px;
  border: 1.5px dashed #e9e4dc; border-radius: 16px; color: #999; margin: 8px;
}
.cart-empty-icon { font-size: 36px; }
.cart-empty strong { color: #222; font-size: 14px; font-weight: 800; }
.cart-empty p { margin: 0; font-size: 13px; }
.cart-empty-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px;
  background: #111; color: #fff;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  text-decoration: none; transition: background .18s ease;
}
.cart-empty-cta:hover { background: #8b5cf6; }

.cart-item {
  display: grid; grid-template-columns: 74px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid #f5f2ee;
}
.cart-item:last-child { border-bottom: none; }
.cart-item img {
  width: 74px; height: 88px; object-fit: cover;
  border-radius: 10px; background: #f0ede8;
}
.cart-item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item-title { font-size: 13px; font-weight: 800; line-height: 1.3; color: #111; }

.cart-item-prices { display: flex; align-items: baseline; gap: 7px; }
.cart-item-price-old { font-size: 12px; color: #999; text-decoration: line-through; font-weight: 600; }
.cart-item-price-new { font-size: 15px; font-weight: 900; color: #111; }

.cart-item-variant {
  font-size: 11px; font-weight: 700; color: #888;
  text-transform: uppercase; letter-spacing: .05em;
}

.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.cart-qty {
  display: inline-flex; align-items: center;
  border: 1.5px solid #e9e4dc; border-radius: 999px;
  background: #faf9f6; overflow: hidden;
}
.cart-qty button {
  width: 32px; height: 32px; border: 0; background: transparent;
  cursor: pointer; font-size: 18px; color: #555;
  transition: background .15s ease, color .15s ease;
  display: grid; place-items: center;
}
.cart-qty button:hover { background: #111; color: #fff; }
.cart-qty span { min-width: 26px; text-align: center; font-size: 13px; font-weight: 900; }

.cart-remove {
  border: 0; background: transparent; cursor: pointer; padding: 5px;
  color: #ccc; transition: color .18s ease; display: grid; place-items: center;
  border-radius: 8px;
}
.cart-remove:hover { color: #e53e3e; background: #fff0f0; }
.cart-remove svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ── UPSELL ── */
.cart-upsell { padding: 0 16px 16px; border-bottom: 1px solid #f0ede8; }
.cart-upsell-title {
  font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
  color: #888; margin-bottom: 10px;
}
.cart-upsell-track {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding-bottom: 4px;
}
.cart-upsell-track::-webkit-scrollbar { display: none; }
.cart-upsell-card {
  flex: 0 0 140px;
  border: 1.5px solid #f0ede8; border-radius: 14px;
  background: #faf9f6; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .18s ease;
}
.cart-upsell-card:hover { border-color: #8b5cf6; }
.cart-upsell-img { width: 100%; aspect-ratio: 1; background: #ece9e3; overflow: hidden; }
.cart-upsell-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-upsell-body { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 4px; }
.cart-upsell-name { font-size: 11px; font-weight: 800; line-height: 1.25; color: #111; }
.cart-upsell-prices { display: flex; align-items: baseline; gap: 5px; }
.cart-upsell-old { font-size: 10px; color: #bbb; text-decoration: line-through; font-weight: 600; }
.cart-upsell-new { font-size: 12px; font-weight: 900; color: #111; }
.cart-upsell-btn {
  width: 100%; padding: 6px; border: 0; border-radius: 8px;
  background: #111; color: #fff; font-size: 11px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  transition: background .18s ease;
}
.cart-upsell-btn:hover { background: #8b5cf6; }

/* ── PROMO CODE ── */
.cart-promo { padding: 14px 16px; border-bottom: 1px solid #f0ede8; display: flex; gap: 8px; }
.cart-promo input {
  flex: 1; height: 44px; border: 1.5px solid #e9e4dc; border-radius: 12px;
  padding: 0 14px; font: inherit; font-size: 13px; font-weight: 700;
  background: #faf9f6; color: #111; outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.cart-promo input::placeholder { color: #bbb; font-weight: 500; }
.cart-promo input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.12); background: #fff; }
.cart-promo-btn {
  height: 44px; padding: 0 16px; border: 1.5px solid #111; border-radius: 12px;
  background: #fff; color: #111; font: inherit; font-size: 13px; font-weight: 900;
  cursor: pointer; white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.cart-promo-btn:hover { background: #111; color: #fff; }

/* ── FOOT ── */
.cart-foot { flex: 0 0 auto; padding: 16px 18px 20px; background: #fff; border-top: 1px solid #f0ede8; }

.cart-shipping {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; border-radius: 12px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  margin-bottom: 12px;
}
.cart-shipping-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; color: #0f7c59; }
.cart-shipping-bar { height: 4px; background: #d1fae5; border-radius: 99px; overflow: hidden; }
.cart-shipping-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #059669); transition: width .4s ease; }

.cart-totals { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: #666; }
.cart-total-row.savings { color: #0f7c59; font-weight: 800; }
.cart-total-row.main { font-size: 17px; font-weight: 900; color: #111; border-top: 1.5px solid #f0ede8; padding-top: 10px; margin-top: 4px; }

.cart-checkout {
  width: 100%; min-height: 54px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #f5a623, #f0830a);
  color: #fff; font-size: 15px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .06em; cursor: pointer;
  box-shadow: 0 8px 24px rgba(245,166,35,.38);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px;
}
.cart-checkout:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(245,166,35,.5); }
.cart-checkout svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2.2; fill: none; }

.cart-continue {
  width: 100%; min-height: 42px; border: 1.5px solid #e9e4dc; border-radius: 12px;
  background: #fff; color: #666; font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: border-color .18s ease, color .18s ease; margin-bottom: 14px;
}
.cart-continue:hover { border-color: #999; color: #111; }

/* ── PAYMENT SECTION ── */
.cart-pay-section {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  background: #faf9f6;
  border: 1px solid #f0ede8;
  border-radius: 16px;
}
.cart-pay-secure {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11px; font-weight: 800; color: #555;
  text-transform: uppercase; letter-spacing: .06em;
}
.cart-pay-secure svg { width: 14px; height: 14px; stroke: #10b981; stroke-width: 2.2; fill: none; flex: 0 0 auto; }
.cart-pay-icons {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.cart-pay-logo {
  height: 26px; padding: 4px 8px;
  background: #fff; border: 1px solid #e9e4dc; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.cart-pay-logo:hover { border-color: #bbb; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.cart-pay-logo svg { height: 14px; width: auto; display: block; }

/* ── TOAST ── */
.cart-toast {
  position: fixed; right: 20px; bottom: 80px; z-index: 110;
  opacity: 0; transform: translateX(20px); pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px; border-radius: 16px;
  background: #111; color: #fff; font-size: 13px; font-weight: 800;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
}
.cart-toast svg { width: 18px; height: 18px; stroke: #4ade80; stroke-width: 2.4; fill: none; flex: 0 0 auto; }
.cart-toast.is-visible { opacity: 1; transform: translateX(0); }

@media (max-width: 520px) { .cart-panel { width: 100%; } }
