/* S3 Roleplay — animations et effets lumineux, v1
   A charger APRES style.css ET s3rp-refresh.css.
   Couche visuelle uniquement : ne modifie pas PHP, la navigation ou les donnees.
*/

/* 1. Halo rose/violet doux dans le bandeau principal. */
.hero { isolation: isolate; }
.hero::after {
  content: "";
  position: absolute;
  inset: -18% -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 45%, rgba(255, 45, 155, .19), transparent 32%),
    radial-gradient(circle at 88% 74%, rgba(150, 75, 255, .16), transparent 35%);
  opacity: .74;
  animation: s3-halo-drift 13s ease-in-out infinite alternate;
}
.hero-content { position: relative; z-index: 1; }

/* 2. Fond quadrille en mouvement tres lent. */
.hero::before { animation: s3-grid-drift 35s linear infinite; }

/* 3. Logo S3 dans le bandeau : flottement leger. */
.hero-mark {
  animation: s3-logo-float 8s ease-in-out infinite;
  pointer-events: none;
}

/* 4. Lumiere douce sur le logo du menu et le titre. */
.brand-mark { animation: s3-brand-glow 4s ease-in-out infinite alternate; }
.hero h1 span {
  animation: s3-title-glow 5s ease-in-out infinite alternate;
}

/* 5. Reflet lumineux qui traverse le bouton principal d'accueil. */
.hero-actions .btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-actions .btn-primary::after {
  content: "";
  position: absolute;
  top: -35%; bottom: -35%;
  left: -55%;
  width: 35%;
  transform: translateX(-80%) rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  pointer-events: none;
  animation: s3-button-shine 5.8s ease-in-out infinite;
}

/* 6. Cartes de contenu : apparition + bordure lumineuse au survol. */
.feature-grid > .panel,
.s3-home-news .news-grid > .panel {
  animation: s3-card-appear .6s ease-out both;
}
.feature-grid > .panel:nth-child(2),
.s3-home-news .news-grid > .panel:nth-child(2) { animation-delay: .10s; }
.feature-grid > .panel:nth-child(3),
.s3-home-news .news-grid > .panel:nth-child(3) { animation-delay: .20s; }
.panel:hover {
  border-color: rgba(255, 115, 201, .7);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, .33),
    0 0 22px rgba(255, 45, 155, .13),
    inset 0 1px 0 rgba(255,255,255,.06);
}

@keyframes s3-halo-drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); opacity: .60; }
  to   { transform: translate3d(3%, -2%, 0) scale(1.07); opacity: .88; }
}
@keyframes s3-grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 55px, 55px 0; }
}
@keyframes s3-logo-float {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-14px) rotate(-8deg); }
}
@keyframes s3-brand-glow {
  from { box-shadow: 0 9px 28px rgba(255,50,155,.22), inset 0 1px 0 rgba(255,255,255,.2); }
  to   { box-shadow: 0 9px 33px rgba(255,50,155,.52), 0 0 14px rgba(164,66,255,.18), inset 0 1px 0 rgba(255,255,255,.28); }
}
@keyframes s3-title-glow {
  from { filter: drop-shadow(0 0 4px rgba(255,45,155,.08)); }
  to   { filter: drop-shadow(0 0 12px rgba(255,45,155,.29)); }
}
@keyframes s3-button-shine {
  0%, 65%, 100% { transform: translateX(-180%) rotate(18deg); }
  82% { transform: translateX(490%) rotate(18deg); }
}
@keyframes s3-card-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Telephone : animations plus discretes et moins couteuses. */
@media (max-width: 720px) {
  .hero::after { opacity: .42; }
  .hero-mark { animation-duration: 10s; }
  .hero::before { animation: none; }
}

/* Accessibilite : aucune animation si la personne prefere reduire les mouvements. */
@media (prefers-reduced-motion: reduce) {
  .hero::after,
  .hero::before,
  .hero-mark,
  .brand-mark,
  .hero h1 span,
  .hero-actions .btn-primary::after,
  .feature-grid > .panel,
  .s3-home-news .news-grid > .panel {
    animation: none !important;
  }
}
