<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="/assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <title>Admin | Bookcase</title>
    <link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon">
    <style>
        body {
            width: 100vw;
            height: 100vh;
            overflow: hidden;
        }
    </style>
</head>

<body>
    <div class="row justify-content-center h-100 align-items-center">
        <div class="col-11 col-lg-6">
            <div class="card">
                <div class="card-header text-center text-danger">
                    @if (session()->has('error'))
                        {{ session()->get('error') }}
                    @else
                        Vous devez vous connecter...
                    @endif
                </div>
                <div class="card-body">
                    <h3 class="text-center">Espace d'Administration</h3>
                    <form action="{{ route('admin_log') }}" method="POST">
                        @csrf()
                        <div class="row mb-3">
                            <label for="inputText" class=" col-form-label">Email </label>
                            <div class="col-12">
                                <input class="form-control @error('email') is-invalid @enderror" type="email" required
                                    name="email" value="{{ old('email') }}">
                            </div>
                        </div>
                        <div class="row mb-3">
                            <label for="inputText" class=" col-form-label">Mot de passe</label>
                            <div class="col-12">
                                <input class="form-control @error('password') is-invalid @enderror" type="password"
                                    required name="password" value="{{ old('password') }}">
                            </div>
                        </div>
                        <div class="row mb-3 justify-content-center">
                            <button type="submit" class="btn btn-primary col-sm-10 col-md-4">Connexion</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
