/* Styles pour les graphiques et visualisations de données */

.data-visualization-section {
  padding: 50px 0;
  background-color: #ffffff;
}

.charts-row {
  margin-top: 30px;
}

.chart-container {
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 30px;
  min-height: 400px;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chart-title {
  font-size: 1.25rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
}

canvas {
  width: 100% !important;
  height: 400px !important;
  margin: 0 auto;
  display: block;
}

/* Taille spécifique pour les graphiques circulaires */
.chart-pie {
  height: 400px !important;
}

.chart-legend {
  padding-top: 15px;
  text-align: left;
  max-height: 400px;
  overflow-y: auto;
}

.legend-container {
  margin-top: 10px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -5px;
}

.legend-item {
  padding: 4px 10px;
  margin-bottom: 5px;
  font-size: 0.85rem;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.legend-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-text {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2;
  flex-grow: 1;
  word-break: break-word;
}

.legend-label {
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.text-muted {
  color: #6c757d;
  font-size: 0.8rem;
}

/* Styles spécifiques pour les différents types de graphiques */
.doughnut-container, .pie-container {
  max-width: 250px;
  margin: 0 auto;
}

.line-chart-container {
  min-height: 300px;
}

/* Animation pour les graphiques */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.chart-container {
  animation: fadeInUp 0.6s ease-out;
}

.chart-container:nth-child(2) {
  animation-delay: 0.2s;
}

.chart-container:nth-child(3) {
  animation-delay: 0.4s;
}

/* Styles responsive */
@media (max-width: 767.98px) {
  .chart-container {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
}
