
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
}
html, body {
    height: 100%;
    overflow-x: hidden;
    background-color: #000;
}
body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.container {
    height: 100%;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
}
section {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
    padding: 0;
}
section.visible {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 768px) {
    section {
        min-height: 100vh;
        height: 100vh;
        padding: 0;
        margin: 0;
    }

    .mosaic-container {
        width: 100%;
        height: 100vh;
        max-width: none;
        max-height: none;
        padding: 10px;
        box-sizing: border-box;
    }

    #section3 {
        height: 100vh;
        padding: 0;
    }
}


.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 30px;
    height: 30px;
    border-bottom: 2px solid #3b65ff;
    border-right: 2px solid #3b65ff;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.scroll-indicator:hover {
    opacity: 0.8;
}
@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) rotate(45deg) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) rotate(45deg) translateY(0px);
        opacity: 0.5;
    }
}
.text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}
#typewriterText {
    margin: 0 20px;
    text-align: center;
    cursor: pointer;
}
#typewriterText.english {
    color: #ff4949;
    font-family: 'Roboto Mono', monospace;
    font-weight: 200;
    cursor: pointer;
}
.arrow-indicator {
    width: 20px;
    height: 20px;
    border-top: 2px solid #3b65ff;
    border-right: 2px solid #3b65ff;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.arrow-indicator.visible {
    opacity: 1;
    animation: blink 1.5s infinite;
}
.arrow-indicator.english {
    border-top-color: #ff4949;
    border-right-color: #ff4949;
}
.left-arrow {
    transform: rotate(45deg);
    margin-right: 20px;
}
.right-arrow {
    transform: rotate(-135deg);
    margin-left: 20px;
}
@keyframes blink {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}
#section1 {
    cursor: pointer;
    background-image: url('images/rustine_title.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #000;
}
@media (max-width: 768px) {
    #section1 {
        background-size: 200%; /* Taille augmentée pour mobile */
    }
}
#section2 {
    background-color: #000;
    position: relative;
    overflow: hidden;
    height: 100vh;
}
#section2 h2 {
    padding: 0 20px;
    text-align: center;
    max-width: 80%;
}
#typewriterText.english {
    color: #ff4949;
    font-family: 'Roboto Mono', monospace;
    font-weight: 200;
    cursor: pointer;
}
/* Section des marques */
/* Section des marques */
#section2_5 {
    background-color: #000;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    box-sizing: border-box;
}

/* Conteneur principal pour les deux colonnes */
.brands-wrapper {
    display: flex;
    width: 100%;
    height: 80vh;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Conteneurs pour les titres BETC et les marques */
.brands-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 45%;
    min-width: 200px;
}

.left-titles {
    align-items: flex-end;
    padding-right: 100px;
    text-transform: uppercase;
}

.right-titles {
    align-items: flex-start;
    padding-left: 100px;
}

/* Styles pour les titres BETC */
.title-item {
    color: #3b65ff;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0.4rem 0;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(-20px);
}

.left-titles .title-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Styles pour les marques (maintenant dans right-titles) */
.brand-item {
    color: white;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0.2rem 0;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
}

.right-titles .brand-item.visible {
    opacity: 1;
    transform: translateX(0);
    color: #3b65ff;
}

/* Effet de survol pour les marques */
.brand-item:hover {
    color: #ff4949;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .brands-wrapper {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .brands-titles {
        width: 100%;
        min-width: auto;
        margin: 1rem 0;
    }

    .left-titles, .right-titles {
        align-items: center;
        padding: 0;
    }

    .title-item, .brand-item {
        font-size: 0.8rem;
        margin: 0.1rem 0;
    }
}


#section3 {
    background-color: #000;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.mosaic-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    width: 95%;
    max-width: 1200px;
    height: 75vh;
}

/* Adapter la mosaïque et ses cases en mode horizontal sur mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .mosaic-item:nth-child(9) {
        display: none;
    }
    .mosaic-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        height: 80vh; /* Hauteur ajustée pour le mode horizontal */
        width: 95vw; /* Largeur ajustée */
        aspect-ratio: 16/9; /* Ratio 16/9 pour le conteneur */
    }

    .mosaic-item {
        aspect-ratio: 16/9; /* Ratio 16/9 pour chaque case */
    }

    .mosaic-item video {
        object-fit: cover; /* Remplir la case en respectant le ratio */
    }
}

/* Effet de bruit blanc réaliste */
@keyframes tv-noise {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5%, 0); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -5%); }
    40% { transform: translate(10%, 5%); }
    50% { transform: translate(-5%, -5%); }
    60% { transform: translate(-10%, 0); }
    70% { transform: translate(0, 10%); }
    80% { transform: translate(-5%, 5%); }
    90% { transform: translate(5%, 0); }
    100% { transform: translate(0, 0); }
}

