/* === Bandeau defilant === */
.ag-wrap {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}
.ag-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
    cursor: grab;
}
.ag-track:active { cursor: grabbing; }
.ag-track::-webkit-scrollbar { display: none; }
.ag-card {
    flex: 0 0 auto;
    width: 220px;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}
.ag-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.ag-card:hover img {
    transform: scale(1.06);
}
.ag-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}
.ag-arrow:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.ag-arrow-left { left: 8px; }
.ag-arrow-right { right: 8px; }

/* === Lightbox === */
.ag-lb {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    margin: 0; padding: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.ag-lb.ag-lb-open {
    display: flex;
    animation: agFadeIn 0.2s ease;
}
@keyframes agFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ag-lb-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
}
.ag-lb-img-wrap {
    position: relative;
    display: inline-block;
}
.ag-lb-img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}
.ag-lb-bar {
    display: flex;
    align-items: center;
    gap: 20px;
}
.ag-lb-prev, .ag-lb-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.ag-lb-prev:hover, .ag-lb-next:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}
.ag-lb-counter {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    min-width: 50px;
    text-align: center;
}
.ag-lb-close {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 3;
}
.ag-lb-close:hover { background: rgba(0,0,0,0.85); }

@media (max-width: 768px) {
    .ag-card {
        width: 160px;
        height: 160px;
    }
    .ag-arrow { width: 32px; height: 32px; font-size: 14px; }
    .ag-lb-prev, .ag-lb-next { width: 38px; height: 38px; font-size: 16px; }
    .ag-lb-img { max-height: 65vh; }
}
