{{ form_start(form, {attr: {class: 'admin-form'}}) }}
    <div class="admin-form-grid">
        <section class="admin-card admin-form-section">
            <h2>Informations du thème</h2>
            <div class="admin-form-two-cols">
                {{ form_row(form.nom) }}
                {{ form_row(form.code) }}
            </div>
            {{ form_row(form.description) }}
            <div class="admin-form-check">
                {{ form_row(form.actif) }}
            </div>
        </section>

        <section class="admin-card admin-form-section">
            <h2>Aperçu visuel</h2>
            <div class="admin-theme-upload-preview">
                {% if theme.previewImage %}
                    <img src="{{ asset(theme.previewImage) }}" alt="Aperçu actuel de {{ theme.nom ?: 'ce thème' }}">
                    <small>{{ theme.previewImage }}</small>
                {% else %}
                    <span class="material-symbols-outlined">image</span>
                    <strong>Aucune image configurée</strong>
                    <small>Ajoutez une capture ou une composition représentative du thème public.</small>
                {% endif %}
            </div>
            {{ form_row(form.previewImageFile) }}
        </section>
    </div>

    <div class="admin-form-actions">
        <a class="btn admin-btn admin-btn-secondary" href="{{ path('platform_theme_index') }}">Annuler</a>
        <button class="btn admin-btn admin-btn-primary" type="submit">{{ button_label|default('Enregistrer') }}</button>
    </div>
{{ form_end(form) }}
