/* ============ BOOK ACTIONS — boutons inline ============ */
.book-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.book-actions .btn-book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    white-space: nowrap;
    flex: 0 0 auto;
}

.btn-book-gallery {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /*background: transparent;*/
    border: 1px solid currentColor;
    padding: 8px 16px;
    cursor: pointer;
    font: inherit;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-book-gallery:hover {
    background: var(--color-primary, #333);
    color: #fff;
}

/* Couverture cliquable */
.book-cover-clickable {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.book-cover-clickable img {
    transition: transform 0.3s ease;
}

.book-cover-clickable:hover img {
    transform: scale(1.05);
}

.book-cover-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.book-cover-clickable:hover .book-cover-zoom,
.book-cover-clickable:focus .book-cover-zoom {
    opacity: 1;
}

/* Lightbox */
.jf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jf-lightbox.is-active {
    display: flex;
}

.jf-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.jf-lightbox-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 90vw;
}

.jf-lightbox-content {
    position: relative;
    max-width: 80vw;
    max-height: 70vh;
    text-align: center;
}

.jf-lightbox-image {
    max-width: 100%;
    max-height: 65vh;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.jf-lightbox-caption {
    color: #fff;
    margin-top: 12px;
    font-size: 15px;
}

.jf-lightbox-counter {
    display: block;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    font-size: 13px;
}

.jf-lightbox-close,
.jf-lightbox-prev,
.jf-lightbox-next {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.jf-lightbox-close:hover,
.jf-lightbox-prev:hover,
.jf-lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}

.jf-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

/* Thumbnails */
.jf-lightbox-thumbs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    margin-top: 20px;
    max-width: 90vw;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
}

.jf-lightbox-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    background: none;
}

.jf-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jf-lightbox-thumb:hover {
    opacity: 0.8;
}

.jf-lightbox-thumb.is-active {
    opacity: 1;
    border-color: #fff;
}

body.jf-lightbox-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .jf-lightbox-inner {
        flex-direction: column;
        gap: 16px;
    }
    .jf-lightbox-prev,
    .jf-lightbox-next {
        position: absolute;
        top: 40%;
        transform: translateY(-50%);
        z-index: 2;
    }
    .jf-lightbox-prev { left: 10px; }
    .jf-lightbox-next { right: 10px; }
    .jf-lightbox-thumbs {
        max-width: 100vw;
    }
}

@media (max-width: 480px) {
    .book-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .book-actions .btn-book {
        width: 100%;
    }
}