/* Version 1.0 — 2026-03-27 — Lightbox CSS pour LADR Galerie (P3A) */
/* Fichier : front/css/ladr-lightbox.css (ladr-galerie) — NOUVEAU */
/* Mobile-first, pas de dependance externe */

/* ///////////////////////////
   //// OVERLAY
   /////////////////////////// */

.ladr-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 300ms ease;
    -webkit-tap-highlight-color: transparent;
}

.ladr-lightbox-overlay.ladr-lightbox-active {
    background: rgba(0, 0, 0, 0.92);
}

/* ///////////////////////////
   //// CONTENU CENTRAL
   /////////////////////////// */

.ladr-lightbox-contenu {
    position: relative;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 300ms ease, transform 300ms ease;
}

.ladr-lightbox-active .ladr-lightbox-contenu {
    opacity: 1;
    transform: scale(1);
}

/* ///////////////////////////
   //// IMAGE
   /////////////////////////// */

.ladr-lightbox-image {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

/* ///////////////////////////
   //// TEMPLATE PERSONNALISE
   /////////////////////////// */

.ladr-lightbox-template {
    max-width: 100%;
    max-height: 78vh;
    overflow-y: auto;
    color: #fff;
}

.ladr-lightbox-template img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

/* ///////////////////////////
   //// INFOS (titre, legende, compteur)
   /////////////////////////// */

.ladr-lightbox-infos {
    text-align: center;
    padding: 12px 0 0;
    max-width: 100%;
}

.ladr-lightbox-titre {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.ladr-lightbox-legende {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.ladr-lightbox-compteur {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* ///////////////////////////
   //// BOUTON FERMER
   /////////////////////////// */

.ladr-lightbox-fermer {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.ladr-lightbox-fermer:hover,
.ladr-lightbox-fermer:focus {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

/* ///////////////////////////
   //// NAVIGATION (precedent / suivant)
   /////////////////////////// */

.ladr-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: background 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.ladr-lightbox-nav:hover,
.ladr-lightbox-nav:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.ladr-lightbox-precedent {
    left: 12px;
}

.ladr-lightbox-suivant {
    right: 12px;
}

/* ///////////////////////////
   //// RESPONSIVE — MOBILE FIRST
   /////////////////////////// */

/* Mobile (< 600px) : boutons nav plus petits, infos compactes */
@media (max-width: 600px) {
    .ladr-lightbox-contenu {
        max-width: 96vw;
        max-height: 90vh;
    }

    .ladr-lightbox-image {
        max-height: 72vh;
    }

    .ladr-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .ladr-lightbox-precedent {
        left: 6px;
    }

    .ladr-lightbox-suivant {
        right: 6px;
    }

    .ladr-lightbox-fermer {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .ladr-lightbox-titre {
        font-size: 14px;
    }

    .ladr-lightbox-legende {
        font-size: 12px;
    }

    .ladr-lightbox-compteur {
        font-size: 11px;
    }
}

/* Tablette (601px — 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
    .ladr-lightbox-contenu {
        max-width: 90vw;
    }
}

/* Desktop (> 1024px) : boutons nav plus espacés */
@media (min-width: 1025px) {
    .ladr-lightbox-contenu {
        max-width: 85vw;
    }

    .ladr-lightbox-precedent {
        left: 24px;
    }

    .ladr-lightbox-suivant {
        right: 24px;
    }

    .ladr-lightbox-fermer {
        top: 20px;
        right: 20px;
    }
}

/* ///////////////////////////
   //// CURSEUR SUR ELEMENTS CLIQUABLES
   /////////////////////////// */

[data-ladr-lightbox="1"] {
    cursor: zoom-in;
}

.ladr-galerie-item[data-image-id] {
    cursor: zoom-in;
}
