html,body, * {
    overscroll-behavior: none;
}

body {
    overscroll-behavior-y: auto;
    background-color: black;
    color: white;
}


.work-videos {
    overscroll-behavior-y: contain; /* ne pas capturer/outrepasser le scroll horizontal au détriment du vertical */
    touch-action: pan-y; /* mobile: autorise le défilement vertical naturel */
    scroll-behavior: smooth;
}

/* Amélioration pour permettre le scroll vertical même sur les carrousels horizontaux */
.work-videos:hover {
    overscroll-behavior-y: auto;
}

/* S'assurer que le scroll vertical fonctionne même quand on survole les éléments de scroll horizontal */
.work-videos * {
    pointer-events: auto;
}

.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}


/* Iframe Vimeo responsive dans les conteneurs vidéo */
.video-container .video-player-container iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Animation du loader */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-loader-spinner {
    animation: spin 0.8s linear infinite;
}

.video-loader.active {
    display: flex !important;
}

/* État : Vidéo en lecture */
.video-container.video-active .video-thumbnail,
.video-container.video-active .video-click-overlay {
    display: none !important;
}

.video-container.video-active .video-player-container {
    display: block !important;
    z-index: 15;
}

/* Modal vidéo - États et comportements spécifiques */
.video-modal.active {
    display: flex !important;
    opacity: 1 !important;
}

.video-modal-side.disabled {
    opacity: 0.2 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Iframe vidéo dans le modal */
.modal-video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* Horizontal scroll */

.work-sections {
    position: sticky;
    overflow: hidden;
    top: calc( (var(--section-index, 0) * 68px) + 29px );
  }

@media (max-width: 767px) {
    .work-sections {
        top: calc( (var(--section-index, 0) * 60px) + 90px );
    }
}
  
  .work-videos {
    display: flex;
    will-change: transform;
  }
  
  /* Fix black frames on videos inside transformed/pinned containers (Safari/Chrome) */
  .work-videos .video-container,
  .work-videos .video-preview {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
  }
  
  .work-videos .video-preview {
    contain: paint;
  }
  
  .work-title {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
    color: white;
  }


/* Menu */

/* Styles pour le menu principal */
.primary-nav .menu a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    padding: 0.25rem 0;
}

/* Logo */
.site-branding img,
.custom-logo-link img {
    width: auto;
    height: auto;
}

/* Talents Page */
#talentsPageList ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#talentsPageList a {
    text-decoration: none;
}

/* Ombre pour les sections */
.section-top-shadow {
    box-shadow: 0 -2px 3px -1px rgba(255, 255, 255, 0.25);
}

/* Animation for talents list */
.talent-item {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.talent-item.is-visible {
    opacity: 1;
}

/* Homepage Editor Carousel Stack */
.editor-videos-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.editor-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: transform 1s cubic-bezier(0.87, 0, 0.13, 1), opacity 1s cubic-bezier(0.87, 0, 0.13, 1);
    transform: translateX(0);
    will-change: transform, opacity;
}

.editor-video.is-previous {
    transform: translateX(-100%);
    pointer-events: none;
}

.editor-video.hidden {
    display: none;
}

.editor-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Editor video titles visibility */
.editor-video .scaling-wrapper .title-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.editor-video.active .scaling-wrapper .title-container {
    opacity: 1;
    visibility: visible;
}

/* Transition fluide pour les flèches de navigation quand les sections se recouvrent */
.carousel-arrows-container {
    transition: opacity 300ms ease-in-out;
  }


@media (width < 59.375rem) {
  .primary-nav .menu-item:last-child {
    display: none !important;
  }
}

/* Override Tailwind md: breakpoint for header layout - mobile jusqu'à 950px */
@media (width >= 48rem) and (width < 59.375rem) {
  /* Garder le layout mobile pour le header */
  header {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    padding-inline: calc(var(--spacing) * 2.5) !important;
  }
  
  /* Logo reste sur 2 colonnes */
  header .col-span-2.md\:col-span-9 {
    grid-column: span 2 / span 2 !important;
  }
  
  /* Navigation reste à la position mobile */
  header .col-span-3.col-start-4.md\:col-start-10 {
    grid-column: span 3 / span 3 !important;
    grid-column-start: 4 !important;
  }
}

@media (max-width: 1024px) {
    .video-modal-content {
        justify-content: center;
    }
    .video-modal-main {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .video-modal-info {
        padding: 0 0.5rem;
    }
}
  