/**
 * TARMAC — Modèle de page « Rubrique » (design v2)
 *
 * Chargée uniquement sur template-rubrique.php.
 * Dépend de assets/css/design-system.css, chargé en amont.
 *
 * Sommaire
 *   1. En-tête
 *   2. Introduction
 *   3. Cartes
 *   4. Responsive
 */

/* ==========================================================================
   1. En-tête
   ========================================================================== */

.trub-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(300px, 40vh, 460px);
	padding-block: clamp(3rem, 8vw, 5.5rem);
	overflow: hidden;
	background: var(--c-bleu-nuit);
	color: var(--c-blanc);
}

.trub-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.trub-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.trub-hero__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgb(28 35 57 / 92%) 12%, rgb(28 35 57 / 60%) 58%, rgb(28 35 57 / 36%) 100%);
}

.trub-hero .thv2-container { z-index: 2; }

.trub-hero h1 {
	max-width: 20ch;
	color: var(--c-blanc);
}

.trub-hero .thv2-kicker { color: var(--c-vert); }
.trub-hero .thv2-kicker span { background: rgb(190 208 41 / 16%); }
.trub-hero .thv2-hl { color: var(--c-vert); }

.trub-hero__lead {
	max-width: 62ch;
	margin-top: var(--sp-5);
	margin-bottom: 0;
	font-size: var(--fs-lead);
	color: rgb(255 255 255 / 84%);
}

.trub-hero__motif {
	top: 16%;
	right: 8%;
	width: clamp(56px, 7vw, 100px);
	opacity: 0.4;
}

.trub-hero .tarmac-breadcrumb { margin-bottom: var(--sp-5); }

.trub-hero .tarmac-breadcrumb,
.trub-hero .tarmac-breadcrumb a,
.trub-hero .tarmac-breadcrumb span { color: rgb(255 255 255 / 70%); }

.trub-hero .tarmac-breadcrumb__sep { color: rgb(255 255 255 / 40%); }

.trub-hero .tarmac-breadcrumb a:hover,
.trub-hero .tarmac-breadcrumb a:focus-visible { color: var(--c-blanc); }

/* ==========================================================================
   2. Introduction
   ========================================================================== */

.trub-intro {
	max-width: 68ch;
	font-size: var(--fs-lead);
	line-height: 1.7;
}

.trub-intro > :first-child { margin-top: 0; }
.trub-intro > :last-child { margin-bottom: 0; }

/* ==========================================================================
   3. Cartes
   ========================================================================== */

.trub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--sp-5);
	margin: var(--sp-7) 0 0;
	padding: 0;
	list-style: none;
}

.trub-intro + .trub-grid { margin-top: var(--sp-8); }

.trub-card { display: flex; }

.trub-card__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	overflow: hidden;
	background: var(--c-blanc);
	border: 1px solid var(--c-border);
	border-radius: var(--radius-xl);
	text-decoration: none;
	color: inherit;
	transition:
		transform var(--dur-base) var(--ease-out),
		box-shadow var(--dur-base) var(--ease-out),
		border-color var(--dur-base) var(--ease-out);
}

.trub-card__link:hover,
.trub-card__link:focus-visible {
	transform: translateY(-6px);
	border-color: var(--c-vert);
	box-shadow: var(--shadow-lg);
}

.trub-card__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background:
		radial-gradient(ellipse 90% 80% at 20% 10%, rgb(190 208 41 / 22%), transparent 62%),
		radial-gradient(ellipse 90% 80% at 90% 90%, rgb(22 109 169 / 18%), transparent 60%),
		var(--c-gris-50);
}

.trub-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--dur-slow) var(--ease-out);
}

.trub-card__link:hover .trub-card__media img { transform: scale(1.06); }

.trub-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--sp-3);
	padding: var(--sp-5);
}

.trub-card__title {
	font-size: var(--fs-h4);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--c-text);
}

.trub-card__text {
	font-size: var(--fs-small);
	line-height: 1.6;
	color: var(--c-text-muted);
}

.trub-card__more {
	display: inline-flex;
	gap: var(--sp-2);
	align-items: center;
	margin-top: auto;
	padding-top: var(--sp-2);
	font-size: var(--fs-small);
	font-weight: 700;
	color: var(--c-bleu);
}

.trub-card__more svg { transition: transform var(--dur-base) var(--ease-out); }
.trub-card__link:hover .trub-card__more svg { transform: translateX(5px); }

/* ==========================================================================
   4. Responsive
   ========================================================================== */

@media (max-width: 600px) {
	.trub-hero__motif { display: none; }
}
