/* ========================================================================
   STYLES PROFESSIONNELS POUR LES IMAGES
   ======================================================================== */

/* ===== SLIDER PRINCIPAL - Image entière visible, responsive ===== */
.slider-slide img {
    object-fit: contain;
    object-position: center;
    max-width: 100%;
    max-height: 100%;
}

/* Amélioration subtile du texte */
.slider-info h2 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.slider-info p {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ===== ARTICLES GRID – image entière visible ===== */
.article-card .article-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: var(--portal-card-hover, #2d2e30);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-card .article-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center !important;
    display: block;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.03);
}

/* Articles wide (2 colonnes) – image entière */
.article-card.wide .article-image {
    height: 300px;
}

.article-card.wide .article-image img,
.article-card.featured .article-image img {
    object-fit: contain !important;
}

/* Articles featured */
.article-card.featured .article-image {
    height: 280px;
}

/* ===== FANCY ARTICLES (Articles déjà passés) – image | texte ===== */
.fancy-article,
.hakika_fancy-article {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    cursor: pointer;
}

.fancy-article:hover,
.hakika_fancy-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.fancy-article.small {
    min-height: 180px;
    overflow: hidden;
}

.hakika_fancy-article {
    min-height: 200px;
    overflow: hidden;
}

.fancy-article-img-wrap,
.hakika_fancy-article-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--portal-bg, #1a1b1c);
}

.fancy-article-img,
.hakika_fancy-article-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center !important;
    display: block;
    transition: transform 0.6s ease;
}

.fancy-article:hover .fancy-article-img,
.hakika_fancy-article:hover .hakika_fancy-article-img {
    transform: scale(1.03);
}

/* Pas de gradient overlay – image et texte séparés */
.fancy-article::before,
.hakika_fancy-article::before {
    display: none;
}

/* Bloc texte à droite */
.fancy-article-overlay,
.hakika_fancy-article-overlay {
    padding: 20px 24px;
    color: var(--dark-color, #e4e6eb);
}

/* Badge de catégorie */
.fancy-article-badge,
.hakika_fancy-article-badge {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(52, 152, 219, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fancy-article-badge.low-popularity,
.hakika_fancy-article-badge.low-popularity {
    background: rgba(231, 76, 60, 0.9);
}

/* Titre – thème portail */
.fancy-article-title,
.hakika_fancy-article-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color, #e4e6eb);
    margin-bottom: 10px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.fancy-article:hover .fancy-article-title,
.hakika_fancy-article:hover .hakika_fancy-article-title {
    color: var(--portal-active-accent, #e85d4c);
}

/* Excerpt – thème portail */
.fancy-article-excerpt,
.hakika_fancy-article-excerpt {
    font-size: 0.95rem;
    color: var(--gray-color, #b0b3b8);
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Meta info */
.fancy-article-meta,
.hakika_fancy-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.fancy-article-author,
.hakika_fancy-article-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fancy-article-date,
.hakika_fancy-article-date {
    font-size: 0.85rem;
    color: var(--gray-color, #b0b3b8);
}

/* ===== SLIDER PROFESSIONNEL ===== */
/* Amélioration des images uniquement, sans toucher à la structure */
.pro-slide img {
    object-fit: cover;
    object-position: center;
}

.pro-slider-overlay {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* ===== PHOTOS DES AUTEURS ===== */
.fancy-article-author-img,
.hakika_fancy-article-author-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover !important;
    object-position: center !important;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.fancy-article:hover .fancy-article-author-img,
.hakika_fancy-article:hover .hakika_fancy-article-author-img {
    transform: scale(1.1);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card,
.fancy-article,
.hakika_fancy-article {
    animation: fadeIn 0.6s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .slider-slide {
        height: 400px;
    }
    
    .slider-info h2 {
        font-size: 1.8rem;
    }
    
    .slider-info p {
        font-size: 1rem;
    }
    
    .slider-info {
        padding: 20px;
    }
    
    .pro-slide {
        height: 350px;
    }
    
    .article-card .article-image {
        height: 200px;
    }
    
    .fancy-article.small,
    .hakika_fancy-article {
        height: 300px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
}

/* ===== OVERLAY POUR MEILLEURE LISIBILITÉ ===== */
.slider-info,
.fancy-article-overlay,
.hakika_fancy-article-overlay,
.pro-slider-overlay {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ===== LOADING SPINNER STYLE ===== */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

