/*
 * Gabarit article en blocs (parts/article.html).
 * Reprend le rendu du modèle Elementor Pro 501268 « 2026 - Article unique »,
 * avec un contenu limité à 1140 px au lieu de 90 % de la largeur d'écran.
 */

.easi-article {
	--easi-article-width: 1140px;
	--easi-article-gutter: max(20px, calc((100% - var(--easi-article-width)) / 2));
	--easi-article-green: #005d4b;
	--easi-article-orange: #e98548;
}

.easi-article-hero,
.easi-article-meta,
.easi-article-body,
.easi-article-share {
	padding-left: var(--easi-article-gutter);
	padding-right: var(--easi-article-gutter);
}

/* --- Bandeau : fil d'Ariane + titre --- */
/* Marges en % de la largeur, comme les conteneurs Elementor (1 % = 14px en 1440) */
.easi-article-hero {
	background-color: var(--easi-article-green);
	padding-top: calc(1% + 15px);
	padding-bottom: calc(1% + 15px);
	color: #fff;
}

.easi-article-hero__breadcrumbs {
	margin-bottom: 0;
	font-size: 11.9px;
	line-height: 22.4px;
	color: #fff;
}

.easi-article-hero__breadcrumbs a,
.easi-article-hero__breadcrumbs a:hover {
	color: #fff;
	text-decoration: none;
}

.easi-article-hero .easi-article-hero__title {
	margin: 0;
	color: #fff;
	font-size: 40px;
	font-weight: 500;
	line-height: 1;
}

/* --- Infos : auteur, date, catégories --- */
.easi-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 25px;
	padding-top: 1%;
	padding-bottom: 1%;
	border-bottom: 1px solid #e0e4ec;
	font-size: 14px;
	color: #000;
}

/*
 * Chaque info est une ligne de texte (pas de flex à l'intérieur) : le flex
 * espaçait les liens des catégories et l'espacement auto des blocs décalait la date.
 */
.easi-article-meta > .easi-article-meta__item {
	position: relative;
	display: block;
	margin: 0;
	line-height: 22.4px;
	white-space: nowrap;
}

.easi-article-meta__date > *,
.easi-article-meta__date > p {
	display: inline;
	margin: 0;
}

.easi-article-meta > .easi-article-meta__item + .easi-article-meta__item::after {
	content: "";
	position: absolute;
	top: 50%;
	left: -13px;
	height: 1em;
	border-left: 1px solid #ddd;
	transform: translateY(-50%);
}

.easi-article-meta a {
	color: inherit;
	text-decoration: none;
}

.easi-article-meta p {
	margin: 0;
}

/* Bloc auteur : le CSS de WP le met en flex avec un contenu qui s'étire. */
.easi-article-meta > .easi-article-meta__author {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 5px;
}

.easi-article-meta__author .wp-block-post-author__avatar {
	margin: 0;
	line-height: 0;
}

.easi-article-meta__author .wp-block-post-author__avatar img {
	width: 20px;
	height: 20px;
	border-radius: 50%;
}

.easi-article-meta__author .wp-block-post-author__content {
	flex: 0 0 auto;
}

.easi-article-meta__author .wp-block-post-author__byline,
.easi-article-meta__author .wp-block-post-author__name {
	display: inline;
	width: auto;
	margin: 0;
	font-size: inherit;
	font-weight: 400;
}

.easi-article-meta__author .wp-block-post-author__name {
	margin-left: 4px;
}

.easi-article-meta__date::before,
.easi-article-meta__cats::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 5px;
	vertical-align: -2px;
	background-color: currentColor;
	-webkit-mask: var(--easi-icon) center / contain no-repeat;
	mask: var(--easi-icon) center / contain no-repeat;
}

.easi-article-meta__date {
	--easi-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z'/%3E%3C/svg%3E");
}

.easi-article-meta__cats {
	--easi-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z'/%3E%3C/svg%3E");
}

