/* Styles pour les pages de catégories */

/* Miniature avec image de fond (si disponible) */
div.post-thumbnail {
    margin: 20px 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
}

.post-thumbnail-overlay {
    padding: 20px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.post-thumbnail-overlay h1 {
    margin: 0;
}

/* Header de catégorie - copié du style des pages */
.entry-header {
    margin: 0 !important;
    padding: 0 5vw !important;
    width: 100% !important;
    max-width: unset !important;
    position: relative;
    margin-bottom: 160px !important;
    background-color: var(--systemoun-strong-color, #19744c);
    color: white;
    text-align: center;
}

.entry-header>img {
    position: absolute;
    right: 0;
    /* bottom: -100px; */
    width: 100%;
    /* min-width: 600px; */
    max-width: 100%;
    height: 128px;
    object-fit: fill;
    border-radius: 0;
    box-shadow: none;
    z-index: -10;
}

.entry-header h1 {
    margin-bottom: 16px;
    font-size: 40px;
    font-weight: 700;
    color: white;
    z-index: 2;
}

.entry-header:has(.category-description) {
    margin-bottom: 100px !important;
}



.category-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    z-index: 2;
}

/* Info de catégorie */
.category-info {
    background: #f8f9fa;
    padding: 16px 0;
    border-bottom: 1px solid #e9ecef;
}

.category-stats {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Conteneur principal des catégories */
.category-content {
    padding: 0 16px;
    margin: 0 2vw !important;
    max-width: 1200px !important;
    margin: 0 auto;
}

.custom-post-content {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;

    .private-badge {
        margin-top: 8px;
    }

}

/* Personnaliser le style d'affichage des différentes catégories */
.category-actualites .custom-post-item,
.category-ressources-et-contenus .custom-post-item {

    max-width: unset;
    width: 100%;



    >a {
        display: flex;
        flex-direction: row;
        gap: 20px;
        padding: 10px;


        >img {
            min-width: 220px;
            width: 220px;
            height: 130px;
            object-fit: cover;
            object-position: center;
            border-radius: 8px;
            margin: 0;
        }
    }
}

.category-formations .custom-post-item, .category-colloques .custom-post-item {
    max-width: 400px;
    flex: 1;
    min-width: 300px;

    >a {

        >img {
            width: 100%;
            height: 220px;
            object-fit: cover;
            object-position: center;
            border-radius: 8px;
        }

        div.custom-post-meta {
            display: none;
        }
    }
}

a.custom-post-link {
    height: 100%;
    width: 100%;

    img {
        transition: all 0.3s ease !important;
    }

    &:hover {
        filter: blur(0) !important;

        img {
            filter: none !important;
        }
    }
}




.custom-post-item {
    position: relative;
}

/* Responsive - copié du style des pages */
@media (max-width: 800px) {
    .entry-header {
        padding: 0 4vw !important;
        margin-bottom: 100px !important;
    }
}

@media (max-width: 768px) {
    .category-content {
        padding: 32px 8px;
    }
}

/* Styles pour les articles restreints */
.article-restreint {
    position: relative;
}

.article-restreint .custom-post-thumbnail {
    filter: grayscale(50%) blur(2px);
}


.private-badge {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);

    display: flex;
    align-items: center;
    gap: 6px;

    &.badge-membre {
        background: #2DAA73;
    }
}







/* affichage mobile */
@media (max-width: 800px) {
    .custom-post-item {
        max-width: min(90vw, 400px) !important;
    }

    .custom-post-link {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .custom-post-thumbnail {
        width: 100% !important;
        height: 140px;
    }



.entry-header h1 {
    font-size: 28px;
    line-height: normal;
}

.category-description {
    font-size: 14px;
}

/* Info de catégorie */


.category-stats {
    font-size: 14px;
    color: #666;
    text-align: center;
}
}

/* Conteneur pour les icônes SVG dans l'en-tête */
.header-svg-container {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    
    >img {
        border: none;
        box-shadow: none;
    }
}