/* Torlann Docs — guide utilisateur */
:root {
	--docs-sidebar: 260px;
	--docs-toc: 190px;
	--docs-ink: #1a2332;
	--docs-muted: #5a6478;
	--docs-faint: #8b93a5;
	--docs-paper: #f6f8fb;
	--docs-white: #ffffff;
	--docs-line: #e2e7ef;
	--docs-coral: #ff6f52;
	--docs-coral-deep: #e5573c;
	--docs-navy: #1c2438;
	--docs-teal: #0e6e63;
	--docs-teal-soft: #e6f3f0;
	--docs-coral-soft: #fff3ef;
	--docs-radius: 12px;
	--font-display: "Bricolage Grotesque", system-ui, sans-serif;
	--font-body: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body.docs-body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--docs-ink);
	background:
		radial-gradient(ellipse 80% 50% at 100% -10%, rgba(255, 111, 82, 0.08), transparent 55%),
		radial-gradient(ellipse 60% 40% at -10% 20%, rgba(14, 110, 99, 0.06), transparent 50%),
		var(--docs-white);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--docs-teal);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* —— Topbar —— */
.docs-topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 56px;
	padding: 0 20px;
	border-bottom: 1px solid var(--docs-line);
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(12px);
}

.docs-topbar__brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--docs-ink);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.05rem;
	text-decoration: none;
}

.docs-topbar__brand:hover {
	text-decoration: none;
	color: var(--docs-ink);
}

.docs-topbar__guide {
	display: inline-flex;
	align-items: center;
	color: var(--docs-ink);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.05rem;
	text-decoration: none;
	margin-left: 4px;
}

.docs-topbar__guide:hover {
	text-decoration: none;
	color: var(--docs-ink);
}

/* Wordmark docs : largeur lisible à côté de « Guide » */
.docs-topbar__brand img {
	display: block;
	width: 100px;
	height: auto;
	max-width: none;
}

.docs-topbar__version {
	font-size: 12px;
	font-weight: 700;
	color: var(--docs-teal);
	background: var(--docs-teal-soft);
	padding: 3px 8px;
	border-radius: 999px;
}

.docs-topbar__spacer {
	flex: 1;
}

.docs-search {
	position: relative;
	flex: 0 1 220px;
	max-width: 240px;
	min-width: 140px;
}

.docs-search__label {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	color: var(--docs-faint);
	pointer-events: none;
	line-height: 0;
}

.docs-search__input {
	width: 100%;
	height: 36px;
	padding: 0 12px 0 32px;
	border: 1px solid var(--docs-line);
	border-radius: 999px;
	background: var(--docs-paper);
	color: var(--docs-ink);
	font: inherit;
	font-size: 0.88rem;
	outline: none;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.docs-search__input::placeholder {
	color: var(--docs-faint);
}

.docs-search__input:focus {
	border-color: #c5d4e0;
	background: var(--docs-white);
	box-shadow: 0 0 0 3px rgba(14, 110, 99, 0.1);
}

.docs-search__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	min-width: 240px;
	padding: 6px;
	border: 1px solid var(--docs-line);
	border-radius: 12px;
	background: var(--docs-white);
	box-shadow: 0 16px 40px -24px rgba(28, 36, 56, 0.45);
	z-index: 50;
}

.docs-search__hit {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 9px 11px;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
}

.docs-search__hit:hover {
	background: var(--docs-paper);
	text-decoration: none;
}

.docs-search__hit-label {
	font-size: 0.9rem;
	font-weight: 650;
	color: var(--docs-ink);
}

.docs-search__hit-group {
	font-size: 0.75rem;
	color: var(--docs-faint);
	font-weight: 600;
}

.docs-search__empty {
	margin: 0;
	padding: 10px 12px;
	font-size: 0.86rem;
	color: var(--docs-muted);
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.docs-lang-picker {
	position: relative;
	margin-right: 8px;
	flex-shrink: 0;
}

.docs-lang-picker .site-lang-picker__trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 1px solid var(--docs-line, #e2e6ee);
	border-radius: 999px;
	background: #fff;
	color: var(--docs-ink, #172033);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	line-height: 1;
}

.docs-lang-picker .site-lang-picker__trigger:hover,
.docs-lang-picker .site-lang-picker__trigger[aria-expanded="true"] {
	border-color: #c8ceda;
	background: #f7f8fb;
}

.docs-lang-picker .site-lang-picker__flag {
	font-size: 0.95rem;
	line-height: 1;
}

.docs-lang-picker .site-lang-picker__code {
	font-size: 0.78rem;
}

.docs-lang-picker .site-lang-picker__chev {
	transition: transform 0.15s ease;
}

.docs-lang-picker .site-lang-picker__trigger[aria-expanded="true"] .site-lang-picker__chev {
	transform: rotate(180deg);
}

.docs-lang-picker .site-lang-picker__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 50;
	min-width: 152px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--docs-line, #e2e6ee);
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(23, 32, 51, 0.12);
}

.docs-lang-picker .site-lang-picker__menu[hidden] {
	display: none;
}

.docs-lang-picker .site-lang-picker__option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--docs-ink, #172033);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
}

