/* Page Aide — hub multi-rubriques (menu latéral, charte H1N1) */

.aide {
	--aide-bg: #161b22;
	--aide-card: #1a212b;
	--aide-elevated: #1e2530;
	--aide-panel: #10141a;
	--aide-border: #3a4556;
	--aide-border-gold: #6b5c3f;
	--aide-text: #e8ecf1;
	--aide-muted: #9aa5b5;
	--aide-accent: #d4a84b;
	--aide-accent-soft: rgba(212, 168, 75, 0.12);
	--aide-int: #7eb8ff;
	--aide-radius: 10px;
	--aide-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--aide-text);
	width: 100%;
	margin: 0 0 2rem;
	box-sizing: border-box;
	line-height: 1.55;
}

.aide *,
.aide *::before,
.aide *::after {
	box-sizing: border-box;
}

.aide__header {
	padding: 1.35rem 1.5rem;
	text-align: center;
	background: linear-gradient(135deg, #1e2836 0%, #151a22 100%);
	border: 1px solid var(--aide-border);
	border-radius: var(--aide-radius) var(--aide-radius) 0 0;
}

.aide__title {
	margin: 0;
	font-size: clamp(1.35rem, 2.5vw, 1.75rem);
	font-weight: 800;
	color: var(--aide-accent);
	line-height: 1.25;
}

.aide__lead {
	margin: 0.5rem 0 0;
	font-size: 0.95rem;
	color: var(--aide-muted);
}

.aide__shell {
	background: var(--aide-bg);
	border: 1px solid var(--aide-border);
	border-top: none;
	border-radius: 0 0 var(--aide-radius) var(--aide-radius);
	padding: 1rem 1.25rem 1.5rem;
	box-shadow: var(--aide-shadow);
}

.aide__layout {
	display: flex;
	gap: 1rem;
	min-height: 520px;
	max-height: min(75vh, 860px);
}

/* —— Menu —— */
.aide__nav {
	width: 230px;
	flex-shrink: 0;
	padding: 0.75rem;
	overflow-y: auto;
	background: var(--aide-panel);
	border: 1px solid var(--aide-border-gold);
	border-radius: 8px;
	scrollbar-width: thin;
	scrollbar-color: var(--aide-border-gold) var(--aide-panel);
}

.aide__nav-group + .aide__nav-group {
	margin-top: 1rem;
	padding-top: 0.85rem;
	border-top: 1px solid rgba(107, 92, 63, 0.45);
}

.aide__nav-group-label {
	margin: 0 0 0.45rem 0.35rem;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--aide-accent);
}

.aide__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aide__nav-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.4rem;
	padding: 0.5rem 0.75rem;
	margin: 0.3rem 0;
	font-size: 0.84rem;
	font-weight: 600;
	color: #e6e0c8;
	text-decoration: none;
	background: #1b1f26;
	border: 1px solid #4d442f;
	border-radius: 6px;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.aide__nav-link:hover,
.aide__nav-link.is-active {
	background: var(--aide-accent-soft);
	color: #fff;
	border-color: var(--aide-accent);
}

.aide__nav-link-text {
	min-width: 0;
}

.aide__nav-badge {
	flex: 0 0 auto;
	padding: 0.1rem 0.4rem;
	font-size: 0.65rem;
	font-weight: 800;
	color: #0e1724;
	background: linear-gradient(180deg, #b8d8ff 0%, var(--aide-int) 100%);
	border-radius: 999px;
}

/* —— Contenu —— */
.aide__main {
	flex: 1;
	min-width: 0;
	overflow-y: auto;
	padding: 0.25rem 0.35rem 0.5rem;
	scrollbar-width: thin;
	scrollbar-color: var(--aide-border) var(--aide-bg);
}

.aide__panel {
	display: none;
}

.aide__panel.is-active {
	display: block;
}

.aide__panel-head {
	margin-bottom: 1.1rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid rgba(212, 168, 75, 0.25);
}

.aide__panel-title {
	margin: 0;
	font-size: clamp(1.2rem, 2.2vw, 1.45rem);
	font-weight: 800;
	color: var(--aide-accent);
}

.aide__panel-sub {
	margin: 0.45rem 0 0;
	font-size: 0.98rem;
	font-weight: 600;
	color: #f0e6d0;
}

.aide__muted {
	color: var(--aide-muted);
	font-size: 0.9rem;
}

/* Welcome */
.aide__welcome-text {
	margin: 0 0 1.1rem;
	color: var(--aide-muted);
	font-size: 0.95rem;
}

.aide__welcome-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.75rem;
}

