*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* ===== LOADER ===== */
#loader {
    position: fixed;
    inset: 0;
    background-color: #080604;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}
#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    animation: loader-fade-in 1s ease forwards;
}
#loader-content img {
    width: 220px;
    opacity: 0.92;
    filter: drop-shadow(0 0 24px rgba(153, 87, 63, 0.35));
}
#loader-bar {
    width: 220px;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
#loader-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgb(153, 87, 63), rgb(210, 150, 100));
    border-radius: 2px;
    animation: loader-progress 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
#loader-grains {
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}
@keyframes loader-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes loader-progress {
    0%   { width: 0%; }
    60%  { width: 75%; }
    100% { width: 100%; }
}

body {
    font-family: 'Inter', sans-serif;
}

h1{
    font-size: 5vh;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
}

a{
    color: white;
    text-decoration: none;
}

a:hover{
    color:rgb(153, 87, 63) !important;
}

svg{
    width: 22px;
    height: 22px;
}

section{
    height: 100vh;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: white; 
    scroll-snap-align: start;
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

/* menu */
#menu-toggle {
    background-color:rgba(255, 255, 255, 0.8);
    position: fixed;
    width: 40px;
    height: 40px;
    top: 8.7vh;
    left: 1vw;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.5s;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
span{
    width: 20px;
    height: 2px;
    background-color:black;
    transition: 0.5s;
    display: block;
}
#bar-2 {
    transition: 0.3s;
}
#menu{
    position: fixed;
    top: 11vh;
    left: -60vw;
    transition: 0.5s;
}
#menu>a{
    color: black;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
#menu-toggle.active{
    width: 520px;
}
#menu-toggle.active > #bar-1, #menu-toggle.active > #bar-3 {
    position: absolute;
    right: 10px;
    top: 50%;
}
#menu-toggle.active > #bar-1 {
    transform: translateY(-50%) rotate(45deg);
}
#menu-toggle.active > #bar-2 {
    opacity: 0;
}
#menu-toggle.active > #bar-3 {
    transform: translateY(-50%) rotate(-45deg);
}
#menu.active{
    position: fixed;
    top: calc(8.7vh + 12px);
    left: calc(1vw + 55px);
    display: flex;
    gap: 2.5vw;
}
#dune{
    width: 15vw;
    margin: 1vw;
    position: fixed;
    z-index: 1;
}

/* Logos producteurs */
header>#production{
    display: flex;
    flex-direction: column;
    gap: 3vh;
    position: fixed;
    z-index: 10;
    top: 3vh;
    right: 1vw;
}

/* Home */
#home{
    background-image: url(../medias/images/dune-timothee-chalamet.jpg);
}
#video {
    width: 45vw;
    height: calc(45vw * 390 / 640);
    display: block;
    position: absolute;
    top: 35vh;
    left: 10vw;
}
.scroll {
    position: fixed !important;
    width: 20vw !important;
    height: calc(20vw * 3 / 4) !important;
    top: 5vh !important;
    left: 74vw !important;
    z-index: 5 !important;
}
#home>h1{
    margin-left: 23vw;
    padding-top: 25vh;
}

/* About */
#about{
    background-image: url(../medias/images/dune-sharon-duncan-brewster.jpeg);
}
#about>h1{
    position: relative;
    top: 15%;
    left: 6%;
}
#about>p{
    background: rgba(10, 8, 6, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 80%;
    line-height: 1.8;
    columns: 3;
    column-gap: 5%;
    padding: 3% 6%;
    column-rule: 1px solid rgba(255,255,255,0.2);
    position: relative;
    top: 15%;
}
#about>img{
    width: 30%;
    position: relative;
    top: 25%;
    left: 50%;
    z-index: 1;
}

/* Characters */
#characters{
    background-image: url(../medias/images/dune-cast-scaled.jpeg);
    position: relative;
}
#characters>h1{
    position: absolute;
    bottom: 15%;
    left: 25%;
    z-index: 2;
}
#characters-carousel{
    width: 380px;
    height: 560px;
    margin: auto;
    position: relative;
    top: 13%;
}
#characters-carousel>.slides{
    position: relative;
    height: 510px;
}
#characters-carousel>p{
    position: absolute;
    bottom: 65px;
    left: -12px;
    right: 40px;
    background: rgba(10, 8, 6, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 14px;
    font-size: 0.78rem;
    border-left: 2px solid rgba(255,255,255,0.45);
}
#characters-carousel>.navigation{
    top: 255px;
}

/* Videos & images */
#videos{
    background-image: url(../medias/images/dune-production_01.jpg);
    position: relative;
}
#videos>h1{
    position: relative;
    top: 15%;
    left: 10%;
}
#videos-carousel{
    width: 70vw;
    height: 70vh;
    position: relative;
    top: 17%;
    left: 10%;
}
#videos-carousel>.slides{
    width: 100%;
    height: 100%;
    position: relative;
}

#videos-carousel>.navigation{
    top: 50%;
}

