/**
 * Sename Carousel Styles
 * Design inspiré de la Sename Foundation
 */

/* ==========================================
   WRAPPER PRINCIPAL
   ========================================== */
.sename-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 53px;
    /*overflow: hidden;*/
}

/* ==========================================
   CONTAINER DU CAROUSEL
   ========================================== */
.sename-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 20px;
}

.sename-carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ==========================================
   CARTES D'ARTICLES
   ========================================== */
.carousel-card {
    flex: 0 0 calc(33.333% - 20px); /* 3 cartes visibles */
    min-width: 350px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    /*box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);*/
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
        padding: 15px;
}

.carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   IMAGE DE LA CARTE
   ========================================== */
.card-image {
    position: relative;
    width: 100%;
    /*height: 280px;
    background: #f5f5f5;*/
    overflow: hidden;
}

.card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-card:hover .carousel-image {
    transform: scale(1.08);
}

/* ==========================================
   CONTENU DE LA CARTE
   ========================================== */
.card-content {
    padding: 15px 0px 0px;
}

.card-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
     color: #1a1a1a;
    font-family: "Montserrat", 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #7b2cbf; /* Couleur violet/pourpre */
}

.card-excerpt {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    font-weight: 400;
    font-family: "Montserrat", 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================
   BOUTONS DE NAVIGATION (Flèches)
   ========================================== */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
   /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);*/
    transition: all 0.3s ease;
    outline: none;
}

.carousel-nav:hover {
    background: #f8f8f8;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 3px;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

/* ==========================================
   INDICATEURS (DOTS)
   ========================================== */
.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(123, 44, 191, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.indicator-dot:hover {
    background: rgba(123, 44, 191, 0.5);
    transform: scale(1.2);
}

.indicator-dot.active {
    background: #7b2cbf;
    width: 30px;
    border-radius: 6px;
}

/* ==========================================
   RESPONSIVE - TABLETTES
   ========================================== */
@media (max-width: 1200px) {
    .carousel-card {
        flex: 0 0 calc(50% - 15px); /* 2 cartes visibles */
        min-width: 300px;
    }

    .sename-carousel-wrapper {
        padding: 50px 60px;
    }

    .card-title {
        font-size: 22px;
    }

    .card-excerpt {
        font-size: 15px;
    }
}

@media (max-width: 992px) {
    .sename-carousel-wrapper {
        padding: 40px 50px;
    }

    .carousel-nav {
        width: 45px;
        height: 45px;
    }

    .carousel-prev {
        left: 15px;
    }

    .carousel-next {
        right: 15px;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */
@media (max-width: 768px) {
    .sename-carousel-wrapper {
        padding: 30px 15px;
    }

    .carousel-card {
        flex: 0 0 100%; /* 1 carte visible */
        min-width: 280px;
        margin: 0 auto;
    }

    .sename-carousel-track {
        gap: 20px;
    }

    .card-image {
        height: 220px;
    }

    .card-content {
        padding: 25px 20px;
    }

    .card-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .card-excerpt {
        font-size: 14px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-indicators {
        margin-top: 30px;
        gap: 8px;
    }

    .indicator-dot {
        width: 10px;
        height: 10px;
    }

    .indicator-dot.active {
        width: 24px;
    }
}

@media (max-width: 480px) {
    .sename-carousel-wrapper {
        padding: 25px 10px;
    }

    .carousel-card {
        min-width: 260px;
    }

    .card-image {
        height: 200px;
    }

    .card-title {
        font-size: 18px;
    }
}

/* ==========================================
   ANIMATIONS & ÉTATS
   ========================================== */
.carousel-card.is-animating {
    pointer-events: none;
}

/* Animation d'entrée pour les cartes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carousel-card {
    animation: slideIn 0.5s ease-out;
}

/* État de chargement */
.sename-carousel-wrapper.is-loading .carousel-card {
    opacity: 0.5;
}

/* ==========================================
   ACCESSIBILITÉ
   ========================================== */
.carousel-nav:focus,
.indicator-dot:focus {
    outline: 2px solid #7b2cbf;
    outline-offset: 2px;
}

/* Réduire les animations pour les utilisateurs qui préfèrent moins de mouvement */
@media (prefers-reduced-motion: reduce) {
    .sename-carousel-track,
    .carousel-card,
    .carousel-image,
    .carousel-nav,
    .indicator-dot {
        transition: none;
    }

    .carousel-card:hover .carousel-image {
        transform: none;
    }

    .carousel-card:hover {
        transform: none;
    }
}

/* ==========================================
   MODE SOMBRE (Optionnel)
   ========================================== */
@media (prefers-color-scheme: dark) {
    .sename-carousel-wrapper {
        background: linear-gradient(135deg, #2d1b3d 0%, #1a1a2e 50%, #16213e 100%);
    }

    .carousel-card {
        background: #2a2a2a;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .card-title {
        color: #ffffff;
    }

    .card-excerpt {
        color: #b0b0b0;
    }

    .carousel-nav {
        background: #3a3a3a;
        color: #ffffff;
    }

    .carousel-nav:hover {
        background: #4a4a4a;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .carousel-nav,
    .carousel-indicators {
        display: none;
    }

    .carousel-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}