/* ===== Grille d'actualités ===== */
.gae {
	--gae-cols: 3;
	--gae-gap: 24px;
	--gae-ratio: 16 / 10;
	--gae-h: 420px;
	--gae-arrow-offset: 12px;
	--gae-accent: #d91f26;
	position: relative;
	width: 100%;
}
.gae-stage { position: relative; }
.gae-viewport {
	overflow: hidden;
	touch-action: pan-y;
	padding: 8px 0 12px; /* laisse la place à l'ombre et à l'effet de survol */
}
.gae--drag:not(.gae--static) .gae-viewport { cursor: grab; }
.gae.is-dragging .gae-viewport { cursor: grabbing; }
.gae.is-dragging .gae-track { user-select: none; }
.gae--fade-edges .gae-viewport {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.gae-track {
	display: flex;
	gap: var(--gae-gap);
	will-change: transform;
}
.gae--mode-none .gae-track { flex-wrap: wrap; will-change: auto; }
.gae--static .gae-clone { display: none; }
.gae-slide {
	flex: 0 0 calc((100% - (var(--gae-cols) - 1) * var(--gae-gap)) / var(--gae-cols));
	min-width: 0;
	display: flex;
}

/* ----- Carte ----- */
.gae-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	color: #111;
	transform: perspective(900px) rotateX(var(--gae-rx, 0deg)) rotateY(var(--gae-ry, 0deg)) translateY(var(--gae-lift, 0px));
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
}
.gae-card.is-tilting { transition: transform .12s ease-out, box-shadow .35s ease; }
.gae-card:focus-within { outline: 2px solid currentColor; outline-offset: 3px; }
.gae-title a:focus-visible { outline: none; }
.gae-thumb {
	position: relative;
	overflow: hidden;
	margin: 0;
	aspect-ratio: var(--gae-ratio);
	background: rgba(127, 127, 127, .15);
}
.gae-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
	-webkit-user-drag: none;
}
.gae-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	padding: 20px 22px 24px;
}
.gae-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	font-size: .8125rem;
}
.gae-cat {
	position: relative;
	z-index: 2;
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(127, 127, 127, .15);
	color: inherit;
	text-decoration: none;
}
.gae-date, .gae-author { opacity: .7; }
.gae-title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.25;
}
.gae-title a { color: inherit; text-decoration: none; }
.gae-title a::after { /* toute la carte devient cliquable */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.gae-excerpt { margin: 0; opacity: .8; }
.gae-more {
	margin-top: auto;
	padding-top: 6px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}
.gae-more svg { width: 16px; height: 16px; transition: transform .3s ease; }
.gae-card:hover .gae-more svg { transform: translateX(4px); }

/* Effets de survol */
.gae--hover-lift .gae-card:hover,
.gae--hover-both .gae-card:hover { --gae-lift: -8px; }
.gae--hover-zoom .gae-card:hover .gae-thumb img,
.gae--hover-both .gae-card:hover .gae-thumb img { transform: scale(1.07); }

/* Style « superposé » : texte sur l'image */
.gae--overlay .gae-card {
	justify-content: flex-end;
	min-height: var(--gae-h);
	color: #fff;
	background: #111;
}
.gae--overlay .gae-thumb {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
}
.gae--overlay .gae-thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 65%);
}
.gae--overlay .gae-body { position: relative; flex: 0 0 auto; }
.gae--overlay .gae-more { margin-top: 4px; }
.gae--overlay .gae-cat { background: rgba(255, 255, 255, .2); }

/* ----- Navigation ----- */
.gae .gae-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 44px;
	height: 44px;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
	display: grid;
	place-items: center;
	cursor: pointer;
	line-height: 1;
	transform: translateY(-50%);
	transition: background-color .2s, color .2s, transform .2s;
}
.gae .gae-arrow:hover { transform: translateY(-50%) scale(1.06); }
.gae .gae-arrow svg { width: 18px; height: 18px; }
.gae-prev { left: var(--gae-arrow-offset); }
.gae-next { right: var(--gae-arrow-offset); }
.gae-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}
.gae .gae-dot {
	width: 8px;
	height: 8px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: currentColor;
	box-shadow: none;
	opacity: .25;
	cursor: pointer;
	transition: opacity .3s, width .3s;
}
.gae .gae-dot[aria-current="true"] { opacity: 1; width: 24px; }
.gae .gae-arrow:focus-visible,
.gae .gae-dot:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.gae--static .gae-arrow,
.gae--static .gae-dots { display: none; }

.gae-empty {
	padding: 24px;
	border: 1px dashed rgba(127, 127, 127, .5);
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.gae-card, .gae-thumb img, .gae-more svg { transition: none !important; }
}

/* ----- Éléments « actualités » ----- */
.gae-badges {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 80px;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.gae-badges .gae-cat {
	background: #fff;
	color: #111;
	font-size: .75rem;
	font-weight: 600;
}
.gae-new {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--gae-accent);
	color: #fff;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	line-height: 1.5;
}
.gae-datebox {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 54px;
	padding: 8px 6px 7px;
	border-radius: 8px;
	background: #fff;
	color: #111;
	line-height: 1;
	text-align: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}
.gae-datebox-day {
	font-size: 1.375rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.gae-datebox-month {
	margin-top: 3px;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.gae-datebox-time {
	margin-top: 6px;
	padding-top: 5px;
	border-top: 1px solid rgba(127, 127, 127, .3);
	font-size: .6875rem;
	font-variant-numeric: tabular-nums;
	opacity: .75;
}
.gae-reading { opacity: .7; }
.gae--overlay .gae-thumb .gae-badges,
.gae--overlay .gae-thumb .gae-datebox { z-index: 2; }

/* ----- Effets dynamiques ----- */

/* Apparition au défilement de la page */
.gae[class*="gae--enter-"] .gae-slide {
	opacity: 0;
	transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .2, 1), filter .8s ease;
	transition-delay: calc(var(--gae-i, 0) * var(--gae-stagger, 110ms));
}
.gae--enter-fadeup .gae-slide { transform: translateY(48px); }
.gae--enter-zoom .gae-slide { transform: scale(.82); }
.gae--enter-flip .gae-slide { transform: perspective(900px) rotateX(-35deg) translateY(40px); transform-origin: 50% 100%; }
.gae--enter-blur .gae-slide { filter: blur(14px); transform: scale(1.04); }
.gae.is-inview .gae-slide {
	opacity: 1;
	transform: none;
	filter: none;
}

/* Reflet lumineux qui suit la souris */
.gae--glare .gae-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: radial-gradient(circle at var(--gae-mx, 50%) var(--gae-my, 0%), rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%);
	opacity: 0;
	transition: opacity .35s ease;
}
.gae--glare .gae-card:hover::before { opacity: 1; }

/* Soulignement animé du titre */
.gae--underline .gae-title a {
	background-image: linear-gradient(var(--gae-accent), var(--gae-accent));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 2px;
	transition: background-size .45s cubic-bezier(.2, .7, .2, 1);
}
.gae--underline .gae-card:hover .gae-title a { background-size: 100% 2px; }

/* Barre de progression */
.gae-progress {
	position: relative;
	height: 3px;
	margin: 18px auto 0;
	max-width: 240px;
	border-radius: 3px;
	overflow: hidden;
	background: rgba(127, 127, 127, .2);
}
.gae-progress span {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--gae-accent);
	transform-origin: left center;
	transform: scaleX(0);
}
.gae--static .gae-progress { display: none; }

@media (prefers-reduced-motion: reduce) {
	.gae .gae-slide { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
	.gae-card { transform: none !important; }
}
