/* ═══════════════════════════════════════════════════════════════════
   Page Panier — État VIDE (pm-cart-empty)
   Porté depuis panier-mobile.html + panier-desktop.html.
   Scopé à .pm-cart-empty + .custom-cart-page:has(.pm-cart-empty).
   Header / nav / footer : gérés par le thème.
═══════════════════════════════════════════════════════════════════ */

/* ── Disable page-wrap constraints when cart is empty ── */
.custom-cart-page:has(.pm-cart-empty) .page-wrap {
  padding: 0;
  max-width: 100%;
}
/* Shipping bar makes no sense with an empty cart */
.custom-cart-page:has(.pm-cart-empty) .mobile-bar-shipping,
.custom-cart-page:has(.pm-cart-empty) .desktop-bar-shipping {
  display: none !important;
}

/* ═══ VARIABLES ═══ */
.pm-cart-empty {
  --gold: #b08a26;
  --border: #e2dfda;
  --muted: #787878;
  --text: #0c0c0c;
  --fd: 'Bebas Neue', sans-serif;
  --fb: 'Gilroy', sans-serif;
  --fi: 'Cormorant Garamond', serif;
}

/* ═══ SECTION WRAPPER ═══ */
.pm-cart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(80vh - 80px);
  padding: clamp(40px, 5vw, 72px) clamp(16px, 3.5vw, 56px);
  background: #fff;
}

.pm-cart-empty__inner {
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ═══ BREADCRUMB ═══ */
.pm-cart-empty__bc {
  font: 300 8px/1 var(--fb);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(40px, 6vw, 72px);
  animation: ceFadeUp 0.55s 0.55s ease both;
}
.pm-cart-empty__bc span {
  color: var(--border);
}
.pm-cart-empty__bc a {
  color: var(--muted);
  transition: color 0.2s;
  text-decoration: none;
}
.pm-cart-empty__bc a:hover {
  color: var(--text);
}

/* ═══ ICON ANIMÉ ═══ */
.pm-cart-empty__icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation:
    ceFadeUp 0.7s 0.6s ease both,
    ceBob 5s 2s ease-in-out infinite;
}
.pm-cart-empty__icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--text);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.18;
}

/* ── Tracé SVG en cascade ── */
.pm-cart-empty__icon svg path:nth-child(1) {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: ceDraw 1s 0.65s ease forwards;
}
.pm-cart-empty__icon svg path:nth-child(2) {
  stroke-dasharray: 95;
  stroke-dashoffset: 95;
  animation: ceDraw 0.7s 1s ease forwards;
}
.pm-cart-empty__icon svg line {
  stroke-dasharray: 72;
  stroke-dashoffset: 72;
  animation: ceDraw 0.45s 1.2s ease forwards;
}
.pm-cart-empty__icon svg text {
  opacity: 0;
  animation: ceTextFade 0.4s 1.35s ease forwards;
}

/* ═══ LABEL OR ═══ */
.pm-cart-empty__label {
  font: 300 8px/1 var(--fb);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
  animation: ceFadeUp 0.55s 0.88s ease both;
}

/* ═══ TITRE ═══ */
.pm-cart-empty__title {
  font-family: var(--fd);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
  animation: ceFadeUp 0.65s 0.98s ease both;
}
/* Sous-titre italic */
.pm-cart-empty__title em {
  display: block;
  font-style: normal;
  font-family: var(--fi);
  font-weight: 300;
  font-size: 0.42em;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 4px;
}

/* ═══ FILET ═══ */
.pm-cart-empty__rule {
  border: none;
  border-top: 1px solid var(--border);
  width: 48px;
  margin: 0 auto 18px;
  animation: ceRuleGrow 0.5s 1.1s ease both;
  transform-origin: center;
}

/* ═══ TEXTE ═══ */
.pm-cart-empty__text {
  font-family: var(--fi);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: clamp(20px, 2.5vw, 28px);
  max-width: 400px;
  animation: ceFadeUp 0.55s 1.16s ease both;
}

/* ═══ CTAs ═══ */
.pm-cart-empty__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
  animation: ceFadeUp 0.55s 1.28s ease both;
}
.pm-cart-empty__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 300 9.5px/1 var(--fb);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  text-decoration: none;
  transition:
    background 0.22s,
    color 0.22s;
}
.pm-cart-empty__btn svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}
.pm-cart-empty__btn:hover {
  background: var(--text);
  color: #fff;
}
.pm-cart-empty__btn--filled {
  background: var(--text);
  color: #fff;
}
.pm-cart-empty__btn--filled:hover {
  background: transparent;
  color: var(--text);
}

/* ═══ TRUST ═══ */
.pm-cart-empty__trust {
  font: 300 8.5px/1 var(--fb) !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  animation: ceFadeUp 0.55s 1.4s ease both;
  max-width: unset !important;
}
.pm-cart-empty__trust span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #bbb;
}
.pm-cart-empty__trust span::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.pm-cart-empty__trust span:first-child::before {
  display: none;
}

/* ═══ KEYFRAMES ═══ */
@keyframes ceFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ceBob {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes ceRuleGrow {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
@keyframes ceDraw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes ceTextFade {
  to {
    opacity: 0.6;
  }
}

/* ═══ MOBILE (≤ 767px) ═══ */
@media (max-width: 767px) {
  .pm-cart-empty {
    min-height: calc(100svh - 78px);
    padding: 40px 20px calc(48px + env(safe-area-inset-bottom, 0px));
    align-items: center;
  }
  .pm-cart-empty__inner {
    max-width: 400px;
  }
  .pm-cart-empty__title {
    font-size: clamp(44px, 14vw, 72px);
  }
  /* Boutons pleine largeur en colonne */
  .pm-cart-empty__ctas {
    flex-direction: column;
    width: 100%;
  }
  .pm-cart-empty__btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    min-height: 50px;
  }
  /* Trust : liste verticale, séparateurs dorés masqués */
  .pm-cart-empty__trust {
    flex-direction: column;
    gap: 6px;
  }
  .pm-cart-empty__trust span::before {
    display: none;
  }
}
