<div class="mournblade-item-card" data-item-id="{{_id}}" data-transfer="{{jsondata}}">

  {{!-- Header --}}
  <div class="item-card-header">
    {{#if img}}
    <img class="item-card-img" src="{{img}}" alt="{{name}}" />
    {{/if}}
    <div class="item-card-title">
      <h3 class="item-card-name">{{name}}</h3>
      <span class="item-card-type-badge">
        <i class="fas {{typeIcon}}"></i> {{typeLabel}}
      </span>
    </div>
  </div>

  {{!-- Type-specific stats --}}
  {{#if (eq type "arme")}}
  <div class="item-card-stats">
    {{#if system.typearme}}
    <div class="stat-row"><span class="stat-label">Type</span><span class="stat-value">{{system.typearme}}</span></div>
    {{/if}}
    {{#if system.degats}}
    <div class="stat-row"><span class="stat-label"><i class="fas fa-burst"></i> Dégâts</span><span class="stat-value stat-highlight">{{system.degats}}</span></div>
    {{/if}}
    <div class="stat-row"><span class="stat-label">Bonus offensif</span><span class="stat-value">{{system.bonusmaniementoff}}</span></div>
    <div class="stat-row"><span class="stat-label">Bonus défensif</span><span class="stat-value">{{system.bonusmaniementdef}}</span></div>
    {{#if system.deuxmains}}<div class="stat-row stat-flag"><i class="fas fa-hands"></i> Deux mains</div>{{/if}}
    {{#if system.ignorearmure}}<div class="stat-row stat-flag"><i class="fas fa-shield-halved"></i> Ignore l'armure</div>{{/if}}
    {{#if system.nonletaux}}<div class="stat-row stat-flag"><i class="fas fa-hand-peace"></i> Non-létaux</div>{{/if}}
    {{#if system.prix}}<div class="stat-row"><span class="stat-label">Prix</span><span class="stat-value">{{system.prix}}</span></div>{{/if}}
  </div>

  {{else if (eq type "bouclier")}}
  <div class="item-card-stats">
    <div class="stat-row"><span class="stat-label"><i class="fas fa-shield-halved"></i> Bonus défense</span><span class="stat-value stat-highlight">{{system.bonusdefense}}</span></div>
    {{#if system.degats}}<div class="stat-row"><span class="stat-label">Dégâts</span><span class="stat-value">{{system.degats}}</span></div>{{/if}}
    {{#if system.nonletaux}}<div class="stat-row stat-flag"><i class="fas fa-hand-peace"></i> Non-létaux</div>{{/if}}
    {{#if system.prix}}<div class="stat-row"><span class="stat-label">Prix</span><span class="stat-value">{{system.prix}}</span></div>{{/if}}
  </div>

  {{else if (eq type "protection")}}
  <div class="item-card-stats">
    {{#if system.typeprotection}}<div class="stat-row"><span class="stat-label">Type</span><span class="stat-value">{{system.typeprotection}}</span></div>{{/if}}
    <div class="stat-row"><span class="stat-label"><i class="fas fa-shield"></i> Protection</span><span class="stat-value stat-highlight">{{system.protection}}</span></div>
    {{#if system.degats}}<div class="stat-row"><span class="stat-label">Dégâts encaissés</span><span class="stat-value">{{system.degats}}</span></div>{{/if}}
    {{#if system.prix}}<div class="stat-row"><span class="stat-label">Prix</span><span class="stat-value">{{system.prix}}</span></div>{{/if}}
  </div>

  {{else if (eq type "competence")}}
  <div class="item-card-stats">
    <div class="stat-row"><span class="stat-label"><i class="fas fa-chart-bar"></i> Niveau</span><span class="stat-value stat-highlight">{{system.niveau}}</span></div>
    {{#if system.attribut1}}<div class="stat-row"><span class="stat-label">Attribut 1</span><span class="stat-value">{{upper system.attribut1}}</span></div>{{/if}}
    {{#if system.attribut2}}<div class="stat-row"><span class="stat-label">Attribut 2</span><span class="stat-value">{{upper system.attribut2}}</span></div>{{/if}}
    {{#if system.attribut3}}<div class="stat-row"><span class="stat-label">Attribut 3</span><span class="stat-value">{{upper system.attribut3}}</span></div>{{/if}}
    {{#if system.doublebonus}}<div class="stat-row stat-flag"><i class="fas fa-star"></i> Double bonus</div>{{/if}}
  </div>

  {{else if (eq type "rune")}}
  <div class="item-card-stats">
    <div class="stat-row"><span class="stat-label"><i class="fas fa-bullseye"></i> Seuil</span><span class="stat-value stat-highlight">{{system.seuil}}</span></div>
    {{#if system.formule}}<div class="stat-row"><span class="stat-label">Formule</span><span class="stat-value">{{system.formule}}</span></div>{{/if}}
    {{#if system.prononcee}}<div class="stat-row"><span class="stat-label">Prononcée</span><span class="stat-value">{{system.prononcee}}</span></div>{{/if}}
    {{#if system.tracee}}<div class="stat-row"><span class="stat-label">Tracée</span><span class="stat-value">{{system.tracee}}</span></div>{{/if}}
  </div>

  {{else if (eq type "runeeffect")}}
  <div class="item-card-stats">
    {{#if system.rune}}<div class="stat-row"><span class="stat-label">Rune</span><span class="stat-value">{{system.rune}}</span></div>{{/if}}
    {{#if system.mode}}<div class="stat-row"><span class="stat-label">Mode</span><span class="stat-value">{{system.mode}}</span></div>{{/if}}
    {{#if system.duree}}<div class="stat-row"><span class="stat-label"><i class="fas fa-clock"></i> Durée</span><span class="stat-value stat-highlight">{{system.duree}}</span></div>{{/if}}
    {{#if system.pointame}}<div class="stat-row"><span class="stat-label">Points d'âme</span><span class="stat-value">{{system.pointame}}</span></div>{{/if}}
  </div>

  {{else if (eq type "don")}}
  <div class="item-card-stats">
    {{#if system.allegeance}}<div class="stat-row"><span class="stat-label">Allégeance</span><span class="stat-value">{{system.allegeance}}</span></div>{{/if}}
    {{#if system.prerequis}}<div class="stat-row"><span class="stat-label">Prérequis</span><span class="stat-value">{{system.prerequis}}</span></div>{{/if}}
  </div>

  {{else if (eq type "pacte")}}
  <div class="item-card-stats">
    {{#if system.allegeance}}<div class="stat-row"><span class="stat-label">Allégeance</span><span class="stat-value">{{system.allegeance}}</span></div>{{/if}}
  </div>

  {{else if (eq type "tendance")}}
  <div class="item-card-stats">
    {{#if system.allegeance}}<div class="stat-row"><span class="stat-label">Allégeance</span><span class="stat-value">{{system.allegeance}}</span></div>{{/if}}
  </div>

  {{else if (eq type "equipement")}}
  <div class="item-card-stats">
    {{#if system.prix}}<div class="stat-row"><span class="stat-label">Prix</span><span class="stat-value">{{system.prix}}</span></div>{{/if}}
    {{#if system.rarete}}<div class="stat-row"><span class="stat-label">Rareté</span><span class="stat-value">{{system.rarete}}</span></div>{{/if}}
  </div>

  {{else if (eq type "potion")}}
  <div class="item-card-stats">
    <div class="stat-row"><span class="stat-label"><i class="fas fa-flask"></i> Statut</span><span class="stat-value stat-highlight">{{system.statutLabel}}</span></div>
    {{#if system.rune}}<div class="stat-row"><span class="stat-label"><i class="fas fa-star-of-david"></i> Rune</span><span class="stat-value">{{system.rune}}</span></div>{{/if}}
    {{#if system.runeSeuil}}<div class="stat-row"><span class="stat-label">Seuil</span><span class="stat-value">{{system.runeSeuil}}</span></div>{{/if}}
    {{#if system.formeLabel}}<div class="stat-row"><span class="stat-label">Forme</span><span class="stat-value">{{system.formeLabel}}</span></div>{{/if}}
    {{#if system.duree}}<div class="stat-row"><span class="stat-label"><i class="fas fa-clock"></i> Durée</span><span class="stat-value">{{system.duree}}</span></div>{{/if}}
    {{#if system.conservation}}<div class="stat-row"><span class="stat-label">Conservation</span><span class="stat-value">{{system.conservation}}</span></div>{{/if}}
    {{#if system.pointsAme}}<div class="stat-row"><span class="stat-label">Points d'Âme</span><span class="stat-value">{{system.pointsAme}}</span></div>{{/if}}
    {{#if system.virulence}}<div class="stat-row"><span class="stat-label"><i class="fas fa-skull-crossbones"></i> Virulence</span><span class="stat-value stat-highlight">{{system.virulence}}</span></div>{{/if}}
  </div>
  {{#if system.effetCuratif}}
  <div class="item-card-divider"><span><i class="fas fa-flask"></i> Effet curatif</span></div>
  <div class="item-card-description">{{{system.effetCuratif}}}</div>
  {{/if}}
  {{#if system.effetLetal}}
  <div class="item-card-divider item-card-divider--danger"><span><i class="fas fa-skull-crossbones"></i> Effet létal</span></div>
  <div class="item-card-description">{{{system.effetLetal}}}</div>
  {{/if}}
  {{#if system.effetSecondaire}}
  <div class="item-card-divider"><span><i class="fas fa-dizzy"></i> Effet secondaire</span></div>
  <div class="item-card-description">{{{system.effetSecondaire}}}</div>
  {{/if}}
  {{/if}}

  {{!-- Description --}}
  {{#if system.description}}
  <div class="item-card-divider"><span>Description</span></div>
  <div class="item-card-description">
    {{{system.description}}}
  </div>
  {{/if}}

  {{!-- Sacrifice (dons) --}}
  {{#if system.sacrifice}}
  <div class="item-card-divider"><span>Sacrifice</span></div>
  <div class="item-card-description item-card-sacrifice">
    {{{system.sacrifice}}}
  </div>
  {{/if}}

</div>
