/* ===================================================
   COMMENT ÇA MARCHE — Styles spécifiques
   =================================================== */

.section-cards {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
}

.section-cards div {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 1rem;
}

.card {
    background-color: var(--color-light);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1 1 calc(25% - 2rem);
    min-width: 200px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.card p {
    color: var(--color-text);
    font-size: 0.9rem;
    margin: 0;
}

/* ===================================================
   LAYOUT SPLIT (bénéficiaires / achats)
   =================================================== */
#split {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    margin: 0;
    padding: 0 1rem;
    width: 100%;
    gap: 2rem;
}

#split > div {
    width: calc(50% - 1rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#split h3 {
    margin-bottom: 1.5rem;
}

#split .section-cards {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    width: 100%;
}

#split .section-cards .card {
    flex: 1 1 calc(50% - 1rem);
    min-width: 160px;
    max-width: 250px;
    padding: 1rem;
}

#split .section-cards .card img {
    width: 50px;
    height: 50px;
    margin-bottom: 0.75rem;
    object-fit: contain;
    flex-shrink: 0;
}

#split .section-cards .card p {
    font-size: 0.85rem;
    margin-bottom: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4em;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 768px) {
    .section-cards {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .section-cards > div {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
        max-width: 400px;
        flex-basis: auto;
        padding: 1.5rem;
    }

    .card p {
        font-size: 1rem;
    }

    .card img {
        width: 60px;
        height: 60px;
    }

    #split {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    #split > div {
        width: 95%;
        margin-bottom: 2rem;
    }

    #split > div:last-child {
        margin-bottom: 0;
    }

    #split .section-cards {
        gap: 0.75rem;
        flex-direction: row;
    }

    #split .section-cards .card {
        flex-basis: calc(50% - 0.75rem);
        min-width: 140px;
        padding: 0.75rem;
    }

    #split .section-cards .card p {
        font-size: 0.8rem;
        min-height: 3.5em;
    }

    #split .section-cards .card img {
        width: 40px;
        height: 40px;
    }
}