.easi-article-meta__cats .wp-block-post-terms__separator {
	margin: 0;
}

/* --- Corps : contenu, étiquettes, « Poursuivez votre lecture » --- */
.easi-article-body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: 1%;
	padding-bottom: 1%;
}

.easi-article-body > * {
	margin-top: 0;
	margin-bottom: 0;
}

.easi-article-tags {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 14px;
}

.easi-article-tags::before {
	content: "#";
	font-weight: 700;
}

.easi-article-tags a {
	color: inherit;
	text-decoration: none;
}

.easi-article-body .easi-article-sep {
	width: 100%;
	margin: 15px 0;
	border: 0;
	border-top: 1px solid #000;
	opacity: 1;
}

.easi-article-body .easi-article-related__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.easi-article-related .easi-article-related__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 35px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.easi-article-related__grid > .wp-block-post {
	display: flex;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
	border-radius: 3px;
	background-color: #fff;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);
}

.easi-article-related__grid .wp-block-post-featured-image {
	margin: 0;
}

.easi-article-related__grid .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.easi-article-related__grid .easi-article-related__post-title {
	margin: 20px 10px 15px;
	font-size: 21px;
	font-weight: 400;
	line-height: 1.07;
}

.easi-article-related__grid .easi-article-related__post-title a {
	color: #000;
	text-decoration: none;
}

/* --- Partage --- */
.easi-article-share {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-top: 20px;
	padding-top: 25px;
	padding-bottom: 25px;
	border-top: 1px solid #000;
	background-color: var(--easi-article-orange);
}

.easi-article-share > * {
	margin: 0;
}

.easi-article-share .easi-article-share__title {
	font-size: 25px;
	line-height: 1;
	color: #000;
}

.easi-partage {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.easi-partage__btn {
	--easi-partage-color: #000;
	display: flex;
	align-items: center;
	height: 30px;
	padding-right: 15px;
	border: 1px solid var(--easi-partage-color);
	border-radius: 999px;
	color: var(--easi-partage-color);
	font-size: 12.75px;
	font-weight: 700;
	text-decoration: none;
}

.easi-partage__btn:hover,
.easi-partage__btn:focus {
	color: var(--easi-partage-color);
	text-decoration: none;
}

.easi-partage__btn--facebook { --easi-partage-color: #3b5998; }
.easi-partage__btn--whatsapp { --easi-partage-color: #25d366; }
.easi-partage__btn--pinterest { --easi-partage-color: #bd081c; }
.easi-partage__btn--email { --easi-partage-color: #ea4335; }

.easi-partage__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
}

.easi-partage__icon svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

/* --- Tablette --- */
@media (max-width: 1024px) {
	.easi-article-related .easi-article-related__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* --- Mobile --- */
@media (max-width: 767px) {
	.easi-article-hero {
		padding-top: 1%;
		padding-bottom: 1%;
	}

	.easi-article-hero__breadcrumbs {
		margin-bottom: 10px;
		font-size: 10px;
		line-height: 12px;
	}

	.easi-article-hero .easi-article-hero__title {
		font-size: 16px;
		line-height: 1;
	}

	.easi-article-meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
	}

	.easi-article-meta > .easi-article-meta__item {
		white-space: normal;
	}

	.easi-article-meta > .easi-article-meta__item + .easi-article-meta__item::after {
		display: none;
	}

	.easi-article-related .easi-article-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* !important : le bloc Image mise en avant pose aspect-ratio:1 en style inline */
	.easi-article-related__grid .wp-block-post-featured-image img {
		aspect-ratio: 2 !important;
	}

	.easi-article-related__grid .easi-article-related__post-title {
		font-size: 14px;
		line-height: 22.4px;
	}

	.easi-article-share .easi-article-share__title {
		font-size: 16px;
	}

	.easi-article-share {
		flex-direction: column;
		text-align: center;
	}

	.easi-partage {
		justify-content: center;
	}
}
