body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    height: 100%;
    overflow: hidden;
    background: #1a1a1a;
}

#background {                                                                       /* CSS section 1 */
    position: absolute;
    display: grid;
    padding: 1%;
    margin-left: -0.2%;
    margin-top: 0.2%;
    gap: 0.5vw;
    z-index: 0;
}
.square {
    background: #2c3e50;
    border-radius: 0.5vw;
    transition: background-color 0.3s ease;
}
.square:hover {
    background: #3498db;
    transition: background-color 0s ease;
}
#background::before {                 
    content: '';
    position: absolute !important;
    top: -140% !important;
    left: -1% !important;
    width: 110% !important;
    height: 150% !important;
    background: linear-gradient(180deg, transparent, #3498db, transparent);
    animation: flow 15s linear infinite;
    z-index: -1; /* Met le flux sous les carrés */
}
@keyframes flow {                      
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(190%);
    }
}

.form-container {                                                                  /* CSS section 2.1*/
    position: absolute;
    top: 0.9%;
    left: 0.5%;
    width: 75%; /* Augmenter la taille du formulaire */
    padding: 1.4% 5%;
    height: calc(100% - 7.5%);
    background: linear-gradient(to top right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), 
                url('https://www.example.com/vague.svg'); /* Fond avec effet de vagues */
    background-size: cover;
    clip-path: polygon(0% 100%, 50% 100%, 100% 0, 0% 0); /* Forme trapèze */
    border-radius: 0.5rem; /* Coins arrondis, optionnel */
    text-align: center;
    transition: transform 1s ease-in-out; /* Animation fluide */
    z-index: 2; /* Le formulaire se place au-dessus du fond interactif */
    pointer-events: none;
}
.form {
    font-size: 1vw; /* Texte adaptatif selon la largeur de l’écran */
    position: relative;
    left: 0;
    width: 80%;
    margin-left: -10%;
    margin-top: 10%;
}
.form-container h2 {
    color: #fff;
    font-size: 3vw; /* Titre responsive */
    margin-bottom: 5vh;
    margin-left: 0;
    text-align: center;
}
.form .inputBox {
    position: relative;
    width: 100%;
    margin-bottom: 2vh;
}
.form .inputBox label {
    display: block;
    color: white;
    font-size: 1vw;
    margin-bottom: 0.8vh;
    margin-left: 0%;
}
.form .inputBox input {
    position: relative;
    width: 55%;
    margin: 0 auto;
    display: block;
    padding: 0.5vw 1vw;
    font-size: 1vw;
    color: #fff;
    background: transparent;
    border-bottom: 0.1vw solid #fff;
    text-align: center;
    pointer-events: auto;
}
.form .inputBox i {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1vw;
    color: #aaa;
    pointer-events: none;
    transition: 0.5s;
}
.form .links {
    display: flex;
    justify-content: center;
    gap: 4vw;
    margin: 2vh 0;
    pointer-events: auto;
}
.form .links a {
    color: #aaa;
    font-size: 1vw;
    text-decoration: none;
}
.form .links a:hover {
    color: #fff;
}
.links a {
    cursor: pointer;
    color: blue;
    text-decoration: underline;
    pointer-events: auto;   
}
.links a:hover {
    color: darkblue;
}
.form .inputBox input[type="submit"] {
    background-color:rgb(44, 73, 159);
    color: #fff;
    border: none;
    padding: 0.8vw 2vw;
    font-size: 1vw;
    border-radius: 0.5vw;
    cursor: pointer;
    width: 40%;
    margin: 2.5vw auto 0 auto;
    display: block;
}
.form .inputBox input[type="submit"]:hover {
    background-color:rgb(28, 112, 202);
}

.criteria {                                                                       /* CSS section 2.2 */
    display: flex;
    align-items: center;
    margin: 0.5vw;
    margin-left: 27%;
}
.progress-container {
    position: absolute;
    width: 30%;
    height: 0.5vw;
    border-radius: 1.5vw;
    background-color: #ffffffcf;
    right: 27%;
}
.progress-bar {
    width: 0%;
    height: 100%;
    background-color: red;
    border-radius: 1.5vw;
    transition: width 0.3s, background-color 0.3s;
}
.progress-bar.valid {
    background-color: green;
}
#passwordError {
    margin-top: 1%;
}