<a class="card" href="{{ route('annonce.show', $a) }}">
<div class="ph">
    @if($a->couverture)
      <img src="{{ asset('storage/'.$a->couverture) }}" alt="" style="width:100%;height:100%;object-fit:cover">
    @endif
    <span class="badge">{{ $a->type->getLabel() }}</span>
  </div>
  <div class="body">
    <h3>{{ $a->titre }}</h3>
    <div class="meta">
      <span class="loc">
        <svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.1 2 5 5.1 5 9c0 5.2 7 13 7 13s7-7.8 7-13c0-3.9-3.1-7-7-7zm0 9.5A2.5 2.5 0 1112 6a2.5 2.5 0 010 5.5z"/></svg>
        {{ $a->localisation ?? 'Haïti' }}
      </span>
      @if($a->type === \App\Enums\TypeAnnonce::Marketplace && $a->marketplaceDetail?->prix)
        <span class="price">{{ number_format($a->marketplaceDetail->prix, 0, ',', ' ') }} HTG</span>
      @elseif($a->type === \App\Enums\TypeAnnonce::Evenement && $a->evenementDetail?->date_debut)
        <span style="font-weight:600">{{ $a->evenementDetail->date_debut->format('d/m/Y') }}</span>
      @endif
    </div>
  </div>
</a>