/* --- BOUTONS SYNTHESE --- */
#refreshButton {
  background-color: var(--primary-color);
  color: white;
}
#refreshButton:hover {
  background-color: var(--primary-hover);
}

/* --- TABLEAU SYNTHESE --- */
.table-container {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  margin-bottom: 60px;
  position: relative;
  padding-bottom: 60px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}
th, td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid var(--border-color);
}
th {
  background-color: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
}
tr:nth-child(even) {
  background-color: var(--even-row-bg);
}
tr:hover {
  background-color: #f5f5f5;
}
td[contenteditable="true"] {
  background-color: #fff8e1;
  padding: 10px;
  border: 2px dashed #ffb74d;
}
td:nth-child(6), td:nth-child(7) {
  text-align: right;
}
.table-container tfoot {
  position: sticky;
  bottom: 0;
  background-color: #87CEEB;
  z-index: 20;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}
.table-container tfoot tr th,
.table-container tfoot tr td {
  padding: 10px;
  background-color: #87CEEB;
}

/* --- TRI --- */
#syntheseTable th[data-key] {
  cursor: pointer;
}
#syntheseTable th[data-key].sort-asc::after {
  content: ' ↑';
  font-size: 0.75em;
  margin-left: 0.5em;
}
#syntheseTable th[data-key].sort-desc::after {
  content: ' ↓';
  font-size: 0.75em;
  margin-left: 0.5em;
}
@media screen and (max-width: 768px) {
  .table-container {
    overflow-x: auto;
  }
  th, td {
    padding: 8px;
  }
}
html, body {
  margin: 0;
  padding: 0;
}
.section {
  padding-left: 1rem;
  padding-right: 1rem;
}

.choices__list--dropdown {
  z-index: 1000;
}
.field {
  margin-bottom: 1rem;
}
.field .control {
  width: 100%;
}
.field .control input[type="date"] {
  width: 100%;
}
.field-group {
  display: flex;
  gap: 1rem;
}
.field-group .field {
  flex: 1;
}
#syntheseTableContainer {
  display: none;
}
#toggleTableButton {
  margin-top: 1rem;
}

/* STYLE DU CHART ÉPARGNE - Responsive + net + animation 
#chartEpargne {
  width: 100% !important;
  height: auto !important;
  max-height: 400px;
  aspect-ratio: 1 / 1;
  display: block;
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
  backface-visibility: hidden;
  transform: none !important;
  transition: none !important;
}

#chartEpargne.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#chartEpargne {
  max-width: 1200px;
  height: 700px !important;
  margin: auto;
  display: block;
  animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}*/
#chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  max-width: 600px;     /* agrandit le graphique */
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;  /* conserve la forme circulaire */
  padding: 1rem;
}

#chartEpargne {
  width: 100% !important;
  height: 100% !important;
}
