<section class="{{cssClass}}" autocomplete="off">

  {{!-- Sheet Header --}}
  <header class="sheet-header">
    <div class="header-fields background-sheet-header">
      <div class="flexrow">
        <img class="profile-img" src="{{actor.img}}" data-action="editImage" data-edit="img" title="{{actor.name}}" />
        <div class="flexcol">
          <h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"  /></h1>
          <div class="flexrow">

            <div class="flexrow">
              <ul class="item-list alternate-list">
                {{#each system.caracteristiques as |carac key|}}
                {{#if (eq kind "physical")}}
                <li class="item flexrow ">
                  <h4 class="item-name-label competence-name roll-style"><a class="roll-carac" data-action="rollCarac" data-key="{{key}}">{{carac.label}}</a></h4>
                  <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
                    name="system.caracteristiques.{{key}}.value" data-tooltip="Valeur actuelle" value="{{carac.value}}"
                    data-dtype="Number" />
                  <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
                    name="system.caracteristiques.{{key}}.rang" data-tooltip="Rang" value="{{carac.rang}}"
                    data-dtype="Number" />
                </li>
                {{/if}}
                {{/each}}
              </ul>
            </div>

            <div class="flexrow">
              <ul class="item-list alternate-list">
                {{#each system.caracteristiques as |carac key|}}
                {{#if (eq kind "mental")}}
                <li class="item flexrow ">
                  <h4 class="item-name-label competence-name roll-style"><a class="roll-carac" data-action="rollCarac" data-key="{{key}}">{{carac.label}}</a></h4>
                  <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
                    name="system.caracteristiques.{{key}}.value" value="{{carac.value}}" data-tooltip="Valeur actuelle"
                    data-dtype="Number" />
                  <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
                    name="system.caracteristiques.{{key}}.rang" value="{{carac.rang}}" data-tooltip="Rang"
                    data-dtype="Number" />
                </li>
                {{/if}}
                {{/each}}
              </ul>
            </div>

          </div>
          <div class="flexrow" style="align-items: center;">
            <label class="item-field-label-short">PV</label>
            <div style="display: flex; align-items: center; gap: 0.2rem;">
              <button type="button" data-action="pvDecrease" title="Diminuer PV" style="cursor: pointer; padding: 0 0.3rem; font-size: 1rem; background: none; border: 1px solid #666; border-radius: 3px; color: #fff;">−</button>
              <input type="text" class="item-field-label-short" name="system.pv.value" value="{{system.pv.value}}"
                data-dtype="Number" data-tooltip="PV actuels" style="text-align: center; width: 3rem;" />
              <button type="button" data-action="pvIncrease" title="Augmenter PV" style="cursor: pointer; padding: 0 0.3rem; font-size: 1rem; background: none; border: 1px solid #666; border-radius: 3px; color: #fff;">+</button>
              <span style="margin-left: 0.2rem;">/</span>
              <input type="text" class="item-field-label-short" name="system.pv.max" value="{{system.pv.max}}"
                data-dtype="Number" data-tooltip="PV maximum" style="text-align: center; width: 3rem;" />
            </div>
            <label class="item-field-label-short">Malus</label>
            <input type="text" class="item-field-label-short" value="{{pvMalus.value}}" data-dtype="Number" disabled data-tooltip="Malus dû aux blessures" style="text-align: center; width: 3rem;" />
            <span>&nbsp;&nbsp;</span>

            <select class="item-field-label-medium" type="text" name="system.statutmasque"
              value="{{system.statutmasque}}" data-dtype="string">
              {{selectOptions config.statutMasque selected=system.statutmasque}}
            </select>

            <span>&nbsp;&nbsp;</span>
            <label class="item-field-label-short">Tricherie</label>
            <input type="text" class="item-field-label-short-num" name="system.rang.tricherie.value"
              value="{{system.rang.tricherie.value}}" data-dtype="Number" data-tooltip="Points de tricherie actuels" />
            <input type="text" class="item-field-label-short-num" name="system.rang.tricherie.max"
              value="{{system.rang.tricherie.max}}" data-dtype="Number" data-tooltip="Points de tricherie maximum" />
          </div>

        </div>
      </div>
  </header>

  {{!-- Sheet Tab Navigation --}}
  <nav class="sheet-tabs tabs" data-group="primary">
    <a class="item" data-tab="competences">Compétences</a>
    <a class="item" data-tab="atouts">Atouts&Matériel</a>
    <a class="item" data-tab="combat">Combat</a>
    <a class="item" data-tab="notes">Notes</a>
  </nav>

  {{!-- Sheet Body --}}
  <section class="sheet-body">

    {{!-- Competence Tab --}}
    <div class="tab competences" data-group="primary" data-tab="competences">

      <div class="flexcol">

        <div class="grid-2col">

          <div>
            {{#each utileSkillsPhysical as |skillDef keyProfil|}}
              {{> systems/fvtt-les-heritiers/templates/partial-utile-skills.hbs skillDef=skillDef keyProfil=keyProfil isPNJ=true config=config}}
            {{/each}}
          </div>

          <div>
            {{#each utileSkillsMental as |skillDef keyProfil|}}
              {{> systems/fvtt-les-heritiers/templates/partial-utile-skills.hbs skillDef=skillDef keyProfil=keyProfil isPNJ=true config=config}}
            {{/each}}
          </div>

        </div>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow">
              <span class="item-field-label-long2">
                <h3><label class="items-title-text">Compétences Futiles</label></h3>
              </span>
              <span class="item-field-label-short">
                <label class="short-label">Niveau</label>
              </span>
              <div class="item-filler">&nbsp;</div>
            </li>
            {{#each futileSkills as |skill key|}}
            <li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
              <span class="item-field-label-long2 roll-style"><a class="roll-competence" data-action="rollRootCompetence" item-field-label-short"
                  data-attr-key="tochoose">{{skill.name}}</a></span>

                <select class="item-field-label-short edit-item-data" type="text"
                  data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
                {{selectOptions @root.config.listNiveau selected=skill.system.niveau}}
              </select>

              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <li class="item flexrow">
          <h2 style="color: #8b6914; margin: 0.5rem 0;">Magie</h2>
        </li>

        <div class="flexrow">
          <ul>
            <li class="flexrow item">
              <label class="item-field-label-medium roll-style"><a class="item-field-label-short"
                  data-rang-key="feerie">Point d'Ame</a></label>
              <input type="text" class="item-field-label-short" name="system.magie.pointsame.value"
                value="{{system.magie.pointsame.value}}" data-dtype="Number" />
              <input type="text" class="item-field-label-short" name="system.magie.pointsame.max"
                value="{{system.magie.pointsame.max}}" data-dtype="Number" {{#if issGM}} {{else}} disabled {{/if}} />
            </li>
          </ul>
        </div>

        {{#each magieList as |magie idx|}}
        <li class="item flexrow magie-section-header" data-item-id="{{magie.competence._id}}" data-item-type="competence">
          <div class="magie-section-title">
            <label class="items-title-text">
              <a class="roll-competence" data-action="rollRootCompetence" data-attr-key="tochoose">
                {{magie.name}} {{magie.competence.system.niveau}}
              </a>
            </label>
          </div>
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
            <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
          </div>
        </li>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header item-field-label-long2-img">
                <h3><label class="items-title-text">Nom du sort</label></h3>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">Niveau</label>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="sort" title="Ajouter un sort"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each sorts as |sort key|}}
            <li class="item flexrow " data-item-id="{{sort._id}}" data-item-type="sort">
              <img class="item-name-img" src="{{sort.img}}" />
              <span class="item-field-label-long2 roll-style"><a class="roll-sort" data-action="rollSort">{{sort.name}}</a></span>
              <span class="item-field-label-medium">{{upperFirst sort.system.niveau}}</span>

              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>
        {{/each}}


      </div>

    </div>

    {{!-- Combat Tab --}}
    <div class="tab combat" data-group="primary" data-tab="combat">

      <ul class="item-list alternate-list">
        <li class="item flexrow" style="justify-content: center; margin-bottom: 0.5rem;">
          <button class="chat-card-button roll-initiative" data-action="rollInitiative">Initiative (actuelle : {{initiative}} )</button>
        </li>
      </ul>

      <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem;">
        <!-- Esquive -->
        <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.25rem; padding: 0.3rem 0.5rem;">
          <div style="text-align: center; font-weight: bold; margin-bottom: 0.25rem; color: #8b6914; font-size: 0.85rem;">Esquive</div>
          <div class="flexrow" style="gap: 0.5rem; align-items: center; justify-content: center;">
            <label style="font-size: 0.75rem; color: #999;">Masquée</label>
            <input type="text" class="item-field-label-short" name="system.combat.esquive.masquee"
              value="{{system.combat.esquive.masquee}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
            <label style="font-size: 0.75rem; color: #999; margin-left: 0.3rem;">Démasquée</label>
            <input type="text" class="item-field-label-short" name="system.combat.esquive.demasquee"
              value="{{system.combat.esquive.demasquee}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
          </div>
        </div>

        <!-- Parade -->
        <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.25rem; padding: 0.3rem 0.5rem;">
          <div style="text-align: center; font-weight: bold; margin-bottom: 0.25rem; color: #8b6914; font-size: 0.85rem;">Parade</div>
          <div class="flexrow" style="gap: 0.5rem; align-items: center; justify-content: center;">
            <label style="font-size: 0.75rem; color: #999;">Masquée</label>
            <input type="text" class="item-field-label-short" name="system.combat.parade.masquee"
              value="{{system.combat.parade.masquee}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
            <label style="font-size: 0.75rem; color: #999; margin-left: 0.3rem;">Démasquée</label>
            <input type="text" class="item-field-label-short" name="system.combat.parade.demasquee"
              value="{{system.combat.parade.demasquee}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
          </div>
        </div>
      </div>

      <div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem;">
        <!-- Résistance Physique -->
        <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.25rem; padding: 0.3rem 0.5rem;">
          <div class="flexrow" style="align-items: center; justify-content: center; gap: 0.4rem;">
            <label style="font-size: 0.75rem; font-weight: bold; color: #d4a574;">Rés. physique</label>
            <input type="text" class="item-field-label-short" name="system.combat.resistancephysique.value"
              value="{{system.combat.resistancephysique.value}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
          </div>
        </div>

        <!-- Résistance Psychique -->
        <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.25rem; padding: 0.3rem 0.5rem;">
          <div class="flexrow" style="align-items: center; justify-content: center; gap: 0.4rem;">
            <label style="font-size: 0.75rem; font-weight: bold; color: #d4a574;">Rés. psychique</label>
            <input type="text" class="item-field-label-short" name="system.combat.resistancepsychique.value"
              value="{{system.combat.resistancepsychique.value}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
          </div>
        </div>

        <!-- Protection -->
        <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.25rem; padding: 0.3rem 0.5rem;">
          <div class="flexrow" style="align-items: center; justify-content: center; gap: 0.4rem;">
            <label style="font-size: 0.75rem; font-weight: bold; color: #d4a574;">Protection</label>
            <input type="text" class="item-field-label-short" name="system.combat.protection.value"
              value="{{system.combat.protection.value}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
          </div>
        </div>
      </div>

      <div style="display: grid; grid-template-columns: 2fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem;">
        <!-- Effets secondaires -->
        <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.25rem; padding: 0.3rem 0.4rem;">
          <div class="flexcol" style="gap: 0.2rem;">
            <label style="font-size: 0.75rem; font-weight: bold; color: #d4a574; text-align: center;">Effets secondaires</label>
            <input type="text" name="system.combat.effetssecondaires"
              value="{{system.combat.effetssecondaires}}" data-dtype="String" style="text-align: center; width: 100%; padding: 0.15rem;" />
          </div>
        </div>

        <!-- Dissimulation -->
        <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.25rem; padding: 0.3rem 0.5rem;">
          <div class="flexrow" style="align-items: center; justify-content: center; gap: 0.4rem;">
            <label style="font-size: 0.75rem; font-weight: bold; color: #d4a574;">Dissimulation</label>
            <input type="text" class="item-field-label-short" name="system.combat.dissimulation.value"
              value="{{system.combat.dissimulation.value}}" data-dtype="Number" style="text-align: center; max-width: 3rem; padding: 0.15rem;" />
          </div>
        </div>
      </div>

      <div class="flexcol">

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header">
                <h3><label class="items-title-text">Armes</label></h3>
              </span>
              <span class="item-field-label-short">
                <label class="short-label">Dégats</label>
              </span>
              <span class="item-field-label-short">
                <label class="short-label">Attaque</label>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="arme" title="Ajouter une arme"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each armes as |arme key|}}
            <li class="item flexrow " data-item-id="{{arme._id}}" data-item-type="arme" style="gap: 0.3rem;">
              <img class="item-name-img" src="{{arme.img}}" />
              <span class="item-name-label competence-name">{{arme.name}}</span>

              <span class="item-field-label-short">
                {{arme.system.degats}}
              </span>

              <span style="min-width: 4.5rem;">
                <button class="roll-attaque-arme" data-action="rollAttaqueArme" button-sheet-roll>Attaque</button>
              </span>

              <span style="min-width: 4.5rem;">
                <button class="roll-assomer-arme" data-action="rollAssomerArme" button-sheet-roll>Assommer</button>
              </span>

              {{#if arme.system.isMelee}}
              <span style="min-width: 4.5rem;">
                <button class="roll-attaque-charge-arme" data-action="rollAttaqueChargeArme" button-sheet-roll>Charger</button>
              </span>
              <span style="min-width: 6.1rem;">
                <button class="roll-attaque-brutale-arme" data-action="rollAttaqueBrutaleArme" button-sheet-roll button-sheet-roll-long1>Att. brutale</button>
              </span>
              {{/if}}

              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-equip" data-action="equipItem" title="Equipé">{{#if arme.system.equipped}}<i
                    class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header">
                <h3><label class="items-title-text">Protections</label></h3>
              </span>
              <span class="item-field-label-short">
                <label class="short-label">Protection</label>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="protection" title="Ajouter une protection"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each protections as |protection key|}}
            <li class="item flexrow " data-item-id="{{protection._id}}" data-item-type="protection">
              <img class="item-name-img" src="{{protection.img}}" />
              <span class="item-name-label competence-name">{{protection.name}}</span>
              <span class="item-field-label-short arme-defensif"><label
                  class="arme-defensif">{{protection.system.protection}}</label>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>
      </div>
    </div>


    {{!-- atouts Tab --}}
    <div class="tab atouts" data-group="primary" data-tab="atouts">

      <div class="flexrow">
        <li class="item flexrow " data-item-id="{{fee._id}}" data-item-type="avantage">
          <img class="item-name-img" src="{{fee.img}}" />
          <span class="item-field-label-long2">{{fee.name}}</span>
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
            <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
      </div>

      <div class="flexrow">
        <ul>
          <li class="flexrow item">
            <label class="item-field-label-medium roll-style"><a class="roll-rang" data-action="rollRang" item-field-label-short" data-rang-key="feerie">Féerie</a></label>
            <input type="text" class="item-field-label-short" name="system.rang.feerie.value" value="{{system.rang.feerie.value}}" data-dtype="Number" />
            <input type="text" class="item-field-label-short" name="system.rang.feerie.max" value="{{system.rang.feerie.max}}" data-dtype="Number" />
            <span class="item-field-label-medium"></span>
            <label class="item-field-label-medium roll-style"><a class="roll-rang" data-action="rollRang" item-field-label-short" data-rang-key="masque">Masque</a></label>
            <input type="text" class="item-field-label-short" name="system.rang.masque.value" value="{{system.rang.masque.value}}" data-dtype="Number" />
            <input type="text" class="item-field-label-short" name="system.rang.masque.max" value="{{system.rang.masque.max}}" data-dtype="Number" />
            <span class="item-field-label-medium"></span>
            <label class="item-field-label-long roll-style"><a class="dialog-recup-usage" data-action="dialogRecupUsage" item-field-label-long">Récup. P. d'Usage</a></label>
          </li>
        </ul>
      </div>

      <div class="flexcol">

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header">
                <h3><label class="items-title-text">Avantages</label></h3>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="avantage" title="Ajouter un avantage"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each avantages as |avantage key|}}
            <li class="item flexrow " data-item-id="{{avantage._id}}" data-item-type="avantage">
              <img class="item-name-img" src="{{avantage.img}}" />
              <span class="item-field-label-long2">{{avantage.name}}</span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header">
                <h3><label class="items-title-text">Désavantages</label></h3>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="desavantage" title="Ajouter un Désavantage"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each desavantages as |desavantage key|}}
            <li class="item flexrow " data-item-id="{{desavantage._id}}" data-item-type="desavantage">
              <img class="item-name-img" src="{{desavantage.img}}" />
              <span class="item-field-label-long2">{{desavantage.name}}</span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header">
                <h3><label class="items-title-text">Atouts Féériques</label></h3>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="atoutfeerique" title="Ajouter un Atout féerique"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each atouts as |atout key|}}
            <li class="item flexrow " data-item-id="{{atout._id}}" data-item-type="atout">
              <img class="item-name-img" src="{{atout.img}}" />
              <span class="item-field-label-long2">{{atout.name}}</span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header item-field-label-long2-img">
                <h3><label class="items-title-text">Pouvoirs</label></h3>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">Masque</label>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">Type</label>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">Niveau</label>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">Usage</label>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="pouvoir" title="Ajouter un pouvoir"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each pouvoirs as |pouvoir key|}}
            <li class="item flexrow " data-item-id="{{pouvoir._id}}" data-item-type="pouvoir">
              <img class="item-name-img" src="{{pouvoir.img}}" />
              <span class="item-field-label-long2 roll-style"><a class="roll-pouvoir" data-action="rollPouvoir">{{pouvoir.name}}</a></span>
              <span class="item-field-label-medium">{{upperFirst pouvoir.system.masquetype}}</span>
              <span class="item-field-label-medium">{{upperFirst pouvoir.system.pouvoirtype}}</span>
              <span class="item-field-label-medium">{{upperFirst pouvoir.system.niveau}}</span>
              <span class="item-field-label-medium">{{pouvoir.system.pointsusagecourant}}/{{pouvoir.maxUsage}}</span>

              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header">
                <h3><label class="items-title-text">Capacités Naturelles</label></h3>
              </span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-add" data-action="createItem" data-type="capacitenaturelle" title="Ajouter une Capacité naturelle"><i
                    class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each capacites as |capa key|}}
            <li class="item flexrow " data-item-id="{{capa._id}}" data-item-type="capacite">
              <img class="item-name-img" src="{{capa.img}}" />
              <span class="item-field-label-long2">{{capa.name}}</span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <div class="sheet-box color-bg-archetype">
          <ul class="item-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header">
                <h3><label class="items-title-text">Equipements</label></h3>
              </span>
              <div class="item-filler">&nbsp;</div>
                <div class="item-controls item-controls-fixed">
                  <a class="item-control item-add" data-action="createItem" data-type="equipement" title="Créer un équipement"><i class="fas fa-plus"></i></a>
              </div>
            </li>
            {{#each equipements as |equip key|}}
            <li class="item flexrow " data-item-id="{{equip._id}}" data-item-type="equipement">
              <img class="item-name-img" src="{{equip.img}}" />
              <span class="item-field-label-long2">{{equip.name}}</span>
              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-edit" data-action="editItem" title="Editer l'item"><i class="fas fa-edit"></i></a>
                <a class="item-control item-delete" data-action="deleteItem" title="Supprimer l'item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>


      </div>

    </div>


    <div class="tab notes" data-group="primary" data-tab="notes">

      <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.3rem; padding: 0.5rem; margin-bottom: 0.75rem;">
        <h3 style="color: #8b6914; margin-bottom: 0.5rem;">Historique</h3>
        <div class="medium-editor item-text-long-line">
          {{formInput systemFields.biodata.fields.description enriched=enrichedDescription value=system.biodata.description name="system.biodata.description" toggled=true}}
        </div>
      </div>

      <div style="background: rgba(56, 32, 32, 0.3); border-radius: 0.3rem; padding: 0.5rem; margin-bottom: 0.75rem;">
        <h3 style="color: #8b6914; margin-bottom: 0.5rem;">Notes MJ</h3>
        <div class="medium-editor item-text-long-line">
          {{formInput systemFields.biodata.fields.playernotes enriched=enrichedPlayernotes value=system.biodata.playernotes name="system.biodata.playernotes" toggled=true}}
        </div>
      </div>

    </div>

  </section>
</section>