/**
 * Vandeto — Infinite Scroll : styles front.
 * Spinner moderne (accent #ffc220), apparition douce des annonces,
 * message de fin discret. La pagination est masquée par JS, mais on
 * sécurise aussi en CSS quand le moteur est actif.
 */

html.vis-active .adt-custom-pagination,
html.vis-active ul.pagination[data-vis-hidden],
html.vis-active #load-more-ads-btn[data-vis-hidden],
html.vis-active #no_more_ads_p[data-vis-hidden] {
    display: none !important;
}

/* Bloc d'état (spinner + fin) ------------------------------------------- */
.vis-feedback {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 26px 0 8px;
    text-align: center;
}

.vis-sentinel {
    width: 100%;
    height: 1px;
    pointer-events: none;
}

/* Spinner --------------------------------------------------------------- */
.vis-spinner {
    display: none; /* affiché par JS pendant le chargement */
    align-items: center;
    gap: 12px;
}

.vis-spinner__ring {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, .12);
    border-top-color: #ffc220;
    animation: vis-spin .8s linear infinite;
    flex: 0 0 auto;
}

.vis-spinner__label {
    font-size: 14px;
    font-weight: 600;
    color: #5b6573;
    letter-spacing: .01em;
}

@keyframes vis-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Message de fin -------------------------------------------------------- */
.vis-end {
    display: none;
    font-size: 13.5px;
    font-weight: 600;
    color: #9aa3b1;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .03);
}

.vis-end.is-visible {
    display: inline-block;
}

/* Apparition douce des éléments ajoutés --------------------------------- */
.vis-appended {
    animation: vis-fade-in .45s ease both;
}

@keyframes vis-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vis-appended {
        animation: none;
    }
    .vis-spinner__ring {
        animation-duration: 1.6s;
    }
}
