/* =====================================================================
   NEXIS — page Services (Nos activités) : frise, grille bento, modèles
   ===================================================================== */

/* Chaîne de valeur en frise numérotée */
.nexis-chain-card {
	margin: 0 !important;
	padding: 1.8rem 2rem;
	border: 1px solid rgba(198, 146, 74, 0.35);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
}
.nexis-hero .nexis-chain-card__title {
	margin: 0 0 1.1rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--copper);
}
.nexis-chain { counter-reset: chain; list-style: none; margin: 0; padding: 0; }
.nexis-chain li {
	counter-increment: chain;
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.55rem 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
}
.nexis-chain li::before {
	content: counter(chain, decimal-leading-zero);
	position: relative;
	z-index: 1;
	flex: none;
	width: 2.1rem;
	height: 2.1rem;
	border: 1px solid rgba(198, 146, 74, 0.7);
	border-radius: 50%;
	background: var(--wp--preset--color--navy);
	font-size: 0.75rem;
	line-height: 2.05rem;
	text-align: center;
	color: var(--wp--preset--color--copper);
}
.nexis-chain li:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 1.05rem;
	top: 2.4rem;
	bottom: -0.55rem;
	width: 1px;
	background: rgba(198, 146, 74, 0.35);
}
.nexis-chain li:last-child::before { background: var(--wp--preset--color--copper); color: var(--wp--preset--color--navy); }

/* En-tête de la grille */
.nexis-bento-head { gap: 1rem 3rem !important; margin-bottom: var(--wp--preset--spacing--40) !important; }
.nexis-bento-head__text { max-width: 26rem; margin: 0; color: var(--wp--preset--color--muted); }

/* Grille bento des métiers */
.nexis-bento .wp-block-post-template {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: minmax(15rem, auto);
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: act;
}
.nexis-bento .wp-block-post-template > li { display: flex; margin: 0; counter-increment: act; }
.nexis-bento .wp-block-post-template > li:first-child { grid-column: span 2; grid-row: span 2; }
.nexis-bento__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	width: 100%;
	margin: 0 !important;
	padding: 1.7rem 1.6rem 1.5rem;
	border: 1px solid #E6EAEE;
	border-radius: 16px;
	background: #fff;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.nexis-bento__card:hover { transform: translateY(-4px); border-color: var(--wp--preset--color--copper); box-shadow: 0 16px 36px rgba(11, 31, 51, 0.09); }