.aide__welcome-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3rem;
	padding: 1rem 1.1rem;
	text-align: left;
	color: inherit;
	cursor: pointer;
	font: inherit;
	background: var(--aide-card);
	border: 1px solid var(--aide-border);
	border-radius: 8px;
	transition: border-color 0.15s, transform 0.15s;
}

.aide__welcome-card:hover {
	border-color: rgba(212, 168, 75, 0.55);
	transform: translateY(-1px);
}

.aide__welcome-card-group {
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aide-accent);
}

.aide__welcome-card-title {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
}

.aide__welcome-card-badge {
	padding: 0.12rem 0.45rem;
	font-size: 0.68rem;
	font-weight: 800;
	color: #0e1724;
	background: linear-gradient(180deg, #b8d8ff 0%, var(--aide-int) 100%);
	border-radius: 999px;
}

/* Build content */
.aide__badge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 1rem;
}

.aide__badge {
	display: inline-flex;
	padding: 0.28rem 0.7rem;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #1a1208;
	background: linear-gradient(180deg, #ffe08a 0%, var(--aide-accent) 100%);
	border-radius: 999px;
}

.aide__badge--soft {
	color: #c8e0ff;
	background: rgba(126, 184, 255, 0.14);
	border: 1px solid rgba(126, 184, 255, 0.35);
}

.aide__tips {
	margin: 0 0 1.35rem;
	padding: 0.95rem 1.1rem;
	background: var(--aide-accent-soft);
	border: 1px solid rgba(212, 168, 75, 0.35);
	border-radius: 8px;
}

.aide__tips-title {
	margin: 0 0 0.45rem;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aide-accent);
}

.aide__tips-list {
	margin: 0;
	padding-left: 1.1rem;
	color: #f0e6d0;
	font-size: 0.9rem;
}

.aide__tips-list li + li {
	margin-top: 0.3rem;
}

.aide__tips--warn {
	background: rgba(224, 122, 122, 0.1);
	border-color: rgba(224, 122, 122, 0.4);
}

.aide__tips--warn .aide__tips-title {
	color: #e07a7a;
}

.aide__tips-p {
	margin: 0;
	font-size: 0.9rem;
	color: #f0e6d0;
	line-height: 1.55;
}

/* Biologiste */
.aide__bio-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.aide__bio {
	padding: 1rem 1.1rem;
	background: var(--aide-card);
	border: 1px solid var(--aide-border);
	border-radius: 10px;
}

.aide__bio-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.55rem 1rem;
	margin-bottom: 0.75rem;
}

.aide__bio-num {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aide-accent);
}

.aide__bio-req {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
}

.aide__bio-badge {
	margin-left: auto;
	padding: 0.15rem 0.5rem;
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	background: #c94444;
	border-radius: 999px;
}

.aide__bio-meta-full {
	grid-column: 1 / -1;
}

.aide__bio-qlv {
	font-weight: 600;
	color: var(--aide-muted);
	font-size: 0.88rem;
}

.aide__bio-meta {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.55rem 1rem;
	margin-bottom: 0.9rem;
	padding: 0.65rem 0.75rem;
	background: rgba(0, 0, 0, 0.22);
	border-radius: 8px;
	font-size: 0.86rem;
}

.aide__bio-k {
	display: block;
	margin-bottom: 0.15rem;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aide-accent);
}

.aide__bio-v {
	color: #e8ecf1;
}

.aide__bio-body {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.aide__bio-icon {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	object-fit: contain;
	image-rendering: pixelated;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--aide-border);
	border-radius: 8px;
	padding: 4px;
}

.aide__bio-icon--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--aide-muted);
	font-weight: 800;
}

.aide__bio-sources {
	flex: 1;
	min-width: 0;
}

