/* layout général */
.fiches-masonry {
    display: flex;          /* flexbox pour gérer les colonnes */
    flex-wrap: wrap;        /* permet aux fiches de passer à la ligne */
    gap: 1.875em;           /* espacement entre fiches */
}

/* carte / fiche */
.fiche-item {
    position: relative;
    cursor: pointer;
    background: #FFFFFF;
    padding: 25px;
    border-radius: 30px;
    border: 2px solid #0034FF;
    box-sizing: border-box;
/*    margin-bottom: 20px; */

    flex: 0 0 calc(33.333% - 1.25em); /* 3 colonnes avec gap */
    min-width: 200px;                 /* largeur minimale lisible */
    transition: all 0.5s ease;        /* transition fluide au filtrage */
}

.fiche-card {
    cursor: pointer;
}

.fiche-item:hover {
    background: #0034FF0F;
}

/* lien global cliquable */
.fiche-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* contenu au-dessus visuellement */
.fiche-item > *:not(.fiche-link):not(.fiche-plus) {
    position: relative;
    z-index: 2;
}

.fiche-card a {
    position: relative;
    z-index: 2;
}

/* bouton plus */
.fiche-plus {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0034FF;
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    transition: all 0.5s ease;
    pointer-events: none;
}

.fiche-item:hover .fiche-plus {
    background: #00BE26;
    color: #0034FF;
    border-color: #0034FF;
}

/* typographie */
.fiche-item h2::first-letter,
.fiche-item h3::first-letter,
.fiche-item p::first-letter {
    text-transform: uppercase;
}

.fiche-item h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0034FF;
    font-size: 21px;
    font-weight: 700;
}

.fiche-item h2 a {
    color: inherit;
    text-decoration: none;
    transition: all 0.5s ease;
}

.fiche-item h2 a:hover {
    color: #00BE26;
}

.fiche-item h3 {
    margin: 5px 0;
    color: #0034FF;
    font-size: 14px;
    font-weight: 700;
}

.fiche-item p {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    color: #00BE26;
    font-size: 14px;
    font-weight: 400;
}

.fiche-valeur {
    color: #00BE26;
    font-weight: 400;
}

.fiche-item {
    transition: all 0.5s ease; /* déjà présent, sinon ajoute */
}

.fiche-item.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none; /* empêche de cliquer sur les fiches masquées */
    height: 0; /* optionnel pour réduire l’espace si besoin */
    margin-bottom: 0; /* optionnel pour éviter les gros vides */
}


/* icônes */
.fiche-icon {
    display: inline-block;
    position: relative;
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    vertical-align: middle;
}

.fiche-icon svg {
    width: 100%;
    height: 100%;
    fill: #00BE26;
    position: relative !important;
    transform: none !important;
}

/* filtres */
#fiches-filters {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#fiches-filters select,
#fiches-filters button#reset-filters {
    width: 250px;
    font-family: "Klarheit Kurrent", sans-serif;
    font-weight: 700;
    font-size: 16px;
}

#fiches-filters select {
    padding: 10px 15px;
    padding-right: 35px;
    border-radius: 30px;
    background: #FFFFFF;
    border: 2px solid #0034FF;
    color: #0034FF;
    line-height: 1.4;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path fill='%230034FF' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
}

#fiches-filters select option {
    background: #FFFFFF;
    color: #0034FF;
    padding: 5px 10px;
}

#fiches-filters button#reset-filters {
    padding: 14px;
    width: 100px;
    border-radius: 30px;
    background: #0034FF;
    color: #FFFFFF;
    border: 2px solid #0034FF;
    cursor: pointer;
}

#fiches-filters button#reset-filters:hover {
    background: #FFFFFF;
    color: #0034FF;
}

#fiches-results {
    transition: opacity 0.3s ease;
}


/* responsive */
@media (max-width: 1024px) {
    .fiche-item {
        flex: 0 0 calc(50% - 0.9375em); /* 2 colonnes */
    }
}

@media (max-width: 600px) {
    .fiche-item {
        flex: 0 0 100%; /* 1 colonne */
    }
}
