/* ================================
   VARIABLES
================================ */
:root {
  --black: #0B0B0B;
  --red: #e03d2b;
  --jade: #36b39d;
  --fg: #F4F4F4;
  --fade: rgba(255,255,255,0.08);
}

/* ================================
   LAYOUT PAGE PACKS
================================ */

body {
  background: var(--black);
  color: var(--fg);
}

.packs-page {
  padding: 8rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.packs-hero {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: -3.9rem;
}

.packs-hero p {
  max-width: 720px;
  margin: 0 auto;
  opacity: 0.8;
  line-height: 1.6;
  font-size: 0.98rem;
}

/* ✅ FIX SAFARI : packs grid centré */
.packs-grid {
  margin-top: 3rem;
  display: grid;

  /* ✅ Pas de 1fr ici (Safari + width fixe) */
  grid-template-columns: repeat(auto-fit, minmax(240px, 240px));

  gap: 2.8rem;

  /* ✅ centre le bloc complet */
  justify-content: center;

  /* ✅ centre les items dans leur colonne */
  justify-items: center;
}

/* ================================
   LINGOTS 3D – BISEAU + PROFONDEUR
================================ */

.pack-item {
  position: relative;
  width: 240px;
  height: 150px;
  perspective: 1700px;
  cursor: pointer;
}

.pack-card {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  transform-style: preserve-3d;
  animation: pack-spin 10s linear infinite;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: relative;
  padding: 1.4rem 1.2rem;

  box-shadow:
    0 42px 90px rgba(0,0,0,0.92),
    0 8px 30px rgba(0,0,0,0.7),
    inset 0 3px 7px rgba(255,255,255,.5),
    inset 0 -14px 26px rgba(0,0,0,0.85);

  border: 1px solid rgba(255,255,255,0.28);
  overflow: hidden;

  /* ✅ Rend Safari stable sur les anims 3D */
  transform: translateZ(0);
  will-change: transform;
}

/* Reflets */
.pack-card::before {
  content: "";
  position: absolute;
  inset: 7px 9px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.95), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(0,0,0,0.6), transparent 68%);
  mix-blend-mode: screen;
  opacity: 0.95;
  pointer-events: none;
}

.pack-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.9),
      rgba(255,255,255,0.12),
      rgba(0,0,0,0.78)
    );
  mix-blend-mode: soft-light;
  opacity: 0.78;
  pointer-events: none;
}

/* Texte */
.pack-name,
.pack-price,
.pack-tagline {
  position: relative;
  z-index: 1;
}

