/* ============================================================
   JEUX SPORTIFS MONDIAUX — Zone Total Sport
   Thème Cosmique Électrique
   ============================================================ */

/* === VARIABLES === */
:root {
  --bg: #080812;
  --bg2: #0d0d1f;
  --bg3: #111128;
  --primary: #00d4ff;
  --primary-dim: rgba(0, 212, 255, 0.15);
  --primary-glow: rgba(0, 212, 255, 0.25);
  --secondary: #7c3aed;
  --secondary-dim: rgba(124, 58, 237, 0.15);
  --accent: #ff0080;
  --accent-dim: rgba(255, 0, 128, 0.15);
  --text: #f0f4ff;
  --text-muted: rgba(240, 244, 255, 0.5);
  --text-faint: rgba(240, 244, 255, 0.25);
  --card-bg: rgba(0, 212, 255, 0.04);
  --card-border: rgba(0, 212, 255, 0.15);
  --header-bg: rgba(8, 8, 18, 0.85);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 20px 60px rgba(0, 212, 255, 0.2), 0 0 0 1px rgba(0, 212, 255, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-title: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #fff;
}

ul, ol {
  padding-left: 1.4em;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.6);
}

/* === CANVAS BACKGROUND === */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.7;
}

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-logo {
  font-size: 4rem;
  animation: pulse 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--primary));
}

.loading-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--primary-dim);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 20px var(--primary-glow);
}

.loading-bar-container {
  width: 240px;
  height: 4px;
  background: var(--primary-dim);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  animation: loadingProgress 3s ease-in-out forwards;
  box-shadow: 0 0 10px var(--primary);
}

.loading-text {
  font-size: 0.8rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* === HIDDEN === */
.hidden {
  display: none !important;
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 12px var(--primary));
  animation: pulse 3s ease-in-out infinite;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary);
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-stats {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.hstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.hstat-num {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.hstat-label {
  font-size: 0.58rem;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#hstat-jeux {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#hstat-jeux .hstat-num,
#hstat-jeux span:first-child {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

#hstat-jeux span:last-child {
  font-size: 0.58rem;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  border-color: var(--card-border);
  background: var(--card-bg);
}

/* === HERO === */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 100px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #60e0ff 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

.gradient-text-alt {
  background: linear-gradient(135deg, var(--secondary) 0%, #a78bfa 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 4s linear infinite reverse;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto 40px;
}

.hero-counters {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.counter-card {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 20px 28px;
  text-align: center;
  transition: var(--transition);
}

.counter-card:hover {
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-3px);
}

.counter-num {
  display: block;
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.counter-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.hero-sports-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 1.6rem;
  flex-wrap: wrap;
  opacity: 0.7;
}

.hero-sports-icons span {
  animation: float 3s ease-in-out infinite;
  display: inline-block;
}

.hero-sports-icons span:nth-child(2) { animation-delay: 0.25s; }
.hero-sports-icons span:nth-child(3) { animation-delay: 0.5s; }
.hero-sports-icons span:nth-child(4) { animation-delay: 0.75s; }
.hero-sports-icons span:nth-child(5) { animation-delay: 1s; }
.hero-sports-icons span:nth-child(6) { animation-delay: 1.25s; }
.hero-sports-icons span:nth-child(7) { animation-delay: 1.5s; }
.hero-sports-icons span:nth-child(8) { animation-delay: 1.75s; }
.hero-sports-icons span:nth-child(9) { animation-delay: 2s; }
.hero-sports-icons span:nth-child(10) { animation-delay: 2.25s; }
.hero-sports-icons span:nth-child(11) { animation-delay: 2.5s; }
.hero-sports-icons span:nth-child(12) { animation-delay: 2.75s; }

/* === CONTROLS === */
.controls-section {
  position: sticky;
  top: 72px;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8, 8, 18, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 24px;
}

.controls-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.controls-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input::placeholder {
  color: var(--text-faint);
}

.search-input:focus {
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.filter-select {
  padding: 11px 16px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300d4ff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  min-width: 160px;
}

.filter-select option {
  background: var(--bg2);
  color: var(--text);
}

.filter-select:focus,
.filter-select:hover {
  border-color: var(--primary);
  background-color: rgba(0, 212, 255, 0.07);
}

.controls-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-reset {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 0, 128, 0.06);
}

.results-quick {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

#quick-count {
  color: var(--primary);
  font-weight: 700;
}

/* === STATS BAR === */
.stats-bar {
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 24px;
}

.stats-bar-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.stat-pill {
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.stat-pill-primary {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.stat-pill-secondary {
  background: rgba(124, 58, 237, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.stat-pill-accent {
  background: rgba(255, 0, 128, 0.08);
  color: #ff4da6;
  border: 1px solid rgba(255, 0, 128, 0.2);
}

.stat-pill-muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* === MAIN CONTENT === */
.main-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* === CARDS GRID === */
.jeux-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* === EMPTY STATE === */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 2;
}

.grid-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 24px;
  color: var(--text-muted);
}

.grid-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary-dim);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* === GAME CARDS === */
.game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.game-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  background: rgba(0, 212, 255, 0.07);
}

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

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.card-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.4));
}