.aide__bio-src-title {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: #c8e0ff;
}

.aide__bio-src-label {
	margin: 0.45rem 0 0.2rem;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--aide-muted);
}

.aide__bio-sources ul {
	margin: 0;
	padding-left: 1.05rem;
	font-size: 0.88rem;
	color: #dce4f0;
}

.aide__bio-sources li + li {
	margin-top: 0.15rem;
}

.aide__bio-mlv {
	color: var(--aide-int);
	font-weight: 700;
	font-size: 0.82rem;
}

@media (max-width: 560px) {
	.aide__bio-body {
		flex-direction: column;
	}
}

/* —— Donjons —— */
.aide__dj-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 0.85rem;
}

.aide__dj {
	padding: 0.9rem 1rem;
	background: var(--aide-card);
	border: 1px solid var(--aide-border);
	border-radius: 8px;
	border-left: 3px solid var(--aide-accent);
}

.aide__dj-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.65rem;
}

.aide__dj-titles {
	min-width: 0;
}

.aide__dj-name {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--aide-accent);
	line-height: 1.25;
}

.aide__dj-alias {
	margin: 0.15rem 0 0;
	font-size: 0.8rem;
	color: var(--aide-muted);
}

.aide__dj-lv {
	flex: 0 0 auto;
	padding: 0.28rem 0.55rem;
	font-size: 0.72rem;
	font-weight: 800;
	color: #0e1724;
	background: linear-gradient(180deg, #e8d5a0 0%, var(--aide-accent) 100%);
	border-radius: 999px;
	white-space: nowrap;
}

.aide__dj-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.45rem 0.85rem;
	margin-bottom: 0.65rem;
}

.aide__dj-k {
	display: block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--aide-muted);
	margin-bottom: 0.1rem;
}

.aide__dj-v {
	font-size: 0.88rem;
	color: var(--aide-text);
}

.aide__dj-v--bonus {
	color: #f0d78c;
	font-weight: 700;
}

.aide__dj-body {
	padding-top: 0.55rem;
	border-top: 1px solid rgba(58, 69, 86, 0.7);
}

.aide__dj-src-title {
	margin: 0 0 0.3rem;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aide-accent);
}

.aide__dj-drops ul {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.86rem;
	color: var(--aide-muted);
}

.aide__dj-drops li + li {
	margin-top: 0.15rem;
}

.aide__dj-box {
	margin-top: 0.55rem;
	padding: 0.45rem 0.6rem;
	background: var(--aide-accent-soft);
	border-radius: 6px;
	border: 1px solid rgba(212, 168, 75, 0.25);
}

.aide__dj-box .aide__dj-k {
	display: inline;
	margin-right: 0.4rem;
}

.aide__dj-tip {
	margin: 0.5rem 0 0;
	font-size: 0.84rem;
	color: var(--aide-int);
}

/* —— Cartes / maps —— */
.aide__map-list {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	margin-top: 0.85rem;
}

.aide__map {
	background: var(--aide-card);
	border: 1px solid var(--aide-border);
	border-radius: 8px;
	overflow: hidden;
}

.aide__map-media {
	position: relative;
	background: #0a0c10;
}

.aide__map-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 720 / 120;
	object-fit: cover;
}

.aide__map-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.45rem 0.75rem;
	text-align: center;
	font-size: 0.92rem;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 40%);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.aide__map-name {
	margin: 0;
	padding: 0.85rem 1rem 0;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--aide-accent);
}

.aide__map-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	padding: 0.7rem 0.85rem 0.85rem;
}

.aide__map-pill {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	font-size: 0.84rem;
	font-weight: 700;
	border: 1px solid transparent;
}

.aide__map-pill-k {
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}

.aide__map-pill--bonus {
	color: #f0d78c;
	background: var(--aide-accent-soft);
	border-color: rgba(212, 168, 75, 0.28);
}

.aide__map-pill--resist {
	color: #b8d8ff;
	background: rgba(126, 184, 255, 0.12);
	border-color: rgba(126, 184, 255, 0.28);
}

.aide__section {
	margin: 0 0 1.4rem;
}

