.documentation-page,
.documentation-shell {
	width: 100%;
	max-width: 1680px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}

.documentation-page {
	min-height: calc(100vh - 90px);
}

.documentation-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
	gap: 2rem;
	align-items: end;
	margin-bottom: 2rem;
	padding: 2rem;
	border: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 82%, transparent);
	border-radius: 18px;
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
	box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

.documentation-eyebrow,
.documentation-header__module,
.documentation-nav__title {
	display: inline-flex;
	margin: 0 0 0.65rem;
	color: var(--anthys-text-muted, #667085);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.documentation-hero h1 {
	margin: 0;
	color: var(--anthys-text-primary, #20242c);
	font-size: clamp(2.25rem, 4vw, 4.1rem);
	line-height: 1;
	letter-spacing: 0;
}

.documentation-hero p {
	max-width: 760px;
	margin: 1rem 0 0;
	color: var(--anthys-text-secondary, #475467);
	font-size: 1.08rem;
	line-height: 1.7;
}

.documentation-search {
	position: relative;
	width: 100%;
}

.documentation-search i {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--anthys-text-muted, #98a2b3);
	pointer-events: none;
}

.documentation-search input,
.documentation-sidebar__search input {
	width: 100%;
	height: 48px;
	border: 1px solid var(--anthys-border-color, #dbe1ea);
	border-radius: 12px;
	background: #ffffff;
	color: var(--anthys-text-primary, #20242c);
	font: inherit;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.documentation-search input {
	padding: 0 1rem 0 2.75rem;
}

.documentation-sidebar__search input {
	height: 44px;
	padding: 0 0.9rem;
}

.documentation-search input:focus,
.documentation-sidebar__search input:focus {
	outline: none;
	border-color: color-mix(in srgb, var(--anthys-primary, #4a4a3f) 65%, #ffffff);
	box-shadow: 0 0 0 4px rgba(var(--anthys-primary-rgb, 74, 74, 63), 0.12);
}

.documentation-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 1.15rem;
}

.documentation-card {
	display: flex;
	flex-direction: column;
	min-height: 220px;
	padding: 1.25rem;
	border: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 88%, transparent);
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.documentation-card:hover {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--anthys-primary, #4a4a3f) 36%, #dbe1ea);
	box-shadow: 0 18px 44px rgba(15, 23, 42, 0.10);
}

.documentation-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.documentation-card__icon {
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: #f2f4f7;
	color: var(--anthys-text-primary, #20242c);
	font-size: 1.1rem;
}

.documentation-card__count {
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	background: #f8fafc;
	color: var(--anthys-text-muted, #667085);
	font-size: 0.78rem;
	font-weight: 700;
}

.documentation-card__body {
	flex: 1;
}

.documentation-card h2 {
	margin: 0 0 0.65rem;
	color: var(--anthys-text-primary, #20242c);
	font-size: 1.18rem;
	line-height: 1.25;
	letter-spacing: 0;
}

.documentation-card p {
	margin: 0;
	color: var(--anthys-text-secondary, #475467);
	font-size: 0.95rem;
	line-height: 1.62;
}

.documentation-card__link {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.7rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #edf1f5;
	color: var(--anthys-text-primary, #20242c);
	font-size: 0.92rem;
	font-weight: 800;
	text-decoration: none;
}

.documentation-card__link i {
	transition: transform 0.18s ease;
}

.documentation-card:hover .documentation-card__link i {
	transform: translateX(4px);
}

.documentation-empty-state {
	margin-top: 1.5rem;
	padding: 2rem;
	border: 1px dashed var(--anthys-border-color, #cbd5e1);
	border-radius: 14px;
	background: #ffffff;
	text-align: center;
}

.documentation-empty-state h2 {
	margin: 0 0 0.5rem;
	font-size: 1.2rem;
}

.documentation-empty-state p {
	margin: 0;
	color: var(--anthys-text-secondary, #667085);
}

.documentation-layout {
	display: grid;
	grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.documentation-sidebar {
	position: sticky;
	top: 1.5rem;
	max-height: calc(100vh - 3rem);
	overflow: auto;
	padding: 1rem;
	border: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 88%, transparent);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

.documentation-sidebar__header {
	padding: 0.35rem 0.45rem 1rem;
	border-bottom: 1px solid #edf1f5;
	margin-bottom: 1rem;
}

.documentation-sidebar__header p {
	margin: 0 0 0.35rem;
	color: var(--anthys-text-muted, #667085);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.documentation-sidebar__header h2 {
	margin: 0 0 0.85rem;
	color: var(--anthys-text-primary, #20242c);
	font-size: 1.2rem;
	line-height: 1.25;
}

.documentation-sidebar__header a {
	color: var(--anthys-text-secondary, #475467);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}

.documentation-sidebar__header a:hover,
.documentation-breadcrumb a:hover {
	color: var(--anthys-text-primary, #20242c);
}

.documentation-nav {
	margin-top: 1rem;
}

.documentation-nav__title {
	margin: 1rem 0.5rem 0.55rem;
}

.documentation-nav__group {
	margin-bottom: 0.25rem;
}

.documentation-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.62rem 0.75rem;
	border-radius: 10px;
	color: var(--anthys-text-secondary, #475467);
	font-size: 0.92rem;
	line-height: 1.35;
	text-decoration: none;
}

.documentation-nav__link:hover {
	background: #f8fafc;
	color: var(--anthys-text-primary, #20242c);
}

.documentation-nav__link.is-active {
	background: #eeeeeb;
	color: var(--anthys-text-primary, #20242c);
	font-weight: 800;
}

.documentation-nav__chevron {
	color: var(--anthys-text-muted, #98a2b3);
	transition: transform 0.18s ease;
}

.documentation-nav__group.is-open .documentation-nav__chevron {
	transform: rotate(90deg);
}

.documentation-nav__children {
	display: grid;
	gap: 0.1rem;
	margin: 0.25rem 0 0.5rem 0.8rem;
	padding-left: 0.7rem;
	border-left: 2px solid #edf1f5;
}

.documentation-nav__link--page {
	justify-content: flex-start;
	padding: 0.5rem 0.65rem;
	color: var(--anthys-text-muted, #667085);
	font-size: 0.86rem;
}

.documentation-nav__link--page.is-active {
	background: #f5f5f4;
	color: var(--anthys-text-primary, #20242c);
}

.documentation-main {
	min-width: 0;
	width: 100%;
}

.documentation-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 1.15rem;
	color: var(--anthys-text-muted, #667085);
	font-size: 0.9rem;
	font-weight: 700;
}

.documentation-breadcrumb a {
	color: var(--anthys-text-secondary, #475467);
	text-decoration: none;
}

.documentation-breadcrumb strong {
	color: var(--anthys-text-primary, #20242c);
}

.documentation-header {
	margin-bottom: 1.35rem;
	padding: 1.75rem 1.9rem;
	border: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 88%, transparent);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
}

.documentation-header h1 {
	margin: 0;
	color: var(--anthys-text-primary, #20242c);
	font-size: clamp(2.1rem, 3.2vw, 3.25rem);
	line-height: 1.06;
	letter-spacing: 0;
}

.documentation-header p:not(.documentation-header__module) {
	max-width: 760px;
	margin: 0.85rem 0 0;
	color: var(--anthys-text-secondary, #475467);
	font-size: 1rem;
	line-height: 1.65;
}

.documentation-article {
	width: 100%;
	max-width: none;
	padding: 0;
	color: var(--anthys-text-primary, #20242c);
	font-size: 1rem;
	line-height: 1.78;
}

.documentation-article > h1:first-child {
	display: none;
}

.documentation-article h2 {
	margin: 1.25rem 0 0;
	padding: 1.1rem 1.25rem 0.15rem;
	border: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 85%, transparent);
	border-bottom: 0;
	border-radius: 14px 14px 0 0;
	background: #ffffff;
	color: var(--anthys-text-primary, #20242c);
	font-size: 1.38rem;
	line-height: 1.25;
	letter-spacing: 0;
}

.documentation-article h2 + p,
.documentation-article h2 + ul,
.documentation-article h2 + ol,
.documentation-article h2 + blockquote {
	margin-top: 0;
}

.documentation-article h2 ~ p,
.documentation-article h2 ~ ul,
.documentation-article h2 ~ ol {
	max-width: none;
}

.documentation-article h3 {
	margin: 1.35rem 0 0.55rem;
	color: var(--anthys-text-primary, #20242c);
	font-size: 1.08rem;
	line-height: 1.35;
	letter-spacing: 0;
}

.documentation-article p,
.documentation-article ul,
.documentation-article ol,
.documentation-article blockquote,
.documentation-image,
.documentation-gallery {
	background: #ffffff;
	border-left: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 85%, transparent);
	border-right: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 85%, transparent);
	margin: 0;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.documentation-article p {
	padding-top: 0.7rem;
	padding-bottom: 0.7rem;
	color: var(--anthys-text-secondary, #475467);
}

.documentation-article ul,
.documentation-article ol {
	padding-top: 0.65rem;
	padding-bottom: 0.75rem;
	padding-left: 2.75rem;
	color: var(--anthys-text-secondary, #475467);
}

.documentation-article li {
	margin: 0.32rem 0;
}

.documentation-article li::marker {
	color: var(--anthys-text-primary, #20242c);
	font-weight: 800;
}

.documentation-article strong {
	color: var(--anthys-text-primary, #20242c);
	font-weight: 800;
}

.documentation-article code {
	padding: 0.12rem 0.35rem;
	border-radius: 6px;
	background: #f2f4f7;
	color: var(--anthys-text-primary, #20242c);
	font-size: 0.92em;
}

.documentation-article > :last-child {
	border-bottom: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 85%, transparent);
	border-radius: 0 0 14px 14px;
	padding-bottom: 1.2rem;
}

.documentation-article h2 ~ h2 {
	margin-top: 1rem;
}

.documentation-article h2:not(:first-child) {
	box-shadow: 0 -1px 0 #edf1f5;
}

.documentation-article blockquote,
.documentation-callout {
	margin: 0;
	padding: 1rem 1.25rem;
	border-top: 0;
	border-bottom: 0;
	background: #fbfcfe;
	color: var(--anthys-text-secondary, #475467);
}

.documentation-callout--tip {
	box-shadow: inset 4px 0 0 var(--anthys-success, #16a34a);
}

.documentation-callout--warning {
	box-shadow: inset 4px 0 0 var(--anthys-warning, #f59e0b);
}

.documentation-callout--note {
	box-shadow: inset 4px 0 0 var(--anthys-info, #0ea5e9);
}

.documentation-image {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.documentation-image img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--anthys-border-color, #dbe1ea);
	border-radius: 12px;
	background: #f8fafc;
}

.documentation-image figcaption,
.documentation-caption {
	display: block;
	margin-top: 0.65rem;
	color: var(--anthys-text-muted, #667085);
	font-size: 0.86rem;
}

.documentation-image--missing {
	padding: 1rem 1.25rem;
	color: var(--anthys-text-muted, #667085);
	text-align: center;
}

.documentation-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.documentation-gallery .documentation-image {
	margin: 0;
	padding: 0;
	border: 0;
}

.documentation-image {
	position: relative;
}

.documentation-image-zoom {
	position: absolute;
	right: 1.8rem;
	top: 1.8rem;
	border: 0;
	border-radius: 999px;
	padding: 0.45rem 0.75rem;
	background: rgba(15, 23, 42, 0.82);
	color: #ffffff;
	font-size: 0.82rem;
	font-weight: 800;
	cursor: pointer;
}

.documentation-image-zoom:hover {
	background: rgba(15, 23, 42, 0.96);
}

.documentation-image-modal[hidden] {
	display: none;
}

.documentation-image-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: rgba(0, 0, 0, 0.82);
}

.documentation-image-modal img {
	max-width: 96vw;
	max-height: 90vh;
	border-radius: 14px;
	background: #ffffff;
}

.documentation-image-modal__close {
	position: fixed;
	top: 1rem;
	right: 1rem;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: #ffffff;
	color: #111827;
	font-size: 1.7rem;
	cursor: pointer;
}

@media (max-width: 1100px) {
	.documentation-page,
	.documentation-shell {
		padding: 1rem 0.85rem 2.5rem;
	}

	.documentation-hero {
		grid-template-columns: 1fr;
		padding: 1.35rem;
	}

	.documentation-layout {
		grid-template-columns: 1fr;
	}

	.documentation-sidebar {
		position: static;
		max-height: none;
	}
}

@media (max-width: 680px) {
	.documentation-grid {
		grid-template-columns: 1fr;
	}

	.documentation-header {
		padding: 1.3rem;
	}

	.documentation-article h2 {
		font-size: 1.2rem;
	}

	.documentation-article p,
	.documentation-article ul,
	.documentation-article ol,
	.documentation-article blockquote,
	.documentation-image,
	.documentation-gallery {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.documentation-article ul,
	.documentation-article ol {
		padding-left: 2.25rem;
	}
}

/* Rendu final article : un support lisible, pas une succession de lignes flottantes. */
.documentation-article {
	max-width: 980px;
	padding: 1.55rem 1.7rem 1.7rem;
	border: 1px solid color-mix(in srgb, var(--anthys-border-color, #dbe1ea) 88%, transparent);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
}

.documentation-article p,
.documentation-article ul,
.documentation-article ol,
.documentation-article blockquote,
.documentation-image,
.documentation-gallery {
	margin: 0.85rem 0;
	padding-left: 0;
	padding-right: 0;
	border: 0;
	background: transparent;
}

.documentation-article ul,
.documentation-article ol {
	padding-left: 1.45rem;
}

.documentation-article h2 {
	margin: 2rem -1.7rem 1rem;
	padding: 1.2rem 1.7rem 0.75rem;
	border: 0;
	border-top: 1px solid #edf1f5;
	border-radius: 0;
	background: #fbfcfe;
}

.documentation-article > h1:first-child + p,
.documentation-article > p:first-of-type {
	margin-top: 0;
	font-size: 1.04rem;
}

.documentation-article h2:first-of-type {
	margin-top: 1.4rem;
}

.documentation-article h3 {
	margin-top: 1.45rem;
}

.documentation-article > :last-child {
	padding-bottom: 0;
	border: 0;
	border-radius: 0;
}

.documentation-article blockquote,
.documentation-callout {
	padding: 1rem 1.15rem;
	border: 1px solid #e6ebf2;
	border-left-width: 4px;
	border-radius: 12px;
	background: #fbfcfe;
}

@media (max-width: 680px) {
	.documentation-article {
		padding: 1.2rem 1rem 1.3rem;
	}

	.documentation-article h2 {
		margin-left: -1rem;
		margin-right: -1rem;
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

/* Anthys look: plus contrasté, moins clinique. */
body.documentation-mode {
	background:
		linear-gradient(180deg, #eef2f6 0%, #f7f8fa 38%, #eef1f4 100%) !important;
}

body.documentation-mode .anthys-main-content {
	background: transparent !important;
}

.documentation-page,
.documentation-shell {
	position: relative;
}

.documentation-hero {
	border: 0;
	background:
		linear-gradient(135deg, #252932 0%, #343337 58%, #575341 100%);
	color: #ffffff;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.documentation-hero::after {
	content: "";
	align-self: stretch;
	min-height: 100%;
	border-radius: 14px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 12px);
}

.documentation-hero__content {
	position: relative;
	z-index: 1;
}

.documentation-hero .documentation-eyebrow {
	color: rgba(255, 255, 255, 0.68);
}

.documentation-hero h1,
.documentation-hero p {
	color: #ffffff;
}

.documentation-hero p {
	color: rgba(255, 255, 255, 0.78);
}

.documentation-hero .documentation-search {
	position: relative;
	z-index: 1;
	align-self: end;
}

.documentation-hero .documentation-search input {
	border-color: rgba(255, 255, 255, 0.24);
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.documentation-hero .documentation-search input::placeholder {
	color: rgba(255, 255, 255, 0.62);
}

.documentation-hero .documentation-search i {
	color: rgba(255, 255, 255, 0.7);
}

.documentation-grid {
	gap: 1.25rem;
}

.documentation-card {
	position: relative;
	overflow: hidden;
	border-color: rgba(37, 41, 50, 0.10);
	background: #ffffff;
	box-shadow: 0 16px 44px rgba(32, 36, 44, 0.10);
}

.documentation-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, #252932, #8a865f 58%, #b54b46);
}

.documentation-card__icon {
	background: #252932;
	color: #ffffff;
}

.documentation-card__count {
	background: #f0efe8;
	color: #5d5a43;
}

.documentation-card__link {
	color: #252932;
}

.documentation-sidebar {
	border: 0;
	background: #252932;
	color: #ffffff;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.documentation-sidebar__header {
	border-bottom-color: rgba(255, 255, 255, 0.12);
}

.documentation-sidebar__header p,
.documentation-sidebar__header h2,
.documentation-sidebar__header a {
	color: #ffffff;
}

.documentation-sidebar__header p,
.documentation-nav__title {
	color: rgba(255, 255, 255, 0.58);
}

.documentation-sidebar__search input {
	border-color: rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	box-shadow: none;
}

.documentation-sidebar__search input::placeholder {
	color: rgba(255, 255, 255, 0.56);
}

.documentation-nav__link {
	color: rgba(255, 255, 255, 0.72);
}

.documentation-nav__link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

.documentation-nav__link.is-active,
.documentation-nav__link--page.is-active {
	background: #ffffff;
	color: #252932;
}

.documentation-nav__children {
	border-left-color: rgba(255, 255, 255, 0.16);
}

.documentation-nav__chevron {
	color: rgba(255, 255, 255, 0.46);
}

.documentation-breadcrumb {
	color: #6b7280;
}

.documentation-breadcrumb a {
	color: #4d5141;
}

.documentation-header {
	position: relative;
	overflow: hidden;
	border: 0;
	background: linear-gradient(135deg, #252932 0%, #343337 62%, #5c573f 100%);
	box-shadow: 0 22px 64px rgba(15, 23, 42, 0.20);
}

.documentation-header::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 7px;
	background: #b54b46;
}

.documentation-header__module,
.documentation-header h1,
.documentation-header p:not(.documentation-header__module) {
	position: relative;
	z-index: 1;
	color: #ffffff;
}

.documentation-header__module {
	color: rgba(255, 255, 255, 0.62);
}

.documentation-header p:not(.documentation-header__module) {
	color: rgba(255, 255, 255, 0.78);
}

.documentation-article {
	border: 0;
	background: #ffffff;
	box-shadow: 0 22px 64px rgba(15, 23, 42, 0.11);
}

.documentation-article h2 {
	background: linear-gradient(90deg, #f0efe8 0%, #ffffff 100%);
	border-top-color: #e3dfcf;
	color: #252932;
}

.documentation-article h2::before {
	content: "";
	display: inline-block;
	width: 0.55rem;
	height: 0.55rem;
	margin-right: 0.7rem;
	border-radius: 2px;
	background: #b54b46;
	vertical-align: 0.12rem;
}

.documentation-article strong,
.documentation-article li::marker {
	color: #252932;
}

.documentation-article blockquote,
.documentation-callout {
	background: #f6f5ef;
	border-color: #ddd8c3;
}

@media (max-width: 1100px) {
	.documentation-hero::after {
		display: none;
	}
}
