<tr>
                        <td class="{{ commerce.hasAddress() ? 'filled' : '' }}">
                        <a href="{{ path('app_admin_commerce', {'id': commerce.id}) }}">
                        {% if commerce.name is empty %}
                            <span class="no-name">
                                (sans nom)
                            </span>
                        {% else %}
                            {{ commerce.name }}
                        {% endif %}
                        </a>
                        </td>
                        <td>
                            <a href="{{ path('app_admin_make_email_for_place', {'id': commerce.id}) }}">
                                <i class="bi bi-envelope-fill"></i>
                            </a>
                        </td>

                        <td>
                        {% if commerce.email is defined and commerce.email %}
                            <div style="max-width: 350px; white-space: pre-wrap; word-break: break-all;">{{ commerce.email }}</div>
                        {% else %}
                            <span class="text-muted">-</span>
                        {% endif %}
                        </td>
                        <td class="text-right completion-cell" 
                            style="background : rgba(0,255,0,{{ commerce.getCompletionPercentage() / 100 }})"
                            data-bs-toggle="popover"
                            data-bs-trigger="hover"
                            data-bs-html="true"
                            >
                            {{ commerce.getCompletionPercentage() }}

                            <div class='p-2'>
                                    {# <h6>Infos manquantes :</h6> #}
                                    <ul class='list-unstyled list-inline mb-0'>
                                        {% if not commerce.name %}
                                            <span title="Nom du commerce">
                                                <i class='bi bi-person-badge text-danger'></i>
                                            </span>
                                        {% endif %}
                                        {% if not commerce.hasAddress() %}
                                            <span title="Adresse complète">
                                                <i class='bi bi-geo-alt text-danger'></i>
                                            </li>
                                        {% endif %}
                                        {% if not commerce.hasOpeningHours() %}
                                            <span title="Horaires d'ouverture">
                                                <i class='bi bi-clock text-danger'></i>
                                            </span>
                                        {% endif %}
                                        {% if not commerce.hasWebsite() %}
                                            <span title="Site web">
                                                <i class='bi bi-globe text-danger'></i>
                                            </span>
                                        {% endif %}
                                        {# {% if not commerce.phone %}
                                            <li title="Téléphone">
                                                <i class='bi bi-telephone text-danger'></i>
                                            </li>
                                        {% endif %} #}
                                        {% if not commerce.hasWheelchair() %}
                                            <span title="Accessibilité PMR">
                                                <i class='bi bi-universal-access text-danger'></i>
                                            </span>
                                        {% endif %}
                                        {% if not commerce.siret %}
                                            <span title="SIRET">
                                                <i class='bi bi-book text-danger'></i>
                                            </span>
                                        {% endif %}
                                    </ul>
                                </div>
                        </td>
                        <td  class="{{ commerce.mainTag ? 'filled' : '' }}">
                        <span title="{{ commerce.mainTag }}">
                            {{ tag_emoji(commerce.mainTag) }}
                        </span>
                        </td>
                        <td  class="{{ commerce.hasAddress() ? 'filled' : '' }}">{{ commerce.address }}  </td>
                        <td  class="{{ commerce.hasAddress() ? 'filled' : '' }}">{{ commerce.housenumber }}</td>
                        <td  class="{{ commerce.hasAddress() ? 'filled' : '' }}">
                        {% if commerce.street %}
                                    <a href="{{ path('app_public_street', {'cityId': commerce.stats.zone, 'streetName': commerce.street|url_encode }) }}">{{ commerce.street }}</a>
                                {% else %}
                                    <span class="text-muted">(inconnue)</span>
                                {% endif %}
                        
                        {# {{ commerce.street }} #}
                        </td>
                        <td  class="{{ commerce.hasWebsite() ? 'filled' : '' }}">{{ commerce.website }}</td>
                        <td  class="{{ commerce.hasWheelchair() ? 'filled' : '' }}">{{ commerce.wheelchair }}</td>
                        <td  class="{{ commerce.hasNote() ? 'filled' : '' }}">{{ commerce.note }}</td>
                        <td  class="{{ commerce.noteContent ? 'filled' : '' }}">{{ commerce.noteContent }}</td>   
                        <td  class="{{ commerce.siret ? 'filled' : '' }}"> 

                        {% if commerce.siret %}
                            {% set sirets = commerce.siret|split(';')|map(siret => siret|trim)|filter(siret => siret) %}
                            {% for siret in sirets %}
                                {% if not loop.first %}, {% endif %}
                                <a href="https://annuaire-entreprises.data.gouv.fr/etablissement/{{ siret }}" >{{ siret }}</a>
                            {% endfor %}
                        {% else %}
                        <a href="https://annuaire-entreprises.data.gouv.fr/etablissement/{{ commerce.siret }}" >
                        {% endif %}


                        <td>
                        {% if stats.population > 0 %}
                            {{ (1 / (stats.population / stats.places|length))|number_format(3, '.', ' ') }}
                        {% else %}
                            -
                        {% endif %}
                        </td>
                        <td>
                        {# (si siret clos) #}
                        </td>
                        <td>
                        {% if commerce.osmDataDate %}
                            {% set now = "now"|date("U") %}
                            {% set osmDate = commerce.osmDataDate|date("U") %}
                            {% set diff = now - osmDate %}
                            {% set years = (diff / 31536000)|round(0, 'floor') %}
                            {% set months = ((diff % 31536000) / 2592000)|round(0, 'floor') %}
                            {% set days = ((diff % 2592000) / 86400)|round(0, 'floor') %}
                            
                            <div class="small osm-modification-info">
                                <div>
                                    {{ commerce.osmDataDate|date('Y-m-d H:i') }}
                                    <i class="bi bi-calendar"></i>
                                </div>
                                {% if commerce.osmUser %}
                                    <div>
                                        <i class="bi bi-person"></i>
                                        <a href="https://www.openstreetmap.org/user/{{ commerce.osmUser }}" target="_blank" title="Voir le profil OSM">
                                            {{ commerce.osmUser }}
                                        </a>
                                    </div>
                                {% endif %}
                                <div class="text-muted">
                                    <small>
                                        {% if diff < 86400 %}
                                            Aujourd'hui
                                        {% elseif years > 0 %}
                                            {{ years }} an{{ years > 1 ? 's' : '' }}
                                            {% if months > 0 %}, {{ months }} mois{% endif %}
                                        {% elseif months > 0 %}
                                            {{ months }} mois
                                            {% if days > 0 %}, {{ days }} jour{{ days > 1 ? 's' : '' }}{% endif %}
                                        {% elseif days > 0 %}
                                            {{ days }} jour{{ days > 1 ? 's' : '' }}
                                        {% else %}
                                            Aujourd'hui
                                        {% endif %}
                                    </small>
                                </div>
                            </div>
                        {% else %}
                            <span class="text-muted">Non disponible</span>
                        {% endif %}
                        </td>
                        <td>
                        <a href="https://www.openstreetmap.org/{{ commerce.osmKind }}/{{ commerce.osmId }}" title="{{ commerce.osmKind }} - {{ commerce.osmId }} " >
                            <i class="bi bi-globe"></i>
                            
                        </a>
                        </td>
                        <td>
                            {{ commerce.osmKind }}
                        </td>
                    </tr>