function reinit() {
  $("#spinner").css("display", "block");
    $.ajax({
        url: "../../model/mainController.php",
        type: "POST",
        headers: {
            "publicKey": publicKey,

        },
        data: {
            "action": "askforreset",
            "parameters": JSON.stringify({
                "email": $("#email").val()
            })
        },
        dataType: "json"
    })
        .done((response) => {
            console.log(response);
            if (response.status == 200) {
                $("#login").hide();
                $("#thankyou").show();
            }
            else {
                $("#login").css("display", "none");
                $("#error").css("display", "block");

            };
        })
        .fail((error) => {
            console.log(error);
            $("#login").css("display", "none");
            $("#error").css("display", "block");
        })
        .always(function (result) {
            console.log("Requête effectuée");
            $("#spinner").css("display", "none");
        });
}

.thankyou, .error {
  display: none;
}

/* Section mot de passe incorrect */
.toast-body {
  background-color: #ffffff!important;
  padding: 1.5rem;
  border-radius: 20px;
  text-align: center;
}

.spinner{
  width: 5rem;
  height: 5rem;
  display: none;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #14AE28;
  margin: 2rem auto;
  animation: 1s spin ease-in-out infinite;
}

@keyframes spin{
  to{
    transform: rotate(360deg);
  }
}
