/* ============================================================
   UGO HUMBERT — LUXE CSS
   Scroll progress, section dots, image reveal cinema,
   easter egg, nav active, premium polish
   ============================================================ */

/* ============================================================
   SCROLL PROGRESS BAR (en haut de la page)
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 9999;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 15px rgba(212, 255, 0, 0.6);
  transition: width 0.1s linear;
}

/* ============================================================
   SECTION DOTS NAVIGATION (sidebar droite)
   ============================================================ */
.section-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 90;
}

.section-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s var(--ease-out);
  display: block;
  cursor: none;
}

.section-dot:hover {
  background: var(--accent);
  transform: scale(1.4);
}

.section-dot.active {
  background: var(--accent);
  transform: scale(1.6);
  box-shadow: 0 0 20px rgba(212, 255, 0, 0.6);
}

.dot-label {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 100px;
  border: 1px solid var(--line);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
}

.section-dot:hover .dot-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 1024px) {
  .section-dots { display: none; }
}

/* ============================================================
   IMAGE REVEAL CINEMA (effet rideau au scroll)
   ============================================================ */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  z-index: 2;
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
  pointer-events: none;
}

.image-reveal.revealed::before {
  transform: scaleX(0);
}

.image-reveal img {
  transform: scale(1.2);
  transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}

.image-reveal.revealed img {
  transform: scale(1);
}

/* ============================================================
   EASTER EGG — Balles de tennis qui tombent
   ============================================================ */
@keyframes ballFall {
  0% {
    transform: translateY(-100vh) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0.8;
  }
}

.easter-ball {
  position: fixed;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e8ff5e, var(--accent) 50%, #88a700);
  box-shadow:
    inset -4px -4px 12px rgba(0,0,0,0.3),
    0 0 20px rgba(212, 255, 0, 0.5);
  z-index: 9998;
  pointer-events: none;
  animation: ballFall linear forwards;
}

.easter-ball::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 1px;
  border-top: 1px dashed rgba(255,255,255,0.5);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-15deg);
}

.uh-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 16px 28px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.2em;
  border-radius: 100px;
  z-index: 9999;
  animation: toastIn 0.5s var(--ease-out) forwards, toastOut 0.5s var(--ease-out) 2.5s forwards;
  box-shadow: 0 20px 40px rgba(212, 255, 0, 0.3);
}

@keyframes toastIn {
  to { transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  to { transform: translateX(-50%) translateY(100px); opacity: 0; }
}

/* ============================================================
   NAV LINK ACTIVE STATE
   ============================================================ */
.nav-menu a {
  position: relative;
  transition: color 0.3s var(--ease-out);
}

.nav-menu a.active {
  color: var(--accent);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

/* ============================================================
   3D TILT — Add depth indicator
   ============================================================ */
.stat-card, .play-card, .tour-card, .sponsor-card, .ranking-card, .timeline-card {
  will-change: transform;
  transform-style: preserve-3d;
}

/* ============================================================
   KEYBOARD SHORTCUTS HINT (badge en bas)
   ============================================================ */
.kb-hint {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  z-index: 80;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}

.kb-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--accent);
  margin: 0 2px;
}

body:not(.scrolled-yet) .kb-hint { opacity: 1; }

@media (max-width: 768px) {
  .kb-hint { display: none; }
}

/* ============================================================
   ENHANCED HOVER STATES — Sponsor cards radial glow
   ============================================================ */
.sponsor-card {
  position: relative;
}

.sponsor-card::after {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 255, 0, 0.15), transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
  border-radius: 50%;
}

.sponsor-card:hover::after {
  opacity: 1;
}

/* ============================================================
   TIMELINE — Glow effect on highlighted cards
   ============================================================ */
.timeline-card.highlight {
  position: relative;
}

.timeline-card.highlight::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--accent-2), transparent, var(--accent));
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.5s var(--ease-out);
}

.timeline-card.highlight:hover::after {
  opacity: 0.8;
}

/* ============================================================
   SECTION TRANSITIONS — Cross-section divider
   ============================================================ */
section {
  position: relative;
}

section + section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}

/* ============================================================
   PREMIUM TYPOGRAPHY — Hero number variant
   ============================================================ */
.hero-stat-num {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  position: relative;
}

.hero-stat-num::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.hero-stat:hover .hero-stat-num::after {
  width: 100%;
}

/* ============================================================
   CALENDAR SECTION — Upcoming tournaments
   ============================================================ */
.calendar {
  padding: 140px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.calendar::before {
  content: '2026';
  position: absolute;
  top: 80px;
  left: -30px;
  font-family: var(--font-display);
  font-size: clamp(180px, 26vw, 420px);
  color: var(--line);
  font-weight: 400;
  letter-spacing: -0.02em;
  z-index: 0;
  pointer-events: none;
}

.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.calendar-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  align-items: center;
  gap: 30px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
}

.calendar-item:last-child {
  border-bottom: 1px solid var(--line);
}

.calendar-item:hover {
  padding-left: 20px;
  background: linear-gradient(90deg, rgba(212, 255, 0, 0.04), transparent);
}

.cal-date {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.cal-date small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-3);
  margin-top: 6px;
}

.cal-tournament {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.cal-tournament small {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-3);
  margin-top: 4px;
}

.cal-surface {
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-2);
}

.cal-cat {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-3);
}

.cal-cat.gs {
  color: var(--accent);
}

.cal-cat.m1000 {
  color: var(--accent-3);
}

@media (max-width: 768px) {
  .calendar-item {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
  }
  .cal-surface, .cal-cat {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .cal-date { font-size: 22px; }
  .cal-tournament { font-size: 18px; }
}

/* ============================================================
   PHOTO CREDITS overlay (footer micro)
   ============================================================ */
.credits-bar {
  text-align: center;
  padding: 20px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

/* ============================================================
   PERFORMANCE — Reduce motion fallback
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .image-reveal::before,
  .image-reveal img {
    transition: none !important;
  }
  .scroll-progress-bar {
    transition: none !important;
  }
}
