/* Styles pour l'histogramme empilé */
.stacked-chart-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    font-family: var(--heading-font, 'Rubik', sans-serif);
}

.stacked-chart-area {
    display: flex;
    flex: 1;
    position: relative;
    margin: 10px 0;
    height: 200px;
}

.stacked-bars-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 100%;
    width: 100%;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.y-axis-stacked {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 10px;
    font-size: 0.85rem;
    color: var(--text-color, #000B10);
    font-weight: 500;
    text-align: right;
    min-width: 25px;
    height: 100%;
    border-right: 1px solid #eee;
}

.stacked-bar-column {
    display: flex;
    flex-direction: column-reverse; /* Inverser pour que ça parte du bas */
    align-items: center;
    width: 22%;
    position: relative;
    height: 85%; /* Laisse un peu d'espace en haut */
    align-self: flex-end; /* Aligne au bas de la zone */
}

/* Assurer que les colonnes s'affichent correctement sur mobile */
.slider-card .stacked-bar-column {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    width: 22%;
    position: relative;
    height: 85%;
    align-self: flex-end;
}

.stacked-bar-segment {
    width: 100%;
    transition: all 0.3s ease;
}

/* Réinitialisation des arrondis */
.stacked-bar-segment {
    border-radius: 0;
}

/* Segment positif (vert) - arrondi en haut car il apparaît en haut visuellement */
.stacked-bar-segment.segment-positive {
    border-radius: 6px 6px 0 0;
}

/* Segment neutre (bleu clair) - arrondi en bas car il apparaît en bas visuellement */
.stacked-bar-segment.segment-neutral {
    border-radius: 0 0 6px 6px;
}

.segment-positive {
    background-color: #60d394; /* Vert pour positif */
}

.segment-negative {
    background-color: #FF647C; /* Rose pour négatif */
}

.segment-question {
    background-color: var(--primary-color, #7C89FF); /* Bleu primaire pour question */
}

.segment-neutral {
    background-color: #b4c0ff; /* Bleu clair pour neutre */
}

.stacked-bar-label {
    font-size: 0.85rem;
    color: var(--text-color, #000B10);
    font-weight: 500;
    margin-top: 10px;
    text-align: center;
}

.grid-lines-stacked {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 0;
    pointer-events: none;
}

.grid-line-stacked {
    width: 100%;
    height: 1px;
    background-color: #e5e5e5;
}

/* Légende du graphique */
.stacked-chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.stacked-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color, #000B10);
}

.stacked-legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
