<?php
$data = $args['data'] ?? array();
$nom = $data['nom'] ?? false;
$description = $data['description'] ?? '';
$image = $data['image'] ?? 0;
$lien = $data['lien'] ?? '';
if(!empty($description) || !empty($nom) || $image > 0) :
?>
<div class="card-team scroll-appear">
	<?php if (!empty($lien)) : ?>
		<a href="<?php echo $lien; ?>">
		<?php endif; ?>
		<div class="card-wrapper">
			<div class="card-img">
				<?php if ($image > 0) : ?>
					<?php echo wp_get_attachment_image($image, 'full', false, array('loading' => 'lazy', 'class' => 'max-w-[43%] scroll-appear scroll-appear-fade-left')); ?>
				<?php endif; ?>
			</div>
			<div class="card-body">
				<?php if (!empty($nom)) : ?>
					<h3 class="card-title round-after round-after-orange round-after-sm">
						<?php echo $nom; ?>
					</h3>
				<?php endif; ?>
				<?php if (!empty($description)) : ?>
					<h4 class="card-subtitle">
						<?php echo $description; ?>
					</h4>
				<?php endif; ?>
			</div>
		</div>
		<?php if (!empty($lien)) : ?>
		</a>
	<?php endif; ?>
</div>
<?php endif; ?>
