/* ---------------------------------------HEADER--------------------------------------- */

#header {
    display: block;
    gap: 1.75em;
    width: 100%;
    max-width: 1592px;
    padding: 1.75em;
    position: relative;
    margin: 0 auto;
    overflow-x: hidden;
}

.header-bg {
    position: absolute;
    width: calc(100% - 3.5em);
    height: 30em;
    z-index: -1;
}

.header-bg .mtn-simple {
    position: absolute;
    bottom: 0;
    right: 0;
}

.header-content {
    position: relative;
    width: 100%;
    height: 100%;
    align-items: center;
}

.intro {
    height: 100%;
    padding: 7.5em 0 0 ;
    justify-content: flex-start;
    gap: 14.25em;
    z-index: 1;
}

.intro .cta {
    align-items: center;
}

#conteneur-pass-3d {
    height: 100%;
    width: 100%;
    position: absolute;
    display: flex;
    justify-content: center;
}

#pass-animation-3d {
    max-width: 18em;
    position: absolute;
    top: 22.5%;
    margin: 0 auto;
    z-index: 1;
}

#pass-animation-3d img {
    max-width: 18em;
}

.safari-only {
    display: none;
}


@media screen and (min-width: 844px) {
    #header {
        height: 100vh;
        max-width: 1592px;
        padding: 0;
    }

    .header-bg {
        height: 100vh;
        overflow: visible;
    }

    .intro {
        height: auto;
        gap: 0;
        max-width: 690px;
        padding: 175px 1.75em 0 2.6em;
    }

    .intro .cta {
        display: block;
    }

    #conteneur-pass-3d {
        height: calc(200vh);
        top: 0;
        max-width: 1592px;
        position: absolute;
        display: flex;
        justify-content: flex-end;
    }

    #pass-animation-3d {
        width: 50%;
        max-width: 750px;
        height: 100vh;
        position: -webkit-sticky;
        position: sticky;
        top: 0px;
        transform-origin: top right;
        margin: 0;
        padding: 0;
        padding-top: 175px;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #pass-animation-3d img {
        max-width: 500px;
        max-height: 500px;
    }
}

@media screen and (max-width: 844px) {
    :root {
        overflow-x: hidden;
    }
}




/* ---------------------------- FOND DU HEADER SUR MOBILE ------------------------ */

/* MONTAGNES NOIRES */

#header .mtn-black:nth-child(10) {
    width: 3.25em;
    height: 1.625em;
    right: calc(50% - 1.625em);
}

#header .mtn-black:nth-child(9) {
    width: 10em;
    height: 5em;
    right: calc(50% - 11.625em);
}

#header .mtn-black:nth-child(8) {
    width: 15em;
    height: 7.5em;
    right: calc(50% - 26.625em);
}

/* MONTAGNES BLEUES */

#header .mtn-blue:nth-child(7) {
    width: 22.5em;
    height: 11.25em;
    right: -11.25em;
}

#header .mtn-blue:nth-child(6) {
    display: none;
}

/* MONTAGNES RAYEES */

#header .mtn-striped:nth-child(5) {
    width: 15em;
    height: 7.5em;
    right: 25%;
}

#header .mtn-striped:nth-child(4) {
    display: none;
}

#header .mtn-striped:nth-child(3) {
    display: none;
}

/* MONTAGNES A POIS */

#header .mtn-dotted:nth-child(2) {
    width: 25em;
    height: 12.5em;
    right: -5.5em;
}

#header .mtn-dotted:nth-child(1) {
    display: none;
}


/* ---------------------------- FOND DU HEADER SUR DESKTOP ------------------------ */

