/* ========== hall-of-fame.css - Hall of Fame / Challenge Équipe ========== */

/* Challenge Preview Card (sur la carte d'aventure) */
.challenge-preview-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
  border: 2px solid #ffd700;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.challenge-preview-card::before {
  content: '✨';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.2em;
  opacity: 0.6;
}

.challenge-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
  border-color: #ff8c00;
}

.challenge-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 10px;
}

.challenge-preview-icon {
  font-size: 1.4em;
}

.challenge-preview-title {
  font-weight: bold;
  color: #d4a000;
  font-size: 1.1em;
  flex: 1;
}

.challenge-preview-arrow {
  color: #d4a000;
  transition: transform 0.3s;
}

.challenge-preview-card:hover .challenge-preview-arrow {
  transform: translateX(4px);
}

.challenge-preview-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.challenge-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s;
}

.challenge-preview-item:hover {
  background: rgba(255, 215, 0, 0.1);
}

.challenge-preview-item.current-user {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid #ffd700;
  font-weight: 600;
}

.challenge-preview-rank {
  font-size: 1.3em;
  min-width: 28px;
  text-align: center;
}

.challenge-preview-name {
  flex: 1;
  font-size: 0.95em;
  color: var(--text);
}

.challenge-preview-score {
  font-weight: bold;
  color: #d4a000;
  min-width: 45px;
  text-align: right;
}

.challenge-preview-trend {
  font-size: 0.85em;
  min-width: 24px;
  text-align: center;
}

.challenge-preview-trend.up { color: #27ae60; }
.challenge-preview-trend.down { color: #e74c3c; }
.challenge-preview-trend.same { color: #95a5a6; }

.challenge-preview-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 215, 0, 0.3);
  text-align: center;
  color: #d4a000;
  font-size: 0.9em;
  font-weight: 500;
}

.challenge-preview-loading {
  text-align: center;
  color: #95a5a6;
  padding: 10px;
  font-style: italic;
}

/* Défi du Jour Compact */
.daily-challenge-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(243, 156, 18, 0.5);
}

.daily-challenge-compact:active {
  transform: translateY(0);
}

/* ==================== HALL OF FAME PAGE ==================== */

#hallOfFamePage {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 20px;
  display: none;
}

.hof-container {
  max-width: 1800px; /* Augmenté pour plus d'espace */
  margin: 0 auto;
  padding: 0 20px;
}

.hof-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.hof-back-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95em;
  transition: all 0.3s;
}

.hof-back-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%) scale(1.05);
}

.hof-title {
  font-size: 2.5em;
  color: #ffd700;
  margin: 0;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.hof-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1.1em;
  margin-top: 8px;
}

/* Filtres */
.hof-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.hof-filter-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9em;
}

.hof-filter-btn:hover,
.hof-filter-btn.active {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border-color: #ffd700;
  color: #1a1a2e;
  font-weight: bold;
}

/* Layout HORIZONTAL - Lignes empilées */
.hof-layout {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 30px;
}

/* Ligne 1: Podium horizontal */
.hof-podium-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

/* Ligne 2: Tableau de classement */
.hof-table-row {
  width: 100%;
}

/* Ligne 3: Stats perso compactes */
.hof-stats-row {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.hof-stats-row > * {
  flex: 1;
  min-width: 300px;
}

@media (max-width: 768px) {
  .hof-container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  .hof-podium-row {
    gap: 15px;
  }
  
  .hof-stats-row {
    flex-direction: column;
  }
  
  .hof-stats-row > * {
    min-width: auto;
  }
}

/* Podium Horizontal - Cartes */
.hof-podium-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hof-podium-card {
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 25px 35px;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  min-width: 140px;
}

.hof-podium-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.12);
}

.hof-podium-card.first {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.1));
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.2);
  order: 1;
}

.hof-podium-card.second {
  border-color: #c0c0c0;
  background: linear-gradient(135deg, rgba(192,192,192,0.15), rgba(160,160,160,0.1));
  order: 0;
}

.hof-podium-card.third {
  border-color: #cd7f32;
  background: linear-gradient(135deg, rgba(205,127,50,0.15), rgba(184,115,51,0.1));
  order: 2;
}

.hof-podium-rank {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.8);
}

