{% extends "base.html" %}
{% block title %}Services — GMAO{% endblock %}

{% block content %}
<div class="container-fluid">
    <div class="row mb-4">
        <div class="col">
            <h1 class="h3"><i class="bi bi-activity"></i> Services</h1>
        </div>
    </div>

    <div class="card">
        <div class="card-body">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>Nom</th>
                        <th>Description</th>
                        <th>Actif</th>
                    </tr>
                </thead>
                <tbody>
                    {% for s in services %}
                    <tr>
                        <td>{{ s.name }}</td>
                        <td>{{ s.description or '—' }}</td>
                        <td>{% if s.is_active %}<span class="badge bg-success">Oui</span>{% else %}<span class="badge bg-secondary">Non</span>{% endif %}</td>
                    </tr>
                    {% else %}
                    <tr><td colspan="3" class="text-center text-muted">Aucun service.</td></tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %}