@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

body {
  background: #0c0e17;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f3f4f6;
  overflow: hidden;
}

.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 70px 1fr;
  grid-template-areas: 
    "header header"
    "sidebar main";
  height: 100vh;
}

.header {
  grid-area: header;
  background-color: #121625;
  border-bottom: 1px solid #1e2438;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.header h1 {
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-buttons {
  display: flex;
  gap: 1rem;
}

.header-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-avatar {
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #334155;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.header-avatar:hover {
  border-color: #3b82f6;
}

.header-username {
  color: #f3f4f6;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.header-username:hover {
  color: #3b82f6;
}

.sidebar {
  grid-area: sidebar;
  background-color: #121625;
  border-right: 1px solid #1e2438;
  padding: 30px 15px 45px 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-logo {
  color: #3b82f6;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: auto;
  padding-left: 10px;
  display: flex;
  align-items: center;
  gap: 15px; 
  cursor: pointer;
}

.sidebar-logo::after {
  content: "";
  width: 70px; 
  height: 70px; 
  background-image: url('icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: 5px; 
}

.tab-btn {
  background-color: transparent;
  border: 1px solid #232a3f;
  color: #9ca3af;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background-color: #1c2338;
  color: #ffffff;
}

.tab-btn.active {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

.main-content {
  grid-area: main;
  background-color: #0c0e17;
  padding: 40px;
  overflow-y: auto;
}

.main-content h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.main-content p {
  font-size: 1rem;
  color: #9ca3af;
  line-height: 1.6;
}

/* Blocs Atouts (Accueil) */
.atouts-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.atout {
  background: linear-gradient(135deg, #121625 0%, #1a2035 100%);
  border: 1px solid #2b3550;
  border-left: 5px solid #3b82f6;
  border-radius: 12px;
  padding: 20px 25px;
  margin-top: 25px;
  color: #f3f4f6;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.25),
    0 0 15px rgba(59, 130, 246, 0.08);
  transition: all 0.25s ease;
}

.atout:hover {
  transform: translateY(-3px);
  border-color: #3b82f6;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(59, 130, 246, 0.2);
}

.atout-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  margin-right: 2rem;
}

.atout-content {
  color: #9ca3af;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
}

.leaderboard-header {
  margin-bottom: 20px;
}

.leaderboard-switch-zone {
  display: flex;
  margin-bottom: 25px;
}

.leaderboard-switch-zone .tab-btn {
  text-align: center;
}

.leaderboard-container {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  color: #f3f4f6;
}

.leaderboard-table th {
  background: #0f172a;
  padding: 14px 18px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  border-bottom: 2px solid #334155;
}

.leaderboard-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #334155;
  font-size: 0.95rem;
  vertical-align: middle !important;
}

.leaderboard-table tbody tr:hover {
  background: #273549;
}

.player-score {
  color: #3b82f6;
  font-weight: bold;
}

.leaderboard-table tbody tr.row-current-user {
  background: rgba(59, 130, 246, 0.15);
  border-left: 4px solid #3b82f6;
}

.leaderboard-table tbody tr.row-current-user td {
  color: #60a5fa;
}

/* Alignement parfait de la cellule joueur (Avatar + Pseudo) */
.hacker-cell {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #475569 !important;
  display: inline-block;
}

/* =========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================= */
@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 220px 1fr;
  }

  .sidebar {
    padding: 25px 12px;
  }

  .main-content {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
    grid-template-rows: 70px auto 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "main";
    height: auto;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 15px;
    gap: 10px;
    border-right: none;
    border-bottom: 1px solid #1e2438;
  }

  .tab-btn {
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .sidebar-logo {
    display: none;
  }

  .header {
    padding: 0 1.2rem;
  }

  .header h1 {
    font-size: 1.4rem;
  }

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

@media (max-width: 480px) {
  .sidebar {
    flex-direction: column;
  }

  .tab-btn {
    min-width: 100%;
    text-align: left;
  }
}
.rank-charbon {
    color: #9ca3af;
}

.rank-fer {
    color: #cbd5e1;
}

.rank-cuivre {
    color: #f97316;
}

.rank-gold {
    color: #eab308;
}

.rank-diamant {
    color: #06b6d4;
}

.rank-platinium {
    color: #a855f7;
}

.rank-plastique {
    color: #f43f5e;
}