/* Corriger stat-number en mode light */
[data-theme="light"] .stat-number {
  color: var(--page-text) !important;
  font-weight: 700;
  font-size: 2rem;
  font-family: monospace;
  letter-spacing: 0.05em;
  display: inline-block;
  min-width: 150px;
  text-align: center;
}

[data-theme="dark"] .stat-number {
  margin-left: -22px;
}

/* Corriger chart-container en mode light */
[data-theme="light"] .chart-container {
  background: rgba(248, 249, 250, 0.8) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(31, 80, 220, 0.15) !important;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  width: 100%;
  height: 350px;
  transition: all 0.3s ease;
  overflow: hidden;
}

[data-theme="light"] .chart-container:hover {
  border-color: rgba(31, 80, 220, 0.3) !important;
  box-shadow: 0 8px 20px rgba(31, 80, 220, 0.1);
}

/* Corriger breakdown-title en mode light */
[data-theme="light"] .breakdown-title {
  color: var(--page-text) !important;
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  text-align: center;
  word-wrap: break-word;
  word-break: break-word;
  overflow: visible;
  white-space: normal;
  max-width: 100%;
  line-height: 1.4;
}

/* Corriger les stats cards en mode light */
[data-theme="light"] .stat-card {
  background: linear-gradient(
    135deg,
    rgba(248, 249, 250, 0.9) 0%,
    rgba(243, 244, 246, 0.9) 100%
  );
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(31, 80, 220, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

[data-theme="light"] .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: rgba(31, 80, 220, 0.2);
}

/* Corriger stats-container en mode light */
[data-theme="light"] .stats-container {
  background: linear-gradient(
    135deg,
    rgba(248, 249, 250, 0.95) 0%,
    rgba(243, 244, 246, 0.95) 100%
  );
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(31, 80, 220, 0.1);
}

/* Corriger stats-title en mode light */
[data-theme="light"] .stats-title {
  color: var(--page-text) !important;
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  position: relative;
}

[data-theme="light"] .stats-title::after {
  background: linear-gradient(
    90deg,
    rgba(31, 80, 220, 0.8),
    rgba(75, 191, 115, 0.8)
  );
}

/* Corriger wakatime-stats-section en mode light */
[data-theme="light"] .wakatime-stats-section {
  background: linear-gradient(
    135deg,
    rgba(248, 249, 250, 0.9) 0%,
    rgba(243, 244, 246, 0.9) 100%
  );
  border-radius: 20px;
  padding: 3rem 0;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Corriger stat-content en mode light */
[data-theme="light"] .stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Corriger stat-label en mode light */
[data-theme="light"] .stat-label {
  color: var(--page-text-muted) !important;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

/* Corriger language/project items en mode light */
[data-theme="light"] .language-item,
[data-theme="light"] .project-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background-color: rgba(248, 249, 250, 0.8);
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(31, 80, 220, 0.08);
}

[data-theme="light"] .language-item:hover,
[data-theme="light"] .project-item:hover {
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  background-color: rgba(243, 244, 246, 0.9);
}

/* Corriger languages-list/projects-list en mode light */
[data-theme="light"] .languages-list,
[data-theme="light"] .projects-list {
  background-color: rgba(248, 249, 250, 0.9);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid rgba(31, 80, 220, 0.08);
}

/* Corriger canvas en mode light */
[data-theme="light"] canvas {
  filter: drop-shadow(0 0 10px rgba(31, 80, 220, 0.03));
  max-width: 100% !important;
  height: auto !important;
}

/* Corriger stats-footer en mode light */
[data-theme="light"] .stats-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(31, 80, 220, 0.1);
}

[data-theme="light"] .stats-note,
[data-theme="light"] .stats-update {
  color: var(--page-text-muted) !important;
}

/* ===== RESPONSIVE FIXES POUR LIGHT MODE ===== */

@media (max-width: 768px) {
  [data-theme="light"] .chart-container {
    height: 300px;
  }

  [data-theme="light"] .breakdown-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
    word-break: break-word;
  }

  [data-theme="light"] .stat-card {
    padding: 1rem;
  }

  [data-theme="light"] .stat-number {
    font-size: 1.5rem;
    min-width: 120px;
    margin-left: -18px;
  }

  [data-theme="light"] .stat-label {
    font-size: 0.85rem;
  }

  [data-theme="light"] .language-item,
  [data-theme="light"] .project-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 576px) {
  [data-theme="light"] .stats-container {
    padding: 1.5rem;
  }

  [data-theme="light"] .breakdown-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  [data-theme="light"] .chart-container {
    height: 280px;
    padding: 1rem;
  }

  [data-theme="light"] .stat-number {
    font-size: 1.3rem;
    min-width: 100px;
    margin-left: -15px;
  }
}

/* ===== LIGHT MODE CHART.JS STYLING ===== */

[data-theme="light"] .chartjs-render-monitor {
  max-width: 100%;
}

/* Fix pour les Chart.js labels en light mode */
[data-theme="light"] .chart-container canvas {
  color: var(--page-text);
}
