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

  {{!-- Sheet Header --}}
  <header class="sheet-header">
    <img class="profile-img" src="{{actor.img}}" data-action="editImage" data-edit="img" title="{{actor.name}}" />
    <div class="header-fields">
      <h1 class="charname">
        <input name="name" type="text" value="{{actor.name}}" placeholder="Nom du personnage" />
      </h1>
    </div>
    <span class="lock-icon">
      <a data-action="lockUnlock" data-tooltip="{{#if editScore}}Éditable - Cliquer pour verrouiller{{else}}Verrouillé - Cliquer pour éditer{{/if}}">
        <img class="small-button-container" src="systems/fvtt-yggdrasill/images/icons/{{#if editScore}}unlocked.svg{{else}}locked.svg{{/if}}" alt="Editable/Vérouillé">
      </a>
    </span>
  </header>

  {{!-- Sheet Tab Navigation --}}
  <nav class="sheet-tabs tabs" data-group="primary">
    <a class="item" data-tab="principal">Caractéristiques</a>
    <a class="item" data-tab="competence">Compétences</a>
    <a class="item" data-tab="combat">Combat</a>
    <a class="item" data-tab="sorts">Sorts</a>
    <a class="item" data-tab="equipement">Équipement</a>
    <a class="item" data-tab="description">Description</a>
  </nav>

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

    {{!-- Carac Tab --}}
    <div class="sheet-body" data-group="primary" data-tab="principal">
      <div class="tab-content">
        <div class="grid grid-2col">
          <div class="sheet-section">
            <h3>Caractéristiques</h3>
            {{#each system.carac as |categ keycateg|}}
              <div class="carac-category">
                <h4>{{categ.label}}</h4>
                <ul class="item-list">
                  {{#each categ.carac as |mycarac keycarac|}}
                  <li class="item flexrow" data-carac-categ="{{keycateg}}" data-carac-key="{{keycarac}}">
                    <img class="item-img" src="systems/fvtt-yggdrasill/images/icons/icon_carac_{{keycateg}}.png"/>
                    <span class="item-name">
                      <a data-action="rollCarac" data-carac-categ="{{keycateg}}" data-carac-key="{{keycarac}}">{{mycarac.label}}</a>
                    </span>
                    <select name="system.carac.{{keycateg}}.carac.{{keycarac}}.value" value="{{mycarac.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
                      {{selectOptions @root.optionsCarac selected=mycarac.value localize=false}}
                    </select>
                  </li>
                  {{/each}}
                </ul>
              </div>
            {{/each}}

            <h3>Furor</h3>
            <div class="furor-container">
              <input type="number" name="system.furor.value" value="{{system.furor.value}}" data-dtype="Number" style="width: 60px;"/>
              <span> / 
                {{#if isGM}}
                  <input type="number" name="system.furor.max" value="{{system.furor.max}}" data-dtype="Number" style="width: 60px;"/>
                {{else}}
                  {{system.furor.max}}
                {{/if}}
              </span>
            </div>

            <h3>Blessures</h3>
            <ul class="item-list">
              {{#each blessures as |blessure|}}
              <li class="item flexrow" data-item-id="{{blessure.id}}">
                <img class="item-img" src="{{blessure.img}}"/>
                <span class="item-name">{{blessure.name}}</span>
                <div class="item-controls">
                  <a data-action="editItem" data-item-id="{{blessure.id}}" title="Edit"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{blessure.id}}" title="Delete"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>

            <h3>Sorts/Runes actifs</h3>
            <ul class="item-list">
              {{#each effetsMagiques as |effetmagique|}}
              <li class="item flexrow" data-item-id="{{effetmagique.id}}">
                <img class="item-img" src="{{effetmagique.img}}"/>
                <span class="item-name">{{effetmagique.name}}</span>
                <div class="item-controls">
                  <a data-action="editItem" data-item-id="{{effetmagique.id}}" title="Edit"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{effetmagique.id}}" title="Delete"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>
          </div>

          <div class="sheet-section">
            <h3>Dons</h3>
            <ul class="item-list">
              {{#each dons as |don|}}
              <li class="item flexrow" data-item-id="{{don.id}}">
                <img class="item-img" src="{{don.img}}"/>
                <span class="item-name">{{don.name}}</span>
                <div class="item-controls">
                  <a data-action="editItem" data-item-id="{{don.id}}" title="Edit"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{don.id}}" title="Delete"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>

            <h3>Faiblesses</h3>
            <ul class="item-list">
              {{#each faiblesses as |faiblesse|}}
              <li class="item flexrow" data-item-id="{{faiblesse.id}}">
                <img class="item-img" src="{{faiblesse.img}}"/>
                <span class="item-name">{{faiblesse.name}}</span>
                <div class="item-controls">
                  <a data-action="editItem" data-item-id="{{faiblesse.id}}" title="Edit"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{faiblesse.id}}" title="Delete"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>

            <h3>Caractéristiques Secondaires</h3>
            <ul class="item-list">
              {{#each system.caracsecondaire as |caracsec key|}}
              {{#if (ne key "pv")}}
              <li class="item flexrow">
                <span class="item-name">{{caracsec.label}}</span>
                <div class="item-controls">
                  {{#if (or (eq key "defensephy") (eq key "defensemen"))}}
                    <span>Base: {{caracsec.max}}</span>
                    <span>B/M:</span>
                    <select name="system.caracsecondaire.{{key}}.bonusmalus" value="{{caracsec.bonusmalus}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
                      {{selectOptions @root.optionsDMDP selected=caracsec.bonusmalus valueAttr="value" labelAttr="text"}}
                    </select>
                    {{!-- Calculate total manually if caracsec.total doesn't work --}}
                    {{#if caracsec.total}}
                      <span>Total: {{caracsec.total}}</span>
                    {{else}}
                      <span>Total: Calculer</span>
                    {{/if}}
                  {{else}}
                    <span>{{caracsec.max}}</span>
                  {{/if}}
                </div>
              </li>
              {{/if}}
              {{/each}}
            </ul>

            <h3>Points de Vie</h3>
            <div class="pv-container">
              <button type="button" class="pv-control" data-action="decrementPV" title="Diminuer PV">-</button>
              <input type="number" name="system.caracsecondaire.pv.value" value="{{system.caracsecondaire.pv.value}}" data-dtype="Number" style="width: 60px;"/>
              <button type="button" class="pv-control" data-action="incrementPV" title="Augmenter PV">+</button>
              <span> / {{system.caracsecondaire.pv.max}}</span>
            </div>

            <h3>État</h3>
            <div class="status-container">
              <label>
                <input type="checkbox" name="system.status.epuise" {{checked system.status.epuise}}/>
                Épuisé
              </label>
              <label>
                <input type="checkbox" name="system.status.blesse" {{checked system.status.blesse}}/>
                Blessé
              </label>
              <label>
                <input type="checkbox" name="system.status.meurtri" {{checked system.status.meurtri}}/>
                Meurtri
              </label>
            </div>
          </div>
        </div>
      </div>
    </div>

    {{!-- Competence Tab --}}
    <div class="sheet-body" data-group="primary" data-tab="competence">
      <div class="tab-content">
        <div class="grid grid-2col">
          {{!-- Left Column: Compétences Générales --}}
          <div class="sheet-section">
            <h3>Compétences Générales</h3>
            <ul class="competence-list">
              <li class="competence-header">
                <span class="competence-icon"></span>
                <span class="competence-name">Nom</span>
                <span class="competence-niveau">Niveau</span>
                <span class="competence-controls"></span>
              </li>
              {{#each competencesGenerales as |competence|}}
              <li class="competence-item" data-item-id="{{competence.id}}">
                <img class="competence-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
                <span class="competence-name">
                  <a data-action="rollCompetence" data-item-id="{{competence.id}}">{{competence.name}}</a>
                  {{#if competence.system.isspecialisation}}
                  <span class="specialisation">({{competence.system.specialisation}})</span>
                  {{/if}}
                </span>
                <select class="competence-niveau" data-action="updateCompetence" data-item-id="{{competence.id}}" value="{{competence.system.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
                  {{selectOptions @root.optionsBase selected=competence.system.niveau localize=false}}
                </select>
                <div class="competence-controls">
                  <a data-action="editItem" data-item-id="{{competence.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{competence.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>
          </div>

          {{!-- Right Column: Compétences Martiales & Magiques --}}
          <div class="sheet-section">
            <h3>Compétences Martiales</h3>
            <ul class="competence-list">
              <li class="competence-header">
                <span class="competence-icon"></span>
                <span class="competence-name">Nom</span>
                <span class="competence-niveau">Niveau</span>
                <span class="competence-controls"></span>
              </li>
              {{#each competencesMartiales as |competence|}}
              <li class="competence-item" data-item-id="{{competence.id}}">
                <img class="competence-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
                <span class="competence-name">
                  <a data-action="rollCompetence" data-item-id="{{competence.id}}">{{competence.name}}</a>
                </span>
                <select class="competence-niveau" data-action="updateCompetence" data-item-id="{{competence.id}}" value="{{competence.system.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
                  {{selectOptions @root.optionsBase selected=competence.system.niveau localize=false}}
                </select>
                <div class="competence-controls">
                  <a data-action="editItem" data-item-id="{{competence.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{competence.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>

            <h3>Compétences Magiques</h3>
            <ul class="competence-list">
              <li class="competence-header">
                <span class="competence-icon"></span>
                <span class="competence-name">Nom</span>
                <span class="competence-niveau">Niveau</span>
                <span class="competence-controls"></span>
              </li>
              {{#each competencesMagiques as |competence|}}
              <li class="competence-item" data-item-id="{{competence.id}}">
                <img class="competence-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
                <span class="competence-name">
                  <a data-action="rollCompetence" data-item-id="{{competence.id}}">{{competence.name}}</a>
                </span>
                <select class="competence-niveau" data-action="updateCompetence" data-item-id="{{competence.id}}" value="{{competence.system.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
                  {{selectOptions @root.optionsBase selected=competence.system.niveau localize=false}}
                </select>
                <div class="competence-controls">
                  <a data-action="editItem" data-item-id="{{competence.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{competence.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>
          </div>
        </div>
      </div>
    </div>

    {{!-- Combat Tab --}}
    <div class="sheet-body" data-group="primary" data-tab="combat">
      <div class="tab-content">
        <div>
          {{!-- Armes --}}
          <div class="sheet-section">
            <h3>Armes</h3>
            <ul class="combat-list">
              <li class="combat-header">
                <span class="combat-icon"></span>
                <span class="combat-name">Nom</span>
                <span class="combat-categorie">Catégorie</span>
                <span class="combat-degat">Dégâts</span>
                <span class="combat-controls"></span>
              </li>
              {{#each armesCC as |arme|}}
              <li class="combat-item" data-item-id="{{arme.id}}">
                <img class="combat-icon" src="{{arme.img}}" alt="{{arme.name}}"/>
                <span class="combat-name">
                  <a data-action="rollArme" data-item-id="{{arme.id}}">{{arme.name}}</a>
                </span>
                <span class="combat-categorie">{{arme.system.categorie}}</span>
                <span class="combat-degat">{{arme.system.degat}}</span>
                <div class="combat-controls">
                  <a data-action="equipItem" data-item-id="{{arme.id}}" title="Équiper/Déséquiper">
                    {{#if arme.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}
                  </a>
                  <a data-action="editItem" data-item-id="{{arme.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{arme.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
              {{#each armesDist as |arme|}}
              <li class="combat-item" data-item-id="{{arme.id}}">
                <img class="combat-icon" src="{{arme.img}}" alt="{{arme.name}}"/>
                <span class="combat-name">
                  <a data-action="rollArme" data-item-id="{{arme.id}}">{{arme.name}}</a>
                </span>
                <span class="combat-categorie">{{arme.system.categorie}}</span>
                <span class="combat-degat">{{arme.system.degat}}</span>
                <div class="combat-controls">
                  <a data-action="equipItem" data-item-id="{{arme.id}}" title="Équiper/Déséquiper">
                    {{#if arme.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}
                  </a>
                  <a data-action="editItem" data-item-id="{{arme.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{arme.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>
          </div>

          {{!-- Prouesses Martiales --}}
          <div class="sheet-section">
            <h3>Prouesses Martiales</h3>
            <ul class="combat-list">
              <li class="combat-header">
                <span class="combat-icon"></span>
                <span class="combat-name">Nom</span>
                <span class="combat-categorie">Catégorie</span>
                <span class="combat-niveau">Niveau</span>
                <span class="combat-controls"></span>
              </li>
              {{#each prouesses as |prouesse|}}
              <li class="combat-item" data-item-id="{{prouesse.id}}">
                <img class="combat-icon" src="{{prouesse.img}}" alt="{{prouesse.name}}"/>
                <span class="combat-name">{{prouesse.name}}</span>
                <span class="combat-categorie">{{prouesse.system.categorie}}</span>
                <span class="combat-niveau">{{prouesse.system.niveau}}</span>
                <div class="combat-controls">
                  <a data-action="editItem" data-item-id="{{prouesse.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                  <a data-action="deleteItem" data-item-id="{{prouesse.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                </div>
              </li>
              {{/each}}
            </ul>
          </div>

          <div class="grid grid-2col">
            {{!-- Left Column: Armures --}}
            <div class="sheet-section">
              <h3>Armures (Protection Totale: {{protectionTotal}})</h3>
              <ul class="combat-list">
                <li class="combat-header">
                  <span class="combat-icon"></span>
                  <span class="combat-name">Nom</span>
                  <span class="combat-categorie">Catégorie</span>
                  <span class="combat-protection">Protection</span>
                  <span class="combat-controls"></span>
                </li>
                {{#each armures as |armure|}}
                <li class="combat-item" data-item-id="{{armure.id}}">
                  <img class="combat-icon" src="{{armure.img}}" alt="{{armure.name}}"/>
                  <span class="combat-name">{{armure.name}}</span>
                  <span class="combat-categorie">{{armure.system.categorie}}</span>
                  <span class="combat-protection">{{armure.system.protection}}</span>
                  <div class="combat-controls">
                    <a data-action="equipItem" data-item-id="{{armure.id}}" title="Équiper/Déséquiper">
                      {{#if armure.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}
                    </a>
                    <a data-action="editItem" data-item-id="{{armure.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                    <a data-action="deleteItem" data-item-id="{{armure.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                  </div>
                </li>
                {{/each}}
              </ul>
            </div>

            {{!-- Right Column: Boucliers --}}
            <div class="sheet-section">
              <h3>Boucliers (Bonus Défense Physique: {{dpBouclier}})</h3>
              <ul class="combat-list">
                <li class="combat-header">
                  <span class="combat-icon"></span>
                  <span class="combat-name">Nom</span>
                  <span class="combat-categorie">Catégorie</span>
                  <span class="combat-bonus">Bonus DP</span>
                  <span class="combat-controls"></span>
                </li>
                {{#each boucliers as |bouclier|}}
                <li class="combat-item" data-item-id="{{bouclier.id}}">
                  <img class="combat-icon" src="{{bouclier.img}}" alt="{{bouclier.name}}"/>
                  <span class="combat-name">{{bouclier.name}}</span>
                  <span class="combat-categorie">{{bouclier.system.categorie}}</span>
                  <span class="combat-bonus">{{bouclier.system.defensebonus}}</span>
                  <div class="combat-controls">
                    <a data-action="equipItem" data-item-id="{{bouclier.id}}" title="Équiper/Déséquiper">
                      {{#if bouclier.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}
                    </a>
                    <a data-action="editItem" data-item-id="{{bouclier.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                    <a data-action="deleteItem" data-item-id="{{bouclier.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
                  </div>
                </li>
                {{/each}}
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>

    {{!-- Sorts Tab --}}
    <div class="sheet-body" data-group="primary" data-tab="sorts">
      <div class="tab-content">
        
        {{!-- Sorts Sejdr --}}
        <div class="sheet-section">
          <h3>Sorts Sejdr</h3>
          <ul class="sort-list">
            <li class="sort-header">
              <span class="sort-icon"></span>
              <span class="sort-name">Nom</span>
              <span class="sort-forme">Forme</span>
              <span class="sort-niveau">Niveau</span>
              <span class="sort-controls"></span>
            </li>
            {{#each sortsSejdr as |sort|}}
            <li class="sort-item" data-item-id="{{sort.id}}">
              <img class="sort-icon" src="{{sort.img}}" alt="{{sort.name}}"/>
              <span class="sort-name">
                <a data-action="rollSort" data-sort-type="sejdr" data-item-id="{{sort.id}}">{{sort.name}}</a>
              </span>
              <span class="sort-forme">{{sort.system.forme}}</span>
              <span class="sort-niveau">{{sort.system.niveau}}</span>
              <div class="sort-controls">
                <a data-action="editItem" data-item-id="{{sort.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                <a data-action="deleteItem" data-item-id="{{sort.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        {{!-- Sorts Galdr --}}
        <div class="sheet-section">
          <h3>Sorts Galdr</h3>
          <ul class="sort-list">
            <li class="sort-header">
              <span class="sort-icon"></span>
              <span class="sort-name">Nom</span>
              <span class="sort-domaine">Domaine</span>
              <span class="sort-duree">Durée</span>
              <span class="sort-controls"></span>
            </li>
            {{#each sortsGaldr as |sort|}}
            <li class="sort-item" data-item-id="{{sort.id}}">
              <img class="sort-icon" src="{{sort.img}}" alt="{{sort.name}}"/>
              <span class="sort-name">
                <a data-action="rollSort" data-sort-type="galdr" data-item-id="{{sort.id}}">{{sort.name}}</a>
              </span>
              <span class="sort-domaine">{{sort.system.domaine}}</span>
              <span class="sort-duree">{{sort.system.duree}}</span>
              <div class="sort-controls">
                <a data-action="editItem" data-item-id="{{sort.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                <a data-action="deleteItem" data-item-id="{{sort.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        {{!-- Runes --}}
        <div class="sheet-section">
          <h3>Runes</h3>
          <ul class="sort-list">
            <li class="sort-header">
              <span class="sort-icon"></span>
              <span class="sort-name">Nom</span>
              <span class="sort-cible">Cible</span>
              <span class="sort-niveau">Niveau</span>
              <span class="sort-domaine">Domaine</span>
              <span class="sort-controls"></span>
            </li>
            {{#each runes as |rune|}}
            <li class="sort-item rune-item" data-item-id="{{rune.id}}">
              <img class="sort-icon" src="{{rune.img}}" alt="{{rune.name}}"/>
              <span class="sort-name">
                <a data-action="rollSort" data-sort-type="rune" data-item-id="{{rune.id}}">{{rune.name}}</a>
              </span>
              <span class="sort-cible">{{rune.system.cible}}</span>
              <span class="sort-niveau">{{rune.system.niveau}}</span>
              <span class="sort-domaine">{{rune.system.domaine}}</span>
              <div class="sort-controls">
                <a data-action="editItem" data-item-id="{{rune.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                <a data-action="deleteItem" data-item-id="{{rune.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

      </div>
    </div>

    {{!-- Equipement Tab --}}
    <div class="sheet-body" data-group="primary" data-tab="equipement">
      <div class="tab-content">
        
        {{!-- Argent / Monnaies --}}
        <div class="sheet-section">
          <h3>Argent</h3>
          <ul class="equipement-list">
            <li class="equipement-header">
              <span class="equipement-icon"></span>
              <span class="equipement-name">Nom</span>
              <span class="equipement-quantite">Quantité</span>
              <span class="equipement-controls"></span>
            </li>
            {{#each monnaies as |monnaie|}}
            <li class="equipement-item" data-item-id="{{monnaie.id}}">
              <img class="equipement-icon" src="{{monnaie.img}}" alt="{{monnaie.name}}"/>
              <span class="equipement-name">{{monnaie.name}}</span>
              <span class="equipement-quantite">{{monnaie.system.quantite}}</span>
              <div class="equipement-controls">
                <a data-action="editItem" data-item-id="{{monnaie.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                <a data-action="deleteItem" data-item-id="{{monnaie.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        {{!-- Équipement --}}
        <div class="sheet-section">
          <h3>Équipement (Encombrement total: {{encTotal}})</h3>
          <ul class="equipement-list">
            <li class="equipement-header">
              <span class="equipement-icon"></span>
              <span class="equipement-name">Nom</span>
              <span class="equipement-quantite">Quantité</span>
              <span class="equipement-enc">Enc.</span>
              <span class="equipement-controls"></span>
            </li>
            {{#each equipements as |equipement|}}
            <li class="equipement-item" data-item-id="{{equipement.id}}">
              <img class="equipement-icon" src="{{equipement.img}}" alt="{{equipement.name}}"/>
              <span class="equipement-name">{{equipement.name}}</span>
              <span class="equipement-quantite">{{equipement.system.quantite}}</span>
              <span class="equipement-enc">{{equipement.system.enc}}</span>
              <div class="equipement-controls">
                <a data-action="equipItem" data-item-id="{{equipement.id}}" title="Équiper/Déséquiper">
                  {{#if equipement.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}
                </a>
                <a data-action="editItem" data-item-id="{{equipement.id}}" title="Éditer"><i class="fas fa-edit"></i></a>
                <a data-action="deleteItem" data-item-id="{{equipement.id}}" title="Supprimer"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

      </div>
    </div>

    {{!-- Description Tab --}}
    <div class="sheet-body" data-group="primary" data-tab="description">
      <div class="tab-content">
        
        {{!-- Expérience et Renommée --}}
        <div class="sheet-section">
          <h3>Expérience et Renommée</h3>
          <div class="form-group">
            <label>XP Actuel:</label>
            <input type="number" name="system.xp.xp.current" value="{{system.xp.xp.current}}" data-dtype="Number"/>
            <label>XP Total:</label>
            <input type="number" name="system.xp.xp.total" value="{{system.xp.xp.total}}" data-dtype="Number"/>
            <label>Renommée:</label>
            <input type="number" name="system.xp.renommee.value" value="{{system.xp.renommee.value}}" data-dtype="Number"/>
          </div>
        </div>

        {{!-- Biodatas --}}
        <div class="sheet-section">
          <h3>Biodatas</h3>
          <div class="form-group">
            <label>Poids:</label>
            <input type="text" name="system.biodata.poids" value="{{system.biodata.poids}}" data-dtype="String"/>
            <label>Taille:</label>
            <input type="text" name="system.biodata.taille" value="{{system.biodata.taille}}" data-dtype="String"/>
            <label>Âge:</label>
            <input type="text" name="system.biodata.age" value="{{system.biodata.age}}" data-dtype="String"/>
          </div>
          <div class="form-group">
            <label>Archétype:</label>
            <input type="text" name="system.biodata.archetype" value="{{system.biodata.archetype}}" data-dtype="String"/>
            <label>Profession:</label>
            <input type="text" name="system.biodata.profession" value="{{system.biodata.profession}}" data-dtype="String"/>
            <label>Royaume:</label>
            <input type="text" name="system.biodata.royaume" value="{{system.biodata.royaume}}" data-dtype="String"/>
          </div>
        </div>

        {{!-- Biographie --}}
        <div class="sheet-section">
          <h3>Biographie</h3>
          <div class="description-content">
            {{formInput systemFields.biodata.fields.description enriched=enrichedDescription value=system.biodata.description name="system.biodata.description" toggled=true}}
          </div>
        </div>

        {{!-- Notes --}}
        <div class="sheet-section">
          <h3>Notes</h3>
          <div class="description-content">
            {{formInput systemFields.biodata.fields.notes enriched=enrichedNotes value=system.biodata.notes name="system.biodata.notes" toggled=true}}
          </div>
        </div>

        {{!-- Tirage des Runes --}}
        <div class="sheet-section">
          <h3>Tirage des Runes</h3>
          <div class="description-content">
            {{formInput systemFields.biodata.fields.tiragerunes enriched=enrichedTirageRunes value=system.biodata.tiragerunes name="system.biodata.tiragerunes" toggled=true}}
          </div>
        </div>

        {{!-- Notes GM --}}
        <div class="sheet-section">
          <h3>Notes GM</h3>
          <div class="description-content">
            {{formInput systemFields.biodata.fields.gmnotes enriched=enrichedGMNotes value=system.biodata.gmnotes name="system.biodata.gmnotes" toggled=true}}
          </div>
        </div>

      </div>
    </div>

  </section>
</section>
