<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% set seoTitle = (block('seo_title') is defined ? block('seo_title') : (block('title') is defined ? block('title') : school.name ~ ' | Inscriptions et suivi pédagogique'))|striptags|trim %}
    {% set seoDescription = (block('seo_description') is defined ? block('seo_description') : school.description)|striptags|trim %}
    {% set seoCanonical = (block('seo_canonical') is defined ? block('seo_canonical') : school.route)|striptags|trim %}
    {% set seoImagePath = school.hasHeroImage ? school.heroImage : (school.hasLogo ? school.logo : 'assets/brand/logo-salmad-dark.png') %}
    {% set seoImage = (block('seo_image') is defined ? block('seo_image') : public_absolute_asset_url(ecole, seoImagePath))|striptags|trim %}
    {% set seoType = (block('seo_type') is defined ? block('seo_type') : 'website')|striptags|trim %}
    {% set seoRobots = (block('seo_robots') is defined ? block('seo_robots') : 'index,follow')|striptags|trim %}
    {% include 'public/_seo.html.twig' with {
        seo_title: seoTitle,
        seo_description: seoDescription,
        seo_canonical: seoCanonical,
        seo_image: seoImage,
        seo_type: seoType,
        seo_robots: seoRobots,
        seo_site_name: school.name
    } only %}
    {% block seo_extra %}{% endblock %}
    {% set schoolJsonLd = {
        '@context': 'https://schema.org',
        '@type': 'EducationalOrganization',
        'name': school.name,
        'url': school.route,
        'description': school.description
    } %}
    {% if school.hasLogo %}
        {% set schoolJsonLd = schoolJsonLd|merge({'logo': public_absolute_asset_url(ecole, school.logo)}) %}
    {% endif %}
    <script type="application/ld+json">{{ schoolJsonLd|json_encode|raw }}</script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Marcellus&family=Source+Sans+3:wght@400;600;700;800&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
    <link rel="icon" type="image/png" href="{{ asset(school.favicon) }}">
    <link href="{{ asset('assets/public/themes/daroul_ilm/theme.css') }}" rel="stylesheet">
    <style>
        :root {
            --school-primary: {{ school.colors.primary }};
            --school-secondary: {{ school.colors.secondary }};
            --school-accent: {{ school.colors.accent }};
        }
    </style>
</head>
<body class="daroul-body">
    <header class="daroul-header">
        <div class="container daroul-nav">
            <a class="daroul-logo" href="{{ school.route }}" aria-label="Accueil {{ school.name }}">
                {% if school.hasLogo %}
                    <img class="daroul-brand-logo school-logo" src="{{ asset(school.logo) }}" alt="{{ school.name }}">
                {% else %}
                    <span class="daroul-logo-text">{{ school.name }}</span>
                {% endif %}
            </a>
            <nav class="daroul-menu d-none d-lg-flex align-items-center" aria-label="Navigation principale">
                <a href="#presentation">Présentation</a>
                <a href="#programmes">Programmes</a>
                <a href="#langues">Langues</a>
                <a href="#classes">Classes</a>
                <a href="#contact">Contact</a>
            </nav>
            <a class="daroul-cta daroul-nav-cta" href="{{ school.registrationRoute }}">Inscription</a>
        </div>
    </header>

    <main>
        {% block body %}{% endblock %}
    </main>

    <footer class="daroul-footer">
        <div class="container daroul-footer-grid">
            <div class="daroul-footer-main">
                {% if school.hasLogo %}
                    <img class="daroul-footer-logo school-logo" src="{{ asset(school.footerLogo) }}" alt="{{ school.name }}">
                {% endif %}
                <div class="daroul-footer-brand">{{ school.name }}</div>
                <p>{{ school.description }}</p>
            </div>
            <div>
                <div class="daroul-footer-title">Navigation</div>
                <ul class="daroul-footer-list">
                    <li><a href="#programmes">Programmes</a></li>
                    <li><a href="#langues">Langues</a></li>
                    <li><a href="#tarifs">Tarifs</a></li>
                    <li><a href="#contact">Contact</a></li>
                </ul>
            </div>
            <div>
                <div class="daroul-footer-title">Contacts</div>
                <ul class="daroul-footer-list">
                    <li>{{ school.phone }}</li>
                    {% if school.phone2 %}
                        <li>{{ school.phone2 }}</li>
                    {% endif %}
                    <li>{{ school.email }}</li>
                    <li>{{ school.city }}</li>
                </ul>
            </div>
        </div>
        <div class="container daroul-footer-bottom">
            <span>Propulsé par SALSABIL Madrassas.</span>
        </div>
    </footer>
</body>
</html>
