/* ─── Reset & Base ─────────────────────────────────────────────────── */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #111827 url("/static/images/Symbole-PLVYOFF.870255049c3d.png") repeat;
  color: #e0e0e0;
  font-family: "Montserrat", sans-serif;
  overflow: auto;
}

/* ─── Invisible fixed navbar ───────────────────────────────────────── */
.navbar-invisible {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  background: transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 102;
}

/* ─── Hamburger toggle (mobile) ───────────────────────────────────── */
.menu-toggle {
  display: none;
  font-size: 25px;
  color: #A0A0A0; /* Couleur grise pour le menu hamburger */
  margin-right: 15px;
  cursor: pointer;
  /* Force la couleur sur tous les enfants qui utilisent currentColor */
  fill: #A0A0A0;
}

/* Ciblage direct et puissant de l'icône hamburger */
.menu-toggle img.icon,
.menu-toggle img.icon * {
  width: 24px;
  height: 24px;
  color: #A0A0A0 !important;
  fill: #A0A0A0 !important;
  stroke: #A0A0A0 !important;
  /* Triple approche pour garantir la couleur */
  filter: invert(65%) sepia(12%) saturate(10%) hue-rotate(7deg) brightness(96%) contrast(91%) !important;
}

/* ─── Logo ─────────────────────────────────────────────────────────── */
.header img {
  height: 50px;
  display: block;
}