@media screen and (min-width: 844px) {

    #header {
        overflow: visible;
    }

    /* MONTAGNES NOIRES */

    #header .mtn-black:nth-child(10) {
        display: none;
        width: 18em;
        height: 9em;
        right: calc(50% - 9.5em);
    }

    #header .mtn-black:nth-child(9) {
        width: 12em;
        height: 6em;
        right: 11.5em;
    }

    #header .mtn-black:nth-child(8) {
        width: 70em;
        height: 35em;
        right: -57.5em;
    }

    /* MONTAGNES BLEUES */

    #header .mtn-blue:nth-child(7) {
        width: 35em;
        height: 17.5em;
        right: calc(50% - 22em);
    }

    #header .mtn-blue:nth-child(6) {
        display: block;
        width: 42em;
        height: 21em;
        right: calc(50% - 62em);
    }

    /* MONTAGNES RAYEES */

    #header .mtn-striped:nth-child(5) {
        width: 18em;
        height: 9em;
        right: calc(60% - 5em);
    }

    #header .mtn-striped:nth-child(4) {
        display: block;
        width: 45em;
        height: 22.5em;
        right: calc(50% - 40em);
    }

    #header .mtn-striped:nth-child(3) {
        display: block;
        width: 58em;
        height: 29em;
        right: -29em;
    }

    /* MONTAGNES A POIS */

    #header .mtn-dotted:nth-child(2) {
        width: 50em;
        height: 25em;
        right: calc(50% - 30em);
    }

    #header .mtn-dotted:nth-child(1) {
        display: block;
        width: 70em;
        height: 35em;
        right: -35em;
    }
}

main {
    background-color: var(--gray);
}

/* -----------------------------SECTION 1 "À PROPOS"----------------------------- */

#A-propos {
    width: 100vw;
    align-items: center;
    position: relative;
}

.carrousel {
    width: 100%;
}

.article {
    width: 100%;
    align-items: center;
}

.card {
    position: relative;
    width: 100%;
    margin-top: 3.5em;
}

.card > h2 {
    display: inline-block;
    width: 100%;
    margin-bottom: 28px;
    text-align: center;
}

.card-content {
    flex-direction: column;
}

.carrousel .mtn-square {
    width: 100%;
    height: 100vw;
}

@media screen and (max-width: 844px) {
    .pass {
        position: absolute;
        display: flex;
        justify-content: center;
        top: 5.75em;
        width: 100%;
    }
    
    .pass > * {
        width: 90%;
    }   
}

.card-text {
    padding: 1.75em;
    justify-content: center;
    align-items: center;
}

.carrousel-links {
    width: 100%;
    max-width: 500px;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.carrousel-links .link {
    display: block;
    position: relative;
}

.carrousel-links .link::before {
    width: 100%;
}

.carrousel-links .link::after {
    content: "";
    position: absolute;
    display: block;
    bottom: -1.75em;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    width: 28px;
    height: 14px;
    background-color: #0008f8;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    transition: all .2s ease;
}

.carrousel-links .link.active {
    transform: translateY(-1.78em);
}

.carrousel-links .link.active::after {
    content: "";
    position: absolute;
    display: block;
    opacity: 1;
}

@media screen and (min-width: 844px) {
    #A-propos {
        height: 100vh;
        justify-content: center;
    }

    .carrousel {
        justify-content: flex-start;
        align-items: center;
        flex: 10;
        overflow-x: scroll;
        scroll-behavior: smooth;
    }

    .carrousel::-webkit-scrollbar {display: none;}

    .article {
        align-self: flex-start;
        height: 100%;
        width: 100%;
        flex: 0 0 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 1000px;
        margin-top: 0;
        align-items: center;
        justify-content: center;
        flex: 1;
    }

    .card .mtn-square {
        width: 50%; 
        max-width: 500px;
        max-height: 500px;
    }

    .card-text {
        padding-left: 3em;
        width: 50%;
        align-items: flex-start;
    }


    .card > h2 {
        margin-bottom: .52em;
    }

    .card-content {
        flex-direction: row;
    }

    .carrousel-links {
        height: 3em;
        position: absolute;
        bottom: calc((100vh - 600px)/8);
        left: 50vw;
        transform: translate(-50%);
    }

}


/* ----------------------SECTION 2 "LES STATIONS VAUDOISES"---------------------- */

#Les-stations {
    width: 100vw;
    padding: 1.75em 1.75em 0;
    align-items: center;
    position: relative;
    text-align: center;
    overflow-x: hidden;
}

.stations-container {
    width: 100%;
    max-width: 1516px;
    position: relative;
}

.station-infos {
    display: none;
    justify-content: flex-start;
    align-items: center;
    flex: 8;
    z-index: 1;
}

.station-infos h3 {
    width: 100%;
}

.station-infos.current {
    display: flex;
}

.station-infos p {
    font-weight: 500;
}