.nexis-bento__card::before {
	content: counter(act, decimal-leading-zero);
	position: absolute;
	top: 1.2rem;
	right: 1.4rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.2rem;
	font-weight: 800;
	line-height: 1;
	color: #F1E6D3;
}
.nexis-bento__card .nexis-icon { width: 3.1rem; height: 3.1rem; border-radius: 12px; background: #FBF4E8; color: var(--nexis-copper-strong); }
.nexis-bento__title { margin: 0.6rem 0 0 !important; font-size: 1.125rem !important; font-weight: 700; }
.nexis-bento__text { flex: 1; margin: 0 !important; font-size: 0.9375rem; color: var(--wp--preset--color--anthracite); }
.nexis-bento__text p { margin: 0; }

/* Première carte : cœur de métier, en navy */
.nexis-bento .wp-block-post-template > li:first-child .nexis-bento__card {
	justify-content: flex-end;
	padding: 2.4rem 2.4rem 2.2rem;
	border: 0;
	background:
		radial-gradient(ellipse 70% 60% at 100% 0%, rgba(22, 78, 112, 0.9), transparent 70%),
		var(--wp--preset--color--navy);
	color: rgba(255, 255, 255, 0.85);
}
.nexis-bento .wp-block-post-template > li:first-child .nexis-bento__card::before { top: 1.6rem; right: 2rem; font-size: 6rem; color: rgba(198, 146, 74, 0.25); }
.nexis-bento .wp-block-post-template > li:first-child .nexis-icon { width: 4rem; height: 4rem; margin-bottom: auto; background: rgba(255, 255, 255, 0.08); color: var(--wp--preset--color--copper); }
.nexis-bento .wp-block-post-template > li:first-child .nexis-bento__title { font-size: clamp(1.6rem, 2.4vw, 2.2rem) !important; }
.nexis-bento .wp-block-post-template > li:first-child .nexis-bento__title a { color: #fff; }
.nexis-bento .wp-block-post-template > li:first-child .nexis-bento__text { flex: 0; font-size: 1.0625rem; color: rgba(255, 255, 255, 0.8); }
.nexis-bento .wp-block-post-template > li:first-child .nexis-more { color: var(--wp--preset--color--copper); }

/* Trois façons de travailler */
.nexis-models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.nexis-model {
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	padding: 2rem 1.8rem;
	border-top: 4px solid var(--wp--preset--color--copper);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(11, 31, 51, 0.05);
	transition: box-shadow 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nexis-model:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(11, 31, 51, 0.09); }
.nexis-model .nexis-icon { background: #FBF4E8; color: var(--nexis-copper-strong); }
.nexis-model__who { margin: 1.1rem 0 0 !important; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.nexis-model__what { margin: 0.3rem 0 0.7rem !important; font-size: 1.375rem !important; font-weight: 700; }
.nexis-model__text { flex: 1; margin: 0 0 1.4rem !important; font-size: 0.9375rem; line-height: 1.65; }

@media (max-width: 1100px) {
	.nexis-bento .wp-block-post-template { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
	.nexis-models { grid-template-columns: 1fr; }
	.nexis-chain-card { margin-top: 2rem !important; }
}
@media (max-width: 600px) {
	.nexis-bento .wp-block-post-template { grid-template-columns: 1fr; }
	.nexis-bento .wp-block-post-template > li:first-child { grid-column: auto; grid-row: auto; }
}

/* La dernière carte s'élargit pour compléter la grille (pas de case vide) */
@media (min-width: 601px) {
	.nexis-bento .wp-block-post-template > li:last-child:nth-child(3n + 2) { grid-column: span 2; }
}

/* ---------- Variante 3 colonnes (page Secteurs : 6 secteurs) ---------- */
@media (min-width: 1101px) { .nexis-bento--3 .wp-block-post-template { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nexis-bento--3 .wp-block-post-template > li:first-child .nexis-bento__card::after {
	content: "Priorité opérationnelle";
	position: absolute;
	top: 2.2rem;
	left: 2.4rem;
	padding: 0.35rem 0.75rem;
	border: 1px solid rgba(198, 146, 74, 0.6);
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--copper);
}
html[lang^="en"] .nexis-bento--3 .wp-block-post-template > li:first-child .nexis-bento__card::after { content: "Operational priority"; }
.nexis-bento--3 .wp-block-post-template > li:first-child .nexis-icon { margin-top: 3rem; }
@media (max-width: 1100px) and (min-width: 601px) {
	.nexis-bento--3 .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nexis-bento--3 .wp-block-post-template > li:first-child { grid-row: auto; }
	.nexis-bento--3 .wp-block-post-template > li:last-child:nth-child(even) { grid-column: span 2; }
}
@media (max-width: 600px) {
	.nexis-bento--3 .wp-block-post-template > li:first-child .nexis-bento__card::after { top: 1.5rem; left: 1.6rem; }
}

/* Index des secteurs (ouverture) */
.nexis-sindex ol { margin: 0; padding: 0; list-style: none; }
.nexis-sindex li { border-top: 1px solid rgba(255, 255, 255, 0.09); }
.nexis-sindex li:first-child { border-top: 0; }
.nexis-sindex a {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.85rem 0.6rem;
	margin: 0 -0.6rem;
	border-radius: 10px;
	text-decoration: none;
	color: #fff;
	transition: background 0.25s, transform 0.25s;
}
.nexis-sindex a:hover { background: rgba(255, 255, 255, 0.06); transform: translateX(4px); color: #fff; }
.nexis-sindex__num { flex: none; width: 2.1rem; font-family: var(--wp--preset--font-family--heading); font-size: 0.8125rem; font-weight: 800; color: var(--wp--preset--color--copper); }
.nexis-sindex__name { flex: 1; font-family: var(--wp--preset--font-family--heading); font-size: 1.0625rem; font-weight: 600; }
.nexis-sindex__badge { flex: none; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--wp--preset--color--copper); font-size: 0.625rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--navy); }
.nexis-sindex__arrow { flex: none; display: grid; color: rgba(255, 255, 255, 0.45); }
.nexis-sindex a:hover .nexis-sindex__arrow { color: var(--wp--preset--color--copper); }
@media (max-width: 480px) {
	.nexis-sindex__badge { display: none; }
	.nexis-sindex__name { font-size: 1rem; }
}
@media (max-width: 480px) {
	.nexis-bento--3 .wp-block-post-template > li:first-child .nexis-bento__card::before { display: none; }
}
