<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <title>Connexion - Metadidomi Server Plus</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <link rel="stylesheet" href="/static/style.css">
    <style>
        body {
            background: linear-gradient(120deg, #e0e7ff 0%, #f7fafc 100%);
        }
        .login-container {
            max-width: 400px;
            margin: 60px auto;
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 4px 24px #0002;
            padding: 32px 28px 24px 28px;
        }
        h2 {
            text-align: center;
            color: #1976d2;
            margin-bottom: 18px;
        }
        label {
            font-weight: 500;
            color: #333;
            margin-top: 10px;
        }
        input[type="text"], input[type="password"] {
            width: 100%;
            padding: 10px 12px;
            margin: 8px 0 16px 0;
            border: 1px solid #bfc8e0;
            border-radius: 8px;
            font-size: 1em;
            background: #f5f8ff;
        }
        button[type="submit"] {
            width: 100%;
            background: #1976d2;
            color: #fff;
            border: none;
            border-radius: 8px;
            padding: 12px;
            font-size: 1.08em;
            font-weight: bold;
            cursor: pointer;
            margin-top: 8px;
            transition: background 0.2s;
        }
        button[type="submit"]:hover {
            background: #1565c0;
        }
        .error {
            background: #ffeaea;
            color: #c00;
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 12px;
            text-align: center;
            font-size: 1em;
        }
        .login-footer {
            text-align: center;
            margin-top: 18px;
            color: #888;
            font-size: 0.98em;
        }
        .login-footer a {
            color: #1976d2;
            text-decoration: none;
        }
        .login-footer a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <h2>Connexion à Metadidomi Server Plus</h2>
        {% if error %}
        <div class="error">{{ error }}</div>
        {% endif %}
        <form method="post">
            <label for="username">Nom d'utilisateur :</label>
            <input type="text" id="username" name="username" placeholder="Votre identifiant" required autofocus>
            <label for="password">Mot de passe :</label>
            <input type="password" id="password" name="password" placeholder="Votre mot de passe" required>
            <button type="submit">Se connecter</button>
        </form>
    </div>
</body>
</html>
