/* 
 * public/login/jpv_login.css
 * Écran Login
 * 
 * @author SIMON Stephane <stephane@bvb-software.fr>
 * @version 1.0.0
*/

/* Base styles */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Rubik", sans-serif;
    overflow: hidden;
}

#myVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
}

/* ================= ALERT ERROR ================= */

.wrap__alert {
    display: flex;
    justify-content: center;
}

.wrap__alert .alert {
        width: 100%;
        margin-bottom: -10px;
}

.flash__login {
    display: flex;
    justify-content: center;
}

.flash__login .alert {
    width: 100%;
    margin-bottom: -10px;
}

.page-login {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.login__card {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 40px);
    padding: 20px 0;
}

.img-and-form {
    z-index: 200;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px) saturate(89%);
    -webkit-backdrop-filter: blur(2px) saturate(89%);
    min-height: 400px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.div__logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
    background-image: url("../../images/logo/jpv-assurances-colorful.svg");
    background-size: 240px;
    background-repeat: no-repeat;
    background-position: center;
}

.div-form {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding-bottom: 20px;
    margin-top: 20px;
}

.div-form form {
    width: 100%;
}

.div-btn-login {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.form-control {
    height: 3.5em;
    background: #ffffff;
    border-top: none;
    border-right: none;
    border-left: none;
    text-align: center;
    font-weight: 400;
    color: var(--secondary-dark);
    border-radius: 5px;
    width: 100%;
}

.password-forget {
    text-align: end;
    width: 100%;
    margin: auto;
    padding-top: 1rem;
}

.password-forget a {
    color: var(--secondary-mid);
    text-decoration: none;
}

.password-forget a:hover {
    color: var(--secondary-dark);
    text-shadow: 0 2px 3px var(--secondary-mid);
}

.btn-login {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-main);
    border-radius: 5px;
    width: 100%;
    margin-top: 20px;
    height: 3em;
    font-size: 1.2rem;
    color: white;
    border-color: transparent;
    box-shadow: 3px 4px 14px -2px rgba(0, 0, 0, 0.26);
    transition: border 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    text-transform: uppercase;
}

.btn-login:focus,
.btn-login:active,
.btn-login:hover {
    border-color: transparent;
    color: var(--white-color) !important;
    background-color: var(--primary-main) !important;
}

.btn-login:disabled {
    border-color: transparent!important;
    background-color: rgba(44, 69, 148, 0.9);
    cursor: not-allowed;
}

.password-field {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.password-field input {
    width: 100%;
    flex-grow: 1;
}

.password-field .eye-icon {
    position: absolute;
    right: 10px;
    cursor: pointer;
    top: 58%;
    color: var(--primary-main);
}

.form-control.input-login {
    padding-right: 30px;
}

.form-control.is-invalid {
    background-position: right calc(.375em + 1.888rem) center;
}

label {
    margin-bottom: 5px;
    color: var(--primary-main);
    font-weight: 500;
    font-size: large;
}

/* =================================================
                      LOADER
   ================================================= */

.loader {
    width: 46px;
    height: 46px;
    border-width: 3px;
    border-color: #FFFFFF;
    border-style: solid solid dotted dotted;
    border-radius: 50%;
    display: none;
    position: relative;
    box-sizing: border-box;
    animation: rotation 2s linear infinite;
}

.loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    border-width: 3px;
    border-color: var(--tertiary-main);
    border-style: solid solid dotted dotted;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    animation: rotationBack 1s linear infinite;
    transform-origin: center center;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
@keyframes rotationBack {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-360deg);
    }
}

/* =================================================
                  MEDIA-QUERIES
   ================================================= */

/* Media queries */
@media (max-width: 991px) {
    .login__card {
        max-width: 90vw;
    }

    .form-control {
        width: 100%;
    }

    #myVideo {
        display: none;
    }

    .mobile-bg {
        background-image: url("../../images/login_page/login-mobile1.webp");
        background-size: cover;
        background-position: center;
    }

    .div-img {
        height: 250px;
    }

    label {
        width: 80%;
    }
}

/* Ajustements pour les petits écrans */
@media (max-width: 320px) {
    .img-and-form {
        width: 95%;
    }

    .img-and-form .form-control,
    .img-and-form .btn-login {
        width: 100%;
        max-width: none;
        min-width: none;
    }
}
