<!DOCTYPE html>
<html lang="fr">
{% set company = company_settings() %}
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="{{ company.primary_color|default('#0f2a44') }}">
<title>{% block title %}{{ company.software_name|default('Plateforme immobiliere') }}{% endblock %}</title>
<link rel="manifest" href="{{ asset('manifest.json') }}">
<link rel="icon" href="{% if company.favicon_path|default(null) %}{{ asset(company.favicon_path) }}{% else %}data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 128'%3E%3Crect width='128' height='128' rx='24' fill='%230f2a44'/%3E%3Cpath d='M28 96V52l36-24 36 24v44H76V72H52v24z' fill='%23f7f4ee'/%3E%3Cpath d='M52 96V72h24v24' fill='%232e8b57'/%3E%3C/svg%3E{% endif %}">
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('assets/app.css') }}?v=20260804-auth-reset">
<style>
:root {
--navy: {{ company.primary_color|default('#0f2a44') }};
--orange: {{ company.secondary_color|default('#f58220') }};
}
</style>
{% endblock %}
</head>
<body class="{% if app.user %}app-body{% else %}public-body{% endif %}">
{% if app.user %}
<div class="app-shell">
{% if is_granted('ROLE_CLIENT') %}
{% include 'components/_client_nav.html.twig' %}
{% else %}
{% include 'components/_admin_nav.html.twig' %}
{% endif %}
<main class="main-panel">
<header class="topbar">
<button class="icon-button sidebar-toggle" type="button" data-sidebar-toggle aria-label="Menu">
<i data-lucide="menu"></i>
</button>
<div>
<p class="eyebrow">{{ company.commercial_name|default('Agence immobiliere') }}</p>
<strong>{% block page_title %}{{ company.software_name|default('Plateforme immobiliere') }}{% endblock %}</strong>
</div>
<div class="topbar-actions">
<a class="ghost-button" href="{{ path('app_change_password') }}"><i data-lucide="key-round"></i>Mot de passe</a>
<a class="primary-button compact" href="{{ path('app_logout') }}"><i data-lucide="log-out"></i>Sortir</a>
</div>
</header>
{% endif %}
{% include 'components/_flash.html.twig' %}
{% block body %}{% endblock %}
{% if app.user %}
</main>
</div>
{% endif %}
{% block javascripts %}
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="{{ asset('assets/app.js') }}?v=20260803-client-admin-ui"></script>
{% endblock %}
</body>
</html>