<?php
$datas = $args['data'];

$titre = isset($datas['titre']) ? $datas['titre'] : '';
$texte = isset($datas['texte']) ? $datas['texte'] : '';
$image = isset($datas['image']) ? $datas['image'] : '';
$bouton = isset($datas['bouton']) ? $datas['bouton'] : '';
$couleur_de_fond = isset($datas['couleur_de_fond']) ? $datas['couleur_de_fond'] : '';


?>
<div class="bg layer" style="background-color:<?php echo $couleur_de_fond ?> ;"></div>
<div class="container pt-5 md:pt-20 pb-16 md:pb-28">


  <div class="flex flex-col md:flex-row md:items-center gap-10  lg:gap-20 relative ">
    <div class="left md:basis-4/12 ">
      <img <?php acf_responsive_image($image['ID'], 'medium', '100%') ?> alt="" class="w-full mx-auto scroll-appear scroll-appear-image max-w-lg">
    </div>
    <div class="right md:basis-8/12 ">
      <div class="max-w-2xl">
        <h2 class="new-section-title !text-left  mb-8 scroll-appear"><?php echo $titre ?></h2>
        <div class=" scroll-appear"><?php echo $texte ?></div>
        <?php
        if ($bouton != '') {
          $post = get_post($bouton[0]);
          setup_postdata($post);
          $s = get_field('iteration_button');
          echo '<button type="button" class="btn mt-10 js-modal" data-target="#modal_iterations"><span>' . $s . '</span></button>';
          wp_reset_postdata();
        } else {
        }
        ?>
      </div>
    </div>

  </div>
</div>