/**
 * Styles de la Lightbox Photo Gallery Manager
 */

.pgm-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    user-select: none;
}

.pgm-lightbox-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Barre supérieure */
.pgm-lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    z-index: 10;
}

.pgm-lb-counter {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 500;
}

.pgm-lb-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.pgm-lb-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* Zone d'affichage de l'image */
.pgm-lb-body {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.pgm-lb-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgm-lb-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pgm-lb-image.is-loading {
    opacity: 0.3;
    transform: scale(0.98);
}

/* Spinner de chargement */
.pgm-lb-spinner {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: pgm-spin 0.8s linear infinite;
    display: none;
}

.pgm-lb-spinner.is-visible {
    display: block;
}

@keyframes pgm-spin {
    to { transform: rotate(360deg); }
}

/* Boutons de navigation (Précédent / Suivant) */
.pgm-lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 52px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 5;
    padding: 0;
}

.pgm-lb-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.pgm-lb-prev {
    left: 20px;
}

.pgm-lb-next {
    right: 20px;
}

/* Barre de légende inférieure */
.pgm-lb-footer {
    padding: 16px 24px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    z-index: 10;
}

.pgm-lb-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.pgm-lb-caption {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
    color: #d1d5db;
}

/* Mode mobile */
@media (max-width: 600px) {
    .pgm-lb-btn {
        width: 40px;
        height: 40px;
        font-size: 22px;
        line-height: 40px;
    }
    .pgm-lb-prev {
        left: 10px;
    }
    .pgm-lb-next {
        right: 10px;
    }
    .pgm-lb-header, .pgm-lb-footer {
        padding: 12px 16px;
    }
}
