<div class="form-field number-field">
    {% if field.label %}
    <label for="id_{{ field.name }}" class="field-label{% if field.error %} field-error{% endif %}">
        {{ field.label }}
    </label>
    {% endif %}

    <input
        type="{{ field.type_field }}"
        name="{{ field.name }}"
        id="id_{{ field.name }}"
        value="{{ field.value }}"
        {% if field.placeholder %}placeholder="{{ field.placeholder }}"{% endif %}

        {# Configuration selon le type numérique #}
        {% if config.Integer %}
            {% if config.Integer.min %}min="{{ config.Integer.min }}"{% endif %}
            {% if config.Integer.max %}max="{{ config.Integer.max }}"{% endif %}
            step="1"
        {% elif config.Float or config.Decimal %}
            {% if config.Float.value %}
                {% if config.Float.value.min %}min="{{ config.Float.value.min }}"{% endif %}
                {% if config.Float.value.max %}max="{{ config.Float.value.max }}"{% endif %}
            {% elif config.Decimal.value %}
                {% if config.Decimal.value.min %}min="{{ config.Decimal.value.min }}"{% endif %}
                {% if config.Decimal.value.max %}max="{{ config.Decimal.value.max }}"{% endif %}
            {% endif %}
            step="any"
        {% elif config.Percent %}
            min="{{ config.Percent.value.min }}"
            max="{{ config.Percent.value.max }}"
            step="0.01"
        {% elif config.Range %}
            min="{{ config.Range.value.min }}"
            max="{{ config.Range.value.max }}"
            step="{{ config.Range.step }}"
        {% endif %}
        {% if readonly.choice %}readonly{% endif %}
        {% if disabled.choice %}disabled{% endif %}
        {% if field.is_required.choice %}required{% endif %}
        {% for key, value in field.html_attributes %}{{ key }}="{{ value }}" {% endfor %}
    >

    {% if config.Percent %}
    <span class="field-helper-text">Valeur en pourcentage (0-100)</span>
    {% endif %}

    {% if field.error %}
    <span class="field-error-message">{{ field.error }}</span>
    {% endif %}
</div>