/* --- ABOUT PAGE CUSTOM CSS --- */
.about-section {
    padding: 15rem 5% 15rem;
    max-width: 1400px;
    margin: 0 auto;
    color: #fff;
}
.about-header {
    margin-bottom: 2.5rem;
    text-align: left;
}
.about-subtitle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    letter-spacing: 5px;
}
.about-title {
    font-family: 'Helvetica Neue', 'Arial Black', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin: 0;
    line-height: 1;
}
.about-content-wrapper {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 5rem;
    align-items: center;
}
.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    aspect-ratio: 4 / 5;
}
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.about-image:hover img {
    transform: scale(1.05);
}
.about-image::after {
    content: '';
    position: absolute;
    top: 20px; right: 20px;
    width: 100px; height: 100px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    opacity: 0.5;
    transform: translate(-10px, 10px);
    transition: transform 0.5s ease;
}
.about-image:hover::after {
    transform: translate(10px, -10px);
}
.about-text-content {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #ddd;
    text-align: left;
    padding-top: 3rem;
    position: relative;
    z-index: 1;
}
.about-text-content p:first-child {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2rem;
}
.about-text-content p {
    margin-bottom: 1.5rem;
}
.bg-accent {
    position: absolute;
    top: -10%;
    right: -10%;
    font-size: 15rem;
    color: rgba(255,255,255,0.02);
    font-weight: 900;
    z-index: 0;
    pointer-events: none;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .about-content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .about-text-content {
        padding-top: 0;
        text-align: center;
    }
    .about-image {
        box-shadow: none;
    }
    .bg-accent {
        display: none;
    }
    .about-title { font-size: 3rem; }
    .about-section { padding: 10rem 20px 8rem; }
}

.media-item:hover img, 
.media-item:hover video {
    transform: scale(1.05);
}

/* --- LIFESTYLE VIDEOS CUSTOM CSS --- */

.lifestyle-section {
    padding: 12rem 5% 10rem;
    max-width: 1200px; /* Better for vertical */
    margin: 0 auto;
    color: #fff;
}
.lifestyle-header {
    margin-bottom: 5rem;
    text-align: center;
}
.lifestyle-subtitle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    letter-spacing: 5px;
}
.lifestyle-title {
    font-family: 'Helvetica Neue', 'Arial Black', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin: 0;
    line-height: 1;
}

/* --- AFFICHAGE MASONRY & GRID  --- */
.video-grid {
    display: block;
    column-count: 3;
    column-gap: 1.5rem;
    width: 100%;
}
.video-thumb-container {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    
    min-height: 250px;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    background: #111;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-thumb-container[data-landscape="true"] {
    aspect-ratio: 16 / 9;
}

.video-thumb-container:not([data-landscape="true"]) {
    aspect-ratio: 9 / 16;
}

@media (max-width: 900px) { .video-grid { column-count: 2; } }
@media (max-width: 600px) { .video-grid { column-count: 1; } }

.video-thumb-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.video-thumb-container iframe {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-thumb-container:hover .video-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    padding-left: 5px;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-content {
    width: 100%;
    height: auto;
    max-width: 90vw; 
    max-height: 90vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: relative;
    overflow: hidden;
    background: #000;
}

.lightbox-content iframe {
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border-radius: 10px;
    background: #000;
    display: none;
    border: 0;
    outline: 0;
}

/* Video-only lightbox rendering fixes */
.lightbox-content.is-video {
    background: #000;
}

.lightbox-content.is-video iframe {
    border-radius: 0;
    background: #000;
}

/* Portrait and square videos are more prone to side artifacts */
.lightbox-content.is-video.is-portrait iframe,
.lightbox-content.is-video.is-square iframe {
    top: 0;
    left: -2px;
    width: calc(100% + 4px);
    height: 100%;
    transform: translateZ(0);
    -webkit-transform: translate3d(0, 0, 0);
}

.lightbox-content.is-video.is-portrait::before,
.lightbox-content.is-video.is-portrait::after,
.lightbox-content.is-video.is-square::before,
.lightbox-content.is-video.is-square::after {
    content: "";
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: #000;
    z-index: 20;
    pointer-events: none;
}

.lightbox-content.is-video.is-portrait::before,
.lightbox-content.is-video.is-square::before {
    left: 0;
}

.lightbox-content.is-video.is-portrait::after,
.lightbox-content.is-video.is-square::after {
    right: 0;
}

.lightbox-content img#lightbox-img { 
    max-width: 100vw; 
    max-height: 90vh; 
    object-fit: contain; 
    border-radius: 5px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); 
    display: none;
}
.video-thumb-container, .video-thumb-container iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Center single videos in the grid */
.video-grid:has(.video-thumb-container:only-child) {
    display: flex;
    justify-content: center;
    column-count: unset;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}
