/* =============================================================================
   LIGHTBOX - MHB Theme
   ============================================================================= */

/* Container */
.mhb-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.mhb-lightbox.is-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.mhb-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    animation: mhbLightboxFadeIn 0.3s ease;
}

/* Content */
.mhb-lightbox__content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: mhbLightboxSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

/* Legend specific */
.mhb-lightbox__content--legend {
    background: #BB9860;
}

.mhb-lightbox__content--legend .mhb-lightbox__body {
    background: url(../images/legends-box-bg.jpg) no-repeat center center;
    background-size: cover;
    scrollbar-color: #BB9860 #000;
}

/* Header */
.mhb-lightbox__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(187, 152, 96, 0.3);
    background: #000;
}

.mhb-lightbox__logo {
    height: 30px;
    width: auto;
}

.mhb-lightbox__close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.3s ease, transform 0.3s ease;
}

.mhb-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Body */
.mhb-lightbox__body {
    overflow-y: auto;
    flex: 1;
    padding: 0;
}

/* Scrollbar */
.mhb-lightbox__body::-webkit-scrollbar {
    width: 6px;
}

.mhb-lightbox__body::-webkit-scrollbar-track {
    background: transparent;
}

.mhb-lightbox__body::-webkit-scrollbar-thumb {
    background: rgba(187, 152, 96, 0.3);
    border-radius: 3px;
}

/* Loading */
.mhb-lightbox__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #BB9860;
    gap: 15px;
    font-size: 14px;
}

.mhb-lightbox__loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(187, 152, 96, 0.2);
    border-top-color: #BB9860;
    border-radius: 50%;
    animation: mhbLightboxSpin 0.8s linear infinite;
}

/* Error */
.mhb-lightbox__error {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* =============================================================================
   LEGEND LIGHTBOX CONTENT
   ============================================================================= */

.mhb-legend-lightbox__container {
    padding: 40px;
}

.mhb-legend-lightbox__content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

/* Photo */
.mhb-legend-lightbox__photo {
    flex-shrink: 0;
}

.mhb-legend-lightbox__img {
    width: 180px;
    height: 240px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Header legend - bordure noire */
.mhb-lightbox__content--legend .mhb-lightbox__header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    background: #000;
}

/* Info */
.mhb-legend-lightbox__info {
    flex: 1;
}

.mhb-legend-lightbox__name {
    margin: 0 0 15px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mhb-legend-lightbox__prenom {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 400;
    color: #000;
}

.mhb-legend-lightbox__nom {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Info boxes */
.mhb-legend-lightbox__box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #1a1a1a;
    font-size: 15px;
    margin-top: 15px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.mhb-legend-lightbox__box svg {
    color: #000;
    flex-shrink: 0;
    margin-top: 2px;
}

.mhb-legend-lightbox__box p {
    margin: 0 0 4px 0;
}

.mhb-legend-lightbox__box b {
    color: #000;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes mhbLightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mhbLightboxSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mhbLightboxSlideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

@keyframes mhbLightboxSpin {
    to { transform: rotate(360deg); }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .mhb-lightbox__content {
        width: 95%;
        max-height: 95vh;
    }

    .mhb-legend-lightbox__container {
        padding: 20px;
    }

    .mhb-legend-lightbox__content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .mhb-legend-lightbox__img {
        width: 140px;
        height: 190px;
    }

    .mhb-legend-lightbox__nom {
        font-size: 28px;
    }

    .mhb-legend-lightbox__prenom {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .mhb-lightbox__header {
        padding: 15px 20px;
    }

    .mhb-legend-lightbox__container {
        padding: 15px;
    }

    .mhb-legend-lightbox__img {
        width: 120px;
        height: 160px;
    }

    .mhb-legend-lightbox__nom {
        font-size: 24px;
    }
}
