@import './fonts.css';
@import './main.css';

/* css spécifique à la page de connexion salamandre */
body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-image: url('../../img/sso/sso-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media screen and (max-width: 991.999px) {
    body {
        background-image: none;
    }
}

header,
main {
    width: 100%;
}

/********************* GLOBAL *********************/
.logo {
    max-width: clamp(150px, 15vw, 200px);
}

/********************* HEADER *********************/
header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

header a.link-back {
    color: #FFF;
    font-weight: bold;
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

header a.link-back:hover {
    text-decoration: underline;
}

/********************* MAIN *********************/
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.form-wrapper {
    background-color: #FFF;
    padding: clamp(2rem, 3.5vw, 3.5rem);
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    gap: clamp(1rem, 1.5vh, 1.5rem);
}

.form-wrapper h2,
.form-wrapper p,
.form-wrapper .content-form,
.formwrapper small {
    margin: 0;
}

.form-wrapper .content-form {
    width: 100%;
}

/********************** LOGIN *********************/
#login .form-wrapper,
#forgot-password .form-wrapper,
#login-password .form-wrapper {
    max-width: 680px;
}

#login .h4,
#forgot-password .h4,
#login .h4 {
    font-weight: 500;
}

#login .subintro a,
#forgot-password .subintro a,
#login-password .subintro a {
    font-weight: bold;
}

#login .subintro a:hover,
#forgot-password .subintro a:hover,
#login-password .subintro a:hover {
    text-decoration: underline;
}

#login form .alert-danger,
#forgot-password form .alert-danger,
#login-password form .alert-danger {
    display: none;
}

#login form.was-validated:invalid .alert-danger,
#forgot-password form.was-validated:invalid .alert-danger,
#login-password form.was-validated:invalid .alert-danger {
    display: block;
}

/********************** CREATION COMPTE *********************/
#signup {
    display: flex;
    align-items: center;
}

#signup h2 {
    align-self: center;
}

#signup .form-wrapper {
    max-width: 1000px;
}

#abonne-infos .popover {
    max-width: 95%;
    min-width: 95%;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: auto !important;
    top: 100% !important;
}

#abonne-infos .popover img {
    margin: auto;
}

/********************** CREATION COMPTE FINALISATION *********************/
#signup #finalisation {
    position: relative;
    --img-size: 50px;
}

#signup #finalisation .yellow-cadre {
    padding: 1rem;
    margin-top: calc(var(--img-size)/2);
    padding-top: calc(var(--img-size)/2 + 1rem);
}

#signup:has(#finalisation) p.h4 {
    text-align: center;
    align-self: center;
}

#signup #finalisation .yellow-cadre img {
    width: auto;
    aspect-ratio: 1/1;
    height: var(--img-size);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

#signup #finalisation .yellow-cadre p {
    line-height: 1.2;
}

/********************** AVANTAGES *********************/
#avantages {
    background-color: var(--beige);
    padding: 15px 0;
}

#avantages h5,
#avantages img {
    margin-bottom: 20px;
}

/******************* WELCOME ***********************/
#welcome .welcome-header {
    line-height: 1.2;
    font-size: 1.7rem;
    font-family: var(--font-morl);
}

#welcome .left,
#welcome .right {
    position: relative;
}

#welcome .left>a,
#welcome .right>a {
    height: 100%;
    width: 100%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    z-index: 1;
    cursor: pointer;
}

#welcome .welcome-computer {
    width: 100%;
    height: auto;
    margin: auto;
}

#welcome .welcome-text {
    width: 70%;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    cursor: pointer;
}

@media (min-width:414px) {
    #welcome .welcome-text {
        top: 55%;
    }
}

@media (min-width:992px) {

    #welcome .welcome-computer,
    #welcome .left>a,
    #welcome .right>a {
        width: 65%;
    }

    #welcome .left,
    #welcome .right {
        margin-top: -9%;
    }

    #login .form-wrapper,
    #forgot-password .form-wrapper,
    #login-password .form-wrapper {
        min-width: 680px;
    }
}