.docs-lang-picker .site-lang-picker__option:hover,
.docs-lang-picker .site-lang-picker__option.is-active {
	background: #f3f5f9;
}

.docs-topbar__links {
	display: flex;
	gap: 18px;
	align-items: center;
	font-size: 0.9rem;
}

.docs-topbar__links a {
	color: var(--docs-muted);
	font-weight: 600;
	text-decoration: none;
}

.docs-topbar__links a:hover {
	color: var(--docs-ink);
}

.docs-menu-toggle {
	display: none;
	margin: 0;
	padding: 8px;
	border: 1px solid var(--docs-line);
	border-radius: 8px;
	background: var(--docs-white);
	cursor: pointer;
	line-height: 0;
	color: var(--docs-ink);
}

/* —— Layout —— */
.docs-layout {
	display: grid !important;
	grid-template-columns: var(--docs-sidebar) minmax(0, 1fr) var(--docs-toc);
	min-height: calc(100vh - 56px);
	align-items: start;
}

.docs-sidebar {
	position: sticky;
	top: 56px;
	align-self: start;
	height: calc(100vh - 56px);
	overflow: auto;
	padding: 20px 14px 40px;
	border-right: 1px solid var(--docs-line);
	background: rgba(246, 248, 251, 0.85);
	width: auto;
	max-width: none;
}

.docs-sidebar__group {
	margin: 18px 10px 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--docs-faint);
}

.docs-sidebar__link {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--docs-muted);
	font-size: 0.94rem;
	font-weight: 560;
	text-decoration: none;
}

.docs-sidebar__link:hover {
	background: rgba(255, 255, 255, 0.9);
	color: var(--docs-ink);
	text-decoration: none;
}

.docs-sidebar__link.is-active {
	background: var(--docs-white);
	color: var(--docs-coral-deep);
	font-weight: 700;
	box-shadow: 0 1px 0 var(--docs-line);
}

.docs-main {
	padding: 40px 44px 88px;
	max-width: 880px;
}

.docs-main--welcome {
	max-width: 920px;
}

.docs-toc {
	position: sticky;
	top: 56px;
	align-self: start;
	height: calc(100vh - 56px);
	overflow: auto;
	padding: 28px 18px;
	border-left: 1px solid var(--docs-line);
}

.docs-toc__title {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--docs-faint);
}

.docs-toc a {
	display: block;
	padding: 4px 0;
	font-size: 0.84rem;
	color: var(--docs-muted);
	text-decoration: none;
	border-left: 2px solid transparent;
	padding-left: 10px;
}

.docs-toc a:hover,
.docs-toc a.is-active {
	color: var(--docs-ink);
	border-left-color: var(--docs-coral);
}

/* —— Content —— */
.docs-kicker {
	margin: 0 0 10px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--docs-coral-deep);
}

.docs-page-title {
	margin: 0 0 12px;
	font-family: var(--font-display);
	font-size: clamp(1.95rem, 3vw, 2.5rem);
	line-height: 1.12;
	letter-spacing: -0.03em;
}

.docs-lead {
	margin: 0 0 28px;
	font-size: 1.18rem;
	color: var(--docs-muted);
	max-width: 40rem;
}

.docs-main h2 {
	margin: 2.5rem 0 0.75rem;
	padding-top: 0.4rem;
	font-family: var(--font-display);
	font-size: 1.4rem;
	letter-spacing: -0.02em;
	scroll-margin-top: 72px;
}

.docs-main h3 {
	margin: 1.6rem 0 0.55rem;
	font-family: var(--font-display);
	font-size: 1.12rem;
	scroll-margin-top: 72px;
}

.docs-main p,
.docs-main li {
	color: var(--docs-muted);
}

.docs-main ul,
.docs-main ol {
	padding-left: 1.25rem;
	margin: 0 0 1rem;
}

.docs-main li {
	margin: 0.4rem 0;
}

.docs-main strong {
	color: var(--docs-ink);
	font-weight: 700;
}

.docs-steps {
	margin: 1rem 0 1.5rem;
	padding: 0;
	list-style: none;
	counter-reset: step;
}

.docs-steps li {
	position: relative;
	margin: 0 0 14px;
	padding: 14px 16px 14px 52px;
	border: 1px solid var(--docs-line);
	border-radius: var(--docs-radius);
	background: var(--docs-white);
}

