@import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,800&display=swap");

/* ================================================================
   BOÎTE PTK — animation 3D CSS (rotation)
   Étui PATCH T-KARE 120 x 320 x 30 mm — échelle 1 mm ~ 2,125 px
   Aucune dépendance JS.
   ================================================================ */

.ptk-stage {
  --ptk-scale: 1;
  /* durée d'un aller-retour complet — les trois animations doivent rester synchrones */
  --ptk-duree: 16s;
  --ptk-w: 255px;
  --ptk-h: 680px;
  --ptk-d: 64px;
  --ptk-noir: #04090d;
  --ptk-orange: #ff5f00;
  --ptk-orange-poche: #e5610d;
  --ptk-orange-rabat: #e76006;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2600px;
  font-family: "Archivo", system-ui, sans-serif;
  width: 100%;
  height: calc(var(--ptk-h) * var(--ptk-scale) + 90px);
  overflow: hidden;
}

.ptk-box {
  position: relative;
  width: var(--ptk-w);
  height: var(--ptk-h);
  transform-style: preserve-3d;
  animation: ptk-spin var(--ptk-duree) cubic-bezier(0.45, 0, 0.55, 1) infinite;
  scale: var(--ptk-scale);
}

@keyframes ptk-spin {
  0% {
    transform: rotateX(-9deg) rotateY(-30deg) translateY(0);
  }
  50% {
    transform: rotateX(-13deg) rotateY(26deg) translateY(-12px);
  }
  100% {
    transform: rotateX(-9deg) rotateY(-30deg) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ptk-box {
    animation: none;
    transform: rotateX(-9deg) rotateY(-24deg);
  }
  .ptk-sheen {
    animation: none;
    opacity: 0.12;
  }
  .ptk-shadow {
    animation: none;
  }
}

.ptk-face {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  background: var(--ptk-noir);
  backface-visibility: hidden;
}

.ptk-face img {
  position: absolute;
  top: 0;
  height: var(--ptk-h);
  width: 383px;
  object-fit: cover;
}

.ptk-front {
  width: var(--ptk-w);
  height: var(--ptk-h);
  transform: translateZ(32px);
}
.ptk-front img {
  left: -64px;
}

.ptk-right {
  width: var(--ptk-d);
  height: var(--ptk-h);
  background: #080d11;
  transform: translateX(223px) rotateY(90deg);
}
.ptk-right img {
  left: -172px;
}

.ptk-left {
  width: var(--ptk-d);
  height: var(--ptk-h);
  background: #080d11;
  transform: translateX(-32px) rotateY(-90deg);
}
.ptk-left img {
  left: 0;
}

.ptk-top,
.ptk-bottom {
  width: var(--ptk-w);
  height: var(--ptk-d);
  background: var(--ptk-orange-rabat);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptk-top {
  transform: translateY(-32px) rotateX(90deg);
}
.ptk-bottom {
  transform: translateY(648px) rotateX(-90deg);
  justify-content: flex-start;
  padding-left: 21px;
  box-sizing: border-box;
}

.ptk-flap-url {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #fff;
  font-weight: 500;
}
.ptk-flap-mention {
  font-size: 6px;
  line-height: 1.5;
  color: #fff;
}

/* ---- ombre au sol ---- */
.ptk-shadow {
  position: absolute;
  left: -52px;
  top: 694px;
  width: 359px;
  height: 74px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.18) 46%,
    rgba(0, 0, 0, 0) 72%
  );
  transform: rotateX(90deg);
  transform-origin: center top;
  filter: blur(3px);
  animation: ptk-shadow var(--ptk-duree) cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes ptk-shadow {
  0%,
  100% {
    opacity: 0.55;
    transform: rotateX(90deg) scale(1);
  }
  50% {
    opacity: 0.32;
    transform: rotateX(90deg) scale(1.1);
  }
}

/* ---- reflet spéculaire sur la face avant ---- */
.ptk-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 34%,
    rgba(255, 255, 255, 0.16) 48%,
    rgba(255, 255, 255, 0.03) 60%,
    rgba(255, 255, 255, 0) 72%
  );
  animation: ptk-sheen var(--ptk-duree) cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes ptk-sheen {
  0% {
    opacity: 0;
    transform: translateX(-130%) skewX(-14deg);
  }
  18% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.1;
    transform: translateX(130%) skewX(-14deg);
  }
  100% {
    opacity: 0;
    transform: translateX(130%) skewX(-14deg);
  }
}

.ptk-edges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    95deg,
    rgba(0, 0, 0, 0.34) 0%,
    rgba(0, 0, 0, 0) 26%,
    rgba(0, 0, 0, 0) 82%,
    rgba(0, 0, 0, 0.22) 100%
  );
}

