/* Rétablissement de certains comportements par défaut pour ces éléments */
#container,
#logo,
#msg,
#form,
#motdepasseoublie,
#emailpourrappelmotdepasse,
#sendit,
#premiereconnexion {
    position: unset;
    transform: unset;
    color: unset;
    background: unset;
    width: unset;
    margin: unset;
    border-radius: unset;
    box-shadow: unset;
}

@media screen and (max-width: 899px) {

    #container,
    #logo,
    #msg,
    #form,
    #motdepasseoublie,
    #emailpourrappelmotdepasse,
    #sendit,
    #premiereconnexion {
        position: unset;
        transform: unset;
        color: unset;
        background: unset;
        width: unset;
        margin: unset;
        border-radius: unset;
        box-shadow: unset;
    }
}

/* Structure générale en Flex */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Zone de connexion défilable si nécessaire */
.login-container {
    background: var(--primary-color);
    z-index: 10;
    width: 33.33%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.info-container {
    background: url('../images/motifs/fond.svg') no-repeat;
    background-size: cover;
    background-position: center;
    width: 66.66%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Style pour le H1 dans le container d'information */
.info-container h1 {
    color: var(--light-color);
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}



/* Adaptation mobile : sur mobile, seule la partie connexion est affichée et occupe toute la page */
@media screen and (max-width: 768px) {
    .page-wrapper {
        flex-direction: column;
        min-height: 100vh;
    }

    .login-container {
        width: 100%;
        min-height: 100vh;
        /* Remplit toute la hauteur */
        padding: 0;
    }

    .info-container {
        display: none;
    }
}

/* Logo et tagline */
.logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-img {
    width: 300px;
    max-width: 70%;
}

.tagline {
    font-size: var(--font-size-title);
    color: var(--dark-color);
    font-weight: 700;
    margin: 1.125rem auto;
    font-style: italic;
}

/* Formulaire de connexion */
.form-container {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1rem;
}

/* Titre du formulaire centré */
.form-title {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Centrage des champs du formulaire */
.form-group {
    margin-bottom: 1rem;
    text-align: center;
}

.form-container .input-login {
    width: 90%;
    /* Pour éviter le débordement */
    max-width: 400px;
    padding: 0.75rem;
    border-radius: var(--border-radius-small);
    background: var(--tertiary-color);
    /* Rend l'input transparent */
    color: var(--dark-color);
    /* Applique la couleur light-color au texte */
    border: none;
    font-size: var(--font-size-text);
    display: block;
    margin: 0 auto;
    /* Centre l'input horizontalement */
}

.form-container .input-login:focus {
    outline: none;
    box-shadow: 0 0 10px var(--secondary-color);
}

/* Boutons */
.button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-small);
    background: var(--primary-color);
    color: var(--light-color);
    cursor: pointer;
    font-size: var(--font-size-normal);
    transition: background 0.3s ease;
    display: block;
    margin: 0 auto;
}

.button:hover {
    background: var(--secondary-color);
}

/* Blocs à affichage dynamique */
.forgot-password,
.first-connection {
    margin-top: 1rem;
    text-align: center;
}

.toggle-forgot,
.toggle-first {
    cursor: pointer;
    font-size: var(--font-size-small);
    color: var(--dark-color);
    margin-top: 0.5rem;
    text-decoration: underline;
}

.toggle-block {
    background: var(--tertiary-color);
    padding: 1rem;
    border-radius: var(--border-radius-small);
    margin-top: 0.5rem;
    display: none;
    color: var(--dark-color);
}

.toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.toggle-close {
    cursor: pointer;
    font-size: var(--font-size-small);
    color: var(--dark-color);
    text-decoration: underline;
}

.response-message {
    padding: 0.5rem 0;
    font-weight: bold;
    color: #800000;
}