<?php

/**
 * Displays the featured part
 *
 * @package WordPress
 * @subpackage IZI_THEME
 * @since 1.0.0
 */
?>
<!-- FEATURED SERIE BEGIN -->
<section class="container py-5">
    <h2 class="htitles text-end mb-5">Série à la une</h2>
    <div class="row">
    <?php
        $featured_serie = get_field('stickyserie', 15);
        // var_dump($featured_serie);
        if( $featured_serie ):
    ?>
        <div class="col-12 col-lg-6">
            <figure class="figure w-100">
                <?php echo get_the_post_thumbnail( $featured_serie, 'full', ['class' => 'figure-img rounded'] ); ?>
            </figure>
        </div>
        <div class="col-12 col-lg-6 position-relative">
            <div class="row">
                <div class="col-12">
                    <h3 class="position-absolute ftitle text-uppercase"><?php echo esc_html( $featured_serie->post_title ); ?></h3>
                </div>
                <div class="col-12 ftext">
                    <p class="justif"><?php echo esc_html( $featured_serie->post_excerpt ); ?></p>
                    <div class="d-grid gap-2 d-md-flex justify-content-md-end">
                        <a href="<?php echo get_permalink( $featured_serie ); ?>" class="btn btn-gradient btn-border mt-5">en
                            découvrir
                            +</a>
                    </div>
                </div>
            </div>
        </div>
    <?php
    endif;
    ?>
    </div>
</section>
<!-- FEATURED SERIE END -->