body {
    margin: 0;
    background-color: #fff;
    overflow-x: hidden;
}

::selection {
    background-color: transparent;
}

::-moz-selection {
    background-color: transparent;
}

.highlighted {
    position: relative;
    display: inline-block;
    background-image: url('../img/highlight.png');
    background-size: 100% 300%;
    background-position: center;
    pointer-events: none;
}

@font-face {
    font-family: "Hermetico";
    src: url("../fonts/Hermetico-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Elite Math";
    src: url("../fonts/Elite-Math-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Typewriter";
    src: url("../fonts/Typewriter-215F.otf") format("opentype");
}

.navbar {
    position: fixed;
    z-index: 12;
    height: 100px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 100px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.navbar-img {
    position: fixed;
    height: 130px;
    z-index: 10;
}

.navbar-img.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(100px);
}

.navbar-logo {
    height: 70px;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    width: 30px;
    height: 30px;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.hamburger-menu .line {
    border: 3px solid #000;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 100%;
    background-color: #000;
}

.hamburger-menu.active .line1 {
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 100%;
}

.hamburger-menu.active .line2 {
    opacity: 0;
}

.hamburger-menu.active .line3 {
    transform: rotate(-45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 100%;
}

.navbar-menu {
    display: flex;
    gap: 30px;
}

.navbar-menu a {
    text-decoration: none;
    position: relative;
    color: #000;
}

.navbar-menu.active a {
    color: #000;
}

.navbar-menu span {
    font-family: "Hermetico";
    font-weight: 600;
    font-size: 20px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.navbar-menu.active span::after {
    background-color: #000;
}

.navbar-menu span::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: calc(100% - 15%);
    background-color: #000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar-menu a:nth-of-type(2) span::after,
.navbar-menu a:nth-of-type(4) span::after {
    border-right: 1px solid #000;
}

.navbar-menu.active a:nth-of-type(2) span::after,
.navbar-menu.active a:nth-of-type(4) span::after {
    border-right: 1px solid #000;
}

.navbar-menu a:hover span::after {
    opacity: 1;
    animation: blink-cursor 1s steps(20, start) infinite;
}

@keyframes blink-cursor {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 200px;
    padding-bottom: 100px;
    padding-inline: 50px;
    background-color: #fff;
    z-index: 9;
    max-width: 1080px;
    overflow: hidden;
    margin: 0 auto;
}

.galerie {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    width: 100%;
    text-align: center;
}

h1, h2 {
    font-family: "Hermetico";
    text-transform: uppercase;
    margin: 0;
}

span {
    font-family: "Typewriter";
}

.galerie-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

#g9iiWheel {
    transition: transform 0.5s ease;
}

.camera-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    user-select: none;
}

.screen-controls {
    user-select: none;
    z-index: 5;
    position: absolute;
    top: 49.5%;
    left: 16%;
    height: 47%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 47%;
    cursor: pointer;
}

.screen {
    user-select: none;
    z-index: 1;
    position: absolute;
    top: 49.5%;
    left: 16%;
    width: 47%;
    height: 47%;
    display: flex;
    align-items: center;
    transition: transform 0.5s ease-in-out;
    pointer-events: none;
}

.switch-button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    outline: none;
    height: 100%;
}

.switch-button img {
    filter: grayscale(1) invert(1);
    max-width: 18px;
}

.screen-photo {
    user-select: none;
    min-width: 100%; /* Chaque image occupe 100% du conteneur "screen" */
    height: 100%;
    object-fit: cover; /* L'image remplit tout l'espace disponible dans l'écran */
}

.gallery {
    max-width: 1400px;
    margin: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;  /* Permet de gérer les images sur plusieurs lignes */
}

.gallery-row img {
    height: auto;
    display: block;
    object-fit: cover; /* S'adapte sans déformer */
}

/* Styles pour les images verticales (les plus hautes que larges) */
.gallery-row img.vertical {
    flex: 1 1 calc(50% - 10px);  /* Limite à 2 images verticales par ligne */
    object-fit: cover;
}

/* Pour les images horizontales, elles peuvent occuper plus de place */
.gallery-row img.horizontal {
    flex: 1 1 calc(33.33% - 10px);  /* Les images horizontales occupent environ un tiers de la ligne */
    object-fit: cover;
}

#mygallery a:hover {
    filter: grayscale(100%) invert(100%);
    transition: filter 0.3s ease;
}

#mygallery a::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    /*background: url('../img/vhs.jpg') center center / cover no-repeat;*/
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

#mygallery a:hover::after {
    opacity: 0.7;
}

#mygallery.no-after::after {
    opacity: 0;
}

/* Lightbox styles */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: white;
    z-index: 1000;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 75vw;
    max-height: 75vh;
    object-fit: contain;
    z-index: 1001;
}

