/* ==========================================================================
   Les ressources : cartes documents + invitation à donner son avis
   Inspiration : cartes ressources du pied de page (.footer__res-*), version claire.
   ========================================================================== */

/* Introduction réduite au seul titre : grand mot, peu d'espace avant les visuels */
.resources-page .page-hero { padding-bottom: clamp(28px, 4vh, 48px); }
.resources-page .page-hero__title { font-size: clamp(48px, 8.6vw, 136px); line-height: .95; letter-spacing: -.035em; }

.resources { padding: 0 0 var(--section-y); }

/* Trois visuels (cahier des charges) : la photo porte la carte, le texte reste court */
.res-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 28px);
	perspective: 1400px;
}
.res-card {
	--lift: 0px;
	display: flex;
	flex-direction: column;
	padding: 12px;
	border-radius: 32px;
	background: var(--sable);
	transform-style: preserve-3d;
	transition: box-shadow .5s var(--ease-out);
}
.res-card:hover,
.res-card:focus-within { box-shadow: 0 32px 64px -36px rgba(14, 34, 49, .55); }
.res-card__media {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 5;
	border-radius: 22px;
	overflow: hidden;
	background: var(--ink-fill);
	isolation: isolate;
}
.res-card__frame { position: absolute; inset: 0; display: block; }
.res-card__media img {
	width: 100%;
	height: 112%;     /* marge pour la parallaxe verticale (JS) */
	margin-top: -6%;
	object-fit: cover;
	transform-origin: 50% 50%;
}
.res-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(14, 34, 49, .38) 0%, rgba(14, 34, 49, 0) 30%);
	pointer-events: none;
}
.res-card__type {
	position: absolute;
	z-index: 2;
	top: 16px;
	left: 16px;
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 0 13px;
	border-radius: 999px;
	background: rgba(252, 241, 218, .94);
	font-family: var(--font-brand);
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--b-encre);
}

.res-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 22px 14px 14px;
}
.res-card__title {
	margin: 0;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: clamp(24px, 2.1vw, 30px);
	line-height: 1.08;
	letter-spacing: -.01em;
	color: var(--b-encre);
	text-wrap: balance;
}
.res-card__sub {
	margin: 6px 0 24px;
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 17px;
	line-height: 1.3;
	color: var(--ink-soft);
	text-wrap: balance;
}
.res-card__cta { margin-top: auto; align-self: flex-start; }
.res-card__cta .cta__label { white-space: normal; }

/* ---------- Invitation « Je donne mon avis » ---------- */
.invite { padding: 0 0 var(--section-y); }
/* Panneau partagé : pilule horizontale (16/10) à gauche, à la hauteur du bloc texte */
.invite__panel {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	align-items: center;
	gap: 0;
	padding: clamp(14px, 1.6vw, 24px);
	border-radius: 44px;
	background: var(--paper);
	box-shadow: inset 0 0 0 1px var(--ink-line);
}
.invite__media {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
}
.invite__body {
	align-self: center;
	padding: clamp(32px, 4vw, 72px) clamp(28px, 4.5vw, 80px);
}
.invite__body .sec-title { font-size: clamp(30px, 3vw, 44px); }
.invite__body .sec-text { margin: 20px 0 36px; }

@media (max-width: 1100px) {
	.res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.res-grid > .res-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.res-grid > .res-card:last-child:nth-child(odd) { flex-direction: row; align-items: stretch; }
	.res-grid > .res-card:last-child:nth-child(odd) .res-card__media { flex: 0 0 48%; aspect-ratio: auto; min-height: 340px; }
	.res-grid > .res-card:last-child:nth-child(odd) .res-card__body { justify-content: center; padding: 28px clamp(20px, 4vw, 48px); }
	.res-grid > .res-card:last-child:nth-child(odd) .res-card__cta { margin-top: 0; }
}
@media (max-width: 900px) {
	.invite__panel { grid-template-columns: minmax(0, 1fr); }
	.invite__media { aspect-ratio: 2 / 1; }
	.invite__body { padding: 36px clamp(16px, 4vw, 48px) 28px; }
}
@media (max-width: 767px) {
	.res-grid { grid-template-columns: minmax(0, 1fr); }
	.res-grid > .res-card:last-child:nth-child(odd) { flex-direction: column; }
	.res-grid > .res-card:last-child:nth-child(odd) .res-card__media { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
	.res-grid > .res-card:last-child:nth-child(odd) .res-card__body { padding: 20px 10px 10px; }
	.res-card__media { aspect-ratio: 4 / 3; }
	.res-card { border-radius: 28px; }
	.res-card__body { padding: 20px 10px 10px; }
	.invite__panel { border-radius: 32px; padding: 10px 10px 24px; }
	.invite__media { --ring-w: 7px; }
	.invite__body { padding: 28px 12px 0; }
	.invite__body .cta { display: flex; width: fit-content; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.res-card { transition: none; }
}

/* ==========================================================================
   Respiration : introduction → visuels → invitation, séparés nettement.
   ========================================================================== */
.resources-page .page-hero { padding-bottom: clamp(48px, 7vh, 80px); }
.resources { padding-bottom: var(--sec-pad); }
.res-grid { gap: clamp(24px, 2.8vw, 44px); }
.res-card__body { padding-top: 28px; }
.res-card__sub { margin-bottom: 32px; }
.invite { padding-bottom: var(--sec-pad); }

@media (max-width: 767px) {
	.res-grid { gap: 28px; }
}

/* ==========================================================================
   iOS Safari (2026-11-13)
   ========================================================================== */
/* La profondeur 3D ne sert qu'à l'inclinaison à la souris : à plat ailleurs
   (WebKit perd l'arrondi de la photo et l'ordre des calques en preserve-3d). */
@media (hover: none), (pointer: coarse) {
	.res-card { transform-style: flat; }
	.res-card:hover:not(:focus-within) { box-shadow: none; }
}
