/* ============================================================
   UGO HUMBERT — EXTRAS CSS
   Nouvelles sections : Style de jeu, Tournois, Big Quote,
   Lightbox navigation, micro-animations premium
   ============================================================ */

/* ============================================================
   PLAY STYLE — Cards style de jeu
   ============================================================ */
.play-style {
  padding: 140px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.play-style::before {
  content: 'PLAY';
  position: absolute;
  top: 60px;
  left: -40px;
  font-family: var(--font-display);
  font-size: clamp(140px, 20vw, 320px);
  color: var(--line);
  font-weight: 400;
  letter-spacing: 0.1em;
  z-index: 0;
  pointer-events: none;
}

.play-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.play-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 30px;
  transition: all 0.5s var(--ease-out);
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.play-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(212, 255, 0, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.play-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.play-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  background: var(--bg-3);
}

.play-card:hover::before { opacity: 1; }
.play-card:hover::after { transform: scaleX(1); }

.play-card-num {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--text-3);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.play-card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  color: var(--accent);
  position: relative;
  z-index: 1;
  transition: transform 0.5s var(--ease-out);
}

.play-card:hover .play-card-icon {
  transform: rotate(-8deg) scale(1.1);
}

.play-card-icon svg { width: 100%; height: 100%; }

.play-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.play-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.play-card-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.play-stat-num {
  font-family: var(--font-display);
  font-size: 42px;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.play-stat-unit {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-3);
  text-transform: uppercase;
}

/* ============================================================
   TOURNAMENTS GRID
   ============================================================ */
.tournaments-section {
  padding: 140px 0;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}

.tournaments-section::before {
  content: 'TOUR';
  position: absolute;
  top: 80px;
  right: -50px;
  font-family: var(--font-display);
  font-size: clamp(160px, 22vw, 360px);
  color: var(--line);
  font-weight: 400;
  letter-spacing: 0.1em;
  z-index: 0;
  pointer-events: none;
}

.tour-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}

.tour-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 220px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.tour-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(212, 255, 0, 0.06));
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.tour-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface);
}

.tour-card:hover::before { opacity: 1; }

.tour-card.grand-slam {
  background: linear-gradient(135deg, var(--bg-3), rgba(0, 38, 84, 0.2));
}

.tour-card.masters {
  background: linear-gradient(135deg, var(--bg-3), rgba(206, 17, 38, 0.1));
  border-color: rgba(206, 17, 38, 0.3);
}

.tour-card.winner {
  border-color: rgba(212, 255, 0, 0.4);
  background: linear-gradient(135deg, var(--bg-3), rgba(212, 255, 0, 0.05));
}

.tour-logo {
  height: 60px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.tour-logo img {
  max-height: 60px;
  max-width: 180px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}

.tour-card:hover .tour-logo img {
  opacity: 1;
  transform: scale(1.05);
}

.tour-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.tour-type {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
}

.tour-surface {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--text);
}

.tour-best {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin-top: 4px;
}

.tour-best.gold {
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   BIG QUOTE — Full screen quote section
   ============================================================ */
.big-quote {
  position: relative;
  padding: 180px 0;
  overflow: hidden;
  background: var(--bg);
}

.big-quote-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(60%) blur(2px);
  opacity: 0.3;
  z-index: 0;
  transform: scale(1.1);
}

.big-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(10,10,10,0.7) 50%, var(--bg) 100%),
    radial-gradient(circle at 50% 50%, rgba(212, 255, 0, 0.1), transparent 60%);
  z-index: 1;
}

.big-quote .container {
  position: relative;
  z-index: 2;
}

.big-quote-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.big-quote-mark {
  width: 60px;
  height: 60px;
  color: var(--accent);
  opacity: 0.5;
  margin: 0 auto 30px;
}

.big-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 64px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 50px;
  font-weight: 400;
}

.big-quote blockquote span {
  display: block;
}

.big-quote blockquote .italic {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.big-quote-author {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.bq-line {
  width: 60px;
  height: 1px;
  background: var(--accent);
}

.bq-name {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--text-2);
}

/* ============================================================
   LIGHTBOX NAVIGATION (prev/next arrows)
   ============================================================ */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  z-index: 10002;
}

.lightbox-nav:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-nav svg { width: 22px; height: 22px; }

#lightboxImg {
  transition: opacity 0.3s var(--ease-out), transform 0.5s var(--ease-out);
}

@media (max-width: 768px) {
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

/* ============================================================
   SPONSORS — IMPROVED with brand-mode toggle
   ============================================================ */
.sponsors-grid {
  position: relative;
}

/* Mode "vraies couleurs officielles" au survol — ajusté pour PNG/SVG colorés */
.sponsor-card {
  cursor: pointer;
}

/* PNG comme UTS — pas de filter */
.sponsor-logo img[src$=".png"] {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.sponsor-card:hover .sponsor-logo img[src$=".png"] {
  filter: brightness(0) invert(1);
  opacity: 1;
  transform: scale(1.08);
}

/* ============================================================
   ENHANCEMENTS — Hero refinements
   ============================================================ */

/* Hero meilleur badge "Born in Metz" */
.hero-meta {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 100px;
  width: fit-content;
}

/* Hero subtitle plus marqué */
.hero-subtitle {
  font-weight: 200;
  letter-spacing: 0.01em;
}

/* Vignette autour de l'image hero */
.hero-overlay {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.2) 30%, rgba(10,10,10,0.95) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.5) 0%, transparent 40%, transparent 60%, rgba(10,10,10,0.3) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(10,10,10,0.4) 100%);
}