.docs-steps li::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	left: 14px;
	top: 14px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--docs-navy);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	display: grid;
	place-items: center;
}

.docs-callout {
	margin: 1.25rem 0;
	padding: 14px 16px;
	border: 1px solid var(--docs-line);
	border-radius: var(--docs-radius);
	background: var(--docs-paper);
	font-size: 0.95rem;
}

.docs-callout--tip {
	border-color: #b7d9d3;
	background: var(--docs-teal-soft);
}

.docs-callout--idea {
	border-color: #f5c7bb;
	background: var(--docs-coral-soft);
}

.docs-callout--warn {
	border-color: #e8d4a8;
	background: #fff8e8;
}

.docs-callout strong {
	display: block;
	margin-bottom: 4px;
}

/* —— FAQ (details) —— */
.docs-faq {
	margin: 1rem 0 2rem;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.docs-faq__group {
	margin: 1.5rem 0 0.75rem;
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--docs-navy);
}

.docs-faq details {
	border: 1px solid var(--docs-line);
	border-radius: 10px;
	background: var(--docs-white);
	overflow: hidden;
}

.docs-faq details[open] {
	border-color: #b7d9d3;
	box-shadow: 0 2px 8px rgba(14, 110, 99, 0.06);
}

.docs-faq summary {
	cursor: pointer;
	list-style: none;
	padding: 12px 16px 12px 40px;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.45;
	position: relative;
}

.docs-faq summary::-webkit-details-marker {
	display: none;
}

.docs-faq summary::before {
	content: "+";
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	border-radius: 6px;
	background: var(--docs-paper);
	color: var(--docs-teal);
	font-weight: 700;
	font-size: 1rem;
	line-height: 20px;
	text-align: center;
}

.docs-faq details[open] summary::before {
	content: "−";
	background: var(--docs-teal-soft);
}

.docs-faq summary:hover {
	background: var(--docs-paper);
}

.docs-faq__answer {
	padding: 0 16px 14px 40px;
	font-size: 0.94rem;
	color: var(--docs-muted);
}

.docs-faq__answer p {
	margin: 0 0 0.65rem;
}

.docs-faq__answer p:last-child {
	margin-bottom: 0;
}

.docs-faq__answer ul,
.docs-faq__answer ol {
	margin: 0.35rem 0 0.65rem;
	padding-left: 1.25rem;
}

.docs-table-wrap {
	margin: 1.25rem 0 1.75rem;
	overflow-x: auto;
	border: 1px solid var(--docs-line);
	border-radius: var(--docs-radius);
	background: var(--docs-white);
}

.docs-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.docs-table th,
.docs-table td {
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--docs-line);
}

.docs-table th {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--docs-muted);
	background: var(--docs-paper);
}

.docs-table tr:last-child td {
	border-bottom: none;
}

.docs-table code {
	font-size: 0.85em;
	padding: 1px 6px;
	border-radius: 4px;
	background: var(--docs-paper);
}

/* Legacy screenshot styles (unused in rewrite) */
.docs-shot {
	margin: 1.4rem 0 1.8rem;
	border: 1px solid var(--docs-line);
	border-radius: 16px;
	overflow: hidden;
	background: #eef1f6;
	box-shadow: 0 18px 40px -28px rgba(28, 36, 56, 0.4);
}

.docs-shot img {
	width: 100%;
	display: block;
	background: #eef1f6;
}

.docs-shot figcaption {
	margin: 0;
	padding: 11px 16px;
	background: rgba(255, 255, 255, 0.92);
	border-top: 1px solid var(--docs-line);
	font-size: 0.86rem;
	color: var(--docs-muted);
}

.docs-shot--hero {
	position: relative;
	margin: 0 0 2rem;
	border: 0;
	border-radius: 20px;
	background:
		radial-gradient(ellipse 70% 80% at 10% 20%, rgba(255, 111, 82, 0.22), transparent 55%),
		radial-gradient(ellipse 60% 70% at 90% 10%, rgba(14, 110, 99, 0.18), transparent 50%),
		linear-gradient(160deg, #1c2438 0%, #2a3550 55%, #1a2332 100%);
	padding: 22px 22px 0;
	box-shadow: 0 24px 50px -30px rgba(28, 36, 56, 0.65);
}

.docs-shot--hero img {
	border-radius: 12px 12px 0 0;
	box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.08) inset;
}

.docs-shot--hero figcaption {
	background: transparent;
	border: 0;
	color: rgba(255, 255, 255, 0.72);
	padding: 14px 4px 18px;
}

/* Welcome extras */
.docs-hero-panel {
	margin: 0 0 2rem;
	padding: 22px 24px;
	border-radius: 18px;
	border: 1px solid rgba(255, 111, 82, 0.18);
	background:
		linear-gradient(135deg, rgba(255, 243, 239, 0.95), rgba(230, 243, 240, 0.7));
}

.docs-hero-panel p {
	margin: 0;
	color: var(--docs-ink);
	font-size: 1.05rem;
	line-height: 1.55;
}

.docs-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 1rem 0 0;
}

.docs-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--docs-line);
	font-size: 0.82rem;
	font-weight: 650;
	color: var(--docs-ink);
}

.docs-cap-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 1.2rem 0 1.8rem;
	padding: 0;
	list-style: none;
}

.docs-feature-list {
	columns: 2;
	column-gap: 32px;
	margin: 0 0 20px;
	padding: 0 0 0 1.15rem;
}

.docs-feature-list li {
	break-inside: avoid;
	margin: 0 0 8px;
	color: var(--docs-ink);
	font-size: 0.95rem;
	line-height: 1.45;
}

@media (max-width: 720px) {
	.docs-feature-list {
		columns: 1;
	}
}

.docs-cap {
	margin: 0;
	padding: 16px 16px 14px;
	border: 1px solid var(--docs-line);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.88);
}

.docs-cap strong {
	display: block;
	margin-bottom: 6px;
	font-family: var(--font-display);
	font-size: 1.02rem;
	color: var(--docs-ink);
}

.docs-cap p {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--docs-muted);
}

.docs-map {
	display: grid;
	gap: 10px;
	margin: 1.2rem 0 1.6rem;
}

.docs-map__item {
	display: grid;
	grid-template-columns: minmax(140px, 180px) 1fr;
	gap: 12px;
	align-items: start;
	padding: 14px 16px;
	border: 1px solid var(--docs-line);
	border-radius: 12px;
	background: var(--docs-white);
}

.docs-map__item strong {
	font-size: 0.95rem;
	color: var(--docs-ink);
}

.docs-map__item p {
	margin: 0;
	font-size: 0.9rem;
}

@media (max-width: 720px) {
	.docs-cap-grid {
		grid-template-columns: 1fr;
	}

	.docs-map__item {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

/* Topic cards */
.docs-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 1.5rem 0 2rem;
}

.docs-card {
	display: block;
	padding: 18px 18px 16px;
	border: 1px solid var(--docs-line);
	border-radius: var(--docs-radius);
	background: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.docs-card:hover {
	border-color: #f0b5a6;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 12px 28px -20px rgba(28, 36, 56, 0.35);
}

.docs-card__label {
	display: block;
	margin-bottom: 6px;
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--docs-ink);
}

.docs-card__text {
	margin: 0;
	font-size: 0.92rem;
	color: var(--docs-muted);
	line-height: 1.45;
}

.docs-pager {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--docs-line);
}

.docs-pager a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border: 1px solid var(--docs-line);
	border-radius: var(--docs-radius);
	color: var(--docs-ink);
	text-decoration: none;
	min-width: 0;
	flex: 1;
	background: rgba(255, 255, 255, 0.7);
}

.docs-pager a:hover {
	border-color: var(--docs-coral);
	background: var(--docs-coral-soft);
	text-decoration: none;
}

.docs-pager a span {
	font-size: 0.8rem;
	color: var(--docs-faint);
	font-weight: 600;
}

.docs-pager a strong {
	font-size: 0.98rem;
}

.docs-pager a.is-next {
	text-align: right;
	margin-left: auto;
}

.docs-pager a.is-prev {
	margin-right: auto;
	flex: 0 1 48%;
}

@media (max-width: 1100px) {
	.docs-layout {
		grid-template-columns: var(--docs-sidebar) minmax(0, 1fr);
	}

	.docs-toc {
		display: none;
	}
}

@media (max-width: 860px) {
	.docs-menu-toggle {
		display: inline-flex;
	}

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

	.docs-sidebar {
		position: fixed;
		inset: 56px auto 0 0;
		width: min(86vw, 300px);
		transform: translateX(-105%);
		transition: transform 0.2s ease;
		z-index: 35;
		box-shadow: 8px 0 24px rgba(23, 32, 51, 0.12);
	}

	.docs-body.is-nav-open .docs-sidebar {
		transform: translateX(0);
	}

	.docs-main {
		padding: 28px 20px 64px;
	}

	.docs-topbar__links {
		display: none;
	}

	.docs-topbar__version {
		display: none;
	}

	.docs-search {
		flex: 1 1 auto;
		max-width: none;
		min-width: 0;
	}

	.docs-cards {
		grid-template-columns: 1fr;
	}
}
