@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,600;1,300&family=Playfair+Display:ital,wght@1,700&display=swap');

:root {
  --clay: #c2622d;
  --clay-light: #d97840;
  --clay-dark: #8b3e15;
  --court-green: #2d5016;
  --court-line: #f5f0e8;
  --chalk: #faf7f2;
  --night: #0d0d0b;
  --night-2: #1a1a16;
  --night-3: #252520;
  --gold: #e8c547;
  --text-muted: #8a8070;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--night);
  color: var(--chalk);
  overflow-x: hidden;
  cursor: none;
}

/* CURSOR */
.cursor {
  width: 12px; height: 12px;
  background: var(--clay);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
  mix-blend-mode: normal;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid var(--clay);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.15s ease;
  opacity: 0.5;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 4rem;
  background: rgba(13,13,11,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(194,98,45,0.2);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  color: var(--clay-light);
  text-decoration: none;
  display: flex; align-items: center; gap: 0.6rem;
}

.nav-logo .ball {
  width: 18px; height: 18px;
  background: var(--clay);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  animation: spin 3s linear infinite;
}

@keyframes spin {
  0% { box-shadow: 0 0 0 0 rgba(194,98,45,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(194,98,45,0); }
  100% { box-shadow: 0 0 0 0 rgba(194,98,45,0); }
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }

.nav-links a {
  text-decoration: none;
  color: var(--chalk);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: all 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: var(--clay);
  transition: width 0.3s;
}
.nav-links a:hover { opacity: 1; color: var(--clay-light); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { opacity: 1; color: var(--clay-light); }
.nav-links a.active::after { width: 100%; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: var(--night);
  z-index: 0;
}

/* Court lines animées */
.court-lines {
  position: absolute; inset: 0;
  overflow: hidden;
  opacity: 0.06;
}

.court-lines::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  border: 2px solid var(--court-line);
  animation: courtPulse 4s ease-in-out infinite;
}
.court-lines::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) translateX(0);
  width: 2px; height: 400px;
  background: var(--court-line);
  animation: courtPulse 4s ease-in-out infinite 0.5s;
}

@keyframes courtPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.clay-texture {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(194,98,45,0.08) 0%, transparent 70%),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(194,98,45,0.02) 39px, rgba(194,98,45,0.02) 40px),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(194,98,45,0.02) 39px, rgba(194,98,45,0.02) 40px);
  z-index: 0;
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--chalk);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero-title .accent { color: var(--clay); }

.hero-italic {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--clay-light);
  margin-top: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 2rem auto;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.9s;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--clay);
  color: var(--chalk);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1.1s;
}
.hero-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--clay-light);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.hero-cta:hover::before { transform: translateX(0); }
.hero-cta span { position: relative; z-index: 1; }

/* Balle rebondissante */
.bouncing-ball {
  position: absolute;
  bottom: 0; left: 50%;
  width: 20px; height: 20px;
  background: #ccdd22;
  border-radius: 50%;
  transform: translateX(-50%);
  animation: bounce 1.2s cubic-bezier(0.36,0.07,0.19,0.97) infinite alternate;
  box-shadow: 0 0 20px rgba(204,221,34,0.4);
}
@keyframes bounce {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(-80px); }
}

.ball-shadow {
  position: absolute;
  bottom: 0; left: 50%;
  width: 20px; height: 6px;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: shadowPulse 1.2s ease infinite alternate;
}
@keyframes shadowPulse {
  0% { transform: translateX(-50%) scaleX(1); opacity: 0.4; }
  100% { transform: translateX(-50%) scaleX(0.4); opacity: 0.1; }
}

/* SCORE TICKER */
.score-ticker {
  background: var(--clay-dark);
  padding: 0.5rem 0;
  overflow: hidden;
  position: relative;
}
.ticker-track {
  display: flex; gap: 0;
  animation: ticker 25s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  padding: 0 3rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--chalk);
  opacity: 0.9;
}
.ticker-dot { color: var(--gold); }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* SECTIONS */
.section {
  padding: 8rem 4rem;
  position: relative;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.section-label::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--clay);
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 3rem;
}

/* STATS BAR */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: rgba(194,98,45,0.15);
  border: 0.5px solid rgba(194,98,45,0.15);
  margin: 0 4rem;
}
.stat-box {
  padding: 2.5rem 2rem;
  background: var(--night-2);
  text-align: center;
  transition: background 0.3s;
}
.stat-box:hover { background: var(--night-3); }
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: var(--clay-light);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--night-2);
  border: 0.5px solid rgba(194,98,45,0.15);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: none;
}
.card::before {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--clay);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}
.card:hover { border-color: rgba(194,98,45,0.4); transform: translateY(-4px); }
.card:hover::before { transform: scaleX(1); }

.card-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: rgba(194,98,45,0.12);
  position: absolute; top: 1rem; right: 1.5rem;
  line-height: 1;
}
.card-emoji { font-size: 2rem; margin-bottom: 1rem; }
.card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--chalk);
  margin-bottom: 0.75rem;
}
.card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 300;
}