.station-infos .btn {
    margin-bottom: 3.5em;
}

.station-infos .mtn-image {
    width: 100%;
    height: calc((100vw - 3.5em)/2);
    margin-top: auto;
    z-index: 1;
}


.station-infos b {
    font-size: 1.2em;
    color: var(--blue);
    font-weight: 700;
}

#station-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
}

#station-bg .mtn-simple {
    position: absolute;
    bottom: 0;
    z-index: 0;
}

#station-bg .mtn-black:nth-child(4) {
    width: 10em;
    height: 5em;
    right: -1.5em;
    z-index: 2;
}

#station-bg .mtn-blue:nth-child(3) {
    width: 15em;
    height: 7.5em;
    right: -7.5em;
}

#station-bg .mtn-striped:nth-child(2) {
    width: 15em;
    height: 7.5em;
    right: 50%;
}

#station-bg .mtn-dotted:nth-child(1) {
    width: 30em;
    height: 15em;
    right: -15em;
}

@media screen and (min-width: 844px) {
    #Les-stations {
        padding-top: 130px;
    }

    #station-bg .mtn-black:nth-child(4) {
        width: 10em;
        height: 5em;
        right: -2.5em;
        z-index: 1;
    }
    
    #station-bg .mtn-blue:nth-child(3) {
        width: 30em;
        height: 15em;
        right: -15em;
    }
    
    #station-bg .mtn-striped:nth-child(2) {
        width: 30em;
        height: 15em;
        right: calc(100% - 50em);
    }
    
    #station-bg .mtn-dotted:nth-child(1) {
        width: 60em;
        height: 30em;
        right: -30em;
    }
}


/* ----------------------------------Liste de sélection---------------------------------- */
/*the container must be positioned relative:*/
.custom-select {
    position: relative;
    width: 100%;
    font-family: var(--font-General);
    font-size: 1.4em;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
    margin: 1em 0;
    z-index: 2;
}
  
  .custom-select select {
    display: none; /*hide original SELECT element:*/
  }
  
  .select-selected {
    padding: .7em .7em .7em;
    background-color: var(--white);
    color: var(--blue);
    border-radius: 0.3125em;
  }
  
  /*style the arrow inside the select element:*/
  .select-selected:after {
    position: absolute;
    content: "";
    top: 50%;
    transform: translateY(-25%);
    right: 1em;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-color: var(--blue) transparent transparent transparent;
  }
  
  /*point the arrow upwards when the select box is open (active):*/
  .select-selected.select-arrow-active:after {
    border-color: transparent transparent var(--blue) transparent;
    top: 50%;
    transform: translateY(-50%);
  }
  
  /*style the items (options), including the selected item:*/
  .select-items div {
    padding: .35em .7em;
    cursor: pointer;
    user-select: none;
    border-radius: 0.3125em;
  }
  
  /*style items (options):*/
  .select-items {
    position: absolute;
    padding: .7em 0 0 0;
    height: 230px;
    background-color: var(--gray);
    color: var(--black);
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9;
    overflow-y: auto;
    border-bottom: 5px solid var(--blue);
  }

  .select-items::-webkit-scrollbar {
    width: 5px;
  }

  .select-items::-webkit-scrollbar-thumb {
    background-color: var(--blue);
    border-radius: 5px;
  }
  
  /*hide the items when the select box is closed:*/
  .select-hide {
    display: none;
  }
  
  .select-items div:hover, .same-as-selected {
    color: var(--blue);
  }

  @media screen and (min-width: 844px) {
        .stations-container {
            margin: 1em 0;
        }

        .station-infos {
            align-items: flex-start;
            text-align: left;
            padding-left: 1em;
        }

        .station-infos .mtn-image {
            height: auto;
        }

        .custom-select {
            height: auto;
            width: auto;
            flex: 4 1 200px;
            margin: 0;
        }

        .select-selected {
            display: none;
        }

        /*style the items (options), including the selected item:*/
        .select-hide {
            display: block;
        }

        .select-items {
            position: relative;
            height: auto;
            top: 0;
            border: 0;
            background-color: transparent;
        }

        .select-items div {
            padding: 0;
            padding-left: 1.75em;
            margin-bottom: .3em;
        }
  }
