/* === PAST_RESULTS.CSS mis à jour === */

:root {
  --correct-color: #28a745;
  --wrong-color: #dc3545;
  --neutral-color: #ffc107;
}

[data-theme="dark"] {
  --correct-color: #28a745;
  --wrong-color: #dc3545;
  --neutral-color: #ffc107;
}

.performance-section {
  display: flex;
  justify-content: center;
  margin: 40px auto;
  max-width: 1200px;
  flex-wrap: wrap;
  gap: 20px;
}

.stat-box {
  background-color: var(--background-light);
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-md);
  width: 30%;
  min-width: 160px;
  flex-grow: 1;
  padding: 10px;
}

.stat-box h3 {
  font-size: 22px;
  color: var(--highlight-color);
  margin-bottom: 5px;
}

.stat-box p {
  font-size: 13px;
  color: var(--text-color-dark);
}

.chart-container,
.league-chart-container {
  background-color: var(--background-light);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin: 40px auto;
  max-width: 1000px;
}

canvas {
  width: 100% !important;
  height: auto !important;
  max-height: 500px;
}

.slider-container {
  text-align: center;
  max-width: 600px;
  margin: 40px auto;
}

.slider-container label {
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
}

input[type="range"] {
  width: 100%;
}

.help-icon {
  display: inline-block;
  background: var(--highlight-color);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 13px;
  margin-left: 8px;
  cursor: pointer;
}

.help-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.help-content {
  background: var(--background-light);
  color: var(--text-color-light);
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.close-help {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
}

.loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  color: var(--highlight-color);
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid var(--highlight-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.results-column {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background-color: var(--background-light);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  max-height: 600px;
  overflow-y: auto;
}

.result-box {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 20px;
  background-color: var(--background-light);
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--correct-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.result-box.wrong-result {
  border-left-color: var(--wrong-color);
}

.result-info-header {
  display: flex;
  flex-direction: column;
  background: var(--background-light);
  padding: 10px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  gap: 4px;
}

.result-info-header .league-name {
  font-weight: 700;
  color: var(--highlight-color);
  font-size: 14px;
}

.result-info-header .teams {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 14px;
}

.result-info-header .match-date {
  font-style: italic;
  color: var(--text-color-dark);
  font-size: 13px;
}

.result-details {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.result-details.visible {
  display: block;
}

.click-indicator {
  font-size: 13px;
  color: var(--highlight-color);
  text-align: center;
  margin-top: 10px;
}

.progress-bar-container {
  margin: 10px 0;
}

.progress-bar {
  background-color: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  height: 14px;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 8px;
  font-size: 12px;
  font-weight: bold;
  color: white;
  border-radius: 8px;
}

.progress-bar-fill.win {
  background-color: var(--correct-color);
}

.progress-bar-fill.draw {
  background-color: var(--neutral-color);
}

.progress-bar-fill.lose {
  background-color: var(--wrong-color);
}

.score-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin: 6px 0;
}

.score-bar {
  flex-grow: 1;
  background-color: #e0e0e0;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: rgba(45, 107, 199, 0.7);
  border-radius: 5px;
  transition: width 0.4s ease;
}

.load-more-button {
  display: block;
  margin: 30px auto;
  background-color: var(--highlight-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.load-more-button:hover {
  background-color: #1e3e89;
}

/* Mode compact mobile */
@media (max-width: 768px) {
  .performance-section {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .stat-box {
    width: 100%;
    padding: 8px;
  }

  .stat-box h3 {
    font-size: 20px;
  }

  .stat-box p {
    font-size: 12px;
  }

  canvas {
    height: 260px !important;
  }

  .result-box {
    padding: 10px;
  }

  .result-info-header {
    gap: 2px;
    font-size: 12px;
  }

  .score-item {
    font-size: 12px;
    gap: 6px;
  }

  .score-bar {
    height: 6px;
  }

  .progress-bar {
    height: 10px;
  }

  .progress-bar-fill {
    font-size: 10px;
    padding-right: 4px;
  }

  .chart-container canvas {
    height: 220px !important;
  }

  .league-chart-container canvas {
  min-height: 300px;
  }

  .chart-container,
  .league-chart-container {
    padding: 12px;
    margin: 20px auto;
  }

  .chartjs-render-monitor text {
    font-size: 10px !important;
  }

  /* Option : rotation réduite des labels si possible */
  .chart-container canvas,
  .league-chart-container canvas {
    transform-origin: top left;
  }
}
.section-subtitle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-color-dark);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .section-subtitle {
    font-size: 14px;
    padding: 0 12px;
  }
}

/* STYLE DU SELECTEUR DE LIGUE */
#league-select {
  width: 100%;
  max-width: 300px;
  padding: 12px 16px;
  border: 1px solid var(--highlight-color);
  border-radius: 8px;
  background-color: var(--background-light);
  color: var(--primary-color);
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='14' height='10' viewBox='0 0 14 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 8L13 1' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

#league-select:focus {
  outline: none;
  border-color: var(--correct-color);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.slider-container label[for="league-select"] {
  font-weight: 600;
  margin-bottom: 8px;
  display: inline-block;
  color: var(--primary-color);
}

.keywords-footer,
.seo-summary {
  font-size: 0.01px;       /* quasi invisible mais lisible pour les bots */
  line-height: 0.01;
  color: transparent;      /* texte invisible */
  position: absolute;      /* hors flux visuel */
  left: -9999px;           /* déplacé en dehors de l’écran */
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.keywords-footer h3,
.keywords-footer li,
.seo-summary h2,
.seo-summary p {
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}
