<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Gestion du parc{% endblock %}</title>
    <style>
        body { font-family: system-ui, sans-serif; margin: 2rem; background: #f8f9fa; }
        nav { margin-bottom: 1.5rem; }
        nav a { margin-right: 1rem; text-decoration: none; color: #0d6efd; }
        .container { background: #fff; padding: 1.5rem; border-radius: 0.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
        th, td { padding: 0.75rem; border-bottom: 1px solid #dee2e6; text-align: left; }
        .btn { display: inline-block; padding: 0.4rem 0.8rem; border-radius: 0.25rem; text-decoration: none; color: #fff; background: #0d6efd; }
        .btn-danger { background: #dc3545; }
        .btn-secondary { background: #6c757d; }
        .status-active { color: green; font-weight: bold; }
        .status-inactive { color: red; font-weight: bold; }
    </style>
</head>
<body>
    <nav>
        <a href="{% url 'equipment_list' %}">Accueil</a>
        {% if user.is_authenticated %}
            <a href="{% url 'equipment_create' %}">Ajouter un équipement</a>
            <a href="{% url 'logout' %}">Déconnexion ({{ user.username }})</a>
        {% else %}
            <a href="{% url 'login' %}">Connexion</a>
        {% endif %}
    </nav>
    <div class="container">
        {% block content %}{% endblock %}
    </div>
</body>
</html>
