/* ============================================================
   article-carousel.css
   Composant carrousel photo réutilisable dans les articles de blog.
   Usage :
   <div class="article-carousel">
     <div class="article-carousel__track">
       <figure class="article-carousel__slide"><img src="..." alt="..."></figure>
       ...
     </div>
     <button class="article-carousel__btn article-carousel__btn--prev" aria-label="Photo précédente">‹</button>
     <button class="article-carousel__btn article-carousel__btn--next" aria-label="Photo suivante">›</button>
     <div class="article-carousel__dots"></div>
   </div>
   ============================================================ */

.article-carousel {
    position: relative;
    width: 100%;
    margin: 1.8rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a0a;
}

.article-carousel__track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    touch-action: pan-y;
}

.article-carousel__slide {
    min-width: 100%;
    margin: 0;
    position: relative;
}

.article-carousel__slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* ---- Navigation buttons ---- */
.article-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    line-height: 1;
}

.article-carousel__btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.article-carousel__btn--prev {
    left: 12px;
}

.article-carousel__btn--next {
    right: 12px;
}

/* ---- Dots / indicators ---- */
.article-carousel__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 2;
}

.article-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.25s;
}

.article-carousel__dot.active {
    background: #fff;
    transform: scale(1.25);
}

/* ---- Caption (optional) ---- */
.article-carousel__slide figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
    color: #fff;
    font-size: 0.82rem;
    text-align: center;
}

/* ---- Dark mode ---- */
[data-theme="dark"] .article-carousel {
    background: #111;
}

[data-theme="dark"] .article-carousel__btn {
    background: rgba(30, 30, 30, 0.85);
    color: #eee;
}

[data-theme="dark"] .article-carousel__btn:hover {
    background: rgba(50, 50, 50, 0.95);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .article-carousel__slide img {
        height: 260px;
    }

    .article-carousel__btn {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    .article-carousel__btn--prev {
        left: 8px;
    }

    .article-carousel__btn--next {
        right: 8px;
    }
}
