/* ====== STYLES DEFERRES – DESTINY AI (avec fonds webp) ====== */

:root {
  --night-blue: #0b1e35;
  --gold: #b68b1b;
  --gold-shadow: rgba(182, 139, 27, 0.35);
}

/* Fond et typo */
body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  font-weight: 500;
  color: var(--night-blue);
  margin: 0;
  padding: 0;
  line-height: 1.7;
  background-image: url("assets/fond-1024.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
/* variantes mobile */
@media (max-width: 600px) {
  body {
    background-image: url("assets/fond-480.webp");
  }
}
@media (max-width: 600px) and (min-resolution: 2dppx) {
  body {
    background-image: url("assets/fond-960.webp");
  }
}

/* Bloc central */
.content-box {
  max-width: 720px;
  margin: 0 auto 32px; /* collé en haut */
  padding: 0 20px 20px; /* plus de padding top, 20px sur les côtés */
  background: rgba(255, 255, 255, 0.86);
  border-radius: 0; /* pas d’arrondi en haut du container */
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

/* Hero */
.hero {
  height: clamp(180px, 28vw, 300px);
  border-radius: 0 0 12px 12px; /* arrondis seulement en bas */
  overflow: hidden;
  position: relative;
  margin: 0 -20px 16px; /* ⚠️ compense le padding latéral */
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
  display: block;
}

/* Titres */
h1,
h2,
h3 {
  margin: 0 0 12px;
  font-weight: 500;
}
h1 {
  font-size: 2.3em;
  text-align: center;
  margin: 15px 0 8px;
  color: var(--night-blue);
}
h2 {
  color: var(--gold);
  font-weight: 500;
  text-align: center;
}
h2.subtitle {
  font-size: 1.35em;
}

/* Gold + icônes */
.gold {
  color: var(--gold);
  text-shadow: 0 0 6px var(--gold-shadow);
}
.gold-wrap {
  display: inline-block;
}
.suits {
  --suit-size: clamp(30px, 6vw, 50px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.6vw, 16px);
  align-items: center;
  justify-items: center;
  margin-top: 2px;
}
.suits img {
  width: var(--suit-size);
  height: var(--suit-size);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(182, 139, 27, 0.35));
}

/* tagline */
.tagline {
  text-align: center;
  font-size: 1.05em;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Section downloads ===== */
.download-section {
  margin-top: 20px;
  margin-bottom: 40px;
}

.app-intro {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  object-fit: cover;
}
.app-intro h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gold);
}
.app-intro p {
  margin: 0;
  font-size: 0.98rem;
}

/* Cartes dorées (base) */
.store-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}
.store-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  align-items: start;
  background: linear-gradient(145deg, #f7e6b8, #d7b56e);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  width: 100%;
  max-width: 420px;
}
.badge-wrap,
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.badge img {
  max-width: 180px;
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18));
  transition: transform 0.15s ease;
}
.badge:hover img {
  transform: translateY(-2px);
}

/* — Scintillement doré simplifié (sans étoiles) — */
.store-card {
  position: relative;
  isolation: isolate;
}

/* Pellicule nacrée + reflets doux (sans étoiles) */
.store-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  mix-blend-mode: soft-light;

  /* 1) Film nacré texturé (repeating-linear-gradient)
     2) Reflet doux coin haut/gauche
     3) Reflet doux coin bas/droite */
  background: repeating-linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.06) 0 2px,
      rgba(255, 255, 255, 0) 2px 6px
    ),
    radial-gradient(
      120% 160% at 15% 10%,
      rgba(255, 255, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      120% 160% at 85% 90%,
      rgba(255, 255, 255, 0.12),
      transparent 60%
    );

  /* On fait doucement “respirer” l’opacité et
     on fait dériver la texture nacrée */
  background-size: 200% 200%, 200% 200%, 200% 200%;
  background-position: 0% 0%, 20% 0%, 80% 100%;
  opacity: 0.9;
  animation: nacre-drift 12s linear infinite,
    pearl-breathe 5.5s ease-in-out infinite alternate;
}

/* Lueur qui balaie la carte (inchangée) */
.store-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(
    130deg,
    transparent 20%,
    rgba(255, 255, 255, 0.35) 40%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0.35) 60%,
    transparent 80%
  );
  background-size: 200% 200%;
  filter: blur(0.5px);
  opacity: 0;
  animation: gold-sweep 4.8s ease-in-out infinite;
}

/* Hover: léger boost du nacré pour un effet “magique” sans lourdeur */
.store-card:hover::before {
  opacity: 0.98;
}

/* — Animations — */
@keyframes nacre-drift {
  0% {
    background-position: 0% 0%, 20% 0%, 80% 100%;
  }
  100% {
    background-position: 120% 120%, 0% 20%, 60% 80%;
  }
}

@keyframes pearl-breathe {
  from {
    opacity: 0.82;
  }
  to {
    opacity: 0.95;
  }
}

