/* Stylesheet for Photographie page — Oriane Droubay */

.photo-page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #FFFFFF;
    overflow-x: hidden;
}

.photo-layout-container {
    position: relative;
    width: 1728px;
    height: 3255px;
    margin: 0 auto;
    background: #FFFFFF;
}

/* Common style for photo cards */
.photo-card {
    position: absolute;
    overflow: hidden;
    cursor: pointer;
    /* Smooth reveal transition. Transform transition also smooths out the parallax updates for a springy hover effect */
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    opacity: 0;
    transform: translate(0px, calc(80px + var(--parallax-y, 0px))) scale(0.95);
    z-index: 1;
    user-select: none;
}

.photo-card.visible {
    opacity: 1;
    transform: translate(0px, var(--parallax-y, 0px)) scale(1);
}

@media (hover: hover) {
    .photo-card.visible:hover {
        transform: scale(1.08) translate(0px, calc(var(--parallax-y, 0px) - 8px));
        z-index: 10;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }
}

.photo-card-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Individual photo card positions */

/* P1090696-13 1 */
.photo-p1090696-13 {
    width: 260.95px;
    height: 463.91px;
    left: 40px;
    top: 817px;
}

/* P1090445-35 1 */
.photo-p1090445-35 {
    width: 260.95px;
    height: 463.91px;
    left: 502px;
    top: 645px;
}

/* P1090535-1 1 */
.photo-p1090535-1 {
    width: 260.95px;
    height: 464.2px;
    left: 136px;
    top: 56px;
}

/* P1090561-2 1 */
.photo-p1090561-2 {
    width: 260.95px;
    height: 463.98px;
    left: 1285px;
    top: 8px;
}

/* P1090692-12 1 */
.photo-p1090692-12 {
    width: 260.95px;
    height: 464.02px;
    left: 1467px;
    top: 746px;
}

/* P1090153-9 1 */
.photo-p1090153-9 {
    width: 260.95px;
    height: 391px;
    left: 894px;
    top: 1242px;
}

/* P1100126-34 1 */
.photo-p1100126-34 {
    width: 260.95px;
    height: 463.91px;
    left: 360px;
    top: 1164px;
}

/* P1080576-2 1 */
.photo-p1080576-2 {
    width: 260.95px;
    height: 463.88px;
    left: 1155px;
    top: 746px;
}

/* P1080697-Modifier-2-2 1 */
.photo-p1080697-modifier-2-2 {
    width: 260.95px;
    height: 463.91px;
    left: 151px;
    top: 2526px;
}

/* 04-P1080801-4 1 */
.photo-04-p1080801-4 {
    width: 267.96px;
    height: 458px;
    left: 1374px;
    top: 1404px;
}

/* P1080590-8 1 */
.photo-p1080590-8 {
    width: 292.09px;
    height: 519px;
    left: 120px;
    top: 1648px;
}

/* P1090109-4 1 */
.photo-p1090109-4 {
    width: 260.95px;
    height: 390.96px;
    left: 603px;
    top: 1683px;
}

/* P1090112-5 1 */
.photo-p1090112-5 {
    width: 260.95px;
    height: 390.88px;
    left: 881px;
    top: 1819px;
}

/* P1090144-8 1 */
.photo-p1090144-8 {
    width: 584px;
    height: 233px;
    left: 471px;
    top: 120px;
}

/* P1080801 1 */
.photo-p1080801 {
    width: 264px;
    height: 370px;
    left: 529px;
    top: 2316px;
}

/* P1090290-20 1 */
.photo-p1090290-20 {
    width: 258px;
    height: 462px;
    left: 946px;
    top: 2629px;
}

/* P1090065-Modifier 1 */
.photo-p1090065-modifier {
    width: 362px;
    height: 488px;
    left: 1235px;
    top: 2038px;
}

/* P1100215 1 */
.photo-p1100215 {
    width: 379px;
    height: 213px;
    left: 33px;
    top: 2209px;
}


/* Descriptif Container styles */
.photo-descriptif-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 25px 20px;
    gap: 10px;

    position: absolute;
    width: 1064px;
    height: auto;
    left: 332px;
    top: 493px;

    background: #FFFFFF;
    border: 1px solid #000000;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2000;
}

.photo-descriptif-container:hover {
    transform: translateY(-2px);
}

.photo-descriptif-text {
    width: 1030px;
    height: auto;

    /* Description */
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    color: #101010;
    text-align: left;
    margin: 0;
    
    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* BOUTON TOUT VOIR */
.photo-bouton-tout-voir {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    width: 22px;
    height: 13px;
    flex: none;
    order: 1;
    flex-grow: 0;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.photo-descriptif-container:hover .photo-bouton-tout-voir {
    transform: translateY(8px);
    filter: invert(53%) sepia(0%) saturate(0%) brightness(90%) contrast(85%);
}

.photo-fluent-arrow {
    margin: 0 auto;
    width: 22px;
    height: 13px;
    display: block;
}

.photo-fluent-arrow img {
    width: 100%;
    height: 100%;
    display: block;
}


/* DYNAMIC RESPONSIVE SCALING */
@media (min-width: 768px) and (max-width: 1728px) {
    .photo-page-wrapper {
        height: calc(3335px * (100vw / 1728px)) !important;
        overflow-x: hidden;
    }
    
    .photo-layout-container {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) scale(calc(100vw / 1728px)) !important;
        transform-origin: top center !important;
        margin: 0 !important;
    }
}

/* Compensate the text scaling on tablet and small laptop screens to keep the font size legible (around 14px actual visible size) and allow wrapping */
@media (min-width: 768px) and (max-width: 1440px) {
    .photo-descriptif-text {
        font-size: calc(48.3px - 2.19vw) !important;
        line-height: 1.45 !important;
    }
    .photo-descriptif-text strong {
        font-size: inherit !important;
    }
}


/* =========================================
   LIGHTBOX GALERIE PLEIN ÉCRAN
   ========================================= */
.roca-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.roca-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.roca-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.roca-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.roca-lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.roca-lightbox-close:hover {
    transform: scale(1.1);
    color: #ccc;
}

.roca-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 40px;
    padding: 20px 15px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    border-radius: 4px;
}