/* Forcer le ratio 16/9 pour les vidéos dans les cases */

.mosaic-item.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.05) 100%),
        linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.05) 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.3"/></svg>');
    background-size: 200% 200%, 200% 200%, 100% 100%;
    z-index: 2;
    pointer-events: none;
    animation: tv-noise 0.1s infinite;
    opacity: 1;
}

/* Scanlines pour renforcer l'effet TV */
.mosaic-item.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.2) 1px,
        transparent 1px,
        transparent 3px
    );
    z-index: 3;
    pointer-events: none;
}

.mosaic-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    background: #222;
    z-index: 1;
    cursor: pointer;
}
.mosaic-item:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.mosaic-item video {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 2;
}
.static-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: none;
}

.mosaic-item.loading .static-video {
    display: block;
}

.mosaic-item.loading .mosaic-video {
    display: none;
}
/* Style pour l'indicateur de chargement */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(59, 101, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3b65ff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

.loading-indicator p {
    color: #3b65ff;
    font-size: 1.2rem;
    margin: 0;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style pour l'affichage de l'année */
.year-display {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    color: #3b65ff;
    font-size: 1.2rem;
    font-weight: 300;
    font-family: 'Roboto Mono', monospace;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.year-display.visible {
    opacity: 1;
}

@media (max-width: 768px) {
    .year-display {
        font-size: 1.2rem;
        left: 10%;
    }
}


#section4 {
    background-color: #000;
    color: #3b65ff;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}
#section4 p {
    margin-bottom: 20px;
}
h1 {
    font-size: 2.5rem;
    color: #3b65ff;
    text-align: center;
}
@media (min-width: 768px) {
    h1 {
        font-size: 4rem;
    }
}
h2 {
    font-size: 1.5rem;
    color: #3b65ff;
    font-family: "Roboto Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
    padding: 0 20px;
    text-align: center;
    max-width: 80%;
}
@media (min-width: 768px) {
    h2 {
        font-size: 2.2rem;
    }
}
.contact-info {
    font-size: 1.2rem;
    color: #3b65ff;
    text-align: center;
    font-style: normal;
}
@media (min-width: 768px) {
    .contact-info {
        font-size: 1.6rem;
    }
}
p {
    font-family: "Roboto Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 200;
}
/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 20;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.modal-container {
    position: relative;
    width: 95%;
    max-width: 800px;
    height: 80%;
    max-height: 450px;
    display: flex;
    flex-direction: column;
}
@media (max-width: 768px) {
    .modal-container {
        height: 70%;
    }
}
.modal-content {
    position: relative;
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
}
.modal-content video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.video-controls {
    display: none !important;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 0 0 10px 10px;
    margin-top: 10px;
}
.play-pause-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin: 0 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.volume-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin: 0 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border-radius: 50%;
}
.progress-container {
    flex: 1;
    height: 6px;
    background: #444;
    border-radius: 3px;
    margin: 0 10px;
    cursor: pointer;
}
.progress-bar {
    height: 100%;
    background: #3b65ff;
    border-radius: 3px;
    width: 0%;
}
.time-display {
    color: white;
    font-family: "Roboto Mono", monospace;
    font-size: 12px;
    margin: 0 10px;
    min-width: 60px;
    text-align: center;
}
@media (min-width: 768px) {
    .time-display {
        font-size: 14px;
    }
}
.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 21;
}
.close:hover {
    color: #3b65ff;
}
.codedText {
    background:#000;
    color:#3b65ff;
    text-align:center;
    white-space: nowrap;
    cursor:pointer;
    margin-top: 20px;
    padding: 10px 20px;
    border: 1px solid rgba(59, 101, 255, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
}
.volume-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    font-size: 1.2rem;
    z-index: 4;
    background-color: rgba(0, 0, 0, 0.5);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mosaic-item:hover .volume-icon {
    opacity: 1;
}

.mosaic-item.unmuted .volume-icon {
    opacity: 1;
    color: #3b65ff;
}
.codedText a {
    color: #3b65ff;
    text-decoration: none;
}
.codedText a:hover {
    color: rgba(59, 101, 255, 0.5);
}
.modal-controls {
    position: absolute;
    top: -50px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}
/* Modale en plein écran horizontal sur mobile */
@media (max-width: 768px) {
    .modal-container {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
    }
    .modal-content {
        width: 100%;
        height: 100%;
    }
    .modal-content video {
        object-fit: contain;
    }
    .video-controls {
        display: none; /* Masquer les contrôles pour un affichage immersif */
    }
}
/* Style pour la croix de fermeture de la modale */
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 30;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal:hover {
    color: #3b65ff;
    background: rgba(0, 0, 0, 0.8);
}
