/* ============================================================
   UGO HUMBERT — REFINE CSS
   Transitions de section premium, fond amélioré,
   typographie harmonisée, fluidité optimisée
   ============================================================ */

/* ============================================================
   SCROLL — natif fluide, pas de Lenis (qui buggait)
   ============================================================ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ============================================================
   FOND DU SITE — Effet aurore subtile
   Gradient animé en arrière-plan sur tout le site
   ============================================================ */
body {
  background:
    radial-gradient(ellipse at top, rgba(0, 166, 81, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(212, 255, 0, 0.04) 0%, transparent 50%),
    #0a0a0a;
  background-attachment: fixed;
}

/* Noise overlay très léger (style premium) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

/* ============================================================
   SECTION TRANSITIONS — Effets cinematic entre sections
   ============================================================ */

/* Retire l'ancien divider basique */
section + section::before {
  display: none !important;
}

/* Nouveau : effet "ridge" subtil entre les sections */
section {
  position: relative;
  z-index: 2;
}

/* Section transition wave (haut & bas alternance) */
.about, .stats, .ranking, .sponsors, .academy, .cta-section {
  position: relative;
}

.about::after, .stats::after, .ranking::after, .sponsors::after, .academy::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

/* ============================================================
   TYPO HARMONISÉE — Adoucissement général
   ============================================================ */

.hero-subtitle {
  font-size: clamp(16px, 1.4vw, 21px) !important;
  max-width: 540px;
  line-height: 1.55;
}

.hero-stat-num {
  font-size: clamp(32px, 4vw, 52px) !important;
}

.about-lead {
  font-size: clamp(18px, 1.4vw, 22px) !important;
  line-height: 1.55;
}

.about-content > p {
  font-size: 15px;
  line-height: 1.7;
}

.about-quote p {
  font-size: 18px !important;
  line-height: 1.5;
}

.timeline-card h3 {
  font-size: clamp(18px, 1.6vw, 22px) !important;
}

.cta-title {
  font-size: clamp(36px, 5vw, 64px) !important;
}

.academy-title {
  font-size: clamp(32px, 4vw, 56px) !important;
}

.info-value {
  font-size: clamp(16px, 1.4vw, 20px) !important;
}

/* Stat values cohérents */
.stat-value {
  font-size: clamp(36px, 4vw, 56px) !important;
}

/* Marquee plus discret */
.marquee-track {
  font-size: clamp(20px, 2.4vw, 32px) !important;
}

/* Big background text reduce */
.palmares::before {
  font-size: clamp(100px, 14vw, 220px) !important;
  opacity: 0.5;
}

.calendar::before {
  font-size: clamp(140px, 22vw, 340px) !important;
  opacity: 0.5;
}

/* ============================================================
   SCROLL — pas saccadé sur images
   ============================================================ */
img, video {
  will-change: auto;
}

.hero-bg-image {
  will-change: transform;
}

/* Désactive le ken burns sur mobile (peut bugger) */
@media (max-width: 768px) {
  .hero-bg-image {
    animation: none !important;
    transform: none !important;
  }
}

/* ============================================================
   PADDING & SPACING — Plus harmonieux
   ============================================================ */
.about, .palmares, .stats, .gallery, .ranking, .sponsors, .academy, .calendar, .play-style, .tournaments {
  padding: clamp(80px, 10vw, 140px) 0;
}

.section-header {
  margin-bottom: clamp(50px, 7vw, 90px);
}

/* ============================================================
   HERO META — Plus subtil
   ============================================================ */
.hero-meta-text {
  font-size: 12px !important;
  letter-spacing: 0.4em !important;
}

/* ============================================================
   BUTTON refinements
   ============================================================ */
.btn {
  padding: 14px 24px !important;
  font-size: 12px !important;
  letter-spacing: 0.15em !important;
}

/* ============================================================
   NAV — Plus dense et propre
   ============================================================ */
.nav-menu a {
  font-size: 12px !important;
  padding: 8px 14px !important;
  letter-spacing: 0.08em !important;
}

.logo-text {
  font-size: 15px !important;
  letter-spacing: 0.2em !important;
}

/* ============================================================
   SECTION LABELS — Plus design
   ============================================================ */
.section-label {
  font-size: 11px !important;
  letter-spacing: 0.5em !important;
  padding-bottom: 8px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ============================================================
   STAT cards — plus aérées
   ============================================================ */
.stat-card {
  padding: clamp(28px, 3vw, 40px) clamp(20px, 2.5vw, 30px) !important;
}

.stat-icon {
  width: 32px !important;
  height: 32px !important;
  margin-bottom: 16px !important;
}

/* ============================================================
   FIX FOOTER BIG TEXT (overflow)
   ============================================================ */
.footer-big {
  font-size: clamp(60px, 12vw, 180px) !important;
  padding: 0 var(--gutter);
}

/* ============================================================
   GALLERY — plus serrée et fluide
   ============================================================ */
.gallery-grid {
  grid-auto-rows: 240px !important;
}

.gallery-title {
  font-size: 18px !important;
}

/* ============================================================
   TIMELINE — cards plus aérées
   ============================================================ */
.timeline-card {
  padding: 24px 28px !important;
}

.timeline-tournament {
  font-size: 11px !important;
}

.timeline-opponent {
  font-size: 13px !important;
}

.timeline-desc {
  font-size: 13px !important;
  line-height: 1.65 !important;
}

/* ============================================================
   RANKING card refine
   ============================================================ */
.ranking-prefix {
  font-size: 18px !important;
}

.ranking-points {
  font-size: 16px !important;
}

.ranking-trend {
  font-size: 14px !important;
}

/* ============================================================
   ABOUT — Image plus contenue
   ============================================================ */
.about-image-frame {
  aspect-ratio: 4/5 !important;
  max-height: 600px;
}

/* ============================================================
   MOBILE — Encore plus compact
   ============================================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(44px, 12vw, 70px) !important;
  }

  .section-title {
    font-size: clamp(30px, 8vw, 44px) !important;
  }

  .timeline-year {
    font-size: 36px !important;
  }

  .cta-title {
    font-size: 32px !important;
  }

  .footer-big {
    font-size: 48px !important;
  }
}

/* ============================================================
   GPU acceleration pour fluidité
   ============================================================ */
.hero-content, .timeline-card, .stat-card, .sponsor-card, .gallery-item {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ============================================================
   Fix scroll-progress over loader
   ============================================================ */
.loader { z-index: 10001 !important; }
.scroll-progress { z-index: 9999; }

/* ============================================================
   TOURNOIS — Logos colorés en valeur
   ============================================================ */
.tour-card .tour-logo img {
  filter: none !important;
  opacity: 1 !important;
  max-width: 100% !important;
  max-height: 130px !important;
  object-fit: contain;
}

.tour-card .tour-logo {
  height: 140px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.tour-card {
  transition: all 0.5s var(--ease-out) !important;
}

.tour-card:hover .tour-logo img {
  transform: scale(1.08) rotate(-1deg);
  transition: transform 0.5s var(--ease-out);
}

/* ============================================================
   SECTION TRANSITION CINEMATIC
   Effet curtain/wave entre les sections
   ============================================================ */
.section-transition {
  position: relative;
  height: 100px;
  margin-top: -50px;
  margin-bottom: -50px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-2) 50%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   HERO scroll indicator overall improve
   ============================================================ */
.hero-scroll {
  z-index: 5;
}

/* Hide hero-scroll on mobile */
@media (max-width: 768px) {
  .hero-scroll { display: none; }
}

/* ============================================================
   FOND avec subtle parallax stars (premium)
   ============================================================ */
.bg-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(212, 255, 0, 0.3), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 40% 80%, rgba(212, 255, 0, 0.15), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 10% 60%, rgba(212, 255, 0, 0.2), transparent);
  background-size: 100% 100%;
  opacity: 0.7;
}

/* ============================================================
   PERFORMANCE — Limit animations on mobile
   ============================================================ */
@media (max-width: 768px) {
  .floating-ball { display: none !important; }
  body::before { display: none !important; }
}
