/* Page Entreprise */
.entreprise-main {
    min-height: 100vh;
    background-color: #f5f5f5;
    padding-top: 80px;
}

.entreprise-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.entreprise-content {
    max-width: 100%;
    margin: 0;
    padding: 30px 60px 15px 60px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
}

.entreprise-left {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 40px;
}

.entreprise-label {
    font-size: 64px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.5px;
}

.entreprise-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 1px;
    white-space: nowrap;
}

.entreprise-right {
    flex: 1;
    padding-left: 40px;
    padding-right: 60px;
    padding-top: 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.entreprise-intro {
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    font-weight: 300;
    text-align: left;
    max-width: 500px;
}

.entreprise-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0;
    letter-spacing: 1px;
    white-space: nowrap;
}

.entreprise-text {
    margin-bottom: 100px;
}

.entreprise-intro strong {
    font-weight: 600;
}

/* Bandeau image */
.entreprise-banner {
    width: 100%;
    margin-top: 60px;
    padding: 0;
    max-height: 400px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 400px;
    display: block;
    object-fit: cover;
}

/* Section Manifeste */
.manifeste-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 60px 80px;
}

.manifeste-title {
    font-size: 48px;
    font-weight: 400;
    font-style: italic;
    color: #1a1a1a;
    margin-bottom: 50px;
    margin-left: -60px;
}

.manifeste-content {
    max-width: 1200px;
}

.manifeste-text {
    font-size: 15px;
    line-height: 1.8;
    color: #1a1a1a;
    font-weight: 300;
    margin-bottom: 30px;
}

.manifeste-text strong {
    font-weight: 600;
}

/* Bandeau blanc production */
.production-banner {
    background-color: #ffffff;
    padding: 60px 80px;
    margin-top: 80px;
}

.production-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.production-text {
    flex: 1;
    text-align: center;
}

.production-title {
    font-size: 32px;
    font-weight: 700;
    color: #4a4a4a;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.production-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 2px;
}

.production-logo {
    flex: 0 0 auto;
    padding-left: 40px;
}

.production-logo img {
    height: 120px;
    width: auto;
}

/* Bandeau 3 images cliquables */
.images-banner {
    display: flex;
    width: 100%;
    gap: 0;
    margin-top: 0;
}

.image-card {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.image-card:hover::before {
    background-color: rgba(0, 0, 0, 0.5);
}

.image-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.4s ease;
}

.image-card:hover img {
    transform: scale(1.05);
    opacity: 0;
}

/* Vidéo intégrée dans la carte */
.card-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.image-card:hover .card-video {
    opacity: 1;
}

/* Lightbox vidéo */
.video-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.video-lightbox.active {
    display: flex;
}

.video-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: color 0.2s;
}

.video-lightbox-close:hover {
    color: #ccc;
}

.video-lightbox-player {
    max-width: 85%;
    max-height: 85%;
    border-radius: 4px;
    outline: none;
}

.image-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.image-label {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Section bas avec image e5 + texte équipe */
.bottom-section {
    padding: 80px 60px;
    background-color: #ffffff;
    display: flex;
    align-items: stretch;
    gap: 60px;
    width: 100%;
}

.bottom-image {
    width: 50%;
    flex-shrink: 0;
}

.bottom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bottom-text {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 40px 40px 0;
}

.bottom-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px 0;
    margin-left: -10px;
    line-height: 1.1;
}

.bottom-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 300;
    color: #555;
    margin: 0 0 35px 0;
    margin-left: -10px;
}

.bottom-paragraphs {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-left: 40px;
}

.bottom-paragraphs p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    font-weight: 300;
    color: #333;
    line-height: 1.8;
    margin: 0;
    max-width: 500px;
}

.bottom-paragraphs p strong {
    font-weight: 600;
    color: #1a1a1a;
}

/* Galerie horizontale animée */
.gallery-section {
    background-color: #f5f5f5;
    padding: 60px 0;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-section::before {
    --size: 45px;
    --line: rgba(0, 0, 0, 0.06);
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, var(--line) 1px, transparent 1px var(--size)) 50% 50% / var(--size) var(--size),
        linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% / var(--size) var(--size);
    mask: linear-gradient(150deg, transparent 50%, white);
    pointer-events: none;
    z-index: 0;
}

.gallery-scroll {
    --card-width: clamp(180px, 30vw, 340px);
    --card-width-small: clamp(90px, 12vw, 180px);
    display: flex;
    gap: 22px;
    overflow-x: auto;
    /* Pas de snap pour permettre de rester entre deux images */
    scroll-snap-type: none;
    padding-inline: calc(50% - var(--card-width) * 0.5);
    padding-block: 20px;
    min-height: calc(var(--card-width) * 1.75);
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a transparent;
    cursor: grab;
    position: relative;
    z-index: 1;
    /* Optimisation scroll */
    -webkit-overflow-scrolling: touch;
}

.gallery-scroll:active {
    cursor: grabbing;
}

.gallery-scroll::-webkit-scrollbar {
    height: 4px;
}

.gallery-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 2px;
}

.gallery-item {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-direction: column;
    flex-shrink: 0;
    max-height: 100%;
    /* Optimisation rendu */
    contain: layout style;
}

