<div class="fr-skiplinks">
    <nav role="navigation" class="fr-container" aria-label="Accès rapide">
        <ul class="fr-skiplinks__list">
            <li>
                <a class="fr-link" href="#contenu">Contenu</a>
            </li>
            <li>
                <a class="fr-link" href="#navigation-tabs">Menu</a>
            </li>
            <li>
                <a class="fr-link" href="#page-footer">Pied de page</a>
            </li>
        </ul>
    </nav>
</div>
<header class="fr-header" role="banner">
    <div class="fr-header__body">
        <div class="fr-container">
            <div class="fr-header__body-row">
                <div class="fr-header__brand">
                    <div class="fr-header__brand-top">
                        <a href="/" class="internal-outline" title="Accueil - {{ main_conf.title }} du {{ main_conf.entity }}">
                            <div class="fr-header__logo">
                                    <p class="fr-logo">
                                        {{ main_conf.entity_breaklines|safe }}
                                    </p>
                            </div>
                        </a>
                        <div class="fr-header__navbar">
                            <button class="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="header-navigation"  id="button-492" title="Menu">
                                Menu
                            </button>
                        </div>
                    </div>
                    <div class="fr-header__service">
                        <p class="fr-header__service-title">
                            {{ main_conf.title }}
                            {% if ENVIRONMENT != "prd" %}
                                <span class="fr-badge fr-badge--success fr-badge--no-icon" id="fr-badge-:Rj5ikq:">{% if ENVIRONMENT == "ppd" %}PREPROD{% else %}DEV{% endif %}</span>
                            {% endif %}
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="fr-header__menu fr-modal" id="header-navigation" aria-labelledby="button-492">
        <div class="fr-container">
            <button class="fr-btn--close fr-btn" aria-controls="header-navigation" title="Fermer">
                Fermer
            </button>
            <div class="fr-header__menu-links">
            </div>
            <nav role="navigation" class="fr-nav" id="navigation-tabs" aria-label="Menu principal">
                <ul class="fr-nav__list">
                    {% for item in main_conf.parsed_header_navigation %}
                        {% if item.links %}
                            <li class="fr-nav__item">
                                <button class="fr-nav__btn" aria-expanded="false" aria-controls="menu-{{ forloop.counter }}">
                                    {{ item.title }}
                                </button>
                                <div class="fr-collapse fr-menu" id="menu-{{ forloop.counter }}">
                                    <ul class="fr-menu__list">
                                        {% for link in item.links %}
                                            <li>
                                                <a class="fr-nav__link" href="{{ link.link }}" target="_self">{{ link.title }}</a>
                                            </li>
                                        {% endfor %}
                                    </ul>
                                </div>
                            </li>
                        {% else %}
                            <li class="fr-nav__item">
                                <a class="fr-nav__link" href="{{ item.link }}" target="_self">{{ item.title }}</a>
                            </li>
                        {% endif %}
                    {% endfor %}
                </ul>
            </nav>
        </div>
    </div>
    {% if notice %}
        <div id="notice" class="fr-notice fr-notice--info" data-show="false" data-id="{{ notice.id }}">
            <div class="fr-container">
                <div class="fr-notice__body">
                    <p>
                        <span class="fr-notice__title">{{ notice.title }}</span>
                        <span class="fr-notice__desc">{{ notice.description }}</span>
                        {% if notice.link_href and notice.link_text %}
                            <a href="{{ notice.link_href }}" class="fr-notice__link fr-icon-arrow-right-line fr-link--icon-left">{{ notice.link_text }}</a>
                        {% endif %}
                    </p>
                    <button id="close-notice" aria-controls="notice" title="Masquer le message" class="fr-btn--close fr-btn">Masquer le message</button>
                </div>
            </div>
        </div>
    {% endif %}
</header>
<script>
    {% include "./header.js" %}
</script>
