{# ══════════════════════════════════════════════════════════════
   templates/partials/_header.html.twig
   Header principal — inclus depuis base.html.twig
   ══════════════════════════════════════════════════════════════ #}

{% set current_route = app.request.attributes.get('_route') %}

<header>

    {# ── Gauche : Logo + Navigation ───────────────────────────── #}
    <div class="header-left">

        <a href="{{ path('app_accueil') }}" class="logo">
            <img src="{{ asset('images/logo/logo-light.svg') }}" alt="Logo" class="logo-light">
            <img src="{{ asset('images/logo/logo-dark.svg') }}" alt="Logo" class="logo-dark">
        </a>

        <nav>
            <a href="{{ path('app_accueil') }}"
               class="nav-link {{ current_route == 'app_accueil' ? 'active' }}">
                Accueil
            </a>
            <a href="{{ path('app_modpack') }}"
               class="nav-link {{ current_route == 'app_modpack' ? 'active' }}">
                Modpack
            </a>
            <a href="{{ path('app_accueil') }}"
               class="nav-link {{ current_route == 'app_home' ? 'active' }}">
                Statistiques
            </a>
            <a href="{{ path('app_accueil') }}"
               class="nav-link {{ current_route == 'app_home' ? 'active' }}">
                Actualité
            </a>
            <a href="{{ path('app_maps') }}"
               class="nav-link {{ current_route == 'app_maps' ? 'active' }}">
                Maps
            </a>
        </nav>

    </div>

    {# ── Droite : Actions (thème + connexion) ─────────────────── #}
    <div class="header-actions">
        {% include 'partials/_theme_toggle.html.twig' %}
        {% if is_granted('ROLE_USER') %}
            {% include 'partials/_logout_dropdown.html.twig' %}
        {% else %}
             {% include 'partials/_login_dropdown.html.twig' %}
        {% endif %}
    </div>

</header>
