{% extends 'admin/base.html' %}

{% block content %}
<div class="container-fluid">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <h1><i class="fas fa-cog me-2"></i> Paramètres du site</h1>
    </div>
    
    <div class="card border-0 shadow-sm">
        <div class="card-body p-4">
            <form method="post" class="needs-validation" novalidate>
                {{ form.hidden_tag() }}
                
                <div class="row mb-4">
                    <div class="col-12">
                        <h4 class="mb-3">Informations générales</h4>
                    </div>
                    
                    <div class="col-md-6 mb-3">
                        <div class="form-group">
                            {{ form.company_name.label(class="form-label") }}
                            {{ form.company_name(class="form-control" + (" is-invalid" if form.company_name.errors else "")) }}
                            {% if form.company_name.errors %}
                                <div class="invalid-feedback">
                                    {% for error in form.company_name.errors %}
                                        {{ error }}
                                    {% endfor %}
                                </div>
                            {% endif %}
                        </div>
                    </div>
                    
                    <div class="col-md-6 mb-3">
                        <div class="form-group">
                            {{ form.company_email.label(class="form-label") }}
                            {{ form.company_email(class="form-control" + (" is-invalid" if form.company_email.errors else "")) }}
                            {% if form.company_email.errors %}
                                <div class="invalid-feedback">
                                    {% for error in form.company_email.errors %}
                                        {{ error }}
                                    {% endfor %}
                                </div>
                            {% endif %}
                        </div>
                    </div>
                    
                    <div class="col-md-6 mb-3">
                        <div class="form-group">
                            {{ form.company_phone.label(class="form-label") }}
                            {{ form.company_phone(class="form-control" + (" is-invalid" if form.company_phone.errors else "")) }}
                            {% if form.company_phone.errors %}
                                <div class="invalid-feedback">
                                    {% for error in form.company_phone.errors %}
                                        {{ error }}
                                    {% endfor %}
                                </div>
                            {% endif %}
                        </div>
                    </div>
                    
                    <div class="col-md-6 mb-3">
                        <div class="form-group">
                            {{ form.company_address.label(class="form-label") }}
                            {{ form.company_address(class="form-control" + (" is-invalid" if form.company_address.errors else "")) }}
                            {% if form.company_address.errors %}
                                <div class="invalid-feedback">
                                    {% for error in form.company_address.errors %}
                                        {{ error }}
                                    {% endfor %}
                                </div>
                            {% endif %}
                        </div>
                    </div>
                    
                    <div class="col-12 mb-3">
                        <div class="form-group">
                            {{ form.company_description.label(class="form-label") }}
                            {{ form.company_description(class="form-control" + (" is-invalid" if form.company_description.errors else ""), rows=4) }}
                            {% if form.company_description.errors %}
                                <div class="invalid-feedback">
                                    {% for error in form.company_description.errors %}
                                        {{ error }}
                                    {% endfor %}
                                </div>
                            {% endif %}
                        </div>
                    </div>
                </div>
                
                <div class="row mb-3">
                    <div class="col-12">
                        <h4 class="mb-3">Réseaux sociaux</h4>
                        <div class="alert alert-info">
                            <i class="fas fa-info-circle me-2"></i> La gestion des liens vers les réseaux sociaux sera disponible prochainement.
                        </div>
                    </div>
                </div>
                
                <div class="row mb-3">
                    <div class="col-12">
                        <h4 class="mb-3">API et intégrations</h4>
                        <div class="alert alert-info">
                            <i class="fas fa-info-circle me-2"></i> La gestion des API (Google Maps, etc.) sera disponible prochainement.
                        </div>
                    </div>
                </div>
                
                <div class="d-grid mt-4">
                    {{ form.submit(class="btn btn-primary btn-lg") }}
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}