.video-grid:has(.video-thumb-container:only-child) .video-thumb-container {
    width: 100%;
}

/* If there are 2 videos, maybe center them too? */
.video-grid:has(.video-thumb-container:nth-last-child(2):first-child) {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    column-count: unset;
}
.video-grid:has(.video-thumb-container:nth-last-child(2):first-child) .video-thumb-container {
    width: calc(50% - 0.75rem);
    max-width: 600px;
}

@media (max-width: 900px) {
    .video-thumb-container[data-img]:hover .video-overlay {
        display: none !important;
    }
}

.play-icon.play-icon-video {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    padding-left: 2px;
}
.play-icon.play-icon-video svg {
    width: 14px;
    height: 14px;
}

.video-overlay {
    background: transparent !important;
}

.play-icon.play-icon-video {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.3) !important;
    padding: 0 !important;
    margin: 0 !important;
}

.play-icon.play-icon-video svg {
    width: 20px !important;
    height: 20px !important;
    opacity: 0.4 !important;
    transition: opacity 0.3s ease;
}

.play-icon.play-icon-video:hover svg {
    opacity: 0.8 !important;
}

@media (max-width: 768px) {
    /* Avoid sub-pixel gaps on rounded Vimeo embeds on mobile */
    .video-thumb-container {
        background: #000;
        -webkit-mask-image: -webkit-radial-gradient(white, black);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .video-thumb-container iframe {
        top: -2px;
        left: -2px;
        width: calc(100% + 4px);
        height: calc(100% + 4px);
        display: block;
        border: 0;
        background: #000;
        transform: scale(1.04);
        transform-origin: center center;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    /* Extra crop for landscape cards to hide persistent top/bottom lines */
    .video-thumb-container[data-landscape="true"] iframe {
        top: -8% !important;
        left: -3% !important;
        width: 106% !important;
        height: 116% !important;
        transform: none !important;
    }

    /* Hard mask to hide any remaining 1-2px white lines on mobile */
    .video-thumb-container[data-landscape="true"]::before,
    .video-thumb-container[data-landscape="true"]::after {
        content: "";
        position: absolute;
        left: 0;
        width: 100%;
        height: 6px;
        background: #000;
        z-index: 3;
        pointer-events: none;
    }

    .video-thumb-container[data-landscape="true"]::before {
        top: 0;
    }

    .video-thumb-container[data-landscape="true"]::after {
        bottom: 0;
    }
}

@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        /* iPhone Safari fallback: force black top/bottom and crop iframe internals */
        .video-thumb-container[data-landscape="true"] {
            background: #000 !important;
        }

        .video-thumb-container[data-landscape="true"] iframe {
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
            background: #000 !important;
            clip-path: inset(8px 0 8px 0);
        }

        .video-thumb-container[data-landscape="true"]::before,
        .video-thumb-container[data-landscape="true"]::after {
            height: 8px !important;
            background: #000 !important;
            z-index: 99 !important;
        }
    }
}

@media (max-width: 768px) {
    /* Exact sizing: container follows the iframe dimensions on mobile */
    .video-thumb-container[data-landscape="true"] {
        aspect-ratio: auto !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: hidden !important;
        background: #000 !important;
    }

    .video-thumb-container[data-landscape="true"] iframe {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        display: block !important;
        transform: none !important;
        clip-path: none !important;
    }

    .video-thumb-container[data-landscape="true"]::before,
    .video-thumb-container[data-landscape="true"]::after {
        display: none !important;
    }
}