/* ─── Sign In / Sign Up Links ──────────────────────────────────────── */
.auth-links {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.auth-links a {
  padding: 4px 10px;
  border: 1px solid #00d6b4;
  border-radius: 8px;
  background-color: transparent;
  color: #00d6b4;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.auth-links a:hover {
  background-color: rgba(0, 214, 180, 0.08);
}

/* ─── User initials & dropdown ─────────────────────────────────────── */
.user-initials {
  margin-left: auto;
  position: relative;
  width: 30px;
  height: 30px;
  background: #111827;
  color: #00d6b4;
  border: 1px solid #00d6b4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.user-initials:hover,
.user-initials:focus {
  background-color: #00d6b4;
  color: #fff;
  transform: scale(1.1);
}

.user-initials:active {
  transform: scale(1.08);
}

/* ── Dropdown menu container ───────────────────────────────────────── */
.user-menu {
  position: absolute;
  top: 34px;
  right: 0;
  background: #181f2a;
  border: 1px solid #00d6b4;
  border-radius: 4px;
  min-width: 44px;
  max-width: 70px;
  padding: 0;
  z-index: 999;
  box-shadow: 0 1.5px 5px rgba(0, 214, 180, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.user-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Dropdown links ────────────────────────────────────────────────── */
.user-menu a {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: 11px;
  color: #00d6b4;
  background: none;
  border: none;
  border-radius: 4px;
  margin: 1px 0;
  font-weight: 400;
  text-decoration: none;
  text-align: left;
  min-width: 26px;
  height: 20px;
  cursor: pointer;
}

.user-menu a:hover,
.user-menu a:focus {
  color: #00d6b4;
}

/* ── Logout icon ───────────────────────────────────────────────────── */
.logout-icon {
  width: 13px;
  height: 13px;
  margin-left: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-text {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ─── Sidebar ──────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  background: #00d6b4;
  border-radius: 5px;
  z-index: 100;
  max-height: 80vh;       /* jamais plus haut que 80% de la fenêtre */
  overflow: hidden;       /* cache tout ce qui dépasse en hauteur */
  display: flex;
  flex-direction: column;
  width: 60px;
  white-space: nowrap;
  transition: width 0.3s ease;
}

/* ─── Liens (fermée) : padding / margin vertical fixe ─────────────── */
.sidebar a {
  position: relative;     /* pour le pseudo-élément underline */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;          /* espacement vertical identique */
  padding: 8px 0;         /* top/bottom toujours 8px */
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s, justify-content 0.3s, padding 0.3s;
}

/* ─── Underline au survol ─────────────────────────────────────────── */
.sidebar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;              /* place la ligne à la base du lien */
  width: 0;
  height: 2px;
  background: #A0A0A0;       /* couleur de l'underline (ici blanc) */
  transition: width 0.25s ease;
}
.sidebar a:hover::after {
  width: 100%;
}

/* ─── Force TOUTES les icônes en gris #A0A0A0 ──────────────────── */
.sidebar a .icon,
.sidebar a svg,
.sidebar a i,
.sidebar a img,
.sidebar a *[class*="icon"] {
  color: #A0A0A0 !important;
  fill:  #A0A0A0 !important;
  stroke: #A0A0A0 !important;
  filter: none !important;
}
.sidebar a img.icon,
.sidebar a img {
  filter: grayscale(100%) brightness(80%) !important;
  opacity: 1;
}

/* ─── Ouverture : largeur + padding horizontal ────────────────────── */
.sidebar:hover,
.sidebar.active {
  width: max-content;
  overflow-y: auto;       /* scroll vertical si nécessaire */
}
.sidebar:hover a,
.sidebar.active a {
  justify-content: flex-start;
  padding: 8px 15px;      /* top/bottom inchangés, left/right à 15px */
}

/* ─── Texte masqué/affiché ───────────────────────────────────────── */
.sidebar a .link-text {
  display: none;
  font-size: 0.75rem;
  line-height: 1;
}
.sidebar:hover a .link-text,
.sidebar.active a .link-text {
  display: inline-block;
  margin-left: 8px;
}

/* ─── Cacher la scrollbar horizontale ─────────────────────────────── */
.links-container {
  scrollbar-width: none;
}
.links-container::-webkit-scrollbar {
  display: none;
}



/* ─── Main content ────────────────────────────────────────────────── */
.content {
  margin-left: 100px;
  padding: 80px 20px;
  background: transparent;
  color: #fff;
  min-height: calc(100vh - 60px);
  width: calc(100% - 100px);
  transition: margin-left 0.3s, padding 0.3s;
  overflow-y: auto;
}

/* ─── Responsive (<768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .beta-banner {
    display: none;
  }

  .sidebar {
    display: none;
  }
  .sidebar.active {
    display: flex;
    top: 60px;
    transform: none;
    width: max-content;
    max-height: calc(100vh - 60px);
  }

  .sidebar a .link-text {
    display: inline-block;
  }

  .content {
    margin-left: 0;
    width: 100%;
    padding-top: 80px;
  }

  .navbar-invisible {
    height: 50px;
    padding: 0 16px;
  }
  .navbar-invisible .header img {
    height: 40px;
  }
  .navbar-invisible .header {
    margin-right: 8px;
  }

  .auth-links {
    gap: 8px;
  }
  .auth-links a {
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
  }

  .table-compact {
    font-size: 12px;
  }
  .team-logo {
    width: 25px;
    height: 25px;
  }
  .table-compact th,
  .table-compact td {
    padding: 5px 8px;
  }

  .player-card,
  .rank-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    height: auto !important;
    border-radius: 8px !important;
    margin-bottom: 6px !important;
  }
  .player-card .player-card-body,
  .rank-card .player-card-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    padding: 0 !important;
  }
  .player-photo-block {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .player-photo {
    width: 40px !important;
    height: 40px !important;
    
  }
  .player-name {
    font-size: 0.85rem !important;
    color: var(--text-gray) !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }
  .player-stat-block,
  .rank-card .player-stat-block {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .stat-value {
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    color: var(--text-gray) !important;
  }
  .stat-label {
    font-size: 1rem !important;
    font-weight: 900 !important;
    color: var(--text-gray) !important;
  }

  .star-players-first {
    display: none !important;
  }
  .ppg-chart-container,
  .diff-branch {
    display: none !important;
  }
}

/* ─── Global scrollbar styling ─────────────────────────────────────── */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius);
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: var(--bg-panel);
}
html {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-panel);
}

/* ─── Badge “Beta version” ────────────────────────────────────────── */
.beta-banner {
  font-size: 0.75rem;
  font-style: italic;
  color: #c2c0c0;
  padding: 0 0.5rem;
  margin: 0 1rem;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  line-height: 1;
  align-self: center;
}

/* ─── Cookie banner hover/active ──────────────────────────────────── */
#cookie-accept:hover,
#cookie-accept:active,
#cookie-refuse:hover,
#cookie-refuse:active {
  font-weight: 700 !important;
}
#cookie-refuse {
  color: #fff !important;
}
#cookie-refuse:hover,
#cookie-refuse:active {
  color: #fff !important;
  background: #00d6b4 !important;
  border-color: #00d6b4 !important;
  box-shadow: 0 2px 10px rgba(0, 214, 180, 0.2) !important;
  backdrop-filter: none;
}
/* ─── Permettre le scroll une fois ouverte ─────────────────────────── */
.sidebar {
  overflow-y: hidden; /* masquer le scroll quand fermée */
}

.sidebar:hover,
.sidebar.active {
  overflow-y: auto; /* activer le scroll quand ouverte */
}

/* limite et scroll du conteneur */
.links-container {
  max-height: 80vh; /* limite la hauteur à l’écran */
  overflow-y: auto; /* scroll interne */
}

/* cacher la scrollbar en Webkit tout en gardant le scroll actif */
.links-container::-webkit-scrollbar {
  display: none;
}

