<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Connexion administrateur — AKABLA IMMOBILIER</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="flex min-h-screen items-center justify-center bg-slate-100 px-4 antialiased">
    <div class="w-full max-w-md rounded-2xl border border-slate-200 bg-white p-8 shadow-sm">
        <h1 class="text-center text-xl font-semibold text-slate-900">Administration</h1>
        <p class="mt-1 text-center text-sm text-slate-500">AKABLA IMMOBILIER</p>

        @if ($errors->any())
            <div class="mt-6 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800">
                {{ $errors->first() }}
            </div>
        @endif

        <form action="{{ route('admin.login') }}" method="post" class="mt-8 space-y-4">
            @csrf
            <div>
                <label for="email" class="block text-sm font-medium text-slate-700">E-mail</label>
                <input type="email" name="email" id="email" value="{{ old('email') }}" required autocomplete="username"
                    class="mt-1 w-full rounded-lg border border-slate-300 px-3 py-2 text-sm shadow-sm focus:border-sky-500 focus:outline-none focus:ring-1 focus:ring-sky-500">
            </div>
            <div>
                <label for="password" class="block text-sm font-medium text-slate-700">Mot de passe</label>
                <input type="password" name="password" id="password" required autocomplete="current-password"
                    class="mt-1 w-full rounded-lg border border-slate-300 px-3 py-2 text-sm shadow-sm focus:border-sky-500 focus:outline-none focus:ring-1 focus:ring-sky-500">
            </div>
            <label class="flex items-center gap-2 text-sm text-slate-600">
                <input type="checkbox" name="remember" value="1" class="rounded border-slate-300 text-sky-600 focus:ring-sky-500">
                Se souvenir de moi
            </label>
            <button type="submit" class="w-full rounded-lg bg-sky-600 py-2.5 text-sm font-semibold text-white shadow hover:bg-sky-700">Se connecter</button>
        </form>
    </div>
</body>
</html>
