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

$titre = isset($datas['titre']) ? $datas['titre'] : '';
$texte = isset($datas['texte']) ? $datas['texte'] : '';
$slider = isset($datas['slider']) ? $datas['slider'] : '';
$reverse = isset($datas['reverse']) && $datas['reverse'] == '1' ? 'lg:flex-row-reverse ' : 'lg:flex-row ';


?>

<div class="container flex flex-col <?php echo $reverse ?>  gap-10 relative items-center ">
  <div class="section-left basis-7/12  scroll-appear ">
    <div class="max-w-xl">
      <h2 class="new-section-title text-left mb-8"><?php echo $titre ?></h2>
      <div class=""><?php echo $texte ?></div>
    </div>
  </div>
  <div class="section-right basis-5/12 max-w-full  scroll-appear pb-10">

    <div class="slick-figures max-w-full md:max-w-md">
      <?php foreach ($slider as $slide) : ?>

        <figure class="">
          <img <?php acf_responsive_image($slide['image']['id'], "medium", "100%") ?> class="aspect-3/4 w-full h-auto mb-3 max-w-lg" alt="">
          <figcaption><?php echo $slide['auteur'] . ' -  ' . $slide['lieu'] ?> </figcaption>
        </figure>

      <?php endforeach; ?>
    </div>
  </div>

</div>