/* =========================================
   BASE ET TYPOGRAPHIE
========================================= */
body {
    margin: 0;
    padding: 15px;
    background-color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    color: #F5F5F5;
    scrollbar-width: none; /* Cache la barre sur Firefox */
}

/* Cache la barre sur Chrome, Safari et Edge */
body::-webkit-scrollbar {
    display: none;
}

a {
    cursor: pointer;
}

/* =========================================
   MENUS ET NAVIGATION (Top Nav)
========================================= */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    background-color: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 40px;
    border-bottom: 1px solid #333333;
    transition: padding 0.35s ease;
}

.top-nav.is-top,
.top-nav:hover {
    padding: 14px 40px;
}

.nav-link {
    font-size: 14px;
    font-weight: 300;
    color: #888888;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.4s ease, letter-spacing 0.4s ease;
}

.nav-link:hover {
    color: #ffffff;
    letter-spacing: 2px;
}

.custom-title {
    height: 46px;
    width: auto;
    max-width: 70vw;
    display: block;
    transition: height 0.35s ease, opacity 0.3s ease;
}

.top-nav.is-top .custom-title,
.top-nav:hover .custom-title {
    height: 66px;
}

.nav-img {
    height: 19px;
    width: auto;
    display: block;
    filter: invert(1);
    opacity: 0.55;
    transition: height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
}

.top-nav.is-top .nav-img,
.top-nav:hover .nav-img {
    height: 30px;
}

.nav-link:hover .nav-img {
    opacity: 1;
    transform: scale(1.04);
}

/* =========================================
   GALERIE PRINCIPALE ET SOUS-GALERIES
========================================= */
.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15vh;
    margin-top: 60px;
    padding: 0 5vw 15vh 5vw;
}

.photo-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    max-width: 78vw;
    margin-left: auto;
    margin-right: auto;
}

/* Règle générale pour toutes les galeries (sous-pages incluses) */
.photo-item img,
.photo-item video {
    width: 100%;
    max-height: 95vh;
    object-fit: contain;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    transition: opacity 0.3s ease;
    border: 2px solid #ffffff;
    box-sizing: border-box;
}

/* Adaptation du cadre sur archives.html (.media-link) */
.photo-item > .media-link {
    position: relative;
    display: block;
    width: auto;
    max-width: 100%;
}

.photo-item > .media-link img:not(.sticker-overlay) {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 78vh;
    display: block;
    border: 2px solid #ffffff;
    box-sizing: border-box;
}

/* --- EFFET PILE DE PHOTOS --- */
.photo-item a img {
    box-shadow: 4px 4px 0px #000000, 6px 6px 0px #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item a:hover img {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000000, 8px 8px 0px #ffffff;
    opacity: 0.8;
}

.photo-caption {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: #888888;
    margin-top: 15px;
    margin-bottom: 0;
    letter-spacing: 1px;
    text-align: left;
    width: 0;
    min-width: 100%;
}

.photo-item img.photo-caption-img {
    height: 28px;
    width: auto;
    max-width: 100%;
    display: block;
    margin-top: 14px;
    border: none !important;
    box-shadow: none !important;
    filter: invert(1);
}

/* --- LE STICKER --- */
.media-link {
    position: relative;
    display: block;
}

.photo-item img.sticker-overlay {
    position: absolute;
    top: -25px;
    left: -25px;
    width: 120px !important;
    height: 120px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 4px solid #F4F4F4 !important;
    box-shadow: 2px 5px 8px rgba(0,0,0,0.2) !important;
    z-index: 10;
    transform: rotate(-8deg);
    transition: transform 0.3s ease;
}

.media-link:hover img.sticker-overlay {
    transform: rotate(0deg) scale(1.1);
}

/* =========================================
   STYLE DU DIPTYQUE (2 PHOTOS - GRAND FORMAT)
========================================= */
.photo-item.diptyque {
    width: 100%;
    max-width: 86vw !important;
}

.diptyque-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2vw;
    width: 100%;
}

