/* =========================================
   MINIATURES UNIQUEMENT BBCode / URL
========================================= */

.postbody img.nl-thumb {

    display: inline-block;
    margin: 8px 0;

    max-width: 300px;   /* 🔥 limite seulement si plus grand */
    height: auto;

    border-radius: 8px;
    cursor: zoom-in;

    transition: transform .25s ease, box-shadow .25s ease;
}

.postbody img.nl-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,.35);
}

/* =========================================
   BLUR ARRIÈRE-PLAN
========================================= */

body.nl-blur-active > *:not(.nl-overlay) {
    filter: blur(8px);
    transition: filter .3s ease;
}


/* =========================================
   OVERLAY LIGHTBOX
========================================= */

.nl-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0,0,0,.7);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;
}


/* =========================================
   SLIDER STABLE
========================================= */

.nl-slider {
    display: flex;
    width: 100%;
    height: 100dvh;
    transition: transform .35s cubic-bezier(.4,.0,.2,1);
    will-change: transform;
}

.nl-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================
   IMAGE LIGHTBOX (TAILLE RÉELLE)
========================================= */

.nl-slide img {

    max-width: 95vw;
    max-height: 95vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 12px;
    box-shadow: 0 25px 70px rgba(0,0,0,.7);
}


/* =========================================
   FLÈCHES
========================================= */

.nl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    padding: 20px;
    transition: opacity .2s ease;
}

.nl-prev { left: 20px; }
.nl-next { right: 20px; }

.nl-arrow:hover {
    opacity: .7;
}


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

.nl-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0,0,0,.75);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;

    overflow: hidden;
}

.nl-slider {
    display: flex;
    width: 100%;
    height: 100dvh;   /* 🔥 crucial */
    transition: transform .35s cubic-bezier(.4,.0,.2,1);
}

.nl-slide {
    flex: 0 0 100%;
    height: 100dvh;   /* 🔥 crucial */

    display: flex;
    align-items: center;
    justify-content: center;
}

.nl-slide img {
    display: block;

    max-width: 95vw;
    max-height: 95dvh;  /* 🔥 important */

    width: auto;
    height: auto;

    margin: auto;

    object-fit: contain;
}
