{% extends "base.html" %}
{% block title %}Changer le mot de passe — GMAO Collège{% endblock %}

{% block content %}
<div class="container-fluid py-4">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h5 class="mb-0"><i class="bi bi-key me-2"></i>Changer le mot de passe</h5>
                    <small class="text-muted">Utilisateur: {{ user.username }}</small>
                </div>
                <div class="card-body">
                    <form method="POST">
                        <div class="mb-3">
                            <label class="form-label">Nouveau mot de passe</label>
                            <input type="password" name="new_password" class="form-control" required minlength="12">
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Confirmer le mot de passe</label>
                            <input type="password" name="confirm_password" class="form-control" required>
                        </div>
                        <div class="d-flex justify-content-between">
                            <a href="{{ url_for('auth.list_users') }}" class="btn btn-secondary">
                                <i class="bi bi-arrow-left me-1"></i>Annuler
                            </a>
                            <button type="submit" class="btn btn-warning">
                                <i class="bi bi-key me-1"></i>Changer le mot de passe
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
