/* pour faire 4 colonnes */
.associations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
}

/* pancarte d'une association */
.card-asso {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    height: 100%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

/* effet au survol */
.card-asso:hover {
    transform: translateY(-4px);
}

/* div du logo de l'association */
.card-asso-image {
    position: relative;
    width: 100%;
    height: 165px;
    max-height: 165px;
    padding: 15px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

/* style de l'image */
.card-asso-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* si pas de logo changement du background */
.card-asso-image.no-thumbnail {
    background-color: #CCD7FF;
}

/* si pas de logo ajout d'un logo */
.card-asso-image.no-thumbnail::before {
    content: "";
    background: url('../assets/img/no-logo.svg') no-repeat center center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* contenu de la pancarte */
.card-asso-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 20px;
    border-top: solid 1.5px #00186D;
}

/* titre de l'association */
.card-asso-title {
    font-size: 18px;
    font-weight: 900;;
    margin: 0;
    color: #00186D;
}

/* thématiques de l'association */
.card-asso-thematique-badge {
    display: block;
    padding: 5px;
    margin-right: 6px;
    margin-bottom: 6px;
    width: fit-content;
    border: 1px solid #730E5D;
    border-radius: 6px;
    font-size: 12px;
    color: #730E5D !important;
    text-decoration: none;
    text-box-trim: trim-both;
}

/* phrase d'accroche de l'association */
.card-asso-activity {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* div département et public visé */
.card-asso-infos {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* taxonomies départements et public visé */
.card-asso-departements,
.card-asso-contact {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    font-size: 12px;
}

/* ajout du logo pour les départements */
.card-asso-departements::before {
    content: "";
    display: inline-block;
    background-image: url(../assets/img/department-grey.svg);
    background-size: 15px 15px;
    background-repeat: no-repeat;
    width: 15px;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
}

/* ajout du logo pour le public visé */
.card-asso-contact::before {
    content: "";
    display: inline-block;
    background-image: url(../assets/img/contact-grey.svg);
    background-size: 15px 15px;
    background-repeat: no-repeat;
    width: 15px;
    height: 18px;
    margin-right: 9px;
    margin-left: 1px;
    vertical-align: middle;
}

/* style pour le détails de l'association */
.card-asso-link {
    margin-top: 15px;
    text-align: right;
    color: #730E5D;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ajout span invisible sur link détails pour normes RGAA */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/********************************************************************************/

/* pour les écrans de moins de 1100px */
@media (max-width: 1100px) {

    /* pour faire 2 colonnes */
    .associations-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 60px;
    }

}

/* pour les écrans de moins de 800px */
@media (max-width: 800px) {

    /* pour faire 1 colonnes */
    .associations-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}