@font-face {
  font-family: 'LazyDog';
  src: url('/assets/fonts/lazy_dog.ttf') format('truetype');
}

@font-face {
  font-family: 'OctoberCrow';
  src: url('/assets/fonts/October_Crow.ttf') format('truetype');
}

.stats-bg {
  position: fixed;
  inset: 0;
background: url('/assets/images/FONDECRAN1.webp') no-repeat center center;
  background-size: cover;
  z-index: -1;
  animation: fantomeFloat 10s ease-in-out infinite;
  will-change: transform, background-position;
  pointer-events: none;
}

@keyframes fantomeFloat {
  0%   { transform: scale(1); background-position: 50% 50%; }
  50%  { transform: scale(1.05); background-position: 48% 52%; }
  100% { transform: scale(1); background-position: 50% 50%; }
}

.stats-page {
  max-width: 1300px;
  margin: 4rem auto;
  padding: 0 2rem;
  color: #dbdbdb;
  text-align: center;
}

.stats-page h1 {
  font-family: 'OctoberCrow', cursive;
  font-size: 3rem;
  color: #1cce5b;
  text-shadow: 0 0 10px #1cce5b;
  margin-bottom: 1.5rem;
  margin-top: 8rem;
  font-weight: lighter;
}

.intro-text {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #cfcfcf;
}

/* === TABLEAU === */
.table-container {
  background: #110024d9;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid;
  border-image: linear-gradient(to right, #090013, #1cce5b, #090013) 1;
  margin-bottom: 3rem;
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.table-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

#filterInput {
  background: #090013;
  color: #fff;
  border: 1px solid #1cce5b;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  width: 320px;
  outline: none;
  transition: box-shadow 0.3s;
}
#filterInput:focus { box-shadow: 0 0 10px #1cce5b; }

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(9,0,19,0.8);
  border-radius: 10px;
  overflow: hidden;
}
th, td { padding: 0.9rem 1rem; text-align: left; }
th {
  cursor: pointer;
  background: #1a002f;
  color: #1cce5b;
  text-shadow: 0 0 6px #1cce5b;
  font-family: 'LazyDog', cursive;
  font-size: 1rem;
  font-weight: lighter;
}
tr:nth-child(even) { background: rgba(17,0,36,0.6); }
tr:hover { background: rgba(255,126,36,0.1); box-shadow: inset 0 0 10px #1cce5b; }
td { font-size: 1rem; color: #ddd; vertical-align: middle; }

/* Colonne nom : image au-dessus du nom */
.cell-name { display: grid; justify-items: start; gap: 6px; }
.cell-name .ghost-img {
  width: 42px; height: 42px; border-radius: 6px; box-shadow: 0 0 10px rgba(255,126,36,.25);
}
.cell-name .ghost-name { font-weight: 600; }

/* Affichage "Varie" */
.varie { display: inline-flex; align-items: center; gap: .35rem; color: #ffddb8; font-weight: 600; }
.varie .inf { font-weight: 800; color: #1cce5b; text-shadow: 0 0 6px #1cce5b; font-size: 1.05rem; }

/* === BARRES VISUELLES DANS TABLEAU === */
.stat-block { display: grid; gap: 6px; }
.stat-line { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: .95rem; }
.stat-label { color: #cfcfcf; }
.stat-value { color: #ffddb8; font-weight: 600; min-width: 72px; text-align: right; }
.stat-bar { height: 10px; border-radius: 4px; overflow: hidden; background: #1f1330; position: relative; }
.stat-bar > span {
  position: absolute; inset: 0; width: var(--w, 0%); background: var(--bg, #1cce5b);
  border-radius: 4px; transition: width .3s ease;
}

/* Palette barres */
.bar-min { --bg: linear-gradient(90deg, #6f3e18, #8B4513); }                    /* marron */
.bar-max { --bg: linear-gradient(90deg, #1cce5b, #ff4444); }                    /* orange -> rouge */
.bar-ext { --bg: linear-gradient(90deg, #a566ff, #9b33ff); }                    /* violet (extreme) */
.bar-hunt { --bg: linear-gradient(90deg, #0e9b40, #66ff88); }                   /* vert */

/* === LeGENDE DU TABLEAU === */
.speed-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-bottom: 1rem;
}
.speed-legend .legend-item {
  display: flex; align-items: center; gap: 0.4rem; background: #090013;
  padding: 0.3rem 0.6rem; border-radius: 8px; border: 1px solid #1cce5b; font-size: 0.9rem;
}
.legend-color { width: 16px; height: 16px; border-radius: 4px; }

/* === GRAPHIQUES === */
.charts-section {
  margin-top: 3rem; background: #110024d9; border-radius: 12px; padding: 2rem;
  border: 1px solid; border-image: linear-gradient(to right, #090013, #1cce5b, #090013) 1; backdrop-filter: blur(4px);
}
.charts-section h2 {
  font-family: 'OctoberCrow', cursive; color: #1cce5b; font-size: 2rem; text-shadow: 0 0 8px #1cce5b; margin: 2rem 0 1rem;font-weight: lighter;

}
canvas { width: 100% !important; max-height: 420px; margin-bottom: 2rem; }

/* Boutons filtres (vitesses + seuils) */
.chart-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.chart-btn {
  background: #090013; border: 1px solid #1cce5b; color: #fff; border-radius: 8px;
  padding: 0.4rem 1rem; cursor: pointer; transition: 0.25s;
}
.chart-btn.active, .chart-btn:hover { background: #1cce5b; color: #090013; }

/* === PARTICULES === */
.particles-floating { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.particles-floating .particle {
  position: absolute; width: 6px; height: 6px; background-color: #1cce5b;
  border-radius: 50%; opacity: 0.4; animation: floatParticle ease-in-out infinite;
}
@keyframes floatParticle {
  0% { transform: translate(0,0) scale(var(--scale)); opacity: 0.3; }
  50% { transform: translate(var(--x), var(--y)) scale(var(--scale)); opacity: 0.9; }
  100% { transform: translate(0,0) scale(var(--scale)); opacity: 0.3; }
}

/* 🔼 Bouton retour en haut, visible apres scroll */#back-to-top {
  position: fixed;
      bottom: 40px;
      right: 60px;
  background: #1cce5b;
  color: #090013;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: none;
  transition: opacity 0.3s ease;
}

/* 🔼 Bouton retour en haut, visible apres scroll */#back-to-top:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}