/* Style du slider d'actualités CTAB */
.ctab-news-slider {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
}

.ctab-container {
    background-color: #f5f8fd;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.ctab-slider-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    position: relative;
}

.ctab-slider-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #6e9f33;
    margin: 15px auto 0;
    border-radius: 2px;
}

.ctab-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 10px 50px 40px; /* Padding horizontal pour les flèches */
    margin: 0 -20px; /* Compensation pour aligner avec le conteneur */
}

.ctab-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

/* Configuration pour 3 actualités par vue */
.ctab-slider-slide {
    flex: 0 0 33.333%;
    min-width: 33.333%;
    padding: 10px;
    box-sizing: border-box;
}

.ctab-slide-content {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ctab-slide-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.ctab-slide-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

.ctab-slide-content:hover .ctab-slide-image img {
    transform: scale(1.05);
}

.ctab-slide-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ctab-slide-title {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: start; /* RTL-compatible */
}

.ctab-slide-date {
    color: #6e9f33;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.ctab-slide-date svg {
    width: 14px;
    height: 14px;
    margin-inline-end: 5px; /* RTL-compatible */
    fill: #6e9f33;
}

.ctab-slide-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: start; /* RTL-compatible */
}

.ctab-read-more {
    display: inline-block;
    background: #6e9f33;
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
    box-shadow: 0 3px 6px rgba(110, 159, 51, 0.2);
}

.ctab-read-more:hover {
    background: #597f29;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(110, 159, 51, 0.3);
}

/* Flèches de navigation repositionnées avec support RTL */
.ctab-slider-prev,
.ctab-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

/* En mode LTR */
.ctab-slider-prev {
    left: 0;
}

.ctab-slider-next {
    right: 0;
}

/* En mode RTL - inversion des flèches */
[dir="rtl"] .ctab-slider-prev {
    left: auto;
    right: 0;
}

[dir="rtl"] .ctab-slider-next {
    right: auto;
    left: 0;
}

.ctab-slider-prev svg,
.ctab-slider-next svg {
    width: 24px;
    height: 24px;
    fill: #2c3e50;
}

/* RTL: Inverser la direction des icônes de flèche */
[dir="rtl"] .ctab-arrow-icon {
    transform: scaleX(-1);
}

.ctab-slider-prev:hover,
.ctab-slider-next:hover {
    background: #6e9f33;
    transform: translateY(-50%) scale(1.05);
}

.ctab-slider-prev:hover svg,
.ctab-slider-next:hover svg {
    fill: white;
}

/* Conteneur des points de navigation en bas */
.ctab-slider-dots-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding: 10px 0;
}

.ctab-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ctab-slider-dot {
    width: 12px;
    height: 12px;
    background: #d4d4d4;
    border: none;
    border-radius: 50%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.ctab-slider-dot.active {
    background: #6e9f33;
    transform: scale(1.3);
}

/* Responsive design */
@media (max-width: 992px) {
    .ctab-slider-slide {
        flex: 0 0 50%;
        min-width: 50%;
    }
}

@media (max-width: 768px) {
    .ctab-container {
        padding: 20px;
    }
    
    .ctab-slider-title {
        font-size: 24px;
    }
    
    .ctab-slider-slide {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .ctab-slide-image {
        height: 200px;
    }
    
    .ctab-slide-title {
        font-size: 18px;
    }
    
    .ctab-slide-info {
        padding: 15px;
    }
    
    /* Ajustement des flèches sur mobile */
    .ctab-slider-wrapper {
        padding: 10px 40px 40px;
    }
    
    .ctab-slider-prev,
    .ctab-slider-next {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.9);
    }
    
    .ctab-slider-prev {
        left: 5px;
    }
    
    .ctab-slider-next {
        right: 5px;
    }
    
    /* RTL en mobile */
    [dir="rtl"] .ctab-slider-prev {
        left: auto;
        right: 5px;
    }
    
    [dir="rtl"] .ctab-slider-next {
        right: auto;
        left: 5px;
    }
}
