/**
 * News Carousel - Carousel moderne pour les news importantes
 * Design coherent avec le theme bleu ciel
 */

/* ============================================
   CAROUSEL CONTAINER
   ============================================ */

.news-carousel {
    position: relative;
    width: 100%;
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
}

.news-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, #ffffff 100%);
}

/* ============================================
   CAROUSEL SLIDES
   ============================================ */

.news-carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.news-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(142, 188, 235, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
    cursor: pointer;
}

.news-carousel-slide:hover {
    background: linear-gradient(135deg, rgba(142, 188, 235, 0.15) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.news-carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.news-carousel-slide-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.news-carousel-slide-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(142, 188, 235, 0.4);
}

.news-carousel-slide-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary-text);
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.news-carousel-slide-excerpt {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.news-carousel-slide-meta {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

.news-carousel-slide-meta i {
    margin-right: var(--spacing-xs);
    color: var(--color-primary);
}

.news-carousel-slide-link {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(142, 188, 235, 0.3);
}

.news-carousel-slide-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(142, 188, 235, 0.5);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

/* ============================================
   CAROUSEL NAVIGATION
   ============================================ */

.news-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.news-carousel-nav.prev {
    left: var(--spacing-md);
}

.news-carousel-nav.next {
    right: var(--spacing-md);
}

.news-carousel-nav-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-carousel-nav-btn:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.news-carousel-nav-btn:hover i {
    color: white;
}

.news-carousel-nav-btn i {
    font-size: 20px;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

/* ============================================
   CAROUSEL INDICATORS
   ============================================ */

.news-carousel-indicators {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 10;
}

.news-carousel-indicator {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.news-carousel-indicator.active {
    background: var(--color-primary);
    width: 32px;
    border-radius: 6px;
}

/* ============================================
   CAROUSEL AUTO-PLAY INDICATOR
   ============================================ */

.news-carousel-autoplay {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 10;
}

.news-carousel-autoplay-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-carousel-autoplay-btn:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.news-carousel-autoplay-btn:hover i {
    color: white;
}

.news-carousel-autoplay-btn i {
    font-size: 16px;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.news-carousel-autoplay-btn.paused i::before {
    content: "\f04b"; /* play icon */
}

.news-carousel-autoplay-btn.playing i::before {
    content: "\f04c"; /* pause icon */
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .news-carousel-wrapper {
        height: 500px;
    }
    
    .news-carousel-slide {
        padding: var(--spacing-md);
    }
    
    .news-carousel-slide-title {
        font-size: 24px;
    }
    
    .news-carousel-slide-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }
    
    .news-carousel-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .news-carousel-nav-btn i {
        font-size: 16px;
    }
    
    .news-carousel-nav.prev {
        left: var(--spacing-xs);
    }
    
    .news-carousel-nav.next {
        right: var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    .news-carousel-wrapper {
        height: 450px;
    }
    
    .news-carousel-slide-title {
        font-size: 20px;
    }
    
    .news-carousel-slide-excerpt {
        font-size: 13px;
    }
}

