/* Styles for the custom CPA impact chart - V3 with Flexbox */

.impact-chart-container {
    font-family: var(--heading-font, 'Rubik', sans-serif);
    background-color: #fff;
    padding: 20px;
    border-radius: 16px;
    flex-grow: 1; /* Remplace height: 100% pour un meilleur contrôle flex */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color, #000B10);
    margin: 0 0 15px 0;
}

.chart-area {
    display: flex;
    flex-grow: 1;
    align-items: flex-end;
}

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

.bars-container {
    flex-grow: 1;
    display: flex;
    justify-content: space-around; /* Distribute bars evenly with side margins */
    align-items: flex-end;
    height: 100%;
}

.bar-wrapper {
    width: 40% !important; /* Reduce width to increase side margins */
    min-width: 40% !important; /* Reduce width to increase side margins */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align bar to the bottom */
}

.bar {
    width: 100%; /* Bar takes full width of its wrapper */
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text-color, #FFFFFF);
    font-weight: 700;
    font-size: 1.1rem;
    transition: height 0.6s ease-out;
    padding-bottom: 5px;
    box-sizing: border-box;
}

.bar-before {
    background-color: var(--primary-color, #7C89FF);
    height: 60% !important; /* Forcer la hauteur */
}

.bar-after {
    background: #FF647C !important; /* Forcer la couleur du bouton Refuser */
    height: 90% !important; /* Forcer la hauteur */
}

.x-axis-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color, #000B10);
    margin-top: 8px;
}
