{# ══════════════════════════════════════════════════════════════
   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">
            <span class="logo-name">LOGO</span>
        </a>

        <nav>
            <a href="{{ path('app_accueil') }}"
               class="nav-link {{ current_route == 'app_accueil' ? 'active' }}">
                Accueil
            </a>
            <a href="{{ path('app_accueil') }}"
               class="nav-link {{ current_route == 'app_home' ? '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>
        </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>
