/**
 * Styles de base des widgets HFW (Info Box, Grille d'articles).
 * Repris de la feuille UAE (uniquement les règles utiles au site) pour un rendu identique.
 * Les couleurs, typos et espacements viennent des réglages Elementor de chaque widget.
 */

/* =========================================================
 * Info Box
 * ========================================================= */
.uael-infobox .uael-infobox-content,
.uael-infobox-left-right-wrap,
.uael-infobox-title-wrap { width: 100%; }

.uael-infobox-icon-above-title .uael-infobox-left-right-wrap {
	display: block;
	min-width: 100%;
	width: 100%;
}

.uael-icon-wrap .uael-icon { display: inline-block; }
.uael-icon-wrap .uael-icon i { height: auto; width: auto; position: relative; display: block; }
.uael-icon-wrap .uael-icon i:before { position: absolute; left: 50%; transform: translateX(-50%); }
.uael-icon-wrap .uael-icon svg { height: 100%; width: 100%; }

.uael-infobox-module-link {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 4;
}
.elementor-edit-mode .uael-infobox-module-link { z-index: 2; }

.uael-infobox-link-type-module:hover,
.uael-infobox-link-type-module:hover .uael-icon i,
.uael-infobox-link-type-module:hover .uael-icon svg { transition: color .2s; }

.uael-infobox-module-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* =========================================================
 * Grille d'articles
 * ========================================================= */
.uael-post-grid__inner {
	display: flex;
	flex-wrap: wrap;
}
.uael-post-wrapper { float: left; display: inline-block; }

.uael-post__columns-1 .uael-post-wrapper { width: 100%; }
.uael-post__columns-2 .uael-post-wrapper { width: 50%; }
.uael-post__columns-3 .uael-post-wrapper { width: 33.2%; }
.uael-post__columns-4 .uael-post-wrapper { width: 25%; }
.uael-post__columns-5 .uael-post-wrapper { width: 20%; }
.uael-post__columns-6 .uael-post-wrapper { width: 16.66%; }

@media (max-width: 1024px) {
	.uael-post__columns-tablet-1 .uael-post-wrapper { width: 100%; }
	.uael-post__columns-tablet-2 .uael-post-wrapper { width: 50%; }
	.uael-post__columns-tablet-3 .uael-post-wrapper { width: 33.2%; }
	.uael-post__columns-tablet-4 .uael-post-wrapper { width: 25%; }
	.uael-post__columns-tablet-5 .uael-post-wrapper { width: 20%; }
	.uael-post__columns-tablet-6 .uael-post-wrapper { width: 16.66%; }
}
@media (max-width: 767px) {
	.uael-post__columns-mobile-1 .uael-post-wrapper { width: 100%; }
	.uael-post__columns-mobile-2 .uael-post-wrapper { width: 50%; }
	.uael-post__columns-mobile-3 .uael-post-wrapper { width: 33.2%; }
	.uael-post__columns-mobile-4 .uael-post-wrapper { width: 25%; }
	.uael-post__columns-mobile-5 .uael-post-wrapper { width: 20%; }
	.uael-post__columns-mobile-6 .uael-post-wrapper { width: 16.66%; }
}

.uael-post__bg-wrap { width: 100%; display: inline-block; }
.uael-equal__height-yes .uael-post__bg-wrap { height: 100%; }

.uael-post__thumbnail { overflow: hidden; }
.uael-post__thumbnail img { width: 100%; transition: all .3s linear; }

.uael-posts-thumbnail-ratio .uael-post__thumbnail:not(.uael-post-wrapper__noimage) { position: relative; }
.uael-posts-thumbnail-ratio .uael-post__thumbnail img {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
}

.uael-post__terms-wrap { margin-bottom: 10px; }
.uael-post__terms-wrap .uael-post__terms { margin: 0; }
.uael-listing__terms-link {
	color: inherit;
	text-decoration: none;
	font-size: inherit;
	line-height: inherit;
	font-style: inherit;
}

.uael-post-wrapper .uael-post__title a,
.uael-post__meta-data a {
	font-style: inherit;
	font-weight: inherit;
	font-size: inherit;
	line-height: inherit;
	font-family: inherit;
	color: inherit;
}

.uael-post__meta-data { line-height: 1.3em; font-size: 12px; }
.uael-post__meta-data span { line-height: 1.6em; display: inline; margin-right: 10px; }
.uael-post__meta-data span:last-child { margin-right: 0; }
.uael-post__meta-data svg { height: 20px; width: 20px; vertical-align: middle; }

.uael-post__footer { margin-top: 30px; }

/* ---------- Filtres ---------- */
.uael-post__header-filters-wrap { margin-bottom: 20px; }
.uael-post__header-filters { display: block; margin: 0 0 10px; }
.elementor-widget-hfw-posts .uael-post__header ul.uael-post__header-filters { padding-left: unset; }
.elementor-widget-hfw-posts .uael-post__header ul.uael-post__header-filters li { margin-left: unset; }
.uael-post__header-filter { display: inline-block; padding: 5px; cursor: pointer; }
.uael-posts-tabs-dropdown .uael-filters-dropdown { display: none; }

.elementor-widget-hfw-posts .uael-post-grid__inner { transition: opacity .2s; }
.elementor-widget-hfw-posts.hfw-is-loading .uael-post-grid__inner { opacity: .4; pointer-events: none; }

@media (max-width: 767px) {
	.uael-posts-tabs-dropdown .uael-post__header-filters { display: none; }
	.uael-posts-tabs-dropdown .uael-filters-dropdown { display: block; position: relative; margin-bottom: 20px; }
	.uael-posts-tabs-dropdown .uael-filters-dropdown-button {
		background: #efefef;
		padding: 5px 15px;
		cursor: pointer;
		display: inline-block;
	}
	/* Chevron (remplace l'icône Font Awesome d'UAE) */
	.uael-posts-tabs-dropdown .uael-filters-dropdown-button::after {
		content: "";
		display: inline-block;
		width: .45em;
		height: .45em;
		margin-left: 10px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: translateY(-25%) rotate(45deg);
	}
	.uael-posts-tabs-dropdown ul.uael-filters-dropdown-list {
		display: none;
		list-style: none;
		position: absolute;
		margin: 0;
		top: 100%;
		left: 0;
		right: auto;
		background-color: rgba(255, 255, 255, .95);
		z-index: 9;
		border: 1px solid #ededed;
	}
	.uael-posts-tabs-dropdown ul.uael-filters-dropdown-list.show-list { display: block; }
	.uael-posts-tabs-dropdown .uael-post__header-filter {
		white-space: nowrap;
		display: block;
		background: #efefef;
		cursor: pointer;
		transition: all .2s ease-in-out 0s;
		border-style: none;
		margin: 0;
		padding: 5px 15px;
	}
}

/* ---------- Défilement infini ---------- */
.uael-post-inf-loader {
	display: none;
	margin: 0 auto;
	min-height: 58px;
	line-height: 58px;
	width: 160px;
	text-align: center;
}
.uael-post-inf-loader.is-active { display: block; }
.uael-post-inf-loader > div {
	width: 18px;
	height: 18px;
	background-color: #0085ba;
	border-radius: 100%;
	display: inline-block;
	animation: hfw-bouncedelay 1.4s infinite ease-in-out both;
}
.uael-post-inf-loader .uael-post-loader-1 { animation-delay: -.32s; }
.uael-post-inf-loader .uael-post-loader-2 { animation-delay: -.16s; }

@keyframes hfw-bouncedelay {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.uael-post__thumbnail img,
	.uael-post-inf-loader > div { transition: none; animation: none; }
}
