/* ============================================
   Ato Carousel Basic – styles
   ============================================ */

.ato-carousel-basic {
    position: relative;
    padding: 0 44px;
    -webkit-user-select: none;
    user-select: none;
    box-sizing: border-box;
}

/* Fenêtre visible – masque le débordement */
.acb-viewport {
    overflow: hidden;
    width: 100%;
}

/* Piste qui coulisse */
.acb-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    /* la transition est gérée par le JS */
}

/* Cellule individuelle */
.acb-cell {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px;
    box-sizing: border-box;
}

/* Lien optionnel */
.acb-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* Image avec lazy-loading : fade-in à l'apparition */
/* !important sur width pour écraser les contraintes du thème.
   height et aspect-ratio sans !important pour que l'inline style puisse les surcharger. */
.ato-carousel-basic .acb-img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    aspect-ratio: var(--acb-ratio); /* actif uniquement si --acb-ratio est défini sur le wrapper */
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.ato-carousel-basic .acb-img.acb-img-loaded {
    opacity: 1;
}

/* Squelette pendant le chargement */
.acb-cell {
    background: transparent;
}

.acb-img:not(.acb-img-loaded) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: acb-skeleton 1.4s ease-in-out infinite;
}

@keyframes acb-skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Titre */
.acb-title {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    margin: 10px 0 4px;
    line-height: 1.3;
}

/* Contenu optionnel */
.acb-content {
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}

/* ---- Boutons de navigation ---- */

.acb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
    transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.acb-btn:hover {
    background: #fff;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
}

.acb-btn:active {
    opacity: 0.7;
}

.acb-btn:disabled,
.acb-btn.acb-btn--disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.acb-btn svg {
    width: 18px;
    height: 18px;
    stroke: #333;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.acb-btn-prev { left: 0; }
.acb-btn-next { right: 0; }

/* ---- Responsive ---- */

@media screen and (max-width: 767px) {
    .ato-carousel-basic {
        padding: 0 36px;
    }

    .acb-btn {
        width: 30px;
        height: 30px;
    }

    .acb-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media screen and (max-width: 479px) {
    .ato-carousel-basic {
        padding: 0 30px;
    }
}
