/* ============================================================
   Bulle de Soi – Grille Ressources  |  ressources.css
============================================================ */

.bds-ressources-wrap {
    width: 100%;
}

/* ============================================================
   FORMULAIRE DE FILTRES
============================================================ */
.ressources-filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 32px;
}

.ressources-filters input,
.ressources-filters select {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    min-width: 200px;
    background: #fff;
    color: #333;
    transition: border-color .2s;
}

.ressources-filters input:focus,
.ressources-filters select:focus {
    outline: none;
    border-color: #169BAA;
    box-shadow: 0 0 0 3px rgba(22,155,170,.15);
}

#res-filter-btn {
    padding: 10px 22px;
    background: #169BAA;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity .2s;
}
#res-filter-btn:hover { opacity: .85; }


/* ============================================================
   GRILLE MASONRY
============================================================ */
.ressources-grid { width: 100%; }

.ressource-card {
    width: calc((100% - 60px) / 3);
    margin-bottom: 30px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,.10);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

@media (max-width: 980px) {
    .ressource-card { width: calc((100% - 30px) / 2); }
}
@media (max-width: 600px) {
    .ressource-card { width: 100%; }
}


/* ============================================================
   IMAGE
============================================================ */
.ressource-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
}

.ressource-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.ressource-img-wrapper:hover .ressource-img {
    transform: scale(1.03);
}


/* ============================================================
   CORPS DE LA CARTE
============================================================ */
.ressource-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}


/* ============================================================
   TITRE
============================================================ */
.ressource-card h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 10px 0 8px;
    line-height: 1.35;
}

.ressource-card h2 a {
    color: #169BAA;
    text-decoration: none;
    transition: opacity .2s;
}
.ressource-card h2 a:hover { opacity: .75; }


/* ============================================================
   DESCRIPTION
============================================================ */
.ressource-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 16px;
    flex: 1;

    /* Troncature sur 3 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ============================================================
   BADGES
============================================================ */
.ressource-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
    line-height: 1.4;
}

/* Thème : couleur principale */
.badge--theme {
    border: 1px solid #169BAA;
    background: rgba(22,155,170,.18);
    color: #0d7a87;
    font-weight: 600;
}

/* Catégorie : couleur secondaire douce */
.badge--cat {
    border: 1px solid #a78bfa;
    background: rgba(167,139,250,.15);
    color: #6d28d9;
}


/* ============================================================
   BOUTON
============================================================ */
.ressource-btn {
    display: inline-block;
    margin-top: auto;
    padding: 9px 18px;
    background: #169BAA;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    transition: opacity .2s;
    align-self: flex-start;
}
.ressource-btn:hover { opacity: .85; }


/* ============================================================
   LOAD MORE
============================================================ */
#res-load-more {
    display: block;
    margin: 40px auto 0;
    padding: 12px 32px;
    background: #169BAA;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity .2s;
}
#res-load-more:hover { opacity: .85; }


/* ============================================================
   MESSAGES & LOADER
============================================================ */
.bds-no-result {
    text-align: center;
    color: #666;
    padding: 40px 0;
    font-size: 15px;
    width: 100%;
}

.bds-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 4px solid rgba(22,155,170,.25);
    border-top-color: #169BAA;
    border-radius: 50%;
    animation: bds-spin .7s linear infinite;
}

@keyframes bds-spin {
    to { transform: rotate(360deg); }
}