@keyframes gold-sweep {
  0% {
    background-position: -120% -120%;
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  24% {
    background-position: 120% 120%;
    opacity: 0;
  }
  100% {
    opacity: 0;
    background-position: 120% 120%;
  }
}

/* Accessibilité : tout calmer si motion-reduce */
@media (prefers-reduced-motion: reduce) {
  .store-card::before {
    animation: none;
    opacity: 0.18; /* garder un léger voile nacré, fixe */
  }
  .store-card::after {
    animation: none;
    opacity: 0;
  }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  .store-card::before {
    animation: none;
    --tw1: 0.5;
    --tw2: 0.4;
  }
}

.store-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(
    130deg,
    transparent 20%,
    rgba(255, 255, 255, 0.35) 40%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0.35) 60%,
    transparent 80%
  );
  background-size: 200% 200%;
  filter: blur(0.5px);
  opacity: 0;
  animation: gold-sweep 4.8s ease-in-out infinite;
}
@keyframes gold-sweep {
  0% {
    background-position: -120% -120%;
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  24% {
    background-position: 120% 120%;
    opacity: 0;
  }
  100% {
    opacity: 0;
    background-position: 120% 120%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .store-card::after {
    animation: none;
    opacity: 0;
  }
  .store-card::before {
    opacity: 0.18;
  }
}

/* QR bubble */
.qr-ball {
  position: relative;
  width: 144px;
  height: 144px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(
      120% 120% at 30% 30%,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.04) 28%,
      rgba(255, 255, 255, 0) 70%
    ),
    radial-gradient(circle at 38% 28%, #2b3f62 0%, #132742 55%, #0b1e35 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22),
    0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 22px 6px rgba(182, 139, 27, 0.2); /* halo or */
}
.qr-ball::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18),
    inset 0 2px 8px rgba(255, 255, 255, 0.6);
}

.qr-ball .qr {
  position: relative;
  z-index: 3;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  background: #fff;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* Hint */
.hint {
  font-size: 0.85em;
  color: #444;
  text-align: center;
  margin-top: 4px;
}

/* Mobile */
@media (max-width: 700px) {
  .store-card {
    grid-template-columns: 1fr;
  }
  .qr-ball {
    justify-self: center;
  }
}
/* ===== Micro-animations "magie" ultra légères ===== */

/* 1) Shimmer doré sur le titre */
.gold-shimmer {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    #e8d08a 35%,
    var(--gold) 70%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent; /* garde l'effet doré sans image */
  animation: gold-shimmer 6s ease-in-out infinite;
}
@keyframes gold-shimmer {
  0% {
    background-position: 0% 0;
  }
  50% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

/* 2) Flottaison + 3) Scintillement discret des symboles */
.suits img {
  will-change: transform, filter, opacity;
  animation: suit-float 4.8s ease-in-out infinite,
    suit-twinkle 7.5s ease-in-out infinite;
  transform-origin: 50% 60%;
}
.suits img:nth-child(2) {
  animation-delay: 0.25s, 1.1s;
}
.suits img:nth-child(3) {
  animation-delay: 0.5s, 2.2s;
}
.suits img:nth-child(4) {
  animation-delay: 0.75s, 3.3s;
}

@keyframes suit-float {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-6px) rotate(-2deg) scale(1.03);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

/* petit "twinkle" en jouant sur l'intensité de l'ombre portée */
@keyframes suit-twinkle {
  0%,
  88%,
  100% {
    filter: drop-shadow(0 0 6px var(--gold-shadow));
    opacity: 1;
  }
  92% {
    filter: drop-shadow(0 0 12px rgba(255, 215, 130, 0.75));
    opacity: 0.98;
  }
  96% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 130, 0.45));
    opacity: 1;
  }
}

/* Accessibilité : tout couper si l’utilisateur préfère moins d’animations */
@media (prefers-reduced-motion: reduce) {
  .gold-shimmer,
  .suits img {
    animation: none;
  }
  .gold-shimmer {
    color: var(--gold);
    -webkit-background-clip: initial;
    background-clip: initial;
  }
}
/* ===== Glint magique sur le texte doré ===== */
.gold-glint {
  position: relative;
  display: inline-block;
  overflow: hidden; /* masque le halo qui dépasse */
}

.gold-glint::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 45%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.6) 55%,
    transparent 100%
  );
  animation: gold-glint-move 12s linear infinite;
}

@keyframes gold-glint-move {
  0% {
    left: -75%;
  }
  30% {
    left: 120%;
  } /* le glint traverse une fois */
  100% {
    left: 120%;
  } /* pause longue avant le suivant */
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  .gold-glint::after {
    animation: none;
  }
}
/* Calque étoiles dans l’anneau des QR */
.qr-stars {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  clip-path: circle(98% at 50% 50%);
}

/* (inchangé) Une étoile = un point blanc doux */
.qr-stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.85;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
  animation: star-tw 3.8s ease-in-out infinite alternate;
}

.star-wrap {
  position: absolute;
  transform-origin: 0 0; /* pivot = centre de la bulle (cx, cy) */
  animation: orbit linear infinite; /* sens unique (horaire) */
}

/* utilise des variables pour garder l’angle de départ */
@keyframes orbit {
  from {
    transform: rotate(var(--theta, 0deg)) translate(var(--r, 70px));
  }
  to {
    transform: rotate(calc(var(--theta, 0deg) + 360deg))
      translate(var(--r, 70px));
  }
}

/* Scintillement très léger (opacité) */
@keyframes star-tw {
  from {
    opacity: 0.45;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1.05);
  }
}
