/* ── Particules canvas ────────────────────────────────────────────────────── */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── Étoiles ──────────────────────────────────────────────────────────────── */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: var(--min-op, 0.1); transform: scale(1); }
  50%       { opacity: var(--max-op, 0.8); transform: scale(1.3); }
}

/* ── Parallaxe hero ───────────────────────────────────────────────────────── */
.parallax-layer { will-change: transform; }

/* ── Glow pulse sur les cards ─────────────────────────────────────────────── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(155,77,255,0.1); }
  50%       { box-shadow: 0 0 40px rgba(255,79,216,0.25); }
}
.card:hover { animation: glowPulse 2s ease-in-out infinite; }

/* ── Gradient animé sur les titres ───────────────────────────────────────── */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animated-gradient {
  background: linear-gradient(270deg, #9B4DFF, #FF4FD8, #FF82F2, #9B4DFF);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* ── Bordure animée ───────────────────────────────────────────────────────── */
@keyframes borderRotate {
  0%   { background-position: 0% 0%; }
  100% { background-position: 400% 0%; }
}
.card-glow-border {
  position: relative;
}
.card-glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(90deg, #9B4DFF, #FF4FD8, #FF82F2, #9B4DFF);
  background-size: 400% 100%;
  animation: borderRotate 3s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}
.card-glow-border:hover::after { opacity: 1; }

/* ── Hover lift ───────────────────────────────────────────────────────────── */
.hover-lift { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.hover-lift:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(155,77,255,0.2); }

/* ── Shimmer loader ───────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ── Typing cursor ────────────────────────────────────────────────────────── */
.typing-cursor::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: var(--pink);
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Float animation ──────────────────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.float { animation: float 4s ease-in-out infinite; }

/* ── Scroll indicator ─────────────────────────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  animation: float 2s ease-in-out infinite;
}
.scroll-indicator-dot {
  width: 24px; height: 40px;
  border: 2px solid rgba(155,77,255,0.4);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-indicator-dot::before {
  content: '';
  width: 4px; height: 8px;
  background: var(--purple);
  border-radius: 2px;
  animation: scrollDot 1.5s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ── Glassmorphism ────────────────────────────────────────────────────────── */
.glass {
  background: rgba(26, 22, 40, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(155, 77, 255, 0.2);
}

/* ── Neon text ────────────────────────────────────────────────────────────── */
.neon-text {
  color: var(--pink-light);
  text-shadow:
    0 0 10px rgba(255,130,242,0.8),
    0 0 20px rgba(255,130,242,0.4),
    0 0 40px rgba(255,79,216,0.2);
}

/* ── Image gallery ────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(4,4,6,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  font-size: 13px;
  font-weight: 600;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(155,77,255,0.3);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 28px;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: white;
  cursor: pointer;
  background: rgba(155,77,255,0.2);
  border: 1px solid rgba(155,77,255,0.3);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.lightbox-nav:hover { background: rgba(155,77,255,0.4); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-caption {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 6px 16px;
  border-radius: 99px;
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
