/* ═══════════════════════════════════════════════════
   BCA — Couche d'animations UI/UX
   (curseur natif conservé)
═══════════════════════════════════════════════════ */

/* ────────────────────────────────────────
   PAGE LOADER
──────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: opacity .6s cubic-bezier(.4,0,.2,1), visibility .6s;
}
#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#page-loader .pl-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: .25em;
  color: #fff;
  animation: plLogoPop .5s cubic-bezier(.34,1.56,.64,1) both;
}
#page-loader .pl-logo em { color: var(--blue); font-style: normal; }
#page-loader .pl-bar-wrap {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}
#page-loader .pl-bar {
  height: 100%;
  background: var(--blue);
  width: 0;
  animation: plBar .75s .15s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes plLogoPop {
  from { opacity: 0; transform: scale(.7); letter-spacing: .5em; }
  to   { opacity: 1; transform: scale(1);  letter-spacing: .25em; }
}
@keyframes plBar { to { width: 100%; } }

/* ────────────────────────────────────────
   SCROLL PROGRESS BAR
──────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-lt));
  width: 0%;
  z-index: 99998;
  box-shadow: 0 0 8px rgba(80,188,233,.6);
  pointer-events: none;
}

/* ────────────────────────────────────────
   HERO — état initial (GSAP anime ensuite)
──────────────────────────────────────── */
.hero-badge,
.hero-title,
.hero-subtitle,
.hero-cta,
.hero-motto {
  opacity: 0;    /* GSAP prend la main après le loader */
  will-change: transform, opacity;
}


/* ────────────────────────────────────────
   GLITCH SUR "Achardais"
──────────────────────────────────────── */
.glitch-word {
  position: relative;
  display: inline-block;
}
.glitch-word::before,
.glitch-word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  pointer-events: none;
  overflow: hidden;
}
.glitch-word::before {
  color: var(--blue-lt);
  clip-path: polygon(0 25%, 100% 25%, 100% 50%, 0 50%);
  animation: glitch-a 7s infinite;
  opacity: .85;
}
.glitch-word::after {
  color: #c0392b;
  clip-path: polygon(0 55%, 100% 55%, 100% 80%, 0 80%);
  animation: glitch-b 7s infinite;
  opacity: .85;
}
@keyframes glitch-a {
  0%, 88%, 100% { transform: none; opacity: 0; }
  89%  { transform: translateX(-5px); opacity: .85; }
  91%  { transform: translateX(5px);  opacity: .85; }
  93%  { transform: translateX(-3px); opacity: .85; }
  95%  { transform: none;             opacity: 0; }
}
@keyframes glitch-b {
  0%, 88%, 100% { transform: none; opacity: 0; }
  90%  { transform: translateX(5px);  opacity: .85; }
  92%  { transform: translateX(-5px); opacity: .85; }
  94%  { transform: translateX(3px);  opacity: .85; }
  96%  { transform: none;             opacity: 0; }
}

/* ────────────────────────────────────────
   SECTION REVEAL — état initial
   (GSAP ScrollTrigger anime le retour)
──────────────────────────────────────── */
.reveal-left  { opacity: 0; transform: translateX(-45px); }
.reveal-right { opacity: 0; transform: translateX(45px); }
.reveal-up    { opacity: 0; transform: translateY(40px); }
.reveal-scale { opacity: 0; transform: scale(.85); }

/* ────────────────────────────────────────
   SCHEDULE CARD — SHIMMER
──────────────────────────────────────── */
.schedule-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(80,188,233,.11) 50%,
    transparent 80%
  );
  transform: skewX(-15deg);
  animation: shimmerSlide 3.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.schedule-card > * { position: relative; z-index: 2; }
@keyframes shimmerSlide {
  0%       { left: -80%; }
  50%, 100%{ left: 130%; }
}

/* ────────────────────────────────────────
   CTA BAND — GRADIENT ANIMÉ
──────────────────────────────────────── */
.cta-band {
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 120% at var(--mx, 50%) var(--my, 50%),
    rgba(80,188,233,.18) 0%,
    transparent 70%
  );
  pointer-events: none;
  transition: background .6s ease;
}
.cta-band::after {
  content: '';
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(80,188,233,.06) 60deg,
    transparent 120deg,
    rgba(150,35,54,.04) 180deg,
    transparent 240deg,
    rgba(80,188,233,.06) 300deg,
    transparent 360deg
  );
  animation: ctaSpin 14s linear infinite;
  pointer-events: none;
}
@keyframes ctaSpin { to { transform: rotate(360deg); } }

/* ────────────────────────────────────────
   STATS — LUEUR
──────────────────────────────────────── */
.stats { position: relative; overflow: hidden; }
.stats::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 200% at 50% 50%,
    rgba(255,255,255,.04) 0%, transparent 70%);
  pointer-events: none;
  animation: statsPulse 3.5s ease-in-out infinite;
}
@keyframes statsPulse {
  0%, 100% { opacity: .4; }
  50%       { opacity: 1;  }
}
.stat-num {
  text-shadow: 0 0 20px rgba(255,255,255,.35), 0 0 40px rgba(255,255,255,.12);
}

/* ────────────────────────────────────────
   SECTION TAG — GLOW
──────────────────────────────────────── */
.section-tag {
  animation: tagGlow 3.2s ease-in-out infinite;
}
@keyframes tagGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(80,188,233,0); }
  50%       { box-shadow: 0 0 14px 2px rgba(80,188,233,.22); }
}

/* ────────────────────────────────────────
   BOUTONS — RIPPLE
──────────────────────────────────────── */
.btn-primary,
.btn-outline,
.btn-nav {
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  transform: scale(0);
  animation: rippleAnim .55s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ────────────────────────────────────────
   GRAIN CINÉMATIQUE
──────────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999995;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grainShift 1.2s steps(1) infinite;
}
@keyframes grainShift {
  0%  { background-position:   0px   0px; }
  10% { background-position: -15px   8px; }
  20% { background-position:  12px  -5px; }
  30% { background-position:  -8px  18px; }
  40% { background-position:  20px   3px; }
  50% { background-position: -18px -12px; }
  60% { background-position:   6px  22px; }
  70% { background-position: -24px   6px; }
  80% { background-position:  14px -18px; }
  90% { background-position:  -6px  10px; }
}

/* ────────────────────────────────────────
   GALERIE — tilt + glow
──────────────────────────────────────── */
.gallery-item {
  transition: box-shadow .45s;
}
.gallery-item:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(80,188,233,.2);
}

/* ────────────────────────────────────────
   PARTENAIRES — hover lift
──────────────────────────────────────── */
.partner-item {
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s;
}
.partner-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(80,188,233,.15);
}

/* ────────────────────────────────────────
   REDUCE MOTION
──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-badge, .hero-title, .hero-subtitle, .hero-cta, .hero-motto,
  .reveal-left, .reveal-right, .reveal-up, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
}
