/* =====================================================
   Jeu de Carte — Oriane Droubay
   Page layout fidèle aux specs Figma (1728px base)
   ===================================================== */

/* ─── Page Wrapper ──────────────────────────────────── */
.jdc-page-wrapper {
    position: relative;
    width: 100%;
    background: #FFFFFF;
    overflow-x: hidden;
}

.jdc-layout-container {
    position: relative;
    width: 1728px;
    margin: 0 auto;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* ─── HERO ──────────────────────────────────────────── */
.jdc-hero {
    width: 1728px;
    height: 770px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: zoom-in;
    /* Descriptif card is positioned via padding-left/top */
    display: flex;
    align-items: flex-end;
    padding: 0 0 0 550px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Descriptif card */
.jdc-descriptif {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 25px 20px;
    gap: 11px;

    width: 750px;
    height: auto;

    background: #FFFFFF;
    border: 1px solid #000000;
    box-sizing: border-box;
    flex-shrink: 0;
    cursor: pointer;
    margin-bottom: 0;
}

.jdc-descriptif:hover .jdc-arrow {
    transform: translateY(8px) rotate(0deg);
}

.jdc-descriptif-text {
    width: 100%;
    height: auto;
    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;
    white-space: pre-line;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* BOUTON TOUT VOIR */
.jdc-bouton-tout-voir {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    gap: 113px;
    width: 22px;
    height: 13px;
    flex: none;
    order: 1;
    flex-grow: 0;
}

.jdc-line-1 {
    display: none;
}

.jdc-arrow {
    margin: 0 auto;
    width: 22px;
    height: 13px;
    transform: rotate(0deg);
    flex: none;
    order: 1;
    flex-grow: 0;
    transition: transform 0.3s ease;
}

.jdc-arrow img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* ─── BLOC 1 : deux planches de cartes côte à côte ─── */
.jdc-bloc-1 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 1728px;
    height: 715px;
    flex-shrink: 0;
}

.jdc-cartes-1 {
    width: 884px;
    height: 715px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    cursor: zoom-in;
}

.jdc-cartes-2 {
    width: 844px;
    height: 715px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    cursor: zoom-in;
}

/* ─── BLOC 2 : mockup boîte + zone familles émotions ─ */
.jdc-bloc-2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 95px;
    width: 1728px;
    height: 746px;
    flex-shrink: 0;
}

.jdc-mockup-boite {
    width: 994px;
    height: 746px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    cursor: zoom-in;
}

.jdc-zone-emotion {
    width: 510px;
    height: 477px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    cursor: zoom-in;
}

/* ─── SÉLECTION AUTRES PROJETS ──────────────────────── */
.jdc-others-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 1434px;
    margin: 90px auto 100px;
}

.jdc-others-title {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    color: #101010;
    margin: 0 0 10px 0;
}

.jdc-selection {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 650px;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    gap: 0;
}

.jdc-selection-card {
    position: relative;
    width: 478px;
    height: 650px;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
    display: block;
}

.jdc-selection-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.jdc-selection-card:hover .jdc-selection-bg {
    transform: scale(1.04);
    filter: brightness(0.9);
}

