/* 
 * F4HXN Carrousel Pages - Styles
 * Version: 1.0.0
 * Author: Jean-Paul Mansouri (F4HXN)
 */

.f4hxn-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    background: white;
}

.f4hxn-carousel-wrapper {
    position: relative;
    overflow: visible;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.f4hxn-carousel-slides {
    position: relative;
    width: 100%;
    overflow: visible;
}

.f4hxn-carousel-slide {
    display: none;
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: visible;
    animation: fadeIn 0.5s ease-in-out;
    min-height: 100%;
}

.f4hxn-carousel-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-image {
    width: 100%;
    height: 700px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.slide-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
}

.slide-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.f4hxn-carousel-slide:hover .slide-image img {
    transform: scale(1.03);
}

.slide-content {
    padding: 40px;
    background: white;
    min-height: auto;
    height: auto;
}

.slide-title {
    margin: 0 0 15px 0;
    font-size: 2em;
    font-weight: 700;
    line-height: 1.3;
    word-wrap: break-word;
}

.slide-title a {
    color: #0076a5;
    text-decoration: none;
    transition: color 0.3s ease;
    word-wrap: break-word;
}

.slide-title a:hover {
    color: #298ad4;
}

.slide-date {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
    font-weight: 500;
}

.slide-excerpt {
    color: #555;
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 25px;
    min-height: auto;
    max-height: none;
    overflow: visible;
    word-wrap: break-word;
}

.slide-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0076a5, #298ad4);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 118, 165, 0.3);
}

.slide-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 118, 165, 0.4);
    background: linear-gradient(135deg, #298ad4, #0076a5);
}

/* Boutons de navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 118, 165, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2em;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-nav:hover {
    background: rgba(41, 138, 212, 0.95);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

/* Points de navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 25px 0;
    margin-top: 20px;
}

.carousel-dots .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #0076a5;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dots .dot:hover {
    background: #298ad4;
    transform: scale(1.2);
}

.carousel-dots .dot.active {
    background: linear-gradient(135deg, #0076a5, #298ad4);
    width: 40px;
    border-radius: 7px;
}

/* Responsive */
@media (max-width: 768px) {
    .f4hxn-carousel-container {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    .slide-image {
        height: 300px;
        padding-top: 15px;
    }
    
    .slide-content {
        padding: 25px;
        height: auto;
        min-height: auto;
    }
    
    .slide-title {
        font-size: 1.5em;
        word-wrap: break-word;
    }
    
    .slide-excerpt {
        font-size: 1em;
        max-height: none;
        overflow: visible;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }
    
    .carousel-nav.prev {
        left: 10px;
    }
    
    .carousel-nav.next {
        right: 10px;
    }
    
    .slide-button {
        padding: 12px 24px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .slide-image {
        height: 250px;
        padding-top: 10px;
    }
    
    .slide-content {
        padding: 20px;
        height: auto;
    }
    
    .slide-title {
        font-size: 1.3em;
        word-wrap: break-word;
    }
    
    .slide-excerpt {
        font-size: 0.95em;
        max-height: none;
        overflow: visible;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1.3em;
    }
}

/* Animation de chargement */
.f4hxn-carousel-container.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f4hxn-carousel-container.loading::before {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0076a5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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