/* ==========================================================================
   Article card (template-parts/post-card.php) — one design for every list of blog articles:
   homepage, blog and category archives, Catalogue, Qui sommes-nous, "À lire aussi".
   Image at a constant 16:9 (the native ratio of the article banners), category on the image,
   date, title, excerpt, "Lire l'article". The whole card is the article link.
   ========================================================================== */

.pc-grid {
	--pc-ink: #0b0b0b;
	--pc-text: #55524c;
	--pc-muted: #8b877f;
	--pc-line: #e6e1d7;
	--pc-gold: #c99a3f;
	--pc-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--pc-head: "Red Hat Display", var(--o-heading, sans-serif);
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(18px, 2.2vw, 30px);
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pc-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pc {
	display: flex;
	min-width: 0;
	margin: 0;
}
.pc[hidden] {
	display: none;
}
.pc__card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--pc-line);
	border-radius: 8px;
	background: #fff;
	font-family: var(--o-body, Arial, sans-serif);
	transition: transform 0.5s var(--pc-ease), box-shadow 0.5s var(--pc-ease), border-color 0.3s;
}
.pc__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #ece9e3;
}
.pc__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--pc-ease);
}
.pc-grid .pc__cat {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 12px;
	border-radius: 999px;
	background: rgba(11, 11, 11, 0.72);
	backdrop-filter: blur(6px);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #fff;
	text-decoration: none;
	transition: background-color 0.25s, color 0.25s;
}
.pc__cat:hover,
.pc__cat:focus-visible {
	background: var(--pc-gold);
	color: var(--pc-ink);
}
.pc__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: clamp(18px, 2vw, 24px) clamp(18px, 2vw, 24px) clamp(20px, 2.2vw, 26px);
}
.pc-grid .pc__date {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--pc-muted);
}
.pc__date::before {
	content: "";
	width: 22px;
	height: 1px;
	background: var(--pc-gold);
}
.pc-grid .pc__title {
	margin: 12px 0 0;
	font-family: var(--pc-head);
	font-size: clamp(1.15rem, 1rem + 0.45vw, 1.35rem);
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.01em;
	color: var(--pc-ink);
	text-wrap: balance;
}
.pc-grid .pc__link {
	color: inherit;
	text-decoration: none;
}
/* The whole card opens the article. */
.pc__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.pc__link:focus-visible {
	outline: none;
}
.pc__card:has(.pc__link:focus-visible) {
	outline: 2px solid var(--pc-gold);
	outline-offset: 3px;
}
.pc-grid .pc__excerpt {
	display: -webkit-box;
	margin: 10px 0 0;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.6;
	color: var(--pc-text);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.pc-grid .pc__more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	margin-top: auto;
	padding-top: 18px;
	font-size: 14px;
	font-weight: 700;
	color: var(--pc-ink);
}
.pc__more svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.4s var(--pc-ease);
}
@media (hover: hover) and (pointer: fine) {
	.pc__card:hover {
		border-color: #d9d2c4;
		box-shadow: 0 24px 44px -28px rgba(11, 11, 11, 0.4);
		transform: translateY(-4px);
	}
	.pc__card:hover .pc__media img {
		transform: scale(1.05);
	}
	.pc__card:hover .pc__more {
		color: #8a6a26;
	}
	.pc__card:hover .pc__more svg {
		transform: translateX(5px);
	}
}

/* Reveal, once, card after card (assets/js/post-card.js). */
.pc-js .pc {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.7s var(--pc-ease), transform 0.8s var(--pc-ease);
	transition-delay: calc(var(--pc-i, 0) * 80ms);
}
.pc-js .pc.is-in {
	opacity: 1;
	transform: none;
}

@media (max-width: 1023px) {
	.pc-grid,
	.pc-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 639px) {
	.pc-grid,
	.pc-grid--2 {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (prefers-reduced-motion: reduce) {
	.pc-grid *,
	.pc-js .pc {
		transition: none !important;
	}
	.pc-js .pc {
		opacity: 1;
		transform: none;
	}
}

/* Long unbroken words in original titles ("MULTICERAME,CHAMPIONDE…") wrap instead of widening the page. */
.pc-grid .pc__title,
.pc-grid .pc__excerpt {
	overflow-wrap: anywhere;
}