.gallery-card {
    width: clamp(80px, 10vw, 160px);
    overflow: hidden;
    position: relative;
    aspect-ratio: 2 / 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    will-change: width;
    transform: translateZ(0);
    /* Animation scroll-driven fluide */
    animation: gallery-change both linear;
    animation-timeline: view(inline);
}

@keyframes gallery-change {
    0%, 100% {
        width: clamp(80px, 10vw, 160px);
    }
    25%, 75% {
        width: var(--card-width-small);
    }
    50% {
        width: var(--card-width);
    }
}

/* Fallback pour anciens navigateurs */
.gallery-item.active .gallery-card {
    width: var(--card-width);
}

.gallery-card a {
    text-transform: none;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    color: #1a1a1a;
    text-decoration: none;
    margin-bottom: 6px;
    display: block;
    white-space: normal;
    line-height: 1.45;
    min-height: 120px;
    position: relative;
    z-index: 2;
    opacity: 0.15;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-card a span {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.82rem;
}

.gallery-item.active .gallery-card a {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
}

.gallery-card-img {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.85) contrast(1.4);
    will-change: filter;
    transform: translateZ(0);
    /* Animation scroll-driven fluide */
    animation: gallery-filter both linear;
    animation-timeline: view(inline);
}

@keyframes gallery-filter {
    0%, 100% {
        filter: grayscale(0.85) contrast(1.4);
    }
    25%, 75% {
        filter: grayscale(0.4) contrast(1.2);
    }
    50% {
        filter: grayscale(0) contrast(1);
    }
}

/* Fallback pour anciens navigateurs */
.gallery-item.active .gallery-card-img img {
    filter: grayscale(0) contrast(1);
}

/* Responsive */
@media (max-width: 768px) {
    .entreprise-main {
        padding-top: 60px;
        overflow-x: hidden;
    }

    .entreprise-container {
        padding: 0;
        overflow-x: hidden;
        width: 100%;
    }

    .entreprise-content {
        padding: 40px 20px;
        flex-direction: column;
        gap: 30px;
        overflow-x: hidden;
    }

    .entreprise-left {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        width: 100%;
    }

    .entreprise-label {
        font-size: 36px;
    }

    .entreprise-title {
        font-size: 16px;
        white-space: normal;
    }

    .entreprise-right {
        padding: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .entreprise-intro {
        font-size: 14px;
        text-align: left;
        max-width: 100%;
        width: 100%;
    }

    .entreprise-banner {
        margin-top: 40px;
        max-height: 250px;
    }

    .banner-image {
        height: 250px;
    }
    
    .manifeste-section {
        padding: 60px 20px 40px;
        overflow-x: hidden;
    }
    
    .manifeste-title {
        font-size: 28px;
        margin-left: 0;
        margin-bottom: 30px;
    }

    .manifeste-content {
        max-width: 100%;
        width: 100%;
    }
    
    .manifeste-text {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .production-banner {
        padding: 30px 20px;
        overflow-x: hidden;
    }
    
    .production-content {
        flex-direction: column;
        gap: 25px;
        align-items: center;
        width: 100%;
    }

    .production-text {
        width: 100%;
    }

    .production-title {
        font-size: 18px;
        line-height: 1.4;
    }

    .production-subtitle {
        font-size: 10px;
    }
    
    .production-logo {
        padding-left: 0;
    }

    .production-logo img {
        height: 80px;
    }
    
    .images-banner {
        flex-direction: column;
        overflow-x: hidden;
    }
    
    .image-card img {
        height: 200px;
    }
}

/* Tablet breakpoint for bottom section */
@media (max-width: 1024px) {
    .bottom-section {
        padding: 60px 40px;
        gap: 40px;
    }

    .bottom-title {
        margin-left: 0;
    }

    .bottom-subtitle {
        margin-left: 0;
    }

    .bottom-paragraphs {
        padding-left: 0;
    }

    .bottom-paragraphs p {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .bottom-section {
        padding: 40px 20px;
        overflow-x: hidden;
        flex-direction: column;
        gap: 30px;
    }
    
    .bottom-image {
        width: 100%;
    }

    .bottom-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .bottom-text {
        width: 100%;
        padding: 0 20px;
        text-align: center;
    }

    .bottom-title {
        margin-left: 0;
    }

    .bottom-subtitle {
        margin-left: 0;
    }

    .bottom-paragraphs {
        padding-left: 0;
    }

    .bottom-paragraphs p {
        max-width: 100%;
        text-align: center;
    }
    
    .timeline-section {
        padding: 50px 0 40px;
        overflow: visible;
    }
    
    .gallery-section {
        padding: 40px 0;
    }

    .gallery-scroll {
        --card-width: clamp(140px, 45vw, 220px);
        --card-width-small: clamp(70px, 20vw, 110px);
        gap: 14px;
        height: calc(var(--card-width) * 1.6);
    }

    .gallery-item {
        width: var(--card-width);
    }

    .gallery-card {
        width: clamp(60px, 18vw, 100px);
    }

    .gallery-card a {
        display: none;
        min-height: 0;
        margin-bottom: 8px;
        font-size: 0.78rem;
        line-height: 1.4;
        opacity: 1;
        transform: none;
    }

    .gallery-card a span {
        font-size: 0.86rem;
        margin-bottom: 4px;
    }

    .gallery-item.active .gallery-card a {
        display: block;
    }
}
