/* Draft Studio — base styles
   Forked from the UI kit, kept tight to the design system. */

@import url("./tokens.css");

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--ds-black);
  color: var(--ds-paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; }
button { font-family: inherit; }

/* ── Header ──────────────────────────────────────────────────── */
.ds-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h, 75px);
  background: var(--ds-black);
  box-shadow: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gut);
}
.ds-header__left { display: flex; align-items: center; gap: 40px; }
.ds-header__brand { display: flex; align-items: center; gap: 14px; cursor: pointer; text-decoration: none; color: var(--ds-paper); }
.ds-header__brand img { width: 48px; height: 48px; }
.ds-header__wordmark { font-family: var(--font-wordmark); font-weight: 700; font-size: 28px; letter-spacing: 0; line-height: 1; color: var(--ds-paper); white-space: nowrap;}
.ds-header__nav { display: flex; align-items: center; gap: 28px; }
.ds-header__nav a {
  color: var(--ds-paper); text-decoration: none;
  font-family: var(--font-display);
  font-weight: 400; font-size: 14px;
  letter-spacing: 0.10em; text-transform: uppercase;
  padding: 6px 0;
  transition: opacity .12s;
  position: relative;
}
.ds-header__nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.ds-header__nav a .new-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--ds-paper);
  margin-left: 6px; vertical-align: middle;
}

.ds-header__icons { display: flex; align-items: center; gap: 18px;}
.ds-iconbtn {
  background: none; border: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ds-paper);
  transition: transform .12s cubic-bezier(.2,.8,.2,1);
}
.ds-iconbtn:hover { transform: translateY(-1px); }
.ds-iconbtn:active { transform: scale(0.95); }
.ds-iconbtn:focus-visible { outline: 2px solid var(--ds-paper); outline-offset: 4px; border-radius: 4px;}
.ds-iconbtn .wrap { position: relative; display: inline-flex; }
.ds-iconbtn .badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 18px; height: 18px; border-radius: 999px;
  background: #ffffff; color: var(--ds-black);
  font-size: 11px; font-weight: 700; letter-spacing: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
/* Panier vide : le <span> compteur est vide -> on masque la pastille. */
.ds-iconbtn .badge:empty { display: none; }

/* ── Marquee ─────────────────────────────────────────────────── */
.ds-marquee {
  height: var(--marquee-h, 85px);
  background: var(--ds-ink);
  border-top: 2px solid var(--ds-paper);
  border-bottom: 2px solid var(--ds-paper);
  overflow: hidden;
  display: flex; align-items: center;
}
.ds-marquee__track {
  display: flex; gap: 0; white-space: nowrap;
  animation: ds-mscroll 40s linear infinite;
  will-change: transform;
}
.ds-marquee__span {
  display: inline-block;
  padding-right: 80px;
  font-family: var(--font-display);
  font-weight: 400; font-size: 24px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ds-paper);
}
.ds-marquee__sep {
  display: inline-block;
  padding-right: 80px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 24px;
  color: var(--ds-paper);
  opacity: 0.5;
}
@keyframes ds-mscroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Pills ───────────────────────────────────────────────────── */
.ds-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 70px; padding: 0 32px;
  background: var(--ds-paper); color: var(--ds-ink);
  border: none; border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .12s cubic-bezier(.2,.8,.2,1), color .12s ease, transform .1s;
}
.ds-pill:hover { background: #e6e6e6; color: var(--ds-ink); box-shadow: none;}
.ds-pill--arrow { gap: 10px; }
.ds-pill--arrow svg { transition: transform .15s ease; }
.ds-pill--arrow:hover svg { transform: translateX(4px); }
.ds-pill:active { transform: scale(0.97); }
.ds-pill:focus-visible { outline: 2px solid var(--ds-paper); outline-offset: 3px;}
.ds-pill--sm { height: 50px; font-size: 16px; padding: 0 22px;}
.ds-pill--md { height: 60px; font-size: 18px; padding: 0 26px;}
.ds-pill--outline {
  background: transparent; color: var(--ds-paper);
  border: 2px solid var(--ds-paper);
}
.ds-pill--outline:hover { background: rgba(250,250,250,0.10); color: var(--ds-paper); box-shadow: none;}
.ds-pill--outline:disabled { opacity: 0.5; cursor: not-allowed;}

/* ── Toast ───────────────────────────────────────────────────── */
.ds-toast {
  position: fixed; right: 22px; top: 92px;
  z-index: 70;
  background: var(--ds-paper); color: var(--ds-ink);
  padding: 16px 22px;
  border-radius: 15px;
  display: flex; align-items: center; gap: 14px;
  font-weight: 500; font-size: 15px;
  letter-spacing: 0;
  box-shadow: 5px 5px 16px rgba(0,0,0,0.5);
  transform: translateX(120%);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s;
  pointer-events: none;
  max-width: 380px;
}
.ds-toast.open { transform: translateX(0); opacity: 1; pointer-events: auto;}
.ds-toast__thumb {
  width: 48px; height: 48px; border-radius: 8px;
  background: var(--ds-ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.ds-toast__thumb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));}