/* Carousel Général */
.slides>img{
    position: absolute;
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.slides>img:not(:first-of-type) {
    display: none;
}
.navigation {
    position: absolute;
    left: -55px;
    right: -55px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}
.navigation>.prev, .navigation>.next {
   width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s;
}
.navigation>.prev:hover, .navigation>.next:hover{
    background: rgba(255, 255, 255, 0.18);
    border-color: white;
}

/* Cinémas */
#theaters{
    background-image: url(../medias/images/dune-timothee-chalamet-rebecca-ferguson.jpeg);
}
#theaters>article{
    background: rgba(10, 8, 6, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20%;
    padding: 4%;
    line-height: 2;
}
#theaters>article>p>button{
    border: none;
    background-color: transparent;
    color: white;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    font-family: inherit;
}
#map {
    width: 50vw;
    height: 50vh;
    z-index: 0;
    position: relative;
    bottom: 45%;
    left: 40%;
}

/* Footer */
#copyright {
    position: absolute;
    bottom: -399vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    z-index: 2;
}
#copyright a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}
#copyright a:hover {
    color: rgb(153, 87, 63);
}

/* Réseaux sociaux */
footer .social-media{
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 82vh;
    right: 1vw;
    gap: 3vh;
}






/* ===== RESPONSIVE ===== */

/* Tablette */
@media (max-width: 1024px) {
    svg {
        width: 24px;
        height: 24px;
    }

    #menu-toggle.active {
        width: 380px;
    }

    #about>p {
        columns: 2;
    }

    #characters-carousel {
        width: 300px;
        height: 440px;
    }
    #characters-carousel>.slides {
        height: 390px;
    }
    #characters-carousel>.navigation {
        top: 195px;
    }

    #videos-carousel {
        width: 82vw;
    }

    #map {
        width: 48vw;
        left: 44%;
    }
}

/* Mobile */
@media (max-width: 768px) {

    h1 { 
        font-size: 3.5vh; 
    }
    #menu-toggle {
        left: auto;
        right: 10px;
        top: 10px;
    }
    #menu-toggle.active {
        width: 160px;
        height: 200px;
        border-radius: 20px;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 46px 14px 14px 14px;
    }
    #menu-toggle.active > #bar-1 {
        top: 20px;
        transform: translateY(-50%) rotate(45deg);
    }
    #menu-toggle.active > #bar-3 {
        top: 20px;
        transform: translateY(-50%) rotate(-45deg);
    }
    #menu {
        display: none;
        transition: none;
    }
    #menu.active {
        display: flex;
        flex-direction: column;
        position: static;
        gap: 0;
    }
    #menu.active > a {
        padding: 9px 0;
        font-size: 0.82rem;
        letter-spacing: 0.08em;
        border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    }
    #menu.active > a:last-child {
        border-bottom: none;
    }

    header>#production {
        top: auto;
        bottom: 5vh;
        left: 3vw;
        flex-direction: row;
        align-items: center;
        gap: 3vw;
    }

    footer .social-media {
        top: auto;
        bottom: 5vh;
        right: 3vw;
        flex-direction: row;
        gap: 3vw;
    }

    #dune { 
        width: 38vw; 
        margin: 3vw; 
    }

    #home {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4vh;
    }
    #home>h1 {
        margin: 0;
        padding-top: 0;
    }
    #home>div {
        width: 88vw;
        height: calc(88vw * 390 / 640);
        position: relative;
    }
    #video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    .scroll {
        width: 40vw !important;
        height: calc(40vw * 3 / 4) !important;
        top: 5vh !important;
        left: 2vw !important;
    }

    #about {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2vh;
        padding: 8vh 0 14vh;
    }
    #about>img {
        width: 60%;
        align-self: flex-end;
        top: 0;
        left: 0;
    }
    #about>h1 {
        top: 0;
        padding: 0 0 0 6%;
    }
    #about>p {
        columns: 1;
        top: 0;
        font-size: 62%;
        line-height: 1.7;
    }

    #characters {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2vh;
    }
    #characters-carousel {
        width: 70vw;
        height: auto;
        top: 0;
        margin: 0;
    }
    #characters-carousel>.slides {
        height: calc(70vw * 510 / 380);
    }
    #characters-carousel>p {
        left: -6px;
        right: 15px;
        font-size: 0.68rem;
    }
    #characters>h1 {
        position: relative;
        top: 0;
        left: 0;
    }

    #videos {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2vh;
    }
    #videos>h1 {
        top: 0;
        left: 0;
    }
    #videos-carousel {
        width: 90vw;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        height: 42vh;
    }
    .navigation {
        position: relative;
        top: auto !important;
        left: auto;
        right: auto;
        transform: none;
        justify-content: center;
        gap: 24px;
        margin-top: 14px;
    }

    #theaters {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2vh;
    }
    #theaters>article {
        padding: 4% 5%;
        line-height: 1.7;
        text-align: center;
        width: 100%;
        margin-top: 0;
    }
    #map {
        width: 90vw;
        height: 36vh;
        top: 0;
        left: 0;
    }
}