<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Connexion Membre - {{ $siteName ?? 'ATARA' }} LifeStyle</title>
    <link rel="icon" type="image/x-icon" href="{{ $siteFavicon ?? asset('favicon.ico') }}">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    <style>
        body {
            background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
        }
        .login-card {
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        .btn-primary {
            background: linear-gradient(135deg, #8B5CF6, #D946EF);
            border: none;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-md-5">
                <div class="login-card p-5">
                    <div class="text-center mb-4">
                        @if(!empty($siteLogo))<img src="{{ $siteLogo }}" alt="{{ $siteName ?? 'ATARA' }}" height="60" class="mb-2">@else<i class="bi bi-gem text-primary fs-1 mb-2"></i>@endif
                        <h3>Espace Membre</h3>
                        <p class="text-muted">{{ $siteName ?? 'ATARA' }} LifeStyle</p>
                    </div>
                    
                    @if(session('error'))
                        <div class="alert alert-danger">{{ session('error') }}</div>
                    @endif
                    
                    <form action="{{ route('member.login.post') }}" method="POST">
                        @csrf
                        <div class="mb-3">
                            <label class="form-label">Email</label>
                            <input type="email" name="email" class="form-control" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Mot de passe</label>
                            <input type="password" name="password" class="form-control" required>
                        </div>
                        <button type="submit" class="btn btn-primary w-100 mb-3">
                            <i class="bi bi-box-arrow-in-right me-2"></i>Se Connecter
                        </button>
                    </form>
                    
                    <hr>
                    <div class="text-center">
                        <p class="mb-0">Pas encore membre ? <a href="{{ route('member.register') }}">S'inscrire</a></p>
                        <a href="/" class="text-muted small"><i class="bi bi-arrow-left"></i> Retour au site</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