/* ============================================================
   GALLERY — Enhanced hover effect
   ============================================================ */
.gallery-item {
  background: var(--bg-2);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 10, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}

.gallery-item:hover::after { opacity: 1; }

/* Badge "VIEW" sur les images au hover */
.gallery-item::before {
  content: 'VIEW';
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--bg);
  background: var(--accent);
  padding: 6px 12px;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(-10px) scale(0.9);
  transition: all 0.4s var(--ease-out);
  z-index: 2;
}

.gallery-item:hover::before {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ============================================================
   TIMELINE — Highlight winning cards
   ============================================================ */
.timeline-card-header {
  position: relative;
}

.timeline-tournament {
  position: relative;
}

/* ============================================================
   STAT CARDS — Improved hover
   ============================================================ */
.stat-card {
  cursor: default;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.stat-card .stat-icon {
  transition: transform 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

.stat-card:hover .stat-icon {
  transform: rotate(-12deg) scale(1.1);
  color: var(--accent);
}

/* ============================================================
   RANKING CARD — Glow on hover
   ============================================================ */
.ranking-card {
  transition: all 0.5s var(--ease-out);
}

.ranking-card:hover {
  box-shadow:
    0 30px 80px -20px rgba(212, 255, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ranking-number {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* ============================================================
   SCORE CARDS — Live pulse
   ============================================================ */
.score-card.live {
  border-color: var(--accent-3);
  position: relative;
}

.score-card.live::after {
  content: 'LIVE';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-3);
  color: white;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================================
   FOOTER — Big text reveal
   ============================================================ */
.footer-big {
  margin-top: 60px;
  padding-bottom: 20px;
  letter-spacing: 0.02em;
  cursor: default;
  user-select: none;
  position: relative;
}

.footer-big::after {
  content: 'THE COMMANDER';
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.5em;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

/* ============================================================
   RESPONSIVE — Adjust new sections
   ============================================================ */
@media (max-width: 1024px) {
  .play-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tour-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .play-style, .tournaments-section {
    padding: 80px 0;
  }
  .play-grid {
    grid-template-columns: 1fr;
  }
  .play-card {
    min-height: auto;
    padding: 30px 24px;
  }
  .tour-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .tour-card {
    padding: 20px;
    min-height: 180px;
  }
  .tour-logo {
    height: 40px;
  }
  .tour-logo img {
    max-height: 40px;
  }
  .big-quote {
    padding: 100px 0;
  }
  .big-quote-mark {
    width: 40px;
    height: 40px;
  }
}

/* ============================================================
   SMOOTH SCROLL (sans Lenis, via CSS native)
   ============================================================ */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   SECTION TRANSITIONS — Smooth divider
   ============================================================ */
.about + .palmares,
.palmares + .stats,
.stats + .play-style,
.play-style + .tournaments-section,
.tournaments-section + .big-quote,
.big-quote + .gallery,
.gallery + .ranking,
.ranking + .sponsors,
.sponsors + .academy {
  position: relative;
}

/* ============================================================
   COURT LINES BG DECORATION (court de tennis virtuel)
   ============================================================ */
.court-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(to right, var(--accent) 1px, transparent 1px),
    linear-gradient(to bottom, var(--accent) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center;
}

/* ============================================================
   ENHANCED ANIMATIONS
   ============================================================ */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Visible class extends */
.play-card.reveal.visible,
.tour-card.reveal.visible {
  animation: fadeInUp 0.8s var(--ease-out) backwards;
}

.play-card:nth-child(1).reveal.visible { animation-delay: 0s; }
.play-card:nth-child(2).reveal.visible { animation-delay: 0.1s; }
.play-card:nth-child(3).reveal.visible { animation-delay: 0.2s; }
.play-card:nth-child(4).reveal.visible { animation-delay: 0.3s; }

.tour-card:nth-child(1).reveal.visible { animation-delay: 0s; }
.tour-card:nth-child(2).reveal.visible { animation-delay: 0.05s; }
.tour-card:nth-child(3).reveal.visible { animation-delay: 0.1s; }
.tour-card:nth-child(4).reveal.visible { animation-delay: 0.15s; }
.tour-card:nth-child(5).reveal.visible { animation-delay: 0.2s; }
.tour-card:nth-child(6).reveal.visible { animation-delay: 0.25s; }
.tour-card:nth-child(7).reveal.visible { animation-delay: 0.3s; }
.tour-card:nth-child(8).reveal.visible { animation-delay: 0.35s; }
