/* Specific styles for the Myia project page */

.myia-project-container {
    position: relative;
    z-index: 10;
    background-color: #ffffff;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 90px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 56px;
    box-sizing: border-box;
}

/* SECTION 1: HERO (FIGMA PRECISE LAYOUT) */
.myia-hero-figma {
    position: relative;
    width: 100%;
    height: 781px;
    overflow: visible;
    background: transparent;
    z-index: 1;
}

.hero-myia {
    position: absolute;
    width: 1526px;
    height: 781px;
    left: 50%;
    transform: translateX(-50%);
    top: 0px;
    z-index: 2; /* Devant le fond */
}

.Fond-hero-Myia {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-image: url('../04- Myia/hero myia/fond header myia.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.Logo-Myia-white {
    position: absolute;
    width: 438px;
    height: 242px;
    left: 521px;
    top: 126px;
    background-image: url('../04- Myia/Logo-Myia-white.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.mascotte-myia {
    position: absolute;
    width: 358px;
    height: 251px;
    right: 60px;
    top: 488px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    z-index: 2; /* Confined to hero, floats behind hero content */
    opacity: 0;
    transition: opacity 0.5s ease;
}

.mascotte-myia:active {
    cursor: grabbing;
}

.mascotte-myia-inner {
    position: absolute;
    width: 332px;
    height: 225px;
    left: 13px;
    top: 13px;
    background-image: url('../04- Myia/hero myia/mascottes-myia.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.0096)) 
            drop-shadow(0px 10px 18px rgba(0, 0, 0, 0.012)) 
            drop-shadow(0px 18px 56px rgba(0, 0, 0, 0.024));
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), filter 0.2s ease;
}

.mascotte-myia-inner:hover {
    transform: translateY(-5px) scale(1.02);
}

.mascotte-myia.dragging .mascotte-myia-inner {
    transform: scale(1.08) translateY(-10px);
    filter: drop-shadow(0px 15px 25px rgba(0, 0, 0, 0.12)) 
            drop-shadow(0px 30px 50px rgba(0, 0, 0, 0.08));
}
.Introduction {
    /* Auto layout */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0px;
    gap: 10px;

    position: absolute;
    width: 430px;
    height: 376px;
    left: 548.59px;
    top: 390px;
    z-index: 10;
}

.Descriptif {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px 20px;
    box-sizing: border-box;
    gap: 10px;
    width: 430px;
    height: auto;
    background: #FFFFFF;
    border: 1px solid #000000;
    cursor: pointer;
}

.myia-text-content {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.myia-text-content p {
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    color: #101010;
    margin: 0;
    text-align: left;
}

.Descriptif strong {
    font-weight: 600;
}

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

.bouton-tout-voir img {
    width: 22px;
    height: 13px;
    display: block;
}

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

/* SECTION 2: GRID (liste-myia style grid) */
.myia-grid-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1434px;
    margin: 0 auto;
}

.myia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 14px; /* vertical gap 20px, horizontal gap 14px */
    width: 100%;
}

.myia-card {
    position: relative;
    width: 100%;
    aspect-ratio: 710 / 532.5;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.myia-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.myia-card:hover .myia-card-bg {
    transform: scale(1.05);
}

/* SECTION 3: MOCKUP DEVICE FRAME WITH EMBEDDED MAQUETTE VIDEO */
.myia-mockup-section {
    width: 100vw;
    height: 800px;
    margin-top: 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background-image: url('../04-%20Myia/fond%20myia.webp');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.myia-mockup-container {
    width: 100%;
    max-width: 1432px;
    height: 647px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.myia-mockup-device {
    position: absolute;
    width: 1106px;
    height: 647px;
    left: 50%;
    top: 0px;
    margin-left: -553px; /* center 1106px */
    background-image: url('../04- Myia/mockup-ordi.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
}

.myia-mockup-screen {
    position: absolute;
    /* Centered: device centered at 50%, screen is 122px inside device from left */
    width: 862.43px;
    height: 539px;
    left: 50%;
    margin-left: -431px; /* center 862.43px */
    top: 45px;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
    z-index: 5;
}

.myia-mockup-screen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLETTE (768–1024px) : scaling Unbottled-style
   La hero entière est scalée proportionnellement à la largeur de l'écran
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Conteneur principal */
    .myia-project-container {
        padding: 40px 10px 0 !important;
        gap: 30px !important;
    }



    /* Grille : 2 colonnes mais compactes */
    .myia-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Mockup laptop : proportionnel, sans fond coloré */
    .myia-mockup-section {
        position: relative !important;
        width: calc(100% - 20px) !important;
        max-width: 760px !important;
        height: auto !important;
        aspect-ratio: 1106 / 647 !important;
        background: transparent !important;
        background-image: none !important;
        margin: 40px auto 60px !important;
        left: auto !important;
        transform: none !important;
        overflow: visible !important;
    }

    .myia-mockup-container {
        position: absolute !important;
        height: 100% !important;
        width: 100% !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

    .myia-mockup-device {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        left: 0 !important;
        top: 0 !important;
        margin-left: 0 !important;
    }

    .myia-mockup-screen {
        position: absolute !important;
        width: 78.19% !important;
        height: 84.85% !important;
        left: 10.9% !important;
        top: 6.04% !important;
        margin-left: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLETTE & TÉLÉPHONE (≤ 1024px) : layout vertical empilé
   Logo centré en haut, mascotte coin droit, descriptif collé en bas
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .myia-project-container {
        padding: 40px 10px 20px !important;
        gap: 30px !important;
    }

    /* Grille en 1 colonne uniquement sous 767px (téléphone) */
    @media (max-width: 767px) {
        .myia-grid {
            grid-template-columns: 1fr !important;
        }
        .myia-card {
            max-width: 100% !important;
            border-radius: 0px !important;
        }
    }

    /* Hero : hauteur fixe en vh */
    .myia-hero-figma {
        position: relative !important;
        width: 100% !important;
        height: 85vh !important;
        min-height: 590px !important;
        overflow: visible !important;
    }

    /* Conteneur interne : plein écran, pas de scale */
    .hero-myia {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 2 !important;
        display: block !important;
    }

    /* Fond plein écran */
    .Fond-hero-Myia {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 1 !important;
    }

    /* Logo MyIA : centré, dans la moitié haute */
    .Logo-Myia-white {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: 12px !important;
        width: 85% !important;
        max-width: 320px !important;
        height: calc(100% - 370px) !important;
        background-size: contain !important;
        background-position: top center !important;
        background-repeat: no-repeat !important;
        z-index: 5 !important;
    }

    /* Mascotte : absolute, positioning controlled by JS */
    .mascotte-myia {
        position: absolute !important;
        width: 130px !important;
        height: 91px !important;
        z-index: 2 !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        touch-action: none !important;
    }


    .mascotte-myia-inner {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        left: 0 !important;
        top: 0 !important;
    }

    /* Descriptif : collé en bas de la hero */
    .Introduction {
        position: absolute !important;
        bottom: 0px !important;
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 40px) !important;
        max-width: 420px !important;
        height: auto !important;
        z-index: 100 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .Descriptif {
        width: 100% !important;
        height: auto !important;
        background-color: #ffffff !important;
        background-image: none !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;
    }

    .myia-text-content {
        width: 100% !important;
        height: auto !important;
    }

    .myia-text-content p {
        font-size: clamp(10px, 3.2vw, 14px) !important;
        line-height: 1.45em !important;
        margin: 0 !important;
    }

    /* Grille 1 colonne */
    .myia-grid {
        grid-template-columns: 1fr !important;
    }

    .myia-card {
        max-width: 100% !important;
        border-radius: 0px !important;
    }

    /* Mockup laptop proportionnel sans fond */
    .myia-mockup-section {
        position: relative !important;
        width: calc(100% - 40px) !important;
        max-width: 540px !important;
        height: auto !important;
        aspect-ratio: 1106 / 647 !important;
        background: transparent !important;
        background-image: none !important;
        margin: 20px auto 40px !important;
        left: auto !important;
        transform: none !important;
        overflow: visible !important;
        cursor: pointer !important;
    }

    .myia-mockup-container {
        position: absolute !important;
        height: 100% !important;
        width: 100% !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

    .myia-mockup-device {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        left: 0 !important;
        top: 0 !important;
        margin-left: 0 !important;
    }

    .myia-mockup-screen {
        position: absolute !important;
        width: 78.19% !important;
        height: 84.85% !important;
        left: 10.9% !important;
        top: 6.04% !important;
        margin-left: 0 !important;
    }
}

/* Lightbox réutilisée depuis rocabruna */
.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;
    }
}

/* =========================================
   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;
    }
}

/* Mobile & Tablet overrides (stacked vertical flow up to 1024px) */
@media (max-width: 1024px) {
    .myia-project-container {
        padding-bottom: 20px !important;
    }
    
    /* Grid in 1 column only under 767px (mobile) */
    @media (max-width: 767px) {
        .myia-grid {
            grid-template-columns: 1fr !important;
        }
        .myia-card {
            max-width: 100% !important;
            border-radius: 0px !important;
        }
    }

    .myia-hero-figma {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .hero-myia {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 30px !important;
        padding: 120px 20px 60px !important;
        box-sizing: border-box !important;
    }
    .Fond-hero-Myia {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        margin-top: 0 !important;
        z-index: 1 !important;
    }
    .Logo-Myia-white {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 85% !important;
        max-width: clamp(320px, 45vw, 500px) !important; /* Dynamically sizes on tablet & mobile */
        aspect-ratio: 438 / 242 !important;
        height: auto !important;
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        z-index: 5 !important;
        margin: 0 auto !important;
    }
    .mascotte-myia {
        position: absolute !important;
        width: 220px !important;
        height: 154px !important;
        z-index: 2 !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        touch-action: none !important;
    }
    .mascotte-myia-inner {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        left: 0 !important;
        top: 0 !important;
    }
    .Introduction {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 650px !important; /* Wider on tablet for beautiful typography flow */
        height: auto !important;
        z-index: 100 !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
    }
     @media (max-width: 767px) {
        .Introduction {
            max-width: 420px !important; /* Enforces mobile typography limit */
        }
        .mascotte-myia {
            width: 130px !important;
            height: 91px !important;
        }
    }
    .Descriptif {
        width: 100% !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;
    }
    .myia-text-content {
        width: 100% !important;
        height: auto !important;
    }
    .myia-text-content p {
        font-size: clamp(10px, 3.2vw, 14px) !important;
        line-height: 1.45em !important;
        margin: 0 !important;
    }
}


