.rapprochement_data_file {
    margin-bottom: 100px;
}

.cde_rim_domaines_liste,
.cde_rim_rapprochement_liste,
.rapprochement_data_file .liste_data {
    display: grid;
    grid-auto-rows: max-content;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.rapprochement_card .actions a:not(.delete_link),
.domaine_card .actions a
{
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    border-radius: 10000px;
    border: 1px solid var(--primary-color);
    padding: 0.75em 1.5em;
    transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    text-decoration: none;
}

.rapprochement_card .actions {
    align-items: center;
}

.rapprochement_card .actions a:not(.delete_link):hover,
.domaine_card .actions a:where(:hover, .active){
    background-color: var(--primary-color);
    color: white !important;
    text-decoration: none !important;
}

.domaine_card .actions a.active {
    cursor: not-allowed;
}
.no-content {
    grid-column: 1 / -1;
}

.rapprochement_data_file .file_name {
    text-transform: uppercase;
    text-align: left;
    color: var(--text-color);
    padding: 0.5em;
    border-bottom: 1px solid lightgray;
    margin-bottom: 2rem !important;
    font-size: 1.25rem;
    font-weight: normal;
}

.rapprochement_data_file .liste_data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.domaine_card,
.rapprochement_card,
.rapprochement-data-card {
    width: 100%;
    background-color: white;
    box-shadow: var(--box-shadow);
    padding: 2rem;
    border-radius: 20px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.rapprochement_card > * {
    order: 50;
}

.cde_rim_rapprochement_data #rapprochement_search {
    max-width: none;
}

.rapprochement_card .user-libelle {
    order: 1;
    font-weight: bold;
}

.rapprochement_card .actions,
.domaine_card .actions {
    margin-top: 15px;
}

.domaine_card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.domaine_card .domaine_libelle {
    font-weight: bold;
    text-transform: uppercase;
}

.rapprochement-data-card > * {
    order: 50;
}

.rapprochement-data-card .statut {
    grid-column: 1 / -1;
    order: 1000;
    font-weight: bold;
}

.rapprochement-data-card .sd-type-demande {
    grid-column: 1 / -1;
}

.rapprochement-data-card > * {
    order: 50;
}

.rapprochement-data-card .SD____Num_Demande {
    order: 1;
}

.rapprochement-data-card .SD___Date_Depot_Demande {
    order: 2;
}

.rapprochement-data-card .SD___Date_Recevabilite_Demande {
    order: 3;
}

.rapprochement-data-card .SD___Type_Proposition {
    order: 4;
}

.rapprochement-data-card .SD___Type_Demande {
    order: 5;
    grid-column: span 2;
}
.rapprochement-data-card .SD___Type_Droit_Propo {
    order: 6;
    grid-column: 1 / -1;
}

.rapprochement-data-card .SD___Statut_Demande {
    order: 100;
    grid-column: 1 / -1;
}

.rapprochement-data-card .SD___Type_Droit_Dec {
    order: 1;
    grid-column: 1 / -1;
}

.rapprochement-data-card .SD___Date_Debut_Droit_Dec {
    order: 2;
    grid-column: 1;
}

.rapprochement-data-card .SD___Date_Fin_Droit_Dec {
    order: 3;
    grid-column: 3;
}




.cde_rim_domaines_liste .domaine_card.active::before,
.cde_rim_rapprochement_liste .rapprochement_card.active::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Duotone";
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -8px;
    right: -8px;
    color: white;
    background-color: var(--success-color);
    aspect-ratio: 1;
    height: 25px;
    width: 25px;
    border-radius: 50%;
}

.rapprochement_card .delete_link {
    color: var(--danger-color);
    margin-left: auto;
}

.rapprochement_card .actions {
    grid-column: 1 / -1;
}

.rapprochement_champ_label {
    display: block;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.cde_rim_rapprochement_form form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 25px;
    row-gap: 10px;
}

.cde_rim_rapprochement_form form > * {
    width: 320px;
}

.cde_rim_rapprochement_form form :where(.form-group-checkbox, .action) {
    width: 100%;
}

div.rapprochement_form_section:has(.cde_rim_rapprochement_form:empty) {
    display: none;
}

h2:has( + div:empty) {
    display: none;
}

div:empty + .wp-block-spacer {
    display: none;
}

@media screen and (max-width: 760px) {
    .domaine_card,
    .rapprochement_card,
    .rapprochement-data-card {
        grid-template-columns: 1fr;
    }

    .cde_rim_domaines_liste,
    .cde_rim_rapprochement_liste,
    .rapprochement_data_file .liste_data {
        grid-template-columns: 1fr;
    }

    .cde_rim_rapprochement_form form > * {
        width: 100%;
    }
}