.hof-podium-card.first .hof-podium-rank { color: #ffd700; }
.hof-podium-card.second .hof-podium-rank { color: #c0c0c0; }
.hof-podium-card.third .hof-podium-rank { color: #cd7f32; }

.hof-podium-avatar-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  margin: 0 auto 12px;
}

.hof-podium-card.first .hof-podium-avatar-large {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  width: 85px;
  height: 85px;
  font-size: 2.5em;
}

.hof-podium-name-large {
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.hof-podium-score-large {
  color: #ffd700;
  font-size: 1.6em;
  font-weight: bold;
}

/* Tableau de classement */
.hof-table-header {
  margin-bottom: 15px;
}

.hof-table-header h2 {
  color: white;
  margin: 0;
  font-size: 1.4em;
  text-align: center;
}

.hof-table-container {
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.hof-table {
  width: 100%;
  border-collapse: collapse;
  color: white;
}

.hof-table thead {
  background: rgba(255,215,0,0.1);
}

.hof-table th {
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  color: #ffd700;
  font-size: 0.95em;
  border-bottom: 2px solid rgba(255,215,0,0.3);
}

.hof-table th:first-child {
  text-align: center;
  width: 80px;
}

.hof-table th:last-child {
  text-align: right;
}

.hof-table td {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95em;
}

.hof-table tr:last-child td {
  border-bottom: none;
}

.hof-table tr:hover {
  background: rgba(255,255,255,0.03);
}

.hof-table tr.current-user {
  background: rgba(255, 215, 0, 0.1);
}

.hof-table tr.current-user td {
  font-weight: 600;
}

.hof-table-rank {
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
}

.hof-table tr:nth-child(1) .hof-table-rank { color: #ffd700; font-size: 1.3em; }
.hof-table tr:nth-child(2) .hof-table-rank { color: #c0c0c0; font-size: 1.2em; }
.hof-table tr:nth-child(3) .hof-table-rank { color: #cd7f32; font-size: 1.1em; }

.hof-table-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hof-table-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
}

.hof-table-score {
  color: rgba(255,255,255,0.7);
}

.hof-table-percent {
  font-weight: bold;
  color: #ffd700;
  font-size: 1.1em;
}

.hof-table-date {
  text-align: right;
  color: rgba(255,255,255,0.5);
  font-size: 0.9em;
}

/* Scrollbar pour le tableau */
.hof-table-container {
  max-height: 500px;
  overflow-y: auto;
}

.hof-table-container::-webkit-scrollbar {
  width: 8px;
}

.hof-table-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}

.hof-table-container::-webkit-scrollbar-thumb {
  background: rgba(255,215,0,0.3);
  border-radius: 4px;
}

.hof-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255,215,0,0.5);
}

.hof-list-section h2 {
  color: white;
  margin: 0 0 20px 0;
  font-size: 1.3em;
}

.hof-list {
  max-height: 550px; /* Augmenté de 500px à 550px */
  overflow-y: auto;
  padding-right: 10px; /* Espace pour la scrollbar */
}

.hof-list::-webkit-scrollbar {
  width: 6px;
}

.hof-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.hof-list::-webkit-scrollbar-thumb {
  background: rgba(255,215,0,0.3);
  border-radius: 3px;
}

.hof-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255,215,0,0.5);
}

.hof-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px; /* Augmenté de 12px 15px à 14px 16px */
  border-radius: 12px;
  margin-bottom: 10px; /* Augmenté de 8px à 10px */
  transition: all 0.3s;
  background: rgba(255,255,255,0.03);
}

.hof-list-item:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(5px);
}

.hof-list-item.current-user {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid #ffd700;
}

.hof-list-rank {
  font-size: 1.2em;
  font-weight: bold;
  color: rgba(255,255,255,0.6);
  min-width: 35px;
  text-align: center;
}

.hof-list-item:nth-child(1) .hof-list-rank { color: #ffd700; }
.hof-list-item:nth-child(2) .hof-list-rank { color: #c0c0c0; }
.hof-list-item:nth-child(3) .hof-list-rank { color: #cd7f32; }

.hof-list-avatar {
  width: 45px; /* Augmenté de 40px à 45px */
  height: 45px; /* Augmenté de 40px à 45px */
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  flex-shrink: 0;
}

.hof-list-info {
  flex: 1;
  min-width: 0; /* Pour éviter le débordement */
}

.hof-list-name {
  color: white;
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 1em; /* Ajouté pour lisibilité */
}

.hof-list-meta {
  color: rgba(255,255,255,0.5);
  font-size: 0.85em;
}

.hof-list-score {
  text-align: right;
  flex-shrink: 0;
}

.hof-list-percentage {
  color: #ffd700;
  font-size: 1.3em;
  font-weight: bold;
}

.hof-list-details {
  color: rgba(255,255,255,0.5);
  font-size: 0.8em;
}

/* Stats perso - Cartes horizontales */
.hof-my-position-card,
.hof-badges-card {
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 20px 25px;
  border: 1px solid rgba(255,255,255,0.1);
}

.hof-my-position-card h3,
.hof-badges-card h3 {
  color: #ffd700;
  margin: 0 0 15px 0;
  font-size: 1.1em;
}

.hof-my-rank-display {
  font-size: 3em;
  color: #ffd700;
  font-weight: bold;
  line-height: 1;
  text-align: center;
}

.hof-my-rank-total {
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-bottom: 15px;
  font-size: 0.9em;
}

.hof-mini-stats {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.hof-mini-stat {
  text-align: center;
  background: rgba(255,255,255,0.05);
  padding: 10px 20px;
  border-radius: 10px;
}

.hof-mini-value {
  display: block;
  color: #ffd700;
  font-size: 1.4em;
  font-weight: bold;
}

.hof-mini-label {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.75em;
  margin-top: 3px;
}

/* Badges */
.hof-badges-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hof-badge-icon {
  font-size: 1.8em;
  opacity: 0.3;
  transition: all 0.3s;
}

.hof-badge-icon.unlocked {
  opacity: 1;
}

/* Stats globales - COMPACT */
.hof-global-stats {
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  justify-content: space-around;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  gap: 20px; /* Ajouté */
}

.hof-global-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hof-global-value {
  color: #ffd700;
  font-size: 1.8em;
  font-weight: bold;
}

.hof-global-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.85em;
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive pour écrans très larges */
@media (min-width: 1800px) {
  .hof-container {
    max-width: 1800px;
  }
  
  .hof-layout {
    grid-template-columns: 350px 1fr 350px;
    gap: 40px;
  }
}

/* Responsive mobile */
@media (max-width: 768px) {
  .hof-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .hof-title {
    font-size: 1.8em;
  }
  
  .hof-filters {
    gap: 8px;
  }
  
  .hof-filter-btn {
    padding: 8px 14px;
    font-size: 0.8em;
  }
  
  .hof-global-stats {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .hof-global-stat {
    flex: 1 1 40%;
  }
}
