/* ══════════════════════════════════════════════════════════
   NOS ACTIONS — carte « Mystère »
   Bordure animée aux couleurs du logo, grand « ? » flottant,
   indicateur « en préparation » et halo qui suit le pointeur.
   La typographie existante (.action-featured h3 / p) est conservée.
   ══════════════════════════════════════════════════════════ */

/* Angle animable de la bordure (navigateurs récents ;
   sinon la bordure reste en dégradé fixe) */
@property --mystery-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.action-featured.mystery-card {
  --mx: 70%;
  --my: 20%;
  isolation: isolate;
  border: 2px solid transparent;
  border-radius: 1.4rem;
  background:
    radial-gradient(
        circle 260px at var(--mx) var(--my),
        rgba(97, 48, 160, 0.1),
        transparent 70%
      )
      padding-box,
    linear-gradient(135deg, var(--card-bg), var(--bg-alt)) padding-box,
    conic-gradient(
        from var(--mystery-angle),
        var(--turquoise),
        var(--vert),
        var(--jaune),
        var(--bordeaux),
        var(--violet),
        var(--turquoise)
      )
      border-box;
  box-shadow: 0 18px 48px -18px rgba(97, 48, 160, 0.35);
  animation: mystery-spin 8s linear infinite;
  transition: box-shadow 0.4s var(--ease-out, ease);
}
.action-featured.mystery-card:hover {
  box-shadow: 0 24px 60px -18px rgba(97, 48, 160, 0.5);
}
/* L'ancien halo décoratif est remplacé par le « ? » */
.action-featured.mystery-card::after {
  display: none;
}

@keyframes mystery-spin {
  to {
    --mystery-angle: 360deg;
  }
}

/* Grand point d'interrogation décoratif */
.mystery-glyph {
  position: absolute;
  z-index: -1;
  right: -0.5rem;
  bottom: -3rem;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: 16rem;
  line-height: 1;
  background: linear-gradient(160deg, var(--violet), var(--turquoise));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.12;
  transform: rotate(12deg);
  animation: mystery-float 6s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}
@keyframes mystery-float {
  0%,
  100% {
    transform: rotate(12deg) translateY(0);
  }
  50% {
    transform: rotate(6deg) translateY(-14px);
  }
}

/* Tag lisible sur fond clair comme sombre */
.mystery-card .action-tag {
  position: relative;
}
body.dark .mystery-card .tag-v {
  color: #b994ea;
  background: rgba(185, 148, 234, 0.12);
  border-color: rgba(185, 148, 234, 0.35);
}

/* « Mystère... » : reflet qui balaie le mot */
.mystery-word {
  background: linear-gradient(
    100deg,
    var(--texte) 0%,
    var(--texte) 40%,
    var(--violet) 50%,
    var(--texte) 60%,
    var(--texte) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: mystery-shine 4s ease-in-out infinite;
}
@keyframes mystery-shine {
  0% {
    background-position: 100% 0;
  }
  60%,
  100% {
    background-position: 0% 0;
  }
}

/* Indicateur « en préparation » : 5 pastilles aux couleurs du logo */
.mystery-loader {
  display: flex;
  gap: 0.4rem;
  margin: -0.25rem 0 1.25rem;
}
.mystery-loader span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  animation: mystery-bounce 1.4s ease-in-out infinite;
}
.mystery-loader span:nth-child(1) { background: var(--turquoise); }
.mystery-loader span:nth-child(2) { background: var(--vert); animation-delay: 0.12s; }
.mystery-loader span:nth-child(3) { background: var(--jaune); animation-delay: 0.24s; }
.mystery-loader span:nth-child(4) { background: var(--bordeaux); animation-delay: 0.36s; }
.mystery-loader span:nth-child(5) { background: var(--violet); animation-delay: 0.48s; }
@keyframes mystery-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

/* Bouton : la flèche glisse au survol */
.mystery-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
}
.mystery-cta span {
  transition: transform var(--dur, 320ms) var(--ease-out, ease);
}
.mystery-cta:hover span {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .mystery-glyph {
    font-size: 11rem;
    bottom: -2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action-featured.mystery-card,
  .mystery-glyph,
  .mystery-word,
  .mystery-loader span {
    animation: none;
  }
  .mystery-word {
    background: none;
    color: var(--texte);
  }
}
