/*
 * SERVIPRA 1.1.38 — site plus vivant
 * Micro-interactions, veille dynamique et conseils Shelby.
 * Aucun asset tiers et aucun traceur.
 */

/* ----------------------------------------------------------
   Apparitions au scroll
   Le contenu reste visible par défaut. Il n'est masqué que
   lorsque le JS local a explicitement activé le mode motion.
   ---------------------------------------------------------- */
html.sp-motion-ready .sp-reveal{
	opacity:0;
	transform:translate3d(0,14px,0);
	transition:
		opacity .42s cubic-bezier(.2,.7,.2,1),
		transform .42s cubic-bezier(.2,.7,.2,1);
	transition-delay:var(--sp-reveal-delay,0ms);
	will-change:opacity,transform;
}
html.sp-motion-ready .sp-reveal.is-visible{
	opacity:1;
	transform:translate3d(0,0,0);
}

/* ----------------------------------------------------------
   Dernière veille SERVIPRA — accueil
   ---------------------------------------------------------- */
.sp-home-news{
	position:relative;
	padding:58px 0 68px;
	background:
		radial-gradient(circle at 9% 18%,rgba(32,166,161,.08),transparent 26%),
		linear-gradient(180deg,#f8fbfd 0%,#fff 100%);
	border-top:1px solid var(--line);
}
.sp-home-news__head{
	display:grid;
	grid-template-columns:minmax(0,1fr) auto;
	align-items:end;
	gap:34px;
	margin-bottom:30px;
}
.sp-home-news__head h2{
	max-width:850px;
	margin-bottom:10px;
	font-size:clamp(2rem,3.2vw,3.15rem);
}
.sp-home-news__head p:not(.sp-eyebrow){
	max-width:820px;
	margin:0;
	color:var(--muted);
}
.sp-home-news__all{white-space:nowrap}
.sp-home-news__grid{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:22px;
}
.sp-home-news__card{
	position:relative;
	display:flex;
	flex-direction:column;
	min-width:0;
	padding:25px;
	background:#fff;
	border:1px solid var(--line);
	border-radius:20px;
	box-shadow:0 7px 26px rgba(8,31,53,.045);
	transition:
		transform .22s ease,
		box-shadow .22s ease,
		border-color .22s ease;
}
.sp-home-news__card.is-alert{
	border-top:3px solid var(--orange);
}
.sp-home-news__meta{
	display:flex;
	align-items:flex-start;
	justify-content:space-between;
	gap:14px;
	margin-bottom:18px;
}
.sp-home-news__badges{
	display:flex;
	flex-wrap:wrap;
	gap:7px;
}
.sp-home-news__badge{
	display:inline-flex;
	align-items:center;
	min-height:26px;
	padding:4px 9px;
	color:#164970;
	background:#eef6fb;
	border:1px solid #d5e8f3;
	border-radius:999px;
	font-size:.7rem;
	font-weight:850;
	line-height:1.15;
}
.sp-home-news__badge--alert{
	color:#8c4c08;
	background:#fff6e9;
	border-color:#f3d4a8;
}
.sp-home-news__meta time{
	flex:0 0 auto;
	color:var(--muted);
	font-size:.76rem;
}
.sp-home-news__card h3{
	margin:0 0 12px;
	font-size:1.26rem;
	line-height:1.28;
}
.sp-home-news__card h3 a{
	color:var(--navy);
	text-decoration:none;
}
.sp-home-news__card p{
	margin:0 0 20px;
	color:var(--muted);
	font-size:.92rem;
	line-height:1.58;
}
.sp-home-news__link{
	display:inline-flex;
	align-items:center;
	gap:6px;
	margin-top:auto;
	font-size:.86rem;
	font-weight:850;
	text-decoration:none;
}
.sp-home-news__link span{
	display:inline-block;
	transition:transform .18s ease;
}

/* ----------------------------------------------------------
   Conseil Shelby contextuel
   ---------------------------------------------------------- */
.sp-section--shelby-tip{
	padding:46px 0;
	background:#fff;
}
.sp-shelby-tip{
	display:grid;
	grid-template-columns:84px minmax(0,1fr) auto;
	align-items:center;
	gap:22px;
	margin-top:34px;
	padding:20px 24px;
	background:
		linear-gradient(135deg,rgba(22,119,200,.07),rgba(32,166,161,.07)),
		#fff;
	border:1px solid #d6e7f1;
	border-radius:20px;
	box-shadow:0 8px 28px rgba(8,31,53,.055);
	transition:
		transform .22s ease,
		box-shadow .22s ease,
		border-color .22s ease;
}
.sp-section--shelby-tip .sp-shelby-tip{margin-top:0}
.sp-shelby-tip__avatar{
	width:84px;
	height:68px;
	overflow:hidden;
	display:flex;
	align-items:center;
	justify-content:center;
	background:#fff;
	border:1px solid var(--line);
	border-radius:16px;
}
.sp-shelby-tip__avatar img{
	width:100%;
	height:100%;
	object-fit:cover;
}
.sp-shelby-tip__eyebrow{
	margin:0 0 3px!important;
	color:var(--blue)!important;
	font-size:.72rem!important;
	font-weight:900;
	letter-spacing:.1em;
	text-transform:uppercase;
}
.sp-shelby-tip__text{
	margin:0!important;
	color:var(--ink)!important;
	font-size:1rem!important;
	line-height:1.5;
}
.sp-shelby-tip__link{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:42px;
	padding:9px 14px;
	color:var(--navy);
	background:#fff;
	border:1px solid var(--line);
	border-radius:999px;
	font-size:.78rem;
	font-weight:850;
	text-decoration:none;
	white-space:nowrap;
	transition:
		color .18s ease,
		border-color .18s ease,
		transform .18s ease,
		box-shadow .18s ease;
}

/* ----------------------------------------------------------
   Micro-interactions desktop — volontairement sobres
   ---------------------------------------------------------- */
.sp-card-link,
.sp-home-news__link{
	position:relative;
}
@media (hover:hover) and (pointer:fine){
	.sp-home-news__card:hover{
		transform:translateY(-4px);
		border-color:#b7d7ea;
		box-shadow:0 16px 42px rgba(8,31,53,.10);
	}
	.sp-home-news__card:hover .sp-home-news__link span{
		transform:translateX(4px);
	}
	.sp-home-news__card h3 a:hover{
		color:var(--blue);
	}
	.sp-shelby-tip:hover{
		transform:translateY(-3px);
		border-color:#b7d7ea;
		box-shadow:0 14px 38px rgba(8,31,53,.09);
	}
	.sp-shelby-tip__link:hover{
		color:var(--blue);
		border-color:#b7d7ea;
		box-shadow:0 7px 20px rgba(8,31,53,.07);
		transform:translateX(2px);
	}
	.sp-card-link span,
	.sp-card-link::after{
		transition:transform .18s ease;
	}
}

/* Focus clavier explicite pour les nouveaux liens. */
.sp-home-news__card a:focus-visible,
.sp-shelby-tip__link:focus-visible{
	outline:3px solid rgba(22,119,200,.28);
	outline-offset:4px;
	border-radius:6px;
}

/* Responsive */
@media(max-width:980px){
	.sp-home-news__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
	.sp-home-news__head{grid-template-columns:1fr;align-items:start}
	.sp-home-news__all{justify-self:start}
	.sp-shelby-tip{grid-template-columns:72px minmax(0,1fr)}
	.sp-shelby-tip__avatar{width:72px;height:60px}
	.sp-shelby-tip__link{grid-column:2;justify-self:start}
}
@media(max-width:620px){
	.sp-home-news{padding:46px 0 54px}
	.sp-home-news__grid{grid-template-columns:1fr}
	.sp-home-news__card{padding:21px}
	.sp-home-news__head{margin-bottom:24px}
	.sp-shelby-tip{
		grid-template-columns:58px minmax(0,1fr);
		gap:14px;
		padding:17px;
	}
	.sp-shelby-tip__avatar{width:58px;height:52px;border-radius:13px}
	.sp-shelby-tip__link{
		grid-column:1/-1;
		justify-self:stretch;
		white-space:normal;
	}
}

/* Accessibilité : aucune animation si l'utilisateur le demande. */
@media(prefers-reduced-motion:reduce){
	html.sp-motion-ready .sp-reveal{
		opacity:1!important;
		transform:none!important;
		transition:none!important;
	}
	.sp-home-news__card,
	.sp-shelby-tip,
	.sp-shelby-tip__link,
	.sp-home-news__link span{
		transition:none!important;
		transform:none!important;
	}
}