.card-header-text {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}

.card-origin {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag-niveau {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.tag-intensite-eleve {
  background: rgba(255, 0, 64, 0.15);
  color: #ff4080;
  border: 1px solid rgba(255, 0, 64, 0.25);
}

.tag-intensite-modere {
  background: rgba(255, 200, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 200, 0, 0.25);
}

.tag-intensite-faible {
  background: rgba(0, 229, 160, 0.15);
  color: #00e5a0;
  border: 1px solid rgba(0, 229, 160, 0.25);
}

.tag-espace {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-players {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.card-arrow {
  font-size: 0.75rem;
  color: var(--primary);
  opacity: 0;
  transition: var(--transition);
  transform: translateX(-4px);
}

.game-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* === MODAL === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  background: #0f0f24;
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 212, 255, 0.1);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-body {
  padding: 28px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 0, 128, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.modal-badge {
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section h3 {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-section ul,
.modal-section ol {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.8;
}

.modal-section li {
  margin-bottom: 4px;
  color: rgba(240, 244, 255, 0.85);
}

.modal-section li::marker {
  color: var(--primary);
}

/* === BADGES NIVEAUX === */
.badge-prescolaire {
  background: rgba(0, 229, 160, 0.12);
  color: #00e5a0;
  border: 1px solid rgba(0, 229, 160, 0.25);
}

.badge-primaire {
  background: rgba(0, 212, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.badge-secondaire {
  background: rgba(124, 58, 237, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* === FOOTER === */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid rgba(0, 212, 255, 0.08);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-faint);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

@keyframes loadingProgress {
  0% { width: 0%; }
  30% { width: 35%; }
  60% { width: 65%; }
  80% { width: 82%; }
  95% { width: 95%; }
  100% { width: 100%; }
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 900px) {
  .header-stats {
    display: none;
  }

  .header-nav .nav-link:not(.active) {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 110px 16px 60px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-counters {
    gap: 12px;
  }

  .counter-card {
    padding: 14px 18px;
  }

  .counter-num {
    font-size: 1.7rem;
  }

  .hero-sports-icons {
    font-size: 1.3rem;
    gap: 10px;
  }

  .controls-section {
    top: 60px;
    padding: 12px 16px;
  }

  .controls-row {
    gap: 8px;
  }

  .search-wrapper {
    min-width: 100%;
  }

  .filter-select {
    min-width: calc(50% - 4px);
    flex: 1;
    font-size: 0.8rem;
    padding: 9px 30px 9px 10px;
  }

  .header-inner {
    padding: 0 16px;
    height: 60px;
  }

  .logo-main {
    font-size: 0.8rem;
  }

  .logo-sub {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .jeux-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .main-content {
    padding: 20px 16px 48px;
  }

  .stats-bar {
    padding: 8px 16px;
  }

  .modal-container {
    max-height: 90vh;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .filter-select {
    min-width: 100%;
  }

  .hero-counters {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }
}

/* === UTILITAIRES === */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.font-title { font-family: var(--font-title); }

/* Transition douce pour les filtres */
.game-card {
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}