.roca-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.roca-lightbox-prev {
    left: -70px;
}

.roca-lightbox-next {
    right: -70px;
}

@media (max-width: 1024px) {
    .roca-lightbox-prev {
        left: 10px;
    }
    .roca-lightbox-next {
        right: 10px;
    }
    .roca-lightbox-close {
        top: -40px;
        right: 0px;
    }
    .roca-lightbox-img {
        max-width: 85vw;
        max-height: 85vh;
    }
}

@media (max-width: 767px) {
    /* Stack layout: center and stack description and images on mobile */
    .photo-page-wrapper {
        height: auto !important;
    }

    .photo-layout-container {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 40px 10px 80px !important;
        box-sizing: border-box !important;
        gap: 30px !important;
    }

    .photo-descriptif-container {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 420px !important;
        height: auto !important;
        background-image: none !important;
        background-color: #ffffff !important;
        border: 1px solid #101010 !important;
        padding: 24px 20px !important;
        box-sizing: border-box !important;
        border-radius: 0px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        gap: 15px !important;
        margin: 0 auto 20px !important;
        transform: none !important;
    }

    .photo-descriptif-text {
        width: 100% !important;
        height: auto !important;
        text-align: center !important;
        font-size: clamp(10px, 3.05vw, 14px) !important;
        line-height: 1.45em !important;
        margin: 0 !important;
    }

    .photo-bouton-tout-voir {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 22px !important;
        height: 13px !important;
        margin-top: 10px !important;
    }

    .photo-descriptif-container:hover .photo-bouton-tout-voir {
        transform: translateY(4px) !important;
        filter: invert(40%) sepia(0%) saturate(0%) brightness(80%) !important;
    }

    .photo-card {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 500px !important;
        transform: none !important;
        opacity: 1 !important;
        border-radius: 0px !important;
        box-shadow: none !important; /* Pas d'ombre sur mobile/tablette */
        /* Scroll tactile fluide : désactive les transitions de hover qui bloquent le scroll */
        transition: none !important;
        touch-action: pan-y !important; /* Autorise le scroll vertical natif au doigt */
        cursor: default !important;
    }

    .photo-card.visible {
        transform: none !important;
    }

    /* Désactivation totale du hover sur appareils tactiles */
    .photo-card.visible:hover {
        transform: none !important;
        box-shadow: none !important;
        z-index: 1 !important;
    }



    /* Exact native aspect ratios of each photo card to prevent any cropping */
    .photo-p1090535-1 { aspect-ratio: 260.95 / 464.2 !important; }
    .photo-p1090561-2 { aspect-ratio: 260.95 / 463.98 !important; }
    .photo-p1090144-8 { aspect-ratio: 584 / 233 !important; max-width: 600px !important; }
    .photo-p1090445-35 { aspect-ratio: 260.95 / 463.91 !important; }
    .photo-p1090692-12 { aspect-ratio: 260.95 / 464.02 !important; }
    .photo-p1080576-2 { aspect-ratio: 260.95 / 463.88 !important; }
    .photo-p1090696-13 { aspect-ratio: 260.95 / 463.91 !important; }
    .photo-p1100126-34 { aspect-ratio: 260.95 / 463.91 !important; }
    .photo-p1090153-9 { aspect-ratio: 260.95 / 391 !important; }
    .photo-04-p1080801-4 { aspect-ratio: 267.96 / 458 !important; }
    .photo-p1080590-8 { aspect-ratio: 292.09 / 519 !important; }
    .photo-p1090109-4 { aspect-ratio: 260.95 / 390.96 !important; }
    .photo-p1090112-5 { aspect-ratio: 260.95 / 390.88 !important; }
    .photo-p1090065-modifier { aspect-ratio: 362 / 488 !important; }
    .photo-p1100215 { aspect-ratio: 379 / 213 !important; max-width: 600px !important; }
    .photo-p1080801 { aspect-ratio: 264 / 370 !important; }
    .photo-p1080697-modifier-2-2 { aspect-ratio: 260.95 / 463.91 !important; }
    .photo-p1090290-20 { aspect-ratio: 258 / 462 !important; }

    .photo-card-bg {
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
    }
}

/* =========================================
   CUSTOM CURSOR FOLLOWER
   ========================================= */
.photo-cursor-follower {
    position: fixed;
    left: 0;
    top: 0;
    padding: 7px 14px;
    background: #101010;
    color: #FFFFFF;
    font-family: 'Source Code Pro', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.photo-cursor-follower.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
