/* =====================================================================
   NEXIS — pages « document » (mentions légales, confidentialité)
   Sommaire latéral collant, sections numérotées en cartes, fiche éditeur.
   ===================================================================== */

/* En-tête */
.nexis-doc-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(ellipse 45% 90% at 100% 0%, rgba(22, 78, 112, 0.85), transparent 70%),
		radial-gradient(ellipse 30% 60% at 85% 100%, rgba(198, 146, 74, 0.14), transparent 70%),
		var(--wp--preset--color--navy) !important;
}
.nexis-doc-hero::after {
	/* Globe du logo en filigrane */
	content: "";
	position: absolute;
	right: max(2rem, calc((100vw - 1400px) / 2));
	top: 50%;
	width: 300px;
	aspect-ratio: 762 / 512;
	transform: translateY(-50%);
	background: url(../img/logo-globe.png) center / contain no-repeat;
	opacity: 0.08;
	filter: brightness(0) invert(1);
	pointer-events: none;
}
.nexis-doc-hero .wp-block-post-title { margin-top: 0.4rem; }
.nexis-doc-hero__meta { margin-top: 1rem !important; gap: 0.4rem; font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); }
.nexis-doc-hero__meta p { margin: 0; }
.nexis-doc-hero__meta .wp-block-post-date { color: #fff; font-weight: 600; }

/* Mise en page : sommaire + contenu */
.nexis-doc-layout {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
}

/* Colonne latérale */
.nexis-doc__aside { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.nexis-doc__card {
	padding: 1.4rem 1.4rem 1.3rem;
	border: 1px solid #E6EAEE;
	border-radius: 16px;
	background: #fff;
}
.nexis-doc__label {
	margin: 0 0 0.8rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--nexis-copper-strong, #B7853F);
}
.nexis-doc__toc ol { margin: 0; padding: 0; list-style: none; }
.nexis-doc__toc a {
	display: flex;
	gap: 0.75rem;
	align-items: baseline;
	padding: 0.5rem 0.6rem;
	margin: 0 -0.6rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	color: var(--wp--preset--color--navy);
	transition: background 0.2s, color 0.2s;
}
.nexis-doc__toc a span { flex: none; font-family: var(--wp--preset--font-family--heading); font-size: 0.75rem; font-weight: 700; color: #B9C2CB; transition: color 0.2s; }
.nexis-doc__toc a:hover,
.nexis-doc__toc a.is-active { background: #FBF4E8; color: var(--wp--preset--color--navy); }
.nexis-doc__toc a:hover span,
.nexis-doc__toc a.is-active span { color: var(--nexis-copper-strong, #B7853F); }

.nexis-doc__docs { display: flex; flex-direction: column; gap: 0.5rem; }
.nexis-doc__docs .nexis-doc__label { margin-bottom: 0.3rem; }
.nexis-doc__doc {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.7rem 0.9rem;
	border: 1px solid #E6EAEE;
	border-radius: 10px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--wp--preset--color--navy);
	transition: border-color 0.2s, background 0.2s;
}
.nexis-doc__doc::after { content: "→"; color: var(--wp--preset--color--copper); transition: transform 0.2s; }
.nexis-doc__doc:hover { border-color: var(--wp--preset--color--copper); }
.nexis-doc__doc:hover::after { transform: translateX(3px); }
.nexis-doc__doc.is-current { border-color: var(--wp--preset--color--navy); background: var(--wp--preset--color--navy); color: #fff; }
.nexis-doc__doc.is-current::after { content: "●"; font-size: 0.5rem; }

.nexis-doc__help { border: 0; background: var(--wp--preset--color--navy); color: rgba(255, 255, 255, 0.78); }
.nexis-doc__help p { margin: 0 0 1rem; font-size: 0.9375rem; line-height: 1.55; }
.nexis-doc__help .nexis-doc__help-title { margin-bottom: 0.4rem; font-family: var(--wp--preset--font-family--heading); font-size: 1.125rem; font-weight: 700; color: #fff; }
.nexis-doc__btn {
	display: inline-block;
	padding: 0.7rem 1.1rem;
	border-radius: 3px;
	background: var(--wp--preset--color--copper);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--navy);
	transition: background 0.2s;
}
.nexis-doc__btn:hover { background: #fff; color: var(--wp--preset--color--navy); }

/* Sections en cartes */
.nexis-doc { display: flex; flex-direction: column; gap: 1.25rem; }
.nexis-doc > * { margin-block: 0 !important; }
.nexis-doc__section,
.nexis-doc__intro {
	padding: 2rem 2.2rem;
	border: 1px solid #E6EAEE;
	border-radius: 16px;
	background: #fff;
	scroll-margin-top: 1.5rem;
	transition: box-shadow 0.3s, border-color 0.3s;
}
.nexis-doc__section:target { border-color: var(--wp--preset--color--copper); box-shadow: 0 12px 30px rgba(11, 31, 51, 0.07); }
.nexis-doc__section > h2 {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin: 0 0 1.1rem !important;
	font-size: clamp(1.25rem, 1.6vw, 1.5rem) !important;
	font-weight: 700;
}
.nexis-doc__num {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 10px;
	background: #FBF4E8;
	font-size: 0.875rem;
	font-weight: 800;
	color: var(--nexis-copper-strong, #B7853F);
}
.nexis-doc__section > :is(p, ul, ol) { margin: 0 0 0.9rem; font-size: 1rem; line-height: 1.75; color: var(--wp--preset--color--anthracite); }
.nexis-doc__section > :last-child { margin-bottom: 0; }
.nexis-doc__section > ul { padding-left: 1.2rem; }
.nexis-doc__section > ul li::marker { color: var(--wp--preset--color--copper); }
.nexis-doc__section a { color: var(--wp--preset--color--deep-blue); text-underline-offset: 3px; }

/* Fiche « Éditeur du site » */
.nexis-legal-id__head {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	padding: 1.2rem 1.4rem;
	margin-bottom: 1rem;
	border-radius: 14px;
	background:
		radial-gradient(ellipse 60% 120% at 100% 0%, rgba(22, 78, 112, 0.9), transparent 70%),
		var(--wp--preset--color--navy);
}
.nexis-legal-id__head img { width: 64px; height: auto; filter: brightness(0) invert(1); opacity: 0.95; }
.nexis-legal-id__head p { margin: 0; }
.nexis-legal-id__name { font-family: var(--wp--preset--font-family--heading); font-size: 1.125rem; font-weight: 800; letter-spacing: 0.02em; color: #fff; }
.nexis-legal-id__sigle { margin-top: 0.2rem !important; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--copper); }
.nexis-legal-id__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.nexis-legal-fact {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
	padding: 1rem 1.1rem;
	border: 1px solid #EEF1F4;
	border-radius: 12px;
	background: var(--wp--preset--color--offwhite);
}
.nexis-legal-fact.is-wide { grid-column: 1 / -1; }
.nexis-legal-fact__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 10px;
	background: #fff;
	color: var(--nexis-copper-strong, #B7853F);
}
.nexis-legal-fact__icon svg { width: 20px; height: 20px; }
.nexis-legal-fact__label { display: block; margin-bottom: 0.15rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.nexis-legal-fact__value { display: block; font-family: var(--wp--preset--font-family--heading); font-size: 0.9875rem; font-weight: 600; line-height: 1.45; color: var(--wp--preset--color--navy); overflow-wrap: anywhere; }
.nexis-legal-fact__value a { color: inherit; text-decoration: none; }
.nexis-legal-fact__value a:hover { color: var(--nexis-copper-strong, #B7853F); }

/* Responsive */
@media (max-width: 1024px) {
	.nexis-doc-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
	.nexis-doc__aside { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nexis-doc__toc { grid-row: span 2; }
	.nexis-doc-hero::after { width: 200px; opacity: 0.06; }
}
@media (max-width: 680px) {
	.nexis-doc__aside { grid-template-columns: minmax(0, 1fr); }
	.nexis-doc__toc { grid-row: auto; }
	.nexis-doc__help { display: none; }
	.nexis-doc__section, .nexis-doc__intro { padding: 1.5rem 1.25rem; }
	.nexis-legal-id__grid { grid-template-columns: 1fr; }
	.nexis-doc-hero::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.nexis-doc__toc a, .nexis-doc__doc, .nexis-doc__doc::after, .nexis-doc__section { transition: none; }
}
html:has(.nexis-doc-layout) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.nexis-doc-layout) { scroll-behavior: auto; } }
