@model FamilyBudget.Models.Utilisateur

@{
    ViewData["Title"] = "Create Utilisateur";
}

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Create Utilisateur</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        .form-control:focus {
            border-color: #007bff;
            box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
        }

        .input-group-text {
            background-color: #f8f9fa;
        }
    </style>
</head>
<body>
    <div class="container mt-5">
        <div class="card shadow-lg p-4">
            <h2 class="text-primary"><i class="bi bi-person-plus"></i> Créer un utilisateur</h2>
            <p class="text-muted">Remplissez les informations pour ajouter un nouvel utilisateur.</p>
            <hr />
            <div class="row">
                <div class="col-md-6">
                    <form asp-action="Create">
                        <div asp-validation-summary="ModelOnly" class="alert alert-danger"></div>

                        <div class="mb-3">
                            <label asp-for="Nom" class="form-label fw-bold">Nom</label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="bi bi-person"></i></span>
                                <input asp-for="Nom" class="form-control" placeholder="Entrez votre nom" />
                            </div>
                            <span asp-validation-for="Nom" class="text-danger"></span>
                        </div>

                        <div class="mb-3">
                            <label asp-for="Email" class="form-label fw-bold">Email</label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="bi bi-envelope"></i></span>
                                <input asp-for="Email" type="email" class="form-control" placeholder="exemple@mail.com" />
                            </div>
                            <span asp-validation-for="Email" class="text-danger"></span>
                        </div>

                        <div class="mb-3">
                            <label asp-for="MotDePasse" class="form-label fw-bold">Mot de passe</label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="bi bi-lock"></i></span>
                                <input asp-for="MotDePasse" type="password" class="form-control" placeholder="******" />
                            </div>
                            <span asp-validation-for="MotDePasse" class="text-danger"></span>
                        </div>

                        <div class="d-flex gap-3">
                            <button type="submit" class="btn btn-primary btn-lg"><i class="bi bi-check-circle"></i> Créer</button>
                            <a asp-action="Index" class="btn btn-secondary btn-lg"><i class="bi bi-arrow-left"></i> Retour</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    @section Scripts {
        @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
    }
</body>
</html>