/* PLAYERS PAGE */
.players-hero { padding-top: 12rem; }

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: rgba(194,98,45,0.1);
  margin-top: 4rem;
}

.player-card {
  background: var(--night-2);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  cursor: none;
  transition: all 0.4s;
}
.player-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(194,98,45,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.player-card:hover::after { opacity: 1; }
.player-card:hover { background: var(--night-3); }

.player-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 5rem;
  color: rgba(194,98,45,0.08);
  position: absolute; top: 1rem; right: 2rem;
  line-height: 1;
}
.player-flag { font-size: 2rem; margin-bottom: 1rem; }
.player-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.player-country {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1.5rem;
}
.player-stats { display: flex; gap: 1.5rem; }
.p-stat { }
.p-stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--chalk);
}
.p-stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* COURTS PAGE */
.surface-tabs {
  display: flex; gap: 0;
  border: 0.5px solid rgba(194,98,45,0.2);
  margin-bottom: 3rem;
  overflow: hidden;
}
.tab {
  flex: 1;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: none;
  transition: all 0.3s;
  background: transparent;
  color: var(--text-muted);
  border: none;
  position: relative;
}
.tab.active, .tab:hover { color: var(--chalk); background: var(--clay); }

.court-card {
  background: var(--night-2);
  border: 0.5px solid rgba(194,98,45,0.15);
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  transition: all 0.3s;
}
.court-card:hover { border-color: rgba(194,98,45,0.4); }

.court-visual {
  padding: 3rem;
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}

.court-diagram {
  width: 160px; height: 100px;
  border: 3px solid var(--court-line);
  position: relative;
  opacity: 0.8;
}
.court-diagram::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; background: var(--court-line);
  transform: translateX(-50%);
}
.court-diagram::after {
  content: '';
  position: absolute; top: 33%; left: 0; right: 0;
  height: 3px; background: var(--court-line);
}
.clay-court { background: rgba(194,98,45,0.3); }
.grass-court { background: rgba(45,80,22,0.5); }
.hard-court { background: rgba(30,80,150,0.3); }

.court-info { padding: 3rem; }
.court-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; margin-bottom: 0.5rem;
}
.court-surface {
  font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--clay);
  margin-bottom: 1.5rem;
}
.court-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; font-weight: 300; }

/* RULES PAGE */
.rules-list { max-width: 800px; }

.rule-item {
  display: flex; gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 0.5px solid rgba(194,98,45,0.1);
  transition: all 0.3s;
  cursor: none;
}
.rule-item:hover { padding-left: 1rem; }
.rule-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--clay);
  opacity: 0.4;
  line-height: 1;
  min-width: 60px;
  transition: opacity 0.3s;
}
.rule-item:hover .rule-num { opacity: 1; }
.rule-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.rule-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; font-weight: 300; }

/* SCORE DISPLAY */
.live-score {
  background: var(--night-2);
  border: 0.5px solid rgba(194,98,45,0.15);
  padding: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #cc2222;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  margin-bottom: 1.5rem;
}
.live-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.score-board {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 1.5rem;
  align-items: center;
}
.score-player { font-weight: 600; font-size: 1.1rem; }
.score-set {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--chalk);
  text-align: center;
  min-width: 50px;
}
.score-set.serving { color: var(--clay-light); }
.score-divider { color: var(--text-muted); font-size: 1.5rem; }

/* FOOTER */
footer {
  background: var(--night-2);
  border-top: 0.5px solid rgba(194,98,45,0.15);
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--clay-light);
  margin-bottom: 1rem;
}
.footer-text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; font-weight: 300; }
.footer-heading {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1.5rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 300;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--chalk); }
.footer-bottom {
  border-top: 0.5px solid rgba(194,98,45,0.1);
  padding: 1.5rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ANIMATIONS SCROLL */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* PROGRESS BAR NAV */
#progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px;
  background: var(--clay);
  z-index: 999;
  transition: width 0.1s;
}

/* HIGHLIGHT BADGE */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(194,98,45,0.15);
  border: 0.5px solid rgba(194,98,45,0.3);
  color: var(--clay-light);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

/* PAGE TRANSITION */
.page-enter {
  animation: pageIn 0.6s ease forwards;
}
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* DIVIDER */
.divider {
  height: 0.5px;
  background: linear-gradient(90deg, transparent, rgba(194,98,45,0.3), transparent);
  margin: 0;
}

/* MOBILE */
@media (max-width: 768px) {
  nav { padding: 1.2rem 1.5rem; }
  .section { padding: 5rem 1.5rem; }
  .stats-row { margin: 0 1.5rem; }
  footer { grid-template-columns: 1fr; padding: 3rem 1.5rem; }
  .footer-bottom { padding: 1.5rem; flex-direction: column; gap: 0.5rem; }
  .court-card { grid-template-columns: 1fr; }
  .score-board { grid-template-columns: 1fr auto auto; }
}
