(async function(){
  const items = await SSAPI.get('/tournaments/upcoming').catch(()=>[]);
  const el = document.getElementById('list');
  el.innerHTML = items.map(t=>`
    <a class="card" href="/tournament/?id=${t.id}" style="display:block;text-decoration:none;color:inherit">
      <strong>${t.name}</strong><br>
      ${t.location || ''}<br>
      ${t.start_date} → ${t.end_date}
    </a>
  `).join('') || '<p class="muted">Aucun événement à venir</p>';
})();