.aide__section-title {
	margin: 0 0 0.7rem;
	padding-bottom: 0.4rem;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--aide-accent);
	border-bottom: 1px solid rgba(212, 168, 75, 0.22);
}

.aide__slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.7rem;
}

.aide__slot {
	padding: 0.85rem 0.95rem;
	background: var(--aide-card);
	border: 1px solid var(--aide-border);
	border-radius: 8px;
}

.aide__slot-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.55rem;
	margin-bottom: 0.4rem;
}

.aide__slot-name {
	font-size: 0.92rem;
	font-weight: 700;
	color: #fff;
}

.aide__slot-value {
	flex: 0 0 auto;
	padding: 0.18rem 0.5rem;
	font-size: 0.7rem;
	font-weight: 800;
	color: #0e1724;
	background: linear-gradient(180deg, #b8d8ff 0%, var(--aide-int) 100%);
	border-radius: 999px;
	white-space: nowrap;
}

.aide__slot-lines {
	margin: 0;
	padding-left: 1rem;
	font-size: 0.84rem;
	color: var(--aide-muted);
}

.aide__slot-lines li + li {
	margin-top: 0.18rem;
}

/* —— Tableaux (bonus costumes, etc.) —— */
.aide__table-wrap {
	margin-top: 0.85rem;
	overflow: auto;
	max-height: min(58vh, 640px);
	border: 1px solid var(--aide-border-gold);
	border-radius: 8px;
	background: #0a0c10;
	scrollbar-width: thin;
	scrollbar-color: var(--aide-border-gold) #0a0c10;
}

.aide__table {
	width: 100%;
	min-width: 720px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.82rem;
}

.aide__table th,
.aide__table td {
	padding: 0.45rem 0.55rem;
	text-align: center;
	border-right: 1px solid #2a3140;
	border-bottom: 1px solid #2a3140;
	white-space: nowrap;
}

.aide__table th:last-child,
.aide__table td:last-child {
	border-right: none;
}

.aide__table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	font-weight: 700;
	color: #f0e6c8;
	background: #141820;
	box-shadow: inset 0 -1px 0 var(--aide-border-gold);
}

.aide__table-sticky {
	position: sticky;
	left: 0;
	z-index: 1;
	text-align: left !important;
	min-width: 11.5rem;
}

.aide__table thead .aide__table-sticky {
	z-index: 3;
	background: #141820;
}

.aide__table-label {
	font-weight: 600;
	color: var(--aide-text);
	background: #10141a;
	box-shadow: inset -1px 0 0 #2a3140;
}

.aide__table tbody tr:nth-child(even) .aide__table-label {
	background: #121820;
}

.aide__table tbody tr:nth-child(even) td:not(.aide__table-label):not(.is-filled) {
	background: #0d1016;
}

.aide__table-cell.is-filled {
	font-weight: 700;
	color: #1a1408;
	background: #c4b08a;
}

.aide__table--yesno {
	min-width: 860px;
	font-size: 0.78rem;
}

.aide__table--yesno .aide__table-sticky {
	min-width: 12.5rem;
}

.aide__table--yesno .aide__table-cell {
	font-weight: 800;
	letter-spacing: 0.02em;
}

.aide__table--yesno .aide__table-cell.is-oui {
	color: #0b1a0b;
	background: #22c55e;
}

.aide__table--yesno .aide__table-cell.is-non {
	color: #1a0808;
	background: #ef4444;
}

.aide__table--yesno tbody tr:hover .aide__table-cell.is-oui {
	background: #16a34a;
}

.aide__table--yesno tbody tr:hover .aide__table-cell.is-non {
	background: #dc2626;
}

.aide__table tbody tr:hover .aide__table-label {
	background: #1a222c;
}

.aide__table tbody tr:hover td:not(.aide__table-label):not(.is-filled) {
	background: #151b24;
}

@media (max-width: 820px) {
	.aide__layout {
		flex-direction: column;
		max-height: none;
		min-height: 0;
	}

	.aide__nav {
		width: 100%;
		max-height: 220px;
	}

	.aide__main {
		max-height: none;
		overflow: visible;
	}

	.aide__table-wrap {
		max-height: none;
	}
}
