.celtiis-cash-table {
    --cash-head-bg: var(--bs-primary);
    --cash-head-color: #FFFFFF;

    --cash-col-1-bg: #8DC63F1A;
    --cash-col-2-bg: #FFFFFF;
    --cash-col-3-bg: #1D3D701A;
    --cash-text: var(--bs-secondary);
    --cash-cols: 1fr 1.1fr 0.9fr;
    --cash-arrow: 8px;

    width: 100%;
    font-family: 'Gotham', sans-serif;
    color: var(--cash-text);
}

.celtiis-cash-table__head {
    display: grid;
    grid-template-columns: var(--cash-cols);
}

.celtiis-cash-table__hcell {
    background: var(--cash-head-bg);
    color: var(--cash-head-color);
    font-size: 16px;
    font-weight: 500;
    padding: 18px 26px;
    display: flex;
    color: var(--bs-secondary);
    align-items: center;
}
/* Corps */
.celtiis-cash-table__row {
    display: grid;
    grid-template-columns: var(--cash-cols);
    align-items: stretch;
}

.celtiis-cash-table__cell {
    padding: 20px 26px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.45;
    font-family: "Montserrat", sans-serif;
    color: var(--cash-text);
}


/* Backgrounds explicites par colonne - utilisent des classes plutôt que
   nth-child pour que le layout groupé (row--group) fonctionne aussi. */
.celtiis-cash-table__cell--col1 { background: var(--cash-col-1-bg); }
.celtiis-cash-table__cell--col2 { background: var(--cash-col-2-bg); }
.celtiis-cash-table__cell--col3 { background: var(--cash-col-3-bg); }
.celtiis-cash-table__cell--col4 { background: var(--cash-col-4-bg, var(--cash-col-2-bg)); }
.celtiis-cash-table__cell--col5 { background: var(--cash-col-5-bg, var(--cash-col-3-bg)); }

.celtiis-cash-table__cell--service {
    font-weight: 300;
}

/* Row-group : un seul service, service name centré verticalement
   Le row-group est UNE grille 3-colonnes × N-lignes. La cellule "service"
   spanne toutes les lignes (grid-row: 1 / -1) et est centrée en flex. */
.celtiis-cash-table__row--group {
    display: grid;
    grid-template-columns: var(--cash-cols);
    grid-template-rows: repeat(var(--cash-single-rows, 1), auto);
    align-items: stretch;
}

.celtiis-cash-table__cell--span {
    grid-column: 1 / 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center; /* centrage vertical du nom sur toutes les tranches */
}

@media (max-width: 767px) {
    .celtiis-cash-table {
        min-width: 0;
    }

    .celtiis-cash-table__head {
        display: none;
    }

    .celtiis-cash-table__row,
    .celtiis-cash-table__row--group {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 3px;
        padding: 0;
        margin-bottom: 20px;
        border-bottom: 1px solid #1D3D7014;
    }

    .celtiis-cash-table__cell--span {
        grid-column: auto;
        grid-row: auto;
    }

    .celtiis-cash-table__cell {
        min-width: 0;
        padding: 10px 12px;
        display: grid;
        grid-template-columns: minmax(120px, 42%) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        overflow-wrap: anywhere;
    }

    .celtiis-cash-table__cell::before {
        content: attr(data-label);
        min-width: 0;
        font-weight: 500;
        color: #54627F;
        overflow-wrap: anywhere;
    }

    .celtiis-cash-table__cell--service {
        font-size: 16px;
        font-weight: 500;
        color: var(--cash-head-bg);
    }

    .celtiis-cash-table__cell--service .celtiis-cash-table__desc {
        grid-column: 2;
    }
}

@media (max-width: 420px) {
    .celtiis-cash-table__cell {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .celtiis-cash-table__cell--service .celtiis-cash-table__desc {
        grid-column: 1;
    }
}

/* Description optionnelle sous le nom du service (mode « afficher description ») */
.celtiis-cash-table__desc {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(28, 59, 113, 0.65);
    font-weight: 400;
    line-height: 1.4;
}

/* Empty state (éditeur Elementor uniquement) */
.celtiis-cash-table__empty {
    padding: 24px;
    background: #fff8e1;
    border: 1px dashed #d4a017;
    border-radius: 6px;
    color: #6b5300;
    font-size: 14px;
}