.pack-name {
  font-size: 1.02rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.pack-price {
  font-size: 0.9rem;
  text-transform: uppercase;
  opacity: 0.96;
  margin-bottom: 0.3rem;
}

.pack-tagline {
  font-size: 0.78rem;
  opacity: 0.9;
}

/* Pause rotation */
.pack-item:hover .pack-card,
.pack-item:focus-within .pack-card {
  animation-play-state: paused;
}

/* Rotation 3D */
@keyframes pack-spin {
  0%   { transform: rotateY(0deg) rotateX(20deg); }
  50%  { transform: rotateY(180deg) rotateX(20deg); }
  100% { transform: rotateY(360deg) rotateX(20deg); }
}

/* ================================
   COULEURS MÉTAL + GLOW
================================ */

/* Bronze */
.pack-bronze .pack-card {
  background:
    radial-gradient(circle at 10% 0%, #ffe4b8, transparent 55%),
    linear-gradient(135deg, #774018, #c76924, #ffbc73, #5a2b0c);
  color: #1b0f07;

  box-shadow:
    0 42px 90px rgba(0,0,0,0.92),
    0 0 60px rgba(255,190,120,0.6),
    inset 0 3px 7px rgba(255,255,255,.5),
    inset 0 -14px 26px rgba(0,0,0,0.85);
}

/* Silver */
.pack-silver .pack-card {
  background:
    radial-gradient(circle at 10% 0%, #ffffff, transparent 55%),
    linear-gradient(135deg, #b9c0d0, #f4f7ff, #cfd6e5, #7d8596);
  color: #111319;

  box-shadow:
    0 42px 90px rgba(0,0,0,0.9),
    0 0 70px rgba(210,220,255,0.7),
    inset 0 3px 7px rgba(255,255,255,.55),
    inset 0 -14px 26px rgba(0,0,0,0.85);
}

/* Gold */
.pack-gold .pack-card {
  background:
    radial-gradient(circle at 10% 0%, #fff8c9, transparent 55%),
    linear-gradient(135deg, #b8860b, #ffd36b, #ffe89e, #8a6513);
  color: #1b1306;

  box-shadow:
    0 42px 90px rgba(0,0,0,0.9),
    0 0 80px rgba(255,215,90,0.75),
    inset 0 3px 7px rgba(255,255,255,.55),
    inset 0 -14px 26px rgba(0,0,0,0.85);
}

/* Platinum */
.pack-platinum .pack-card {
  background:
    radial-gradient(circle at 10% 0%, #ffffff, transparent 55%),
    linear-gradient(135deg, #d4dbea, #f8fbff, #e3e9f3, #9aa2b3);
  color: #10121b;

  box-shadow:
    0 42px 90px rgba(0,0,0,0.9),
    0 0 75px rgba(220,235,255,0.75),
    inset 0 3px 7px rgba(255,255,255,.55),
    inset 0 -14px 26px rgba(0,0,0,0.85);
}

/* Diamond */
.pack-diamond .pack-card {
  background:
    radial-gradient(circle at 0% 0%, #ffffff, transparent 55%),
    linear-gradient(145deg, #00f7ff, #96fdff, #00b7ff, #0070ff);
  color: #021015;

  box-shadow:
    0 0 50px rgba(0,255,209,0.95),
    0 0 110px rgba(0,200,255,0.95),
    0 42px 100px rgba(0,0,0,1);

  border: 1px solid rgba(255,255,255,0.9);
}

.pack-diamond .pack-card::before {
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,0.98), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(0,40,80,0.9), transparent 65%),
    linear-gradient(
      130deg,
      rgba(255,255,255,0.9) 0%,
      rgba(255,255,255,0.18) 30%,
      transparent 40%,
      transparent 60%,
      rgba(255,255,255,0.45) 72%,
      rgba(0,60,120,0.85) 100%
    );
}

.pack-diamond .pack-card::after {
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,1),
      rgba(0,245,255,0.6),
      rgba(0,80,150,1)
    );
  opacity: 1;
}

/* ✅ Diamond centré sous les autres */
.pack-item.pack-diamond {
  grid-column: 1 / -1;
  justify-self: center;
}

/* ================================
   TOOLTIP
================================ */

.pack-tooltip {
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(9,9,9,0.96);
  color: var(--fg);
  padding: 0.9rem 1rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  width: 230px;
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 10;
}

.pack-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: rgba(9,9,9,0.96) transparent transparent transparent;
}

.pack-item:hover .pack-tooltip,
.pack-item:focus-within .pack-tooltip,
.pack-item.show-tooltip .pack-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.pack-tooltip-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--jade);
}

.pack-tooltip-body {
  opacity: 0.9;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 480px) {
  .pack-item {
    width: 200px;
    height: 140px;
  }

  .packs-page {
    padding-top: 7rem;
  }

  .packs-grid {
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
    gap: 2.2rem;
  }

  .pack-tooltip {
    width: 90vw;
    max-width: 280px;
  }
}

/* ================================
   TITRE GRADIENT SAFE
================================ */

.section-title .huge {
  background: linear-gradient(90deg, var(--red), var(--jade)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  text-shadow: 0 0 1px rgba(255,255,255,0.08);
}

@supports not (-webkit-background-clip: text) {
  .section-title .huge {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
  }
}
