/* ============================================
   Colver Réalisations — lightbox.css
   ============================================ */

.clb-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 18, 20, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.clb-overlay.clb-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ── Zone image principale ───────────────────────────────────────── */
.clb-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    padding: 52px 80px 20px;
    box-sizing: border-box;
    min-height: 0;
}

.clb-counter {
    position: absolute;
    top: 16px;
    left: 20px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.06em;
    pointer-events: none;
}

.clb-back {
    display: none;
    position: absolute;
    top: 12px;
    right: 64px;
    height: 38px;
    align-items: center;
    gap: 6px;
    max-width: 55vw;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    z-index: 10;
    transition: color 0.2s;
}
.clb-back:hover { color: #fff; }
.clb-back::before { content: '\2039'; font-size: 16px; line-height: 1; flex-shrink: 0; }
.clb-overlay.clb-has-back .clb-back { display: flex; }

.clb-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.25s;
    padding: 0;
    z-index: 10;
}
.clb-close:hover {
    color: #fff;
    transform: rotate(90deg) scale(1.15);
}

/* ── Inner ───────────────────────────────────────────────────────── */
.clb-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.clb-img {
    display: block;
    max-width: min(85vw, 1300px);
    max-height: calc(100vh - 220px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

.clb-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: transparent linear-gradient(
        180deg, #4B767F00 0%, #4B767F 100%
    ) 0% 0% no-repeat padding-box;
    pointer-events: none;
    opacity: 0.85;
}

/* ── Loader ──────────────────────────────────────────────────────── */
.clb-loader {
    display: none;
    position: absolute;
    gap: 8px;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.clb-overlay.clb-loading .clb-loader { display: flex; }
.clb-loader span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4C95A5;
    animation: clb-bounce 1.2s ease-in-out infinite;
}
.clb-loader span:nth-child(2) { animation-delay: 0.2s; }
.clb-loader span:nth-child(3) { animation-delay: 0.4s; }
@keyframes clb-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* ── Navigation ─────────────────────────────────────────────────── */
.clb-prev,
.clb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 58px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    z-index: 10;
    transition: color 0.2s, transform 0.2s;
}
.clb-prev:hover,
.clb-next:hover { color: #fff; }
.clb-prev { left: 16px; }
.clb-prev:hover { transform: translateY(-50%) translateX(-4px); }
.clb-next { right: 16px; }
.clb-next:hover { transform: translateY(-50%) translateX(4px); }
.clb-overlay.clb-single .clb-prev,
.clb-overlay.clb-single .clb-next { display: none; }

/* ── Thumbnail strip ─────────────────────────────────────────────── */
.clb-thumbstrip {
    width: 100%;
    padding: 12px 60px 16px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}
.clb-thumbtrack {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.clb-thumbtrack::-webkit-scrollbar { display: none; }
.clb-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    opacity: 0.45;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}
.clb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clb-thumb:hover { opacity: 0.8; transform: translateY(-2px); }
.clb-thumb.is-active { opacity: 1; border-color: #4C95A5; transform: translateY(-2px); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .clb-main { padding: 52px 44px 16px; }
    .clb-img  { max-width: 95vw; max-height: calc(100vh - 170px); }
    .clb-prev { left: 2px; }
    .clb-next { right: 2px; }
    .clb-thumb { width: 60px; height: 42px; }
    .clb-thumbstrip { padding: 10px 16px 12px; }
}