.ds-toast__body { display: flex; flex-direction: column; gap: 2px; min-width: 0;}
.ds-toast__title { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;}
.ds-toast__sub { font-weight: 300; font-size: 13px; color: rgba(38,38,38,0.7);}

/* ── Cart drawer ─────────────────────────────────────────────── */
.ds-cart-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 80;
  opacity: 0; pointer-events: none;
  transition: opacity .24s ease;
}
.ds-cart-scrim.open { opacity: 1; pointer-events: auto;}
.ds-cart {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 440px;
  background: var(--ds-black);
  border-left: 2px solid var(--ds-paper);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  z-index: 90;
  display: flex; flex-direction: column;
  color: var(--ds-paper);
}
.ds-cart.open { transform: translateX(0);}
.ds-cart__head {
  height: 75px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--ds-paper);
  flex-shrink: 0;
}
.ds-cart__title { font-weight: 700; font-size: 22px; letter-spacing: 0.05em; text-transform: uppercase;}
.ds-cart__close {
  background: none; border: none; color: var(--ds-paper); font-size: 30px; line-height: 1; font-weight: 300; cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .12s;
}
.ds-cart__close:hover { background: rgba(250,250,250,0.10);}
.ds-cart__items { flex: 1; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; overflow: auto;}
.ds-cart__item {
  display: grid; grid-template-columns: 110px 1fr auto;
  align-items: stretch;
  border-radius: 15px; background: var(--ds-ink);
  overflow: hidden;
}
.ds-cart__thumb { display: block; align-self: stretch; background: #d7d9dc; border-radius: 0; cursor: pointer;}
.ds-cart__body { align-self: center; padding: 14px 0 14px 14px; min-width: 0;}
.ds-cart__thumb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));}
.ds-cart__item-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em;}
.ds-cart__item-sub  { font-size: 12px; color: rgba(250,250,250,0.55); letter-spacing: 0.04em; margin-top: 4px;}
.ds-cart__item-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px;}
.ds-cart__item-qtybox { display: inline-flex; align-items: center; gap: 4px; height: 28px;}
.ds-cart__item-qtybox button {
  width: 28px; height: 28px; background: rgba(250,250,250,0.08); border: none; border-radius: 6px;
  color: var(--ds-paper); cursor: pointer; font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.ds-cart__item-qtybox button:hover { background: rgba(250,250,250,0.18);}
.ds-cart__item-qtybox .v { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px;}
.ds-cart__item-remove {
  background: none; border: none; color: rgba(250,250,250,0.55); cursor: pointer;
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 0;
}
.ds-cart__item-remove:hover { color: var(--ds-paper);}
.ds-cart__item-price { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; align-self: start; padding: 14px 14px 0 0;}
.ds-cart__foot { padding: 20px 24px 24px; border-top: 2px solid var(--ds-paper); flex-shrink: 0;}
.ds-cart__subline { display: flex; justify-content: space-between; font-size: 13px; color: rgba(250,250,250,0.7); margin-bottom: 6px; }
.ds-cart__total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 22px; margin: 6px 0 16px; letter-spacing: 0.05em; text-transform: uppercase;}
.ds-cart__total .amt { letter-spacing: -0.02em; font-size: 26px;}
.ds-cart__foot .ds-pill { width: 100%; height: 60px; font-size: 18px; }
.ds-cart__empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: rgba(250,250,250,0.55); gap: 14px; padding: 40px;
  text-align: center;
}
.ds-cart__empty-title { font-size: 22px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ds-paper);}
.ds-cart__empty-sub { font-size: 14px; line-height: 1.5;}

