<x-guest-layout>
    <x-auth-session-status class="mb-4 rounded-xl bg-emerald-50 border border-emerald-100 px-4 py-3 text-sm text-emerald-800" :status="session('status')" />

    <div class="mb-8">
        <h2 class="text-3xl font-bold text-slate-900">Connexion</h2>
        <p class="text-slate-500 text-sm mt-2 leading-relaxed">Connectez-vous pour accéder à votre espace TransTev.</p>
    </div>

    <form method="POST" action="{{ route('login') }}" class="space-y-5">
        @csrf

        <div>
            <label for="email" class="block text-xs font-semibold uppercase tracking-wider text-slate-500 mb-2">Adresse e-mail</label>
            <div class="relative">
                <input id="email" type="email" name="email" value="{{ old('email') }}" required autofocus autocomplete="username"
                       placeholder="votre@email.com"
                       class="w-full rounded-xl border border-slate-200 bg-slate-50/60 px-4 py-3 pr-11 text-sm text-slate-900 placeholder:text-slate-400 shadow-sm transition focus:bg-white focus:border-transtev-500 focus:outline-none focus:ring-2 focus:ring-transtev-500/20">
                <svg class="absolute right-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/></svg>
            </div>
            <x-input-error :messages="$errors->get('email')" class="mt-2" />
        </div>

        <div>
            <label for="password" class="block text-xs font-semibold uppercase tracking-wider text-slate-500 mb-2">Mot de passe</label>
            <div class="relative">
                <input id="password" type="password" name="password" required autocomplete="current-password"
                       placeholder="Votre mot de passe"
                       class="w-full rounded-xl border border-slate-200 bg-slate-50/60 px-4 py-3 pr-11 text-sm text-slate-900 placeholder:text-slate-400 shadow-sm transition focus:bg-white focus:border-transtev-500 focus:outline-none focus:ring-2 focus:ring-transtev-500/20">
                <svg class="absolute right-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/></svg>
            </div>
            <x-input-error :messages="$errors->get('password')" class="mt-2" />
        </div>

        <div class="flex items-center justify-between pt-1">
            <label for="remember_me" class="inline-flex items-center gap-2 cursor-pointer select-none">
                <input id="remember_me" type="checkbox" name="remember" class="rounded border-slate-300 text-transtev-600 focus:ring-transtev-500">
                <span class="text-sm text-slate-600">Se souvenir de moi</span>
            </label>

            @if (Route::has('password.request'))
                <a href="{{ route('password.request') }}" class="text-sm font-medium text-transtev-600 hover:text-transtev-700">
                    Mot de passe oublié ?
                </a>
            @endif
        </div>

        <button type="submit"
                class="mt-2 w-full inline-flex items-center justify-center gap-2 rounded-xl bg-transtev-600 px-4 py-3.5 text-sm font-semibold text-white shadow-md shadow-transtev-600/30 transition hover:bg-transtev-700 focus:outline-none focus:ring-2 focus:ring-transtev-500 focus:ring-offset-2">
            <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"/></svg>
            Se connecter
        </button>
    </form>
</x-guest-layout>
