/* ============================================
   ANIMATIONS.CSS — Aarel Digital
   Keyframes, transitions, états GSAP
   ============================================ */

/* === ÉTATS INITIAUX pour GSAP === */
/* GSAP gère les états finaux — CSS gère l'état initial invisible */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
}

[data-reveal-left] {
  opacity: 0;
  transform: translateX(-40px);
}

[data-reveal-right] {
  opacity: 0;
  transform: translateX(40px);
}

[data-reveal-scale] {
  opacity: 0;
  transform: scale(0.92);
}

/* === KEYFRAMES CSS pures === */

/* Pulse or subtil */
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
  50%       { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0.08); }
}

/* Gradient qui tourne */
@keyframes gradient-rotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Ligne qui se dessine */
@keyframes draw-line {
  from { width: 0; }
  to   { width: 100%; }
}

/* Clignotement curseur */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Flottement doux */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Scan line effect */
@keyframes scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Rotation lente */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Shimmer or */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* === PLACEHOLDERS VIDÉO — gradient animé === */
.video-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #080808 0%,
    #111111 25%,
    #0f0d08 50%,
    #080808 75%,
    #0c0b07 100%
  );
  background-size: 400% 400%;
  animation: gradient-rotate 12s ease infinite;
  overflow: hidden;
}

/* Grain subtil par-dessus */
.video-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

/* === CURSEUR PERSONNALISÉ === */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform var(--t-fast), opacity var(--t-fast);
  transform: translate(-50%, -50%);
}

.cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor-ring.is-hovering {
  width: 48px;
  height: 48px;
  border-color: var(--color-gold);
}

/* Masquer cursor natif sur desktop */
@media (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
}

/* === SCROLLBAR CUSTOM === */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold-dark);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* === SELECTION === */
::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--color-text);
}

/* === PROGRESS BAR SCROLL === */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold), var(--color-gold-light));
  z-index: 200;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* === NOISE OVERLAY GLOBAL === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
