/* --- Mobile first (par défaut) --- */

/* Titre responsive */
.titre {
    margin-bottom: 5%;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    white-space: normal;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Fond et wrapper */
.form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5% auto 10%;
    padding: 6%;
    background-color: #F3E1CF;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
}

/* Formulaire */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* Labels */
form label {
    align-self: flex-start;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
}

/* Label en blanc par défaut */
.form-floating label {
    color: white;
}

/* Quand l'input est focus ou rempli, le label devient noir */
.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
    color: black;
}

/* Champs de saisie responsive */
.form-control {
    width: 100%;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(1rem, 2.5vw, 1.25rem);
    border: none;
    border-radius: 8px;
    background-color: rgba(53, 50, 47, 0.9);
    color: white;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    text-align: center;
    outline: none;
}

.form-control:focus {
    outline: none;           /* déjà présent, mais on le garde */
    box-shadow: none;        /* supprime le halo bleu */
    border-color: rgba(53, 50, 47, 0.9);   /* optionnel : garde la couleur du fond */
}

/* Formulaire inscription caché par défaut */
#register-form {
    display: none;
}

/* Lien pour basculer */
.switch-link {
    display: block;
    margin-top: clamp(0.5rem, 2vw, 1rem);
    text-align: center;
    cursor: pointer;
    text-decoration: underline;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
}

/* Boutons responsive */
.button_connexion {
    width: 100%;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    background-color: rgba(53, 50, 47, 0.9);
    color: white;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 4%;
    border: 2px solid rgba(0, 0, 0, 1);
}

.button_connexion:hover {
    background-color: rgba(80, 75, 70, 0.9);
}

/* Lien "Mot de passe oublié" */
a, span {
    color: #35322F;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    text-decoration: underline;
    margin-top: clamp(0.25rem, 1vw, 0.5rem);
    display: flex;
    justify-content: center;
}

a:hover {
    text-decoration: none;
}

/* Wrapper pour mot de passe avec œil */
.password-wrapper {
    position: relative;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    font-size: 1.2em;
    color: #555;
}

/* Responsive : ajustement sur écrans moyens et larges */
@media (min-width: 768px) {
    form {
        max-width: 400px;
    }
}

@media (min-width: 1024px) {
    .form-wrapper {
        padding: 4%;
        max-width: 500px;
    }
}
