/* Styles généraux */
body {
    background-color: #000;
    color: white;
    font-family: "Rubik";
    text-align: left;
    padding: 10px;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#safariErr {
    display:none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 300px;
    margin-top: 50px;
}

#safariErr h3 {
    color:red;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 40px;
}

#safariErr p {
    margin: 0px;
    font-size: 24px;
}

.container {
    width: 90vw;
    height: 90vh;
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}

/* Titre principal */
h1 {
    font-size: 2em;
    font-weight: bold;
    line-height: 1.3;
}

p {
    margin: 0px;
}

/* Styles des éléments absolute */
#regenbox {
    display: block;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
}

#cable {
    display: block;
    position: absolute;
    width: 450px;
    top: 0;
    transform: translate(0, -70%);
    transition: top 1s ease;
}

#plug {
    display: flex;
    position: absolute;
    cursor: default;
    top: 5%;
    right: 0%;
}

#connect {
    display: flex;
    position: absolute;
    cursor: pointer;
    top: 20%;
    left: 0%;
    z-index: 2;
    background-color: black;
}

#connect:hover {
    background-color: #d6803a;
    border: 2px solid #d6803a;
}

#programButton {
    display: flex;
    position: absolute;
    top: 50%;
    right: 0%;
    z-index: 2;
    background-color: black;
}

#programButton.disabled {
    cursor: default;
}

#programButton.enabled {
    cursor: pointer;
    background-color: yellowgreen;
}

#programButton.enabled:hover {
    cursor: pointer;
    background-color: rgb(107, 143, 35);
}

.step {
    border: 2px solid white;
    border-radius: 50%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    width: clamp(120px, 15vw, 170px);
    height: clamp(120px, 15vw, 170px);
}

.step-id {
    margin-bottom: 10px;
    font-size: clamp(20px, 2vw, 30px);
}

.step-txt {
    font-size: clamp(12px, 1.5vw, 16px);
    margin: 5px 0;
    padding: 0 10px;
}

.step-under {
    color: rgb(179, 179, 179);
    padding: 0 10px;
    font-size: 12px;
}


/* Styles de la progress bar */
#progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    bottom: 3%;
}

#progressBar {
    margin: 10px 0;
    border: #ffffff solid 2px;
    border-radius: 20px;
}

progress::-webkit-progress-bar {
    background-color: rgb(0, 0, 0);
    border-radius: 20px;
}

progress::-webkit-progress-value {
    background-color: white;
    border-radius: 20px;
}

progress::-moz-progress-bar {
    background-color: white;
    border-radius: 20px;
}

@media screen and (min-width: 1000px) and (min-height: 1000px){ 
    #regenbox {
        width: 40vh;
        bottom: 20%;
    }

    #cable.plugged {
        top: calc(clamp(115px, 22%, 250px) - 80px);
    }

    #progress {
        bottom: 20%;
    }

    #progressBar {
        width: 500px;
        height: 30px;
    }

    #safariErr h3 {
        font-size: 24px;
    }
    
    #safariErr p {
        font-size: 16px;
    }
}

@media screen and (min-width: 1000px) and (max-height: 1000px){
    #cable.plugged {
        top: calc(clamp(115px, 22%, 250px) - 80px);
    }
}

@media screen and (min-width: 1000px) and (max-height: 1000px){
    #regenbox {
        width: 40vh;
        bottom: 20%;
    }

    #progress {
        bottom: 2%;
    }

    #progressBar {
        width: 500px;
        height: 30px;
    }

    #safariErr h3 {
        font-size: 24px;
    }
    
    #safariErr p {
        font-size: 16px;
    }
}

@media screen and (max-width: 1000px) and (min-width: 700px) and (max-height: 1000px){
    #cable.plugged {
        top: calc(clamp(115px, 22%, 250px) - 55px);
    }
}

@media screen and (max-width: 1000px) and (min-width: 700px){
    #regenbox {
        width: 40vh;
        bottom: 15%;
    }

    #cable {
        top: -50px;
    }

    #progress {
        bottom: 6%;
    }

    #progressBar {
        width: 450px;
        height: 30px;
    }
}

@media screen and (max-width: 700px){
    #regenbox {
        width: 40vh;
        bottom: 10%;
    }

    #cable {
        top: -50px;
    }

    #cable.plugged {
        top: calc(clamp(115px, 22%, 250px) - 0px);
    }

    .step-under {
        font-size: 8px;
    }

    #progress {
        bottom: 10%;
    }

    #progressBar {
        width: 350px;
        height: 25px;
    }
}
