{% extends "base.html" %}
{% block title %}{{ error_code }} - Erreur GMAO{% endblock %}

{% block content %}
<div class="container-fluid main-content">
    <div class="text-center py-5">
        <div class="mb-4">
            <img src="{{ url_for('static', filename='img/logo.png') }}" alt="GMAO Logo" class="img-fluid" style="max-width:120px; opacity:0.6;">
        </div>
        <div class="display-1 fw-bold text-gmao mb-3">{{ error_code }}</div>
        <h2 class="text-muted mb-3">{{ error_title }}</h2>
        <p class="text-muted mb-4">{{ error_message }}</p>
        <div class="d-flex justify-content-center gap-2">
            <a href="{{ url_for('dashboard.index') }}" class="btn btn-gmao-primary">
                <i class="bi bi-speedometer2"></i> Retour au tableau de bord
            </a>
            <a href="javascript:history.back()" class="btn btn-outline-secondary">
                <i class="bi bi-arrow-left"></i> Page precedente
            </a>
        </div>
        {% if error_code == '500' %}
        <div class="alert alert-warning mt-4" style="max-width: 600px; margin: 0 auto;">
            <i class="bi bi-info-circle"></i> Cette erreur a ete signalee automatiquement.
            Le code d'erreur: <strong>{{ request.path }}</strong>
        </div>
        {% endif %}
    </div>
</div>
{% endblock %}