/* ============================================================
   TOP ARTICLES — Styles carousel
   À placer dans : ton-theme/css/top-articles.css
   ============================================================ */

/* ----------------------------------------------------------
   Section globale
   ---------------------------------------------------------- */
.top-articles {
    margin: 2rem 0;
    padding: 0;
}

.top-articles__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #1a1a1a;
}

/* ----------------------------------------------------------
   Swiper — conteneur
   ---------------------------------------------------------- */
.top-articles__swiper {
    position: relative;
    padding-bottom: 2.5rem; /* espace pour la pagination */
}

/* ----------------------------------------------------------
   Slide
   ---------------------------------------------------------- */
.top-articles__slide {
    height: auto; /* important pour que toutes les slides aient la même hauteur */
}

.top-articles__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.top-articles__link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

/* ----------------------------------------------------------
   Rang — badge numéroté
   ---------------------------------------------------------- */
.top-articles__rank {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* Podium — couleurs dorée, argent, bronze */
.top-articles__slide--gold   .top-articles__rank { background: #f5c518; color: #1a1a1a; }
.top-articles__slide--silver .top-articles__rank { background: #b0b0b0; color: #1a1a1a; }
.top-articles__slide--bronze .top-articles__rank { background: #cd7f32; color: #fff; }

/* ----------------------------------------------------------
   Miniature
   ---------------------------------------------------------- */
.top-articles__thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.top-articles__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.top-articles__link:hover .top-articles__img {
    transform: scale(1.04);
}

.top-articles__img--placeholder {
    background: linear-gradient(135deg, #e0e0e0 0%, #c8c8c8 100%);
}

/* ----------------------------------------------------------
   Contenu textuel
   ---------------------------------------------------------- */
.top-articles__content {
    padding: 0.875rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.35rem;
}

.top-articles__category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #e44d26; /* ← adapte à ta couleur principale */
}

.top-articles__heading {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0;
    /* Limite à 3 lignes avec ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-articles__views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #888;
    margin-top: auto;
    padding-top: 0.5rem;
}

.top-articles__views svg {
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   Boutons de navigation Swiper
   ---------------------------------------------------------- */
.top-articles__btn {
    color: #1a1a1a;
}

.top-articles__btn::after {
    font-size: 1.1rem;
    font-weight: 700;
}

/* ----------------------------------------------------------
   Pagination Swiper
   ---------------------------------------------------------- */
.top-articles__pagination .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.top-articles__pagination .swiper-pagination-bullet-active {
    background: #e44d26; /* ← adapte à ta couleur principale */
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 480px) {
    .top-articles__title {
        font-size: 1.2rem;
    }

    .top-articles__heading {
        font-size: 0.875rem;
    }
}