.diptyque-wrapper .media-link {
    width: 49%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diptyque-wrapper .media-link img,
.diptyque-wrapper .media-link video {
    width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* =========================================
   BLOC DE 4 PHOTOS (QUATUOR 2x2)
========================================= */
.photo-item.quatuor {
    max-width: 750px;
}

.quatuor-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    justify-items: center;
    gap: 15px;
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
}

.quatuor-wrapper .media-link {
    display: block;
    width: 100%;
}

.quatuor-wrapper img:not(.sticker-overlay),
.quatuor-wrapper video {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 48vh;
    display: block;
    margin: 0 auto;
    border: 2px solid #ffffff;
    box-sizing: border-box;
}

/* =========================================
   VIDÉOS ET BOUTON PLAY / STOP
========================================= */
.video-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.video-wrapper video {
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    border: 2px solid #ffffff;
    box-sizing: border-box;
    background-color: transparent;
    cursor: pointer;
}

.video-toggle-btn {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 10;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.video-toggle-btn:hover {
    transform: scale(1.08);
    opacity: 0.85;
}

.photo-item img.video-toggle-icon,
.video-toggle-icon {
    height: 26px !important;
    width: auto !important;
    max-height: none !important;
    display: block;
    border: none !important;
    box-shadow: none !important;
    filter: invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
    user-select: none;
    -webkit-user-drag: none;
}

/* =========================================
   NAVIGATION FLOTTANTE (Haut)
========================================= */
.scroll-nav {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 100;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid #333333;
}

.nav-btn {
    font-size: 12px;
    font-weight: 300;
    color: #888888;
    cursor: pointer;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    user-select: none;
}

.nav-btn:hover {
    color: #ffffff;
}

/* =========================================
   PAGE THINK
========================================= */
.think-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 70px;
    width: 100%;
    padding: 50px 20px 100px;
    box-sizing: border-box;
}

.think-center img {
    display: block;
    margin: 0 auto;
    max-width: 900px;
    width: 90%;
    max-height: 82vh;
    height: auto;
    object-fit: contain;
}

/* ==========================================
   PAGE PORTAIL / TITRE (INDEX)
========================================== */
body.portal-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.portal-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.portal-title {
    width: min(560px, 82vw);
    height: auto;
    display: block;
    filter: invert(1);
}

.portal-link:hover {
    transform: scale(1.03);
    opacity: 1;
}

/* =========================================
   LIGHTBOX & SOUS-PAGES (Expositions / Library / Then?)
========================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(232, 223, 223, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 65vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0px 15px 40px rgba(0, 0, 0, 0.1);
}

.lightbox.active img {
    transform: scale(1);
}

.grid-gallery {
    column-count: 5;
    column-gap: 15px;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 15px;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    transition: opacity 0.3s ease;
    cursor: zoom-in;
}

.grid-item img:hover {
    opacity: 0.7;
}

.library-feed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 150px;
    margin-top: 60px;
    padding: 0 5vw;
}

.library-feed .photo-item {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
}

.library-feed img,
.library-feed video {
    width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    transition: opacity 0.3s ease;
}

.library-feed a:hover img {
    opacity: 0.8;
}

.library-feed .photo-caption {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: #888888;
    margin-top: 15px;
    margin-bottom: 0;
    letter-spacing: 1px;
    text-align: left;
}

.minimal-player {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 150px;
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    color: #E8DFDF;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0.3;
    transform: scale(0.9);
    transform-origin: bottom left;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.minimal-player:hover {
    opacity: 1;
    transform: scale(1);
}

.player-info { margin-bottom: 10px; }
.now-playing {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888888;
    display: block;
    margin-bottom: 3px;
}
.track-name {
    font-size: 11px;
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.player-btn {
    background: none;
    border: 1px solid #555555;
    color: #E8DFDF;
    padding: 3px 6px;
    font-size: 9px;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.player-btn:hover {
    background: #E8DFDF;
    color: #1a1a1a;
}
.special-btn {
    border-color: #E8DFDF;
    font-style: italic;
    margin-left: auto;
}
.special-btn.active {
    background: #E8DFDF;
    color: #1a1a1a;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.vol-label {
    font-size: 8px;
    color: #888888;
}
.vol-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    background: #555555;
    outline: none;
    height: 2px;
}
.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #E8DFDF;
    cursor: pointer;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.playlist-container {
    border-top: 1px solid #333333;
    padding-top: 10px;
}
.playlist-title {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888888;
    margin-bottom: 6px;
}
.track-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 60px;
    overflow-y: auto;
}
.track-list li {
    font-size: 10px;
    font-weight: 300;
    color: #888888;
    padding: 3px 0;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-list li:hover, .track-list li.active-track { color: #E8DFDF; }
.track-list::-webkit-scrollbar { width: 0px; background: transparent; }

.then-body {
    background-color: #E8DFDF;
    margin: 0;
    overflow-x: hidden;
}

.then-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    padding: 0 10vw;
    gap: 8vw;
}

.then-artwork {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.then-artwork img {
    width: 100%;
    max-width: 450px;
    box-shadow: 15px 20px 40px rgba(0,0,0,0.15);
    border-radius: 4px;
}

.then-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.then-title {
    font-size: 100px;
    font-weight: 200;
    letter-spacing: -4px;
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.then-credits {
    font-size: 13px;
    color: #888888;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.then-tracklist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 350px;
}

.then-tracklist li {
    font-size: 14px;
    font-weight: 300;
    color: #1a1a1a;
    padding: 12px 0;
    border-bottom: 1px solid #cccccc;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
}

.then-tracklist li span {
    color: #888888;
    font-size: 12px;
}

.then-tracklist li:hover {
    padding-left: 15px;
    color: #888888;
    border-bottom: 1px solid #1a1a1a;
}

/* =========================================
   RESPONSIVE (Tablette & Mobile)
========================================= */
@media (max-width: 1000px) {
    .grid-gallery { column-count: 3; }
    .lightbox img { max-width: 85vw; }
}

@media (max-width: 900px) {
    .then-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 40px 5vw;
    }
    .then-artwork { justify-content: center; }
    .then-info { align-items: center; }
    .then-title { font-size: 70px; }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 8px 16px;
    }

    .top-nav.is-top,
    .top-nav:hover {
        padding: 14px 16px;
    }

    .custom-title {
        height: 34px;
    }

    .top-nav.is-top .custom-title,
    .top-nav:hover .custom-title {
        height: 55px;
    }

    .nav-img {
        height: 16px;
    }

    .top-nav.is-top .nav-img,
    .top-nav:hover .nav-img {
        height: 22px;
    }

    .gallery {
        padding-left: 14px;
        padding-right: 14px;
        gap: 50px;
    }

    .photo-item > .media-link img:not(.sticker-overlay),
    .video-wrapper video {
        max-height: 75vh;
    }

    .diptyque-wrapper {
        flex-direction: column;
        gap: 5vh;
    }

    .diptyque-wrapper .media-link {
        width: 100%;
    }

    .diptyque-wrapper .media-link img,
    .diptyque-wrapper .media-link video {
        max-height: 70vh;
    }

    .quatuor-wrapper {
        gap: 8px;
    }

}

