/* ═══════════════════════════════════════════
   TeamSportive · animations.css · v1.0
   Effets visuels globaux — toutes les pages
═══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --bleu: #0D1B2A;
  --rouge: #E63946;
  --blanc: #F8F9FA;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── TICKER DÉFILANT ── */
.ticker-wrap {
  background: var(--rouge);
  overflow: hidden;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 40px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 16px;
}
.ticker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Décalage en cascade */
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* ── GRADIENT ANIMÉ SUR TEXTE ── */
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--rouge) 40%, #fff 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── GLOW HOVER SUR CARTES ── */
.glow-card {
  transition: transform 0.3s var(--ease-out-expo),
              box-shadow 0.3s var(--ease-out-expo);
}
.glow-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(230, 57, 70, 0.18),
              0 4px 20px rgba(0,0,0,0.12);
}

/* ── NAV UNDERLINE ANIMÉ ── */
nav .nav-links a {
  position: relative;
  padding-bottom: 2px;
}
nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--rouge);
  transition: width 0.3s var(--ease-out-expo);
}
nav .nav-links a:hover::after,
nav .nav-links a.active::after { width: 100%; }

/* ── BOUTON RIPPLE ── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}
.btn-ripple:hover::after { transform: scaleX(1); }

/* ── FLOAT CTA PULSE ── */
.float-cta-btn {
  animation: float-pulse 2.8s ease-in-out infinite;
}
@keyframes float-pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(230,57,70,0.45); }
  50%       { box-shadow: 0 8px 48px rgba(230,57,70,0.7), 0 0 0 8px rgba(230,57,70,0.1); }
}
.float-cta-btn:hover { animation: none; }

/* ── HERO GRADIENT ANIMÉ ── */
.hero-animated-bg {
  background: linear-gradient(
    135deg,
    #0D1B2A 0%,
    #0f2235 25%,
    #1a1220 50%,
    #0D1B2A 75%,
    #0f2235 100%
  );
  background-size: 400% 400%;
  animation: hero-gradient 12s ease infinite;
}
@keyframes hero-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── GRAIN TEXTURE OVERLAY ── */
.grain-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  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='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── LIGNE ANIMÉE SÉPARATRICE ── */
.animated-line {
  width: 0;
  height: 3px;
  background: var(--rouge);
  margin-bottom: 20px;
  transition: width 0.8s var(--ease-out-expo);
  border-radius: 2px;
}
.reveal.visible .animated-line,
.animated-line.visible { width: 48px; }

/* ── STAT COUNTER ── */
.counter { display: inline-block; }

/* ── HOVER BORDER ROUGE SUR STEPS ── */
.step {
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-out-expo);
}
.step:hover {
  border-color: rgba(230,57,70,0.4) !important;
  background: rgba(230,57,70,0.06) !important;
  transform: translateY(-4px);
}

/* ── HOVER GLOW SWOT CELLS ── */
.swot-cell {
  transition: transform 0.3s var(--ease-out-expo), filter 0.3s ease;
}
.swot-cell:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
  z-index: 2;
  position: relative;
}

/* ── FORCE CARD HOVER ── */
.force-card {
  transition: transform 0.3s var(--ease-out-expo),
              box-shadow 0.3s ease,
              border-color 0.3s ease !important;
}
.force-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(230,57,70,0.12);
  border-color: rgba(230,57,70,0.35) !important;
}

/* ── HERO TEXTE ENTRANCE ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-enter-1 { animation: fade-up 0.7s var(--ease-out-expo) 0.1s both; }
.hero-enter-2 { animation: fade-up 0.7s var(--ease-out-expo) 0.25s both; }
.hero-enter-3 { animation: fade-up 0.7s var(--ease-out-expo) 0.4s both; }
.hero-enter-4 { animation: fade-up 0.7s var(--ease-out-expo) 0.55s both; }
.hero-enter-5 { animation: fade-up 0.8s var(--ease-out-expo) 0.7s both; }

/* ── STAT CARD HOVER ── */
.stat-card {
  transition: transform 0.3s var(--ease-out-expo),
              border-color 0.3s ease,
              background 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(230,57,70,0.4) !important;
  background: rgba(255,255,255,0.09) !important;
}

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--rouge);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(230,57,70,0.6);
}

/* ── GLOW ROUGE SUR SECTIONS CLÉS ── */
@keyframes section-glow {
  0%, 100% { box-shadow: inset 0 0 80px rgba(230,57,70,0.0); }
  50%       { box-shadow: inset 0 0 80px rgba(230,57,70,0.04); }
}

/* ── EVENT CARD HOVER AMÉLIORÉ ── */
.event-card {
  transition: transform 0.35s var(--ease-out-expo),
              box-shadow 0.35s ease !important;
}
.event-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.13),
              0 0 0 1px rgba(230,57,70,0.2) !important;
}

/* ── MARCHE CARD HOVER ── */
.marche-card, .diff-card, .faq-item {
  transition: transform 0.3s var(--ease-out-expo),
              box-shadow 0.3s ease;
}
.marche-card:hover, .diff-card:hover, .faq-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

/* ── PAGE HERO ENTRANCE ── */
.page-hero-inner > * {
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out-expo) forwards;
}
.page-hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.page-hero-inner > *:nth-child(2) { animation-delay: 0.15s; }
.page-hero-inner > *:nth-child(3) { animation-delay: 0.28s; }
.page-hero-inner > *:nth-child(4) { animation-delay: 0.4s; }

/* ── LOGO HOVER ── */
.nav-logo {
  transition: opacity 0.2s ease, letter-spacing 0.3s ease;
}
.nav-logo:hover { opacity: 0.85; letter-spacing: 1px; }

/* ── TARGET CARD BORDER ANIMATION ── */
.target-card {
  transition: transform 0.35s var(--ease-out-expo),
              box-shadow 0.35s ease;
}
.target-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
}

/* ── SMOOTH SCROLLBAR (WebKit) ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bleu); }
::-webkit-scrollbar-thumb { background: var(--rouge); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c02030; }
