/* ==========================================================
   Visionneuse plein écran (assets/js/mci-lightbox.js) — 2026-10-11
   Témoignages (page des offres) et attestations (formations).
   Téléphone : chevrons sous l'image, à portée du pouce. Dès 768 px : de part et d'autre.
   ========================================================== */

html.mci-lb-open,
html.mci-lb-open body {
    overflow: hidden;
}

.mci-lb {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(6, 18, 43, 0.96);
    color: #ffffff;
    overflow: hidden;
    overscroll-behavior: contain;
}

.mci-lb[open] {
    display: flex;
    flex-direction: column;
    animation: mci-lb-in 0.2s ease;
}

.mci-lb::backdrop {
    background: rgba(6, 18, 43, 0.96);
}

@keyframes mci-lb-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mci-lb-bar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: max(10px, env(safe-area-inset-top)) 12px 6px 18px;
}

.mci-lb-count {
    font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.82);
    font-variant-numeric: tabular-nums;
}

.mci-lb-stage {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 4px 12px;
}

.mci-lb-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    user-select: none;
    -webkit-user-drag: none;
}

.mci-lb-nav {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 10px 12px max(16px, env(safe-area-inset-bottom));
}

.mci-lb.is-single .mci-lb-nav {
    visibility: hidden;
}

button.mci-lb-btn {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

button.mci-lb-btn:hover,
button.mci-lb-btn:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.4);
}

button.mci-lb-btn:focus-visible {
    outline: 3px solid #8db5ff;
    outline-offset: 2px;
}

button.mci-lb-close {
    width: 44px;
    height: 44px;
}

/* Grand écran : chevrons de part et d'autre de l'image, centrés en hauteur */
@media (min-width: 768px) {
    .mci-lb-stage {
        padding: 8px 96px 28px;
    }

    .mci-lb-nav {
        position: absolute;
        top: 50%;
        right: 0;
        left: 0;
        justify-content: space-between;
        padding: 0 24px;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .mci-lb-nav .mci-lb-btn {
        width: 56px;
        height: 56px;
        pointer-events: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mci-lb[open] {
        animation: none;
    }
}