/* ---- verrouillage typographique de la face avant ---- */
.ptk-lockup {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}
.ptk-lockup span {
  position: absolute;
  white-space: nowrap;
  line-height: 1;
  font-weight: 800;
  transform-origin: left bottom;
}
.ptk-ptk {
  left: 37px;
  top: 115px;
  font-size: 91.7px;
  color: var(--ptk-noir);
  transform: skewX(-11deg) scaleX(0.823);
}
.ptk-name {
  left: 34px;
  top: 192px;
  font-size: 23.1px;
  color: var(--ptk-noir);
  transform: skewX(-11deg) scaleX(0.897);
}
.ptk-baseline {
  left: 32px;
  top: 214px;
  font-size: 7.8px;
  color: var(--ptk-orange);
  font-style: italic;
}

.ptk-count {
  position: absolute;
  left: 48px;
  top: 329px;
  display: flex;
  align-items: flex-start;
}
.ptk-count b {
  font-size: 56px;
  font-weight: 800;
  line-height: 0.72;
  letter-spacing: -0.035em;
  color: var(--ptk-orange);
}
.ptk-count i {
  font-size: 29px;
  font-weight: 800;
  line-height: 0.72;
  color: #fff;
  font-style: normal;
  margin-left: -2px;
}
.ptk-claim {
  position: absolute;
  left: 48px;
  top: 371px;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
}
.ptk-mineral {
  position: absolute;
  left: 28px;
  top: 648px;
  font-size: 7.6px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: #fff;
  font-weight: 500;
}

/* ---- fenêtre découpée : on y voit la pochette ---- */
.ptk-window {
  position: absolute;
  left: 23px;
  top: 391px;
  width: 209px;
  height: 248px;
  border-radius: 29px;
  overflow: hidden;
  background: var(--ptk-noir);
}
.ptk-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 29px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.6);
}
.ptk-pouch {
  position: absolute;
  left: -13px;
  top: -356px;
  width: 234px;
  height: 659px;
  overflow: hidden;
  background: var(--ptk-noir);
}
.ptk-pouch img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.ptk-pouch svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ptk-benefits-title {
  position: absolute;
  left: 42px;
  top: 377px;
  font-size: 10.9px;
  font-weight: 800;
  font-style: italic;
  color: #fff;
}
.ptk-benefits {
  position: absolute;
  left: 42px;
  top: 398px;
  width: 170px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #fff;
}
.ptk-benefits div {
  display: flex;
  flex-direction: column;
}
.ptk-benefits strong {
  font-size: 10.9px;
  font-weight: 700;
  line-height: 1.15;
}
.ptk-benefits em {
  font-size: 8.2px;
  line-height: 1.2;
  font-style: normal;
}

/* ---- joues ---- */
.ptk-chart-label {
  position: absolute;
  font-size: 6.6px;
  color: #fff;
  font-weight: 600;
}
.ptk-chart-value {
  position: absolute;
  left: 21px;
  font-size: 6.8px;
  font-weight: 800;
  color: #fff;
}
.ptk-chart {
  position: absolute;
  left: 7px;
  width: 50px;
  height: 42px;
}
.ptk-usage {
  position: absolute;
  left: 59px;
  top: 14px;
  width: 330px;
  transform: rotate(90deg);
  transform-origin: 0 0;
  font-size: 7.5px;
  line-height: 9px;
  color: #fff;
  font-weight: 500;
}
.ptk-side-url {
  position: absolute;
  left: 38px;
  top: 311px;
  transform: rotate(90deg);
  transform-origin: 0 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
}

/* ================================================================
   Intégration dans le site PATCH T-KARE
   ================================================================ */

/* Hero accueil : la boîte remplace la photo produit */
.pl-hero__stage-pack--box {
  display: grid;
  place-items: center;
  padding: 10px 0 4px;
}

.pl-hero__stage-pack--box .ptk-stage {
  --ptk-scale: 0.78;
}

/* Vignettes produit : la boîte est très élancée, on lui laisse de l'air
   pour qu'elle ne vienne pas toucher les bords arrondis du cadre. */
.patch-showcase__frame--main img[src*="boite-ptk"] {
  padding: 34px 24px;
}

.patch-showcase__frame--secondary img[src*="boite-ptk"] {
  padding: 14px 10px;
}

@media (max-width: 900px) {
  .pl-hero__stage-pack--box .ptk-stage {
    --ptk-scale: 0.66;
  }
}

@media (max-width: 720px) {
  .patch-showcase__frame--main img[src*="boite-ptk"] {
    padding: 20px 14px;
  }
  .patch-showcase__frame--secondary img[src*="boite-ptk"] {
    padding: 10px 8px;
  }
  .pl-hero__stage-pack--box .ptk-stage {
    --ptk-scale: 0.6;
  }
}

@media (max-width: 420px) {
  .pl-hero__stage-pack--box .ptk-stage {
    --ptk-scale: 0.5;
  }
}
