Spaces:
Running
Running
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Connexion - LaboConnect</title> | |
| <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💉</text></svg>"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| body { | |
| font-family: 'Poppins', sans-serif; | |
| background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%); | |
| } | |
| .btn-primary { | |
| background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%); | |
| transition: all 0.3s ease; | |
| } | |
| .btn-primary:hover { | |
| background: linear-gradient(90deg, #4338ca 0%, #6d28d9 100%); | |
| transform: scale(1.05); | |
| } | |
| </style> | |
| </head> | |
| <body class="min-h-screen flex items-center justify-center p-4"> | |
| <div class="w-full max-w-md"> | |
| <div class="bg-white rounded-2xl shadow-xl p-8"> | |
| <div class="text-center mb-8"> | |
| <div class="mx-auto w-16 h-16 rounded-full bg-indigo-100 flex items-center justify-center mb-4"> | |
| <i data-feather="log-in" class="text-indigo-600 w-8 h-8"></i> | |
| </div> | |
| <h1 class="text-2xl font-bold text-gray-800">Connexion</h1> | |
| <p class="text-gray-600 mt-2">Accédez à votre compte LaboConnect</p> | |
| </div> | |
| <form id="loginForm" class="space-y-6"> | |
| <div> | |
| <label class="block text-gray-700 mb-2">Email</label> | |
| <input type="email" id="loginEmail" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-300 focus:border-transparent" required> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-2">Mot de passe</label> | |
| <input type="password" id="loginPassword" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-300 focus:border-transparent" required> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <input id="rememberMe" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"> | |
| <label for="rememberMe" class="ml-2 block text-sm text-gray-700">Se souvenir de moi</label> | |
| </div> | |
| <a href="#" class="text-sm text-indigo-600 hover:text-indigo-800">Mot de passe oublié?</a> | |
| </div> | |
| <button type="submit" class="w-full btn-primary text-white py-3 rounded-lg font-medium">Se connecter</button> | |
| </form> | |
| <div class="mt-6 text-center"> | |
| <p class="text-gray-600"> | |
| Vous n'avez pas de compte ? | |
| <a href="register.html" class="text-indigo-600 font-medium hover:text-indigo-800">S'inscrire</a> | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| document.getElementById('loginForm').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| const email = document.getElementById('loginEmail').value; | |
| const password = document.getElementById('loginPassword').value; | |
| // Mock authentication - In a real app, this would check with a server | |
| const users = JSON.parse(localStorage.getItem('users')) || []; | |
| const user = users.find(u => u.email === email && u.password === password); | |
| if (user) { | |
| localStorage.setItem('currentUser', JSON.stringify(user)); | |
| window.location.href = 'dashboard.html'; | |
| } else { | |
| alert('Identifiants incorrects'); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |