/**
 * Initiative Chart Donut Styles
 */

.initiative-chart-wrapper {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.initiative-chart-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

/* Donut Chart */
.initiative-chart-donut {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-background {
  stroke: #2a4d3a;
}

.donut-segment {
  fill: none;
  stroke-width: 25;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease-in-out, stroke-dashoffset 0.8s ease-in-out;
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #ffffff;
}

.donut-percentage {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.donut-label {
  display: block;
  font-size: 12px;
  color: #a0b0a5;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Legend */
.initiative-chart-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 14px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: #d0e0d5;
}

.legend-percentage {
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

/* Color Variables - seront overridées par JS */
:root {
  --color-sante: #138435;
  --color-education: #FFED00;
  --color-na: #6B7B6E;
  --color-default: #6B7B6E;
}

/* Responsive */
@media (max-width: 400px) {
  .initiative-chart-container {
    flex-direction: column;
    text-align: center;
  }

  .initiative-chart-legend {
    width: 100%;
  }

  .legend-item {
    justify-content: center;
  }
}

/* Animation d'entrée */
@keyframes donutFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.initiative-chart-donut {
  animation: donutFadeIn 0.6s ease-out;
}

.legend-item {
  animation: donutFadeIn 0.4s ease-out;
  animation-fill-mode: both;
}

.legend-item:nth-child(1) {
  animation-delay: 0.2s;
}

.legend-item:nth-child(2) {
  animation-delay: 0.3s;
}

.legend-item:nth-child(3) {
  animation-delay: 0.4s;
}

.legend-item:nth-child(4) {
  animation-delay: 0.5s;
}

.legend-item:nth-child(5) {
  animation-delay: 0.6s;
}