/* Bouton fermer */
.close {
    position: absolute;
    top: 20px;
    right: 35px;
    width: 40px;
    height: auto;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    filter: invert();
}

/* Boutons gauche/droite */
.gallery-switch-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

#gallerySwitchButtonLeft {
    left: 20px;
}

#gallerySwitchButtonRight {
    right: 20px;
}

.gallery-switch-button img {
    max-width: 28px;
    max-height: 28px;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: #fff;
    z-index: 9;
    min-height: 50px;
    height: auto;
    padding-bottom: 20px;
    font-family: "Typewriter";
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    padding-bottom: 20px;
    gap: 20px;
}

.footer-section {
    display: inline-block;
    padding: 0 20px;
}

.footer-section.about span {
    display: flex;
}

.footer-section.links h2 {
    text-align: center;
}

.footer-section.links ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
    list-style: none;
    padding: 0;
    white-space: nowrap;
    column-gap: 10px;
}

.footer-section.links ul li::before {
    display: inline-block;
    content: "\2013";
    margin-right: 3px;
    font-family: "Elite Math";
    font-weight: bold;
}

.footer-section.contact {
    white-space: nowrap;
}

.footer-section.contact a {
    text-decoration: none!important;
}

.footer-section h2 {
    margin-bottom: 10px;
    color: #000;
    font-family: "Hermetico";
    text-transform: uppercase;
    white-space: nowrap;
}

.footer-section p {
    margin: 0 0 10px;
}

.footer-section a {
    color: #000;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-section .social-icons {
    display: flex;
    gap: 10px;
}

.footer-section .social-icon {
    color: #333;
    width: 20px;
    height: 20px;
    font-size: 18px;
    text-decoration: none;
}

.footer-section .social-icon img {
    width: 100%;
    height: 100%;
}

.footer-section .social-icon img:hover {
    scale: 1.1;
}

footer img {
    height: 50px;
}

.copyright {
    display: flex;
    align-items: center;
    text-align: center;
    flex-direction: column;
    font-family: "Typewriter";
    font-size: 16px;
    min-width: 280px;
    padding: 15px;
}

.copyright .attribution {
    position: relative;
}

.copyright .attribution::before{
    content: "Coded by Charlie";
    color: #000;
    animation: words 20s infinite;
}

.copyright .attribution::after{
    content: "";
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    background-color: #fff;
    border-left: 2px solid #000;
    right: -8px;
    animation: cursor .8s infinite, typing 20s steps(20) infinite;
}

@keyframes cursor {
    to{
        border-left: 2px solid #ff7f5000;
    }
}

@keyframes words {
    0%,20% {
        content: "Coded by Charlie";
    }
    21%,40% {
        content: "Designed by Charlie";
    }
    41%,60% {
        content: "Coded by Charlie";
    }
    61%,80% {
        content: "Designed by Charlie";
    }
    81%,100% {
        content: "Propulsed by CVA Prod.";
    }
}

@keyframes typing {
    10%,15%,30%,35%,50%,55%,70%,75%,90%,95%{
        width: 0;
    }
    5%,20%,25%,40%,45%,60%,65%,80%,85%{
        width: calc(100% + 8px);
    }
}

@media screen and (max-width: 1200px) {
    .video {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }

    .video-player {
        width: 100%;
    }
}

@media screen and (max-width: 1000px) {
    .navbar {
        padding-inline: 50px;
    }

    .close {
        width: 35px;
    }

    .gallery-switch-button img {
        max-width: 24px;
        max-height: 24px;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .footer-section.contact .contact-content {
        align-items: center;
    }

    footer img {
        width: 80%;
        height: auto;
    }
}

@media screen and (max-width: 850px) {
    .hamburger-menu {
        display: flex;
    }

    .navbar-menu {
        display: none;
    }

    .navbar-menu.hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        width: 300px;
        height: 350px;
        top: 80px;
        right: 0;
        flex-direction: column;
        background-image: url("../img/navbarbackground.png");
        background-position: center;
        background-size: 90% 100%;
        background-repeat: no-repeat;
        text-align: center;
        animation: slideIn 0.5s ease-out forwards;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }

    @keyframes slideOut {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(100%);
        }
    }

    .navbar-menu span {
        font-size: 24px;
    }

    .screen-controls .switch-button {
        display: none;
    }

    .close {
        width: 30px;
    }

    .gallery-switch-button img {
        max-width: 20px;
        max-height: 20px;
    }
}

@media screen and (max-width: 600px) {
    .container {
        padding-inline: 30px;
    }

    .footer-sections-combined {
        flex-direction: column!important;
    }
}

@media screen and (max-width: 450px) {
    .container {
        padding-top: 120px;
        overflow: hidden;
    }

    .hamburger-menu {
        width: 18px;
        height: 18px;
    }

    .navbar {
        padding-inline: 20px;
    }
}