/* =============================================================
   JASP · Tiroir panier et page panier
   Interface (pas une section de page) : tailles en px, même DA
   (bleu nuit, gris #f4f4f4, accents vert citron, pilules).
   ============================================================= */
.j-cart-lock { overflow: hidden; }
.j-cart { position: fixed; inset: 0; z-index: 1000; font-family: var(--j-font); color: var(--j-black); }
.j-cart *, .j-cart *::before, .j-cart *::after { box-sizing: border-box; }
.j-cart p, .j-cart ul { margin: 0; padding: 0; }
.j-cart ul { list-style: none; }
.j-cart a { color: inherit; text-decoration: none; }
.j-cart .j-cart__overlay { display: block; position: absolute; inset: 0; background: rgba(14, 49, 62, .35); opacity: 0; transition: opacity .3s ease; }
.j-cart__panel {
  position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(520px, calc(100% - 24px));
  display: flex; flex-direction: column; border-radius: 32px; background: var(--j-white); outline: none;
  box-shadow: 0 30px 80px rgba(14, 49, 62, .18); transform: translateX(calc(100% + 24px)); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.j-cart.is-open .j-cart__overlay { opacity: 1; }
.j-cart.is-open .j-cart__panel { transform: none; }
.j-cart.is-busy .j-cart__body, .j-cart.is-busy .j-cart__foot { opacity: .55; pointer-events: none; }

.j-cart__head { display: flex; align-items: center; justify-content: space-between; padding: 28px 28px 18px; }
.j-cart__title { font-weight: 600; font-size: 28px; line-height: 1; letter-spacing: -0.03em; color: var(--j-ink); }
.j-cart__title span { color: var(--j-grey-text); font-weight: 400; }
.j-cart__close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--j-grey-bg); color: var(--j-ink); cursor: pointer; transition: background-color .2s ease; }
.j-cart__close:hover { background: #e8e8e8; }

/* Livraison offerte */
.j-cart__ship { margin: 0 28px; padding: 16px 18px; border-radius: 20px; background: var(--j-grey-bg); }
.j-cart__ship-text { font-size: 15px; line-height: 1.3; color: var(--j-grey-nav); }
.j-cart__ship-text strong { color: var(--j-ink); font-weight: 600; }
.j-cart__bar { height: 8px; margin-top: 12px; border-radius: 8px; background: #e2e2e2; overflow: hidden; }
.j-cart__bar span { display: block; height: 100%; border-radius: 8px; background: var(--j-ink); transition: width .4s ease; }
.j-cart__ship.is-done { background: #d4ff5f; }
.j-cart__ship.is-done .j-cart__ship-text { color: var(--j-ink); }
.j-cart__ship.is-done .j-cart__bar { background: rgba(14, 49, 62, .15); }

/* Lignes */
.j-cart__body { flex: 1; overflow-y: auto; padding: 8px 28px 20px; transition: opacity .2s ease; }
.j-cart__line { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid #ececec; }
.j-cart__thumb { position: relative; display: block; width: 88px; height: 88px; border-radius: 18px; background: var(--j-grey-bg); overflow: hidden; }
.j-cart__thumb img { position: absolute; left: -30%; top: -25%; width: 160%; height: auto; max-width: none; }
.j-cart__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.j-cart__name { font-weight: 600; font-size: 17px; line-height: 1.15; letter-spacing: -0.01em; color: var(--j-ink); }
.j-cart__meta { font-size: 14px; color: var(--j-grey-text); }
.j-cart__tag { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 20px; background: #d4ff5f; font-size: 12px; font-weight: 600; color: var(--j-ink); }
.j-cart__ctrl { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.j-cart__qty { display: flex; align-items: center; height: 38px; border: 2px solid #e6e6e6; border-radius: 40px; }
.j-cart__qty button { width: 34px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--j-ink); }
.j-cart__qty span { min-width: 18px; text-align: center; font-size: 15px; color: var(--j-ink); }
.j-cart__remove { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--j-grey-text); text-decoration: underline; text-underline-offset: .2em; }
.j-cart__remove:hover { color: var(--j-ink); }
.j-cart__price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 600; font-size: 17px; color: var(--j-ink); white-space: nowrap; }
.j-cart__price s { font-weight: 400; font-size: 13px; color: var(--j-grey-text); }

/* Vide */
.j-cart__empty { display: flex; flex-direction: column; gap: 12px; padding: 40px 0 10px; text-align: center; }
.j-cart__empty[hidden] { display: none; }
.j-cart__empty-title { font-weight: 600; font-size: 24px; letter-spacing: -0.02em; color: var(--j-ink); }
.j-cart__empty-text { margin-bottom: 10px !important; font-size: 15px; line-height: 1.4; color: var(--j-grey-nav); }

/* Suggestions */
.j-cart__upsell { margin-top: 24px; }
.j-cart__upsell[hidden] { display: none; }
.j-cart__label { margin-bottom: 12px !important; font-weight: 700; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--j-blue); }
.j-cart__upsell ul { display: grid; gap: 10px; }
.j-cart__up { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: 22px; background: var(--j-grey-bg); }
.j-cart__up[hidden] { display: none; }
.j-cart__up .j-cart__thumb { width: 64px; height: 64px; border-radius: 14px; background: #eaeaea; }
.j-cart__up-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.j-cart__up .j-cart__name { font-size: 15px; }
.j-cart__up .j-cart__meta { font-size: 13px; }
.j-cart__add { height: 38px; padding: 0 16px; border: 0; border-radius: 40px; background: var(--j-white); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--j-ink); transition: background-color .2s ease, color .2s ease; }
.j-cart__add:hover { background: var(--j-ink); color: var(--j-white); }

/* Pied */
.j-cart__foot { padding: 20px 28px 24px; border-top: 1px solid #ececec; background: var(--j-white); }
.j-cart__foot[hidden] { display: none; }
.j-cart__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; color: var(--j-ink); }
.j-cart__row strong { font-weight: 600; font-size: 22px; }
.j-cart__row--save { margin-top: 4px !important; font-size: 14px; color: var(--j-blue); }
.j-cart__row--save[hidden] { display: none; }
.j-cart__note { margin-top: 6px !important; font-size: 13px; color: var(--j-grey-text); }
.j-cart__btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 56px; padding: 0 24px; border-radius: 55px; font-size: 17px; font-weight: 600; transition: background-color .2s ease, transform .2s ease; }
.j-cart__btn:hover { transform: translateY(-1px); }
.j-cart__btn--dark { background: var(--j-ink); color: var(--j-white) !important; }
.j-cart__btn--dark:hover { background: #164a5d; }
.j-cart__btn--ghost { border: 2px solid #e2e2e2; color: var(--j-ink); }
.j-cart__checkout { margin-top: 16px; }
.j-cart__trust { margin-top: 12px !important; text-align: center; font-size: 13px; color: var(--j-grey-text); }
.j-cart__link { display: block; margin-top: 6px; text-align: center; font-size: 13px; color: var(--j-grey-nav); text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 600px) {
  .j-cart__panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92dvh; border-radius: 28px 28px 0 0; transform: translateY(100%); }
  .j-cart__head { padding: 22px 20px 14px; }
  .j-cart__title { font-size: 24px; }
  .j-cart__ship { margin: 0 20px; }
  .j-cart__body { padding: 4px 20px 16px; }
  .j-cart__foot { padding: 16px 20px 20px; }
  .j-cart__line { grid-template-columns: 72px 1fr auto; gap: 12px; }
  .j-cart__thumb { width: 72px; height: 72px; }
}

/* =============================================================
   Page panier (/cart)
   ============================================================= */
.j-cartpage__panel { display: grid; grid-template-columns: minmax(0, 1fr) calc(600 * var(--u)); gap: calc(48 * var(--u)); align-items: start; padding: calc(80 * var(--u)) calc(56 * var(--u)) calc(56 * var(--u)) calc(95.8 * var(--u)); }
.j-cartpage__head .j-title-2 { margin-top: calc(24 * var(--u)); }
.j-cartpage__lines { margin-top: calc(48 * var(--u)); list-style: none; }
.j-cartpage__line { display: grid; grid-template-columns: calc(150 * var(--u)) minmax(0, 1fr) auto; gap: calc(32 * var(--u)); align-items: center; padding: calc(28 * var(--u)); border-radius: calc(40 * var(--u)); background: var(--j-white); }
.j-cartpage__line + .j-cartpage__line { margin-top: calc(14 * var(--u)); }
.j-cartpage__thumb { position: relative; display: block; width: calc(150 * var(--u)); height: calc(150 * var(--u)); border-radius: calc(28 * var(--u)); background: var(--j-grey-bg); overflow: hidden; }
.j-cartpage__thumb img { position: absolute; left: -30%; top: -25%; width: 160%; height: auto; max-width: none; }
.j-cartpage__name { font-weight: 600; font-size: max(17px, calc(30 * var(--u))); line-height: 1.1; letter-spacing: -0.02em; color: var(--j-ink); }
.j-cartpage__meta { margin-top: calc(8 * var(--u)) !important; font-size: max(14px, calc(20 * var(--u))); color: var(--j-grey-text); }
.j-cartpage__ctrl { display: flex; align-items: center; gap: calc(20 * var(--u)); margin-top: calc(18 * var(--u)); }
.j-cartpage__ctrl .j-qty { height: calc(60 * var(--u)); }
.j-cartpage__remove { font-size: max(13px, calc(19 * var(--u))); color: var(--j-grey-text); text-decoration: underline !important; text-underline-offset: .2em; }
.j-cartpage__price { text-align: right; font-weight: 600; font-size: max(17px, calc(30 * var(--u))); color: var(--j-ink); white-space: nowrap; }
.j-cartpage__price s { display: block; font-weight: 400; font-size: max(13px, calc(19 * var(--u))); color: var(--j-grey-text); }
.j-cartpage__aside { position: sticky; top: calc(24 * var(--u)); padding: calc(44 * var(--u)); border-radius: calc(40 * var(--u)); background: var(--j-white); }
.j-cartpage__aside .j-cart__ship { margin: 0 0 calc(28 * var(--u)); }
.j-cartpage__aside .j-cart__row strong { font-size: max(20px, calc(36 * var(--u))); }
.j-cartpage__aside .j-btn { width: 100%; margin-top: calc(28 * var(--u)); }
.j-cartpage__trust { display: grid; gap: calc(10 * var(--u)); margin-top: calc(28 * var(--u)) !important; list-style: none; font-size: max(13px, calc(19 * var(--u))); color: var(--j-grey-nav); }
.j-cartpage__trust li::before { content: '✓'; margin-right: .6em; color: var(--j-blue); font-weight: 700; }
.j-cartpage__empty { margin-top: calc(48 * var(--u)); padding: calc(64 * var(--u)); border-radius: calc(40 * var(--u)); background: var(--j-white); text-align: center; }
.j-cartpage__empty .j-text { margin: calc(20 * var(--u)) auto calc(36 * var(--u)); max-width: calc(620 * var(--u)); }
.j-cartpage__empty .j-buttons { justify-content: center; }

@media (max-width: 989px) {
  .j-cartpage__panel { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 28px 12px 12px; }
  .j-cartpage__head { padding: 0 10px; }
  .j-cartpage__lines { margin-top: 20px; }
  .j-cartpage__line { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: 24px; }
  .j-cartpage__thumb { width: 80px; height: 80px; border-radius: 16px; }
  .j-cartpage__price { grid-column: 2; text-align: left; }
  .j-cartpage__ctrl .j-qty { height: 44px; }
  .j-cartpage__aside { position: static; padding: 20px; border-radius: 24px; }
  .j-cartpage__empty { padding: 32px 20px; border-radius: 24px; }
}
.j-cartpage__ctrl .j-qty a { display: grid; place-items: center; width: calc(52 * var(--u)); min-width: 36px; height: 100%; font-size: max(18px, calc(28 * var(--u))); color: var(--j-ink); }
.j-cartpage__ctrl .j-qty span { min-width: calc(30 * var(--u)); text-align: center; font-size: max(15px, calc(24 * var(--u))); color: var(--j-ink); }
.j-cartpage__aside .j-cart__ship { padding: calc(22 * var(--u)) calc(26 * var(--u)); border-radius: calc(28 * var(--u)); }
.j-cartpage__aside .j-cart__ship-text { font-size: max(14px, calc(21 * var(--u))); }
.j-cartpage__aside .j-cart__row { font-size: max(16px, calc(24 * var(--u))); }
.j-cartpage__aside .j-cart__row--save { font-size: max(14px, calc(20 * var(--u))); }
.j-cartpage__aside .j-cart__note { font-size: max(13px, calc(18 * var(--u))); }