.jdc-selection-label {
    position: absolute;
    top: 23px;
    right: 27px;
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: #101010;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #101010;
    padding: 4px 10px;
    border-radius: 2px;
    z-index: 2;
    transition: background 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.jdc-selection-card:hover .jdc-selection-label {
    background: #101010;
    color: #FFFFFF;
}

/* ─── Responsive Fluid Layouts (No global transform scale) ─── */

/* 1. Laptops and smaller desktops (1025px to 1728px) */
@media (max-width: 1728px) {
    .jdc-layout-container {
        width: 100%;
        max-width: 1728px;
        padding: 0 40px;
        box-sizing: border-box;
    }

    .jdc-hero {
        width: 100%;
        height: auto;
        aspect-ratio: 1728 / 770;
        padding: 0 0 3% 30%;
    }

    .jdc-descriptif {
        width: 44%;
        max-width: 750px;
        padding: 2vw 1.8vw;
    }

    .jdc-descriptif-text {
        width: 100%;
        font-size: clamp(13px, 0.95vw, 14px);
        line-height: 1.35em;
    }

    .jdc-bloc-1 {
        width: 100%;
        height: auto;
        aspect-ratio: 1728 / 715;
    }

    .jdc-cartes-1 {
        width: 51.15%;
        height: 100%;
    }

    .jdc-cartes-2 {
        width: 48.84%;
        height: 100%;
    }

    .jdc-bloc-2 {
        width: 100%;
        height: auto;
        aspect-ratio: 1728 / 746;
        gap: 5.5%;
    }

    .jdc-mockup-boite {
        width: 57.52%;
        height: 100%;
    }

    .jdc-zone-emotion {
        width: 29.51%;
        height: 63.94%;
    }

    .jdc-others-section {
        width: 100%;
        max-width: 1434px;
        margin: 5.2vw auto 5.8vw;
    }

    .jdc-selection {
        height: auto;
        aspect-ratio: 1434 / 650;
    }

    .jdc-selection-card {
        width: 33.33%;
        height: 100%;
    }
}

/* 2. Tablets (768px to 1200px) */
@media (max-width: 1200px) {
    .jdc-layout-container {
        padding: 0 24px;
        gap: 60px;
    }

    .jdc-hero {
        height: 520px !important;
        aspect-ratio: auto !important;
        padding: 0 20px 40px !important;
        justify-content: center;
        align-items: flex-end;
    }

    .jdc-descriptif {
        width: 100% !important;
        max-width: 80% !important;
        padding: 24px 5vw !important;
        box-sizing: border-box !important;
    }

    .jdc-descriptif-text {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 13px !important;
        line-height: 1.45em !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .jdc-bloc-1 {
        aspect-ratio: auto !important;
        height: auto !important;
        gap: 16px !important;
    }

    .jdc-cartes-1, .jdc-cartes-2 {
        height: auto !important;
        aspect-ratio: 884 / 715 !important;
    }

    .jdc-bloc-2 {
        aspect-ratio: auto !important;
        height: auto !important;
        gap: 30px !important;
        align-items: center;
    }

    .jdc-mockup-boite {
        height: auto !important;
        aspect-ratio: 994 / 746 !important;
    }

    .jdc-zone-emotion {
        height: auto !important;
        aspect-ratio: 510 / 477 !important;
    }

    .jdc-others-section {
        margin: 60px auto 80px !important;
    }

    .jdc-selection {
        aspect-ratio: auto !important;
        height: auto !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 12px !important;
    }

    .jdc-selection-card {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 478 / 650 !important;
    }
    
    .jdc-selection-label {
        font-size: 14px !important;
        top: 15px !important;
        right: 15px !important;
        padding: 3px 8px !important;
    }
}

/* 3. Mobiles (up to 767px) */
@media (max-width: 767px) {
    .jdc-layout-container {
        padding: 0 16px;
        gap: 40px;
    }

    .jdc-hero {
        height: 75vh !important;
        min-height: 480px !important;
        padding: 0 10px 24px !important;
    }

    .jdc-descriptif {
        max-width: 100% !important;
        padding: 20px 16px !important;
    }

    .jdc-descriptif-text {
        font-size: clamp(11px, 3.2vw, 13px) !important;
        line-height: 1.4em !important;
    }

    .jdc-bloc-1 {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .jdc-cartes-1, .jdc-cartes-2 {
        width: 100% !important;
    }

    .jdc-bloc-2 {
        flex-direction: column !important;
        gap: 24px !important;
    }

    .jdc-mockup-boite {
        width: 100% !important;
    }

    .jdc-zone-emotion {
        width: 80% !important;
        max-width: 340px !important;
    }

    .jdc-others-section {
        margin: 40px auto 60px !important;
    }

    .jdc-selection {
        flex-direction: column !important;
        display: flex !important;
        gap: 16px !important;
    }

    .jdc-selection-card {
        width: 100% !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;
    }
}

