/* 
 * Styles pour le plugin Programmes Actifs SUXALI
 * Version: 3.5.1
 */
 
.suxali-container {
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    border-radius: 20px;
}

.suxali-container *,
.suxali-container *:before,
.suxali-container *:after {
    box-sizing: inherit;
}

/* ======================================================
   PAGE PRINCIPALE AVEC SHORTCODE
====================================================== */
.programmes-principale-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 20px 0;
}

/* Carte principale */
.programme-card-principale {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
}

.programme-card-principale:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* Background */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.5s ease;
}

.programme-card-principale:hover .card-background {
    transform: scale(1.05);
}

/* Overlay */
.card-overlay-principale {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 2;
}

/* Badges */
.card-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Contenu */
.card-content-principale {
    position: relative;
    z-index: 3;
    padding: 24px;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-description {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.9;
}

/* Bouton */
.btn-savoir-plus {
    display: inline-block;
    padding: 10px 24px;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.btn-savoir-plus:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
}

/* ======================================================
   SHORTCODE PROGRAMMES ACTIFS
====================================================== */
.programme-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #475569;
}

.filter-btn:hover,
.filter-btn.active {
    background: #FF0000;
    color: white;
}

.programmes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.programme-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.programme-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 60%);
    z-index: 1;
}

.programme-card .badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.programme-card .badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.programme-card .badge.en_cours {
    background: #22c55e;
}

.programme-card .badge.a_venir {
    background: #f59e0b;
}

.programme-card .badge.termine {
    background: #6b7280;
}

.programme-card .badge.cat {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.programme-card .content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    color: white;
    z-index: 2;
}

.programme-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: white;
}

.programme-card p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.programme-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    opacity: 0.9;
}

.programme-card .btn {
    display: inline-block;
    padding: 8px 20px;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.programme-card .btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

/* Badges styles */
.badge-statut {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.badge-statut.en_cours {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.badge-statut.a_venir {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-statut.termine {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.badge-categorie-speciale {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.badge-categorie {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (min-width: 768px) {
    .programmes-principale-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
    
    .programmes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .programmes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .programme-card-principale {
        height: 280px;
        min-height: 280px;
    }
    
    .card-content-principale {
        padding: 20px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .card-description {
        font-size: 13px;
    }
    
    .programme-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .programmes-grid {
        grid-template-columns: 1fr;
    }
    
    .programme-card .badges {
        gap: 6px;
    }
    
    .programme-card .badge {
        padding: 5px 12px;
        font-size: 10px;
        min-width: 70px;
    }
}

/* Message quand il n'y a pas de résultats */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 18px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}