/* Style global de la page */
body {
    background-color: #f1f5f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Carte principale centrée */
.main-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Titre de bienvenue */
.main-content h1 {
    color: rgb(19, 32, 75);
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

/* Sélecteur Connexion / Inscription */
.choix_id {
    display: flex;
    width: 100%;
    margin-bottom: 25px;
    background-color: #e2e8f0;
    border-radius: 8px;
    padding: 4px;
}

.choix_id a {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.choix_id a.active {
    background-color: rgb(19, 32, 75);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Formulaires */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Champs de saisie */
.main-content input[type="email"],
.main-content input[type="password"],
.main-content input[type="text"] {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 16px;
    padding: 0 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f8fafc;
}

.main-content input:focus {
    border-color: rgb(53, 87, 199);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(53, 87, 199, 0.15);
}

/* Bouton de validation */
.login-btn {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    background: linear-gradient(0deg, rgb(19, 32, 75), rgb(53, 87, 199));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    box-shadow: 0 4px 12px rgba(19, 32, 75, 0.3);
    transform: translateY(-1px);
}

/* Gestion des messages d'erreur et de succès */
.message-hidden {
    display: none;
}

.message-error {
    width: 100%;
    background-color: #fee2e2;
    color: #991b1b;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #fecaca;
    box-sizing: border-box;
}

.message-success {
    width: 100%;
    background-color: #dcfce7;
    color: #166534;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #bbf7d0;
    box-sizing: border-box;
}

/* Classe utilitaire */
.hidden {
    display: none !important;
}