@media (max-width: 600px) {
    .grid-gallery { column-count: 2; column-gap: 8px; }
    .grid-item { margin-bottom: 8px; }
    .lightbox img { max-width: 95vw; }
}
/* =========================================
   BARRE DU HAUT CENTRÉE (SOUS-GALERIES)
========================================= */
.top-nav.top-nav-center {
    justify-content: center;
}
/* =========================================
   CORRECTIF CADRE PHOTOS VERTICALES
========================================= */
.gallery .photo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery .photo-item .media-link {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: auto;
    max-width: 100%;
}

.gallery .photo-item .media-link > img:not(.sticker-overlay) {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 85vh;
    object-fit: unset;
    display: block;
    border: 2px solid #ffffff;
    box-sizing: border-box;
}

.gallery .diptyque-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.gallery .diptyque-wrapper .media-link {
    flex: 0 1 auto;
    max-width: calc(50% - 10px);
}

.gallery .diptyque-wrapper .media-link > img:not(.sticker-overlay) {
    max-height: 80vh;
}
/* =========================================
   VIDÉOS EN MODE GIF (SANS PLAYER)
========================================= */
.gallery video.video-gif {
    pointer-events: none;
}

.gallery video.video-gif::-webkit-media-controls,
.gallery video.video-gif::-webkit-media-controls-enclosure,
.gallery video.video-gif::-webkit-media-controls-panel,
.gallery video.video-gif::-webkit-media-controls-play-button,
.gallery video.video-gif::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

.gallery .video-wrapper.is-gif img,
.gallery .video-wrapper.is-gif svg,
.gallery .video-wrapper.is-gif span,
.gallery .video-wrapper.is-gif div,
.gallery .video-wrapper.is-gif::before,
.gallery .video-wrapper.is-gif::after {
    display: none !important;
}
.gallery img[src*="1803874839259409.jpg"] {
    filter: invert(1);
}