<div class="modal" id="modal_iterations">
  <div class="modal-background js-modal" data-target="#modal_iterations"></div>
  <div class="modal-content">
    <div class="btn-close js-modal" data-target="#modal_iterations">
      <?php include('dist/assets/svg/cross.svg') ?>
    </div>

    <?php

    if (have_rows('iterations')) {
      $cpt = 0;
      $select = '';
      $list = '';
      $imgs = '';

      while (have_rows('iterations')) {
        the_row();
        $select .= "<option id='iterationSelect" . $cpt . "' value='" . $cpt . "'>" . get_sub_field('titre') . "</option>";
        $list .= '<div id="iterationList' . $cpt . '" class="iteration_list">' . get_sub_field('description') . '</div>';
        $imgs .= wp_get_attachment_image(get_sub_field('image')['id'], "full", "", ["id" => "iterationImg" . $cpt, "class" => "iteration_img", "alt" => get_sub_field('titre')]);
        // $imgs .= '<img id="iterationImg' . $cpt . '"  class="iteration_img" src="' . get_sub_field('image')['sizes']['large'] . '" alt="' . get_sub_field('titre') . '">';
        $cpt++;
      }
    }
    ?>

    <div class="modal-body">
      <div class="col-left">
        <div class="modal-title uppercase text-uppercase"><?php echo __('Iterations', 'laurentperrier'); ?></div>
        <div class="custom_select_wrapper">
          <select id="selectIterations" class="selectIterations uppercase">
            <?php echo $select ?>
          </select>
        </div>
        <div class="modal-result text-uppercase">
          <h3><?php echo __('Blend of years :', 'laurentperrier'); ?></h3>
          <?php echo $list ?>
        </div>
      </div>
      <div class="col-right">
        <?php echo $imgs ?>
      </div>
    </div>
  </div>
</div>

<script>

</script>
<!-- MODALES STORE -->