/* ============================================================
   RUE MICHÈLE — Slider pleine page style Martine Studio
   ============================================================ */

/* Masquer la mise en page originale */
.single-portfolio-item .qodef-e.qodef-magnific-popup,
.single-portfolio-item .qodef-media,
.single-portfolio-item .qodef-e-content,
.single-portfolio-item #qodef-single-portfolio-navigation,
.single-portfolio-item #qodef-portfolio-single-related-items,
.single-portfolio-item .qodef-e-inner > .qodef-media {
    display: none !important;
}

/* Masquer le side area */
.single-portfolio-item #qodef-side-area,
.single-portfolio-item .qodef-side-area-opener,
.single-portfolio-item .widget_gracey_core_side_area_opener {
    display: none !important;
}

/* Reset conteneurs du thème */
.single-portfolio-item #qodef-page-outer,
.single-portfolio-item #qodef-page-inner,
.single-portfolio-item #qodef-page-content,
.single-portfolio-item .qodef-grid,
.single-portfolio-item .qodef-grid-inner,
.single-portfolio-item .qodef-grid-item,
.single-portfolio-item .qodef-portfolio,
.single-portfolio-item .qodef-portfolio-single-item,
.single-portfolio-item .qodef-e-inner {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Séparateur sous le header */
.single-portfolio-item #qodef-page-header {
    padding-bottom: 12px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

/* ---- Wrapper global ---- */
#rm-project-page {
    position: fixed;
    top: calc(105px + var(--wp-admin--admin-bar--height, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    background: #fff;
    z-index: 9999;
    font-family: inherit;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#rm-project-page::-webkit-scrollbar {
    display: none;
}

#rm-logo, #rm-back { display: none !important; }

/* ---- Sections ---- */
.rm-section {
    width: 100vw;
    height: calc(100vh - 105px - var(--wp-admin--admin-bar--height, 0px));
    scroll-snap-align: start;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Image seule */
.rm-section.rm-single .rm-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex: 1;
}

/* Deux images côte à côte */
.rm-section.rm-double .rm-img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex: 1;
}
.rm-section.rm-double .rm-img + .rm-img {
    border-left: 2px solid #fff;
}

/* Deux images empilées (mobile paysage) */
.rm-section.rm-stack {
    flex-direction: column;
}
.rm-section.rm-stack .rm-img {
    width: 100%;
    height: 50%;
    object-fit: cover;
    display: block;
    flex: 1;
}
.rm-section.rm-stack .rm-img + .rm-img {
    border-top: 2px solid #fff;
}

/* ---- Section projet suivant ---- */
.rm-section.rm-next-section {
    height: auto;
    min-height: 20vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 48px;
    border-top: 0.5px solid rgba(0,0,0,0.12);
    background: #fff;
}
.rm-next-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.35);
    margin-bottom: 8px;
}
.rm-next-name {
    font-size: clamp(22px, 3vw, 40px);
    font-weight: 500;
    color: #000;
}
.rm-next-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s;
}
.rm-next-link:hover { opacity: 0.5; }
.rm-next-arrow {
    font-size: 32px;
    color: rgba(0,0,0,0.25);
    transition: transform 0.2s;
}
.rm-next-link:hover .rm-next-arrow {
    transform: translateX(8px);
}

/* Désactiver temporairement les liens vers les pages projet */
.qodef-portfolio-list .qodef-e-media-image a,
.qodef-portfolio-list .qodef-e-title-link {
    pointer-events: none;
    cursor: default;
}

/* Mobile */
@media (max-width: 1024px) {
    #rm-project-page {
        top: calc(85px + var(--wp-admin--admin-bar--height, 0px));
    }
    .rm-section {
        height: calc(100vh - 85px - var(--wp-admin--admin-bar--height, 0px));
    }
    .rm-section.rm-double {
        flex-direction: column;
    }
    .rm-section.rm-double .rm-img {
        width: 100%;
        height: 50%;
    }
    .rm-section.rm-double .rm-img + .rm-img {
        border-left: none;
        border-top: 2px solid #fff;
    }
    .rm-section.rm-next-section {
        padding: 36px 20px;
    }
}