.filters {
  display: flex;
  justify-content: space-between; /* Période à gauche, date à droite */
  align-items: center;           /* Alignement vertical centré */
  flex-wrap: wrap;               /* Permet de passer à la ligne si écran petit */
  gap: 10px;                     /* Espace entre les deux blocs */
}

/* Filtres de période */
.period-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.period-filter-btn {
  padding: 5px 15px;
  border: 1px solid #09244B;
  border-radius: 5px;
  background-color: white;
  color: #09244B;
  font-weight: 400;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
  min-width: 50px;
}

.period-filter-btn:hover {
  background-color: #f0f0f0;
}

.period-filter-btn.active {
  background-color: #09244B;
  color: white;
  border-color: #09244B;
  font-weight: 600;
}

/* Filtres par date */
.date-range-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}


/* Légende */
.chart-legend {
  display: flex;
  gap: 24px;
  margin-top: 10px;     /* espace au-dessus */
  margin-bottom: 16px;
  justify-content: flex-end;
  font-size: 13px;

  width: 100%;          /* 🔹 occupe toute la ligne */
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 16px;
  height: 3px;
  border-radius: 2px;
}

.legend-color.volume {
  background-color: #ff9966;
}

.legend-color.cours {
  background-color: #999;
}

.legend-text {
  font-weight: 500;
}

.legend-text.volume {
  color: #ff9966;
}

.legend-text.cours {
  color: #999;
}

/* Zone du graphique */
.chart-wrapper {
  width: 100%;
  height: 450px;
  position: relative;
  border-radius: 8px;
  padding: 16px;
}

/* Indicateur de chargement */
.chart-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  display: none;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #09244B;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.chart-loading p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

/* Messages d'erreur */
.chart-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px;
  border-radius: 6px;
  margin-top: 16px;
  display: none;
}

/* Info box */
.info-box {
  margin-top: 16px;
  padding: 12px;
  background-color: #e8f4f8;
  border-radius: 6px;
  font-size: 13px;
  color: #0066cc;
}

.info-box strong {
  font-weight: 600;
}
/* Champ date stylé */
.date-range-filters .date-input {
  text-align: center;
  position: relative;
  border: 1px solid #09244B;
  border-radius: 5px;
  padding: 5px 2px;
  font-size: 14px;
  color: #09244B;
  background-color: white;
  cursor: pointer;
  appearance: none;              /* supprime le style par défaut */
  -webkit-appearance: none;
}

/* Supprime le spinner (flèches) */
.date-range-filters .date-input::-webkit-inner-spin-button,
.date-range-filters .date-input::-webkit-clear-button {
  display: none;
}

/* Masque uniquement l’icône native mais garde la zone cliquable */
.date-range-filters .date-input::-webkit-calendar-picker-indicator {
  opacity: 0;          /* rend invisible */
  width: 100%;         /* zone cliquable = tout le champ */
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  cursor: pointer;
}

/* Séparateur */
.date-separator {
  font-weight: bold;
  color: #09244B;
}

/* Bouton calendrier à droite */
.date-range-filters .btn-calendar {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #09244B;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
