* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 0 10px;
}

body::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("../pictures/background/sing-in-background.jpg");
    background-position: center;
    background-size: cover;
}

.wrapper {
    width: 400px;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

form {
    display: flex;
    flex-direction: column;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
}

.input-field {
    position: relative;
    border-bottom: 2px solid #ccc;
    margin: 15px 0;
}

.input-field label {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    color: #fff;
    font-size: 16px;
    pointer-events: none;
    transition: 0.15s ease;
}

.input-field input {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #fff;
}

.input-field input:focus ~ label,
.input-field input:valid ~ label {
    font-size: 0.8rem;
    top: 10px;
    transform: translateY(-120%);
}

.forget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 25px 0 35px 0;
    color: #fff;
}

#remember {
    accent-color: #fff;
}

.forget label {
    display: flex;
    align-items: center;
}

.forget label p {
    margin-left: 8px;
}

.wrapper a {
    color: #efefef;
    text-decoration: none;
}

.wrapper a:hover {
    text-decoration: underline;
}

button {
    background: #fff;
    color: #000;
    font-weight: 600;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    border: 2px solid transparent;
    transition: 0.3s ease;
}

button:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.register {
    text-align: center;
    margin-top: 30px;
    color: #fff;
}

/* Animation pour faire apparaître en fondu */
/* met le .wrapper invisible par défaut */
.wrapper {
    opacity: 0;
}

/* Quand la page vient de se charger */
.fade-in {
    animation: fadeIn 1s forwards;
}

/* Quand on quitte la page */
.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* oeil pour voir le mot de passe */

.input-field {
    position: relative;
    border-bottom: 2px solid #ccc;
    margin: 15px 0;
}

/* Positionne l’icône à droite, centrée verticalement */
.input-field .eye {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.input-field .eye svg {
    width: 20px;
    height: 20px;
    /* Ajuste la couleur si nécessaire */
    fill: #fff;
}

.input-field .eye:hover svg {
    fill: #ddd; /* Effet hover */
}

/* Réinitialisation des marges/paddings du body pour éviter les décalages */
body {
    margin: 0;
    padding: 0;
    /* Si tu as un background ou un body::before, conserve-les */
    /* background: ...  */
}

/* Navbar fixée en haut avec un effet vitre (backdrop-filter) */
.navbar {
    position: fixed; /* fixée en haut */
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;

    background: rgba(255, 255, 255, 0.2); /* un fond légèrement transparent */
    backdrop-filter: blur(8px); /* flou derrière le contenu */
    -webkit-backdrop-filter: blur(8px); /* compatibilité Safari */

    /* Pour voir du texte blanc lisible sur un fond clair, on peut foncer la couleur du texte */
    color: #fff;
    z-index: 999; /* pour qu’elle passe au-dessus du wrapper */
}

/* Marque / Titre de la navbar */
.navbar .nav-brand {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Liste des liens de la navbar */
.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px; /* espace entre les liens */
    margin: 0;
    padding: 0;
}

.navbar ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    color: #ddd;
}

/* Pour éviter que le wrapper/form soit caché sous la navbar */
.wrapper {
    margin-top: 80px; /* décale le conteneur sous la navbar */
    /* le reste de tes styles existants... */
}

/* Exemple d’autres styles existants potentiels */
.input-field {
    position: relative;
    border-bottom: 2px solid #ccc;
    margin: 15px 0;
}

.info {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}
.success {
    background-color: #c8f7c5;
    color: #2e7d32;
}
.error {
    background-color: #f8d7da;
    color: #b71c1c;
}