/* badge pop on count change */
.ds-iconbtn .badge { animation: ds-badge-pop .34s cubic-bezier(.2,.9,.3,1.5); }
@keyframes ds-badge-pop {
  0%   { transform: scale(.2); }
  60%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* free-shipping progress */
.ds-cart__ship { padding: 16px 24px 6px; flex-shrink: 0; }
.ds-cart__ship-msg {
  font-size: 12.5px; letter-spacing: 0.02em; color: rgba(250,250,250,0.8);
  display: flex; align-items: center; gap: 7px;
}
.ds-cart__ship-msg strong { font-weight: 700; color: var(--ds-paper); }
.ds-cart__ship-msg svg { color: var(--ds-paper); }
.ds-cart__ship-bar {
  margin-top: 10px; height: 6px; border-radius: 999px;
  background: rgba(250,250,250,0.14); overflow: hidden;
}
.ds-cart__ship-bar > i {
  display: block; height: 100%; background: var(--ds-paper);
  border-radius: 999px; transition: width .4s cubic-bezier(.2,.8,.2,1);
}

/* just-added line highlight */
.ds-cart__item.is-added { animation: ds-item-in 2s ease forwards; }
@keyframes ds-item-in {
  0%   { box-shadow: 0 0 0 2px var(--ds-paper); }
  100% { box-shadow: 0 0 0 0 rgba(250,250,250,0); }
}

/* coupon */
.ds-cart__coupon { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ds-cart__coupon input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  background: transparent; border: 1.5px solid rgba(250,250,250,0.3); border-radius: 8px;
  color: var(--ds-paper); font-family: var(--font-sans); font-size: 14px;
}
.ds-cart__coupon input::placeholder { color: rgba(250,250,250,0.4); }
.ds-cart__coupon input:focus { outline: none; border-color: var(--ds-paper); }
.ds-cart__coupon .ds-pill { height: 42px; padding: 0 18px; font-size: 14px; letter-spacing: 0.04em; flex-shrink: 0;}
.ds-cart__coupon.is-error input { border-color: rgba(250,250,250,0.7); }
.ds-cart__coupon-err { flex-basis: 100%; font-size: 12px; color: rgba(250,250,250,0.6); margin-top: -2px; }
.ds-cart__coupon-applied {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; padding: 10px 14px; border-radius: 8px;
  border: 1.5px dashed rgba(250,250,250,0.35);
}
.ds-cart__coupon-tag { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.ds-cart__coupon-applied button { background: none; border: none; color: rgba(250,250,250,0.55); cursor: pointer; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.ds-cart__coupon-applied button:hover { color: var(--ds-paper); }

.ds-cart__subline--discount { color: var(--ds-paper); font-weight: 700; }

/* dual action row: view cart + checkout */
.ds-cart__actions { display: flex; gap: 10px; align-items: stretch; margin-top: 4px; }
.ds-cart__foot .ds-cart__actions .ds-pill { width: auto; height: 60px; padding: 0 20px; }
.ds-cart__foot .ds-cart__actions .ds-pill:first-child { flex: 0 0 auto; font-size: 16px; }
.ds-cart__foot .ds-cart__actions .ds-pill:last-child { flex: 1; font-size: 18px; }

/* trust + payment icons */
.ds-cart__trust { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ds-cart__trust-lbl { display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: 0.04em; color: rgba(250,250,250,0.6); }
.ds-cart__trust-lbl svg { color: rgba(250,250,250,0.8); }
.ds-cart__pays { display: flex; gap: 8px; }
.ds-cart__pays .chip {
  font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.06em;
  color: rgba(250,250,250,0.55); border: 1px solid rgba(250,250,250,0.22);
  border-radius: 4px; padding: 4px 8px;
}

/* clickable product image → product page */
.ds-imglink { display: block; width: 100%; height: 100%; cursor: pointer; }
.ds-imglink:hover { opacity: 0.92; }

/* ── Footer ──────────────────────────────────────────────────── */
.ds-footer {
  border-top: 2px solid var(--ds-paper);
  padding: 60px var(--gut) 32px;
  background: var(--ds-ink);
  color: var(--ds-paper);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.ds-footer h4 { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.10em; text-transform: uppercase; margin: 0 0 18px; font-weight: 400; color: var(--ds-paper);}
.ds-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px;}
.ds-footer a { color: var(--ds-paper); text-decoration: none; font-size: 14px; font-weight: 400;}
.ds-footer a:hover { color: var(--ds-paper); text-decoration: underline; text-underline-offset: 4px;}
.ds-footer__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 16px;}
.ds-footer__brand img { width: 42px; height: 42px;}
.ds-footer__brand span { font-family: var(--font-wordmark); font-weight: 700; font-size: 26px;}
.ds-footer__tagline { font-family: var(--font-sans); font-size: 13px; color: var(--ds-paper); max-width: 340px; line-height: 1.55; margin-bottom: 36px; }
.ds-footer__socials { display: flex; flex-direction: column; gap: 14px; }
.ds-footer__social-lbl { font-family: var(--font-display); font-size: 13px; font-weight: 400; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ds-paper); }
.ds-footer__social { display: flex; gap: 16px; }
.ds-footer__social a {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ds-paper);
  transition: opacity .12s;
}
.ds-footer__social a:hover { opacity: 0.65; }
.ds-footer__legal {
  grid-column: 1 / -1;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid rgba(250,250,250,0.10);
  font-size: 12px; color: var(--ds-paper); letter-spacing: 0.05em;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.ds-footer__pays { display: flex; align-items: center; gap: 10px; opacity: 0.7;}
.ds-footer__pays .chip { font-family: var(--font-display); padding: 4px 10px; border: 1px solid rgba(250,250,250,0.25); border-radius: 4px; font-size: 10px; font-weight: 400; letter-spacing: 0.08em;}
