/*
Theme Name: Astra BOFWorld 2
Theme URI: https://wordpress.org/themes/astra/
Description: BOFWorld layout with #0E1525 viewport and gaming-style gradient content panels.
Author: BOFWorld
Template: astra
Version: 1.11.5
Text Domain: astra-bofworld2
*/

:root {
	--bof-viewport-bg: #0e1525;
	--bof-viewport-gradient: linear-gradient(180deg, #080b14 0%, #121a2e 50%, #080b14 100%);
	/* Shell width defaults to Astra site-content-width (1200); overridden in functions.php */
	--bof-shell-width: 1200px;
	/* Menu column + gap; main column grows (flex) beside it */
	--bof-menu-width: 172px;
	--bof-menu-gap: 20px;
	/* Central column (distinct from page bg) */
	--bof-shell-bg: #1a2d4a;
	/* Fondu shell → image footer (équilibre entre lien visuel et lisibilité de l’image) */
	--bof-footer-fade-height: clamp(40px, 8.5vw, 96px);
	/* Fondu bas du header → couleur du shell (#bofworld-container) */
	--bof-header-bottom-fade-height: 80px;
	/* Content block: horizontal blue — mid kept near #005B90 (no bright cyan band; text stays readable) */
	--bof-content-gradient: linear-gradient(
		90deg,
		#121b2e 0%,
		#0c4a6e 22%,
		#065a8a 38%,
		#005b90 50%,
		#065a8a 62%,
		#0f2847 82%,
		#121b2e 100%
	);
	/* Vertical wash toward BOF #005B90 at bottom (layered on top of --bof-content-gradient) */
	--bof-content-fade: linear-gradient(
		to bottom,
		rgba(0, 91, 144, 0) 0%,
		rgba(0, 91, 144, 0.22) 40%,
		rgba(0, 91, 144, 0.5) 72%,
		#005b90 100%
	);
	--bof-content-radius: 20px;
	--bof-text: #f1f5f9;
	--bof-text-muted: #cbd5e1;
	--bof-accent: #38bdf8;
	--bof-accent-hover: #7dd3fc;
	--bof-menu-link: #e2e8f0;
	--bof-menu-link-hover: #ffffff;
	--bof-menu-hover-bg: rgba(56, 189, 248, 0.14);
	--bof-menu-title: #f8fafc;
	--bof-border-soft: rgba(148, 163, 184, 0.28);
	/* Espace autour du shell (comme en haut) pour laisser voir le fond viewport #0e1525 */
	--bof-viewport-shell-gap: 12px;
	--bof-viewport-shell-gap-mobile: 8px;
	/* Mobile : même écart bannière → Menu et Menu → contenu (#bofworld-page) */
	--bof-mobile-band-gap: 26px;
}

/*
 * Astra Customizer override via functions.php (#0E1525). Shell = separate panel tone.
 */
html {
	background-color: var(--bof-viewport-bg) !important;
}

body {
	margin: 0;
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	color: var(--bof-text);
	background-color: var(--bof-viewport-bg) !important;
	background-image: var(--bof-viewport-gradient) !important;
	background-attachment: fixed !important;
	min-height: 100vh;
}

#page.site,
.site,
#content,
#content.site-content,
.site-content,
.ast-separate-container,
.ast-separate-container #primary,
.ast-separate-container #secondary,
#primary,
.site-main {
	background-color: transparent !important;
	background-image: none !important;
}

/*
 * Masquer le masthead Astra (logo Customizer + doublon du menu). Le menu principal
 * WordPress est rendu dans .bofworld-primary-nav ; la colonne #bofworld-menu garde la nav BOF.
 */
.site-header,
.site-footer,
.ast-breadcrumbs-wrapper {
	display: none;
}

#content .ast-container {
	max-width: var(--bof-shell-width);
	padding: 0;
	overflow: visible;
}

#bofworld-container {
	position: relative;
	width: 100%;
	max-width: var(--bof-shell-width);
	margin: var(--bof-viewport-shell-gap) auto var(--bof-viewport-shell-gap);
	background-color: var(--bof-shell-bg);
	background-image: none;
	text-align: left;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
	overflow: visible;
}

/* Fond : si l’ancien logo est « dans » la bannière, c’est souvent ce fichier — remplacez assets/img/header_bofworld.png */
#bofworld-bantop {
	position: relative;
	width: 100%;
	margin: 0;
	height: 280px;
	overflow: hidden;
	background: url("assets/img/header_bofworld.png") no-repeat top center;
	background-size: cover;
}

#bofworld-bantop::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--bof-header-bottom-fade-height);
	pointer-events: none;
	z-index: 5;
	background: linear-gradient(
		to bottom,
		rgba(26, 45, 74, 0) 0%,
		var(--bof-shell-bg) 100%
	);
}

.bofworld-site-logo {
	position: absolute;
	left: clamp(6px, 1.25vw, 16px);
	right: auto;
	top: clamp(8px, 1.5vw, 14px);
	transform: none;
	z-index: 15;
	display: block;
	line-height: 0;
	text-decoration: none;
}

.bofworld-site-logo:focus-visible {
	outline: 2px solid var(--bof-accent);
	outline-offset: 4px;
	border-radius: 4px;
}

.bofworld-site-logo__img {
	display: block;
	width: auto;
	height: auto;
	max-height: clamp(44px, 14vw, 150px);
	max-width: min(92vw, 488px);
	object-fit: contain;
}

.bofworld-site-logo__text {
	display: block;
	line-height: 1.25;
	font-size: clamp(0.95rem, 2.8vw, 1.25rem);
	font-weight: 600;
	color: var(--bof-text);
	max-width: min(92vw, 488px);
	text-shadow:
		0 0 1px rgba(0, 0, 0, 0.85),
		0 1px 3px rgba(0, 0, 0, 0.45);
}

.bofworld-primary-nav {
	position: relative;
	z-index: 20;
	width: 100%;
	box-sizing: border-box;
	padding: 0 12px;
	background: linear-gradient(180deg, rgba(8, 15, 30, 0.96) 0%, rgba(26, 45, 74, 0.72) 100%);
	border-bottom: 1px solid var(--bof-border-soft);
}

.bofworld-primary-nav__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 10px;
	padding: 10px 4px;
}

.bofworld-primary-nav__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bofworld-primary-nav .menu-item {
	position: relative;
	margin: 0;
}

.bofworld-primary-nav .menu-item > a {
	display: block;
	padding: 0.4em 0.65em;
	color: var(--bof-menu-link);
	text-decoration: none;
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 500;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.bofworld-primary-nav .menu-item > a:hover,
.bofworld-primary-nav .menu-item > a:focus-visible {
	background: var(--bof-menu-hover-bg);
	color: var(--bof-menu-link-hover);
	text-decoration: none;
}

.bofworld-primary-nav .sub-menu {
	display: none;
	position: absolute;
	left: 0;
	top: 100%;
	min-width: 210px;
	z-index: 120;
	margin: 2px 0 0;
	padding: 6px 0;
	list-style: none;
	background: rgba(14, 21, 37, 0.98);
	border: 1px solid var(--bof-border-soft);
	border-radius: 8px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.bofworld-primary-nav .sub-menu .sub-menu {
	left: 100%;
	top: 0;
	margin-left: 2px;
}

.bofworld-primary-nav .menu-item:hover > .sub-menu,
.bofworld-primary-nav .menu-item:focus-within > .sub-menu {
	display: block;
}

.bofworld-primary-nav .sub-menu a {
	display: block;
	padding: 0.45em 0.85em;
	color: var(--bof-menu-link);
	text-decoration: none;
	font-size: 0.9rem;
	border-radius: 4px;
}

.bofworld-primary-nav .sub-menu a:hover,
.bofworld-primary-nav .sub-menu a:focus-visible {
	background: var(--bof-menu-hover-bg);
	color: var(--bof-menu-link-hover);
}

#bofworld-page {
	position: relative;
	top: 0;
	left: 0;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: var(--bof-menu-gap);
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 32px 20px 24px;
	min-height: 400px;
	text-align: justify;
	font-size: 16px;
	border-radius: 0 0 var(--bof-content-radius) var(--bof-content-radius);
}

#bofworld-page a {
	color: var(--bof-accent);
	text-decoration-color: rgba(56, 189, 248, 0.45);
}

#bofworld-page a:hover {
	color: var(--bof-accent-hover);
}

#bofworld-page #primary {
	float: none;
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	margin: 0;
}

#bofworld-page .ast-article-single,
#bofworld-page .post,
#bofworld-page .page,
#bofworld-page .site-main > article {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 auto 16px;
	padding: 20px 24px 24px;
	border: none;
	border-radius: var(--bof-content-radius);
	box-shadow:
		0 2px 8px rgba(0, 0, 0, 0.35),
		0 12px 36px rgba(0, 0, 0, 0.42),
		0 24px 48px rgba(0, 0, 0, 0.28);
	background-image: var(--bof-content-fade), var(--bof-content-gradient);
	background-size: 100% 100%, 100% 100%;
	background-repeat: no-repeat;
	overflow: hidden;
	position: relative;
}

#bofworld-page .ast-article-single::before,
#bofworld-page .post::before,
#bofworld-page .page::before,
#bofworld-page .site-main > article::before,
#bofworld-page .ast-article-single::after,
#bofworld-page .post::after,
#bofworld-page .page::after,
#bofworld-page .site-main > article::after {
	display: none;
}

#bofworld-page .entry-content {
	font-size: 16px;
	line-height: 1.6;
	color: var(--bof-text-muted);
	text-shadow:
		0 0 1px rgba(0, 0, 0, 0.8),
		0 1px 3px rgba(0, 0, 0, 0.45);
	background: transparent !important;
}

#bofworld-page .entry-title,
#bofworld-page .page-title,
#bofworld-page h1,
#bofworld-page h2,
#bofworld-page h3 {
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--bof-text);
	text-shadow:
		0 0 1px rgba(0, 0, 0, 0.85),
		0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Bouton codé dans functions.php (pas un bloc WP) : ouvre le panneau #bofworld-menu sur mobile. */
#bofworld-menu-toggle {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 8px;
	margin: 0 0 8px;
	padding: 8px 18px;
	font: 600 15px/1 "Segoe UI", system-ui, sans-serif;
	color: var(--bof-text);
	background: var(--bof-shell-bg);
	border: 1px solid var(--bof-border-soft);
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

#bofworld-menu-toggle:hover,
#bofworld-menu-toggle:focus-visible {
	background: #243a5c;
	color: var(--bof-text);
	border-color: rgba(148, 163, 184, 0.45);
}

#bofworld-menu-toggle .bofworld-burger {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

#bofworld-menu-toggle .bofworld-burger__line {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
}

@media (min-width: 841px) {
	#bofworld-menu-toggle {
		display: none;
	}

	#bofworld-mobile-drawer {
		display: none !important;
	}

	.bofworld-discord--footer {
		display: none !important;
	}
}

/* Sans tiroir (filtre ou menu vide) : pas de bouton burger — la colonne menu reste dans le flux. */
@media (max-width: 840px) {
	#bofworld-container:not(.bofworld2-has-mobile-drawer) #bofworld-menu-toggle {
		display: none;
	}
}

/*
 * Tiroir mobile : menu principal + menu latéral de section (2ᵉ niveau).
 */
#bofworld-mobile-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
	visibility: hidden;
}

#bofworld-mobile-drawer.is-open {
	pointer-events: auto;
	visibility: visible;
}

body.bofworld-mobile-drawer-open {
	overflow: hidden;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__backdrop {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(8, 11, 20, 0.72);
	cursor: pointer;
}

#bofworld-mobile-drawer.is-open .bofworld-mobile-drawer__backdrop {
	animation: bofworld-backdrop-in 0.2s ease-out forwards;
}

@keyframes bofworld-backdrop-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__panel {
	position: relative;
	width: min(100%, 360px);
	max-width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, #121b2e 0%, var(--bof-shell-bg) 48%, #0f172a 100%);
	color: var(--bof-text);
	border-left: 1px solid var(--bof-border-soft);
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
	transform: translateX(100%);
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

#bofworld-mobile-drawer.is-open .bofworld-mobile-drawer__panel {
	transform: translateX(0);
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 10px 10px 6px;
	flex-shrink: 0;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--bof-border-soft);
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.65);
	color: var(--bof-text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__close:hover,
#bofworld-mobile-drawer .bofworld-mobile-drawer__close:focus-visible {
	background: var(--bof-menu-hover-bg);
	color: var(--bof-menu-link-hover);
	border-color: rgba(148, 163, 184, 0.4);
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__screen {
	padding: 0 0 24px;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__list {
	list-style: none;
	margin: 0;
	padding: 0 12px 16px;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__item {
	margin: 0;
	border-bottom: 1px solid var(--bof-border-soft);
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
	padding: 14px 8px;
	margin: 0;
	font: 600 16px/1.35 "Segoe UI", system-ui, sans-serif;
	color: var(--bof-text);
	text-align: left;
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: none;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__row--sub:hover,
#bofworld-mobile-drawer .bofworld-mobile-drawer__row--sub:focus-visible {
	background: var(--bof-menu-hover-bg);
}

#bofworld-mobile-drawer a.bofworld-mobile-drawer__row--link:hover,
#bofworld-mobile-drawer a.bofworld-mobile-drawer__row--link:focus-visible {
	background: var(--bof-menu-hover-bg);
	color: var(--bof-menu-link-hover);
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__chevron {
	flex-shrink: 0;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 0 7px 10px;
	border-color: transparent transparent transparent var(--bof-accent);
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__subbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px 12px;
	border-bottom: 1px solid var(--bof-border-soft);
	margin-bottom: 8px;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__back {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.45);
	color: var(--bof-accent);
	cursor: pointer;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__back:hover,
#bofworld-mobile-drawer .bofworld-mobile-drawer__back:focus-visible {
	background: var(--bof-menu-hover-bg);
	border-color: var(--bof-border-soft);
	color: var(--bof-accent-hover);
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__back-icon {
	display: block;
	width: 10px;
	height: 10px;
	border-left: 3px solid currentColor;
	border-bottom: 3px solid currentColor;
	transform: rotate(45deg);
	margin-left: 4px;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__subbar-title {
	font: 600 17px/1.3 "Segoe UI", system-ui, sans-serif;
	color: var(--bof-menu-title);
	flex: 1;
	min-width: 0;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__sub-inner {
	padding: 0 12px 16px;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__submenu {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: none;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__submenu li {
	margin: 0 0 4px;
	margin-left: 0;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__submenu a {
	display: block;
	padding: 12px 8px;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	font: 500 15px/1.4 "Segoe UI", system-ui, sans-serif;
	color: var(--bof-menu-link);
	text-align: left;
	text-decoration: none;
	border-radius: 8px;
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__submenu a:hover,
#bofworld-mobile-drawer .bofworld-mobile-drawer__submenu a:focus-visible {
	background: var(--bof-menu-hover-bg);
	color: var(--bof-menu-link-hover);
}

#bofworld-mobile-drawer .bofworld-mobile-drawer__submenu .sub-menu {
	margin-top: 4px;
	padding-left: 12px;
}

.admin-bar #bofworld-mobile-drawer {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar #bofworld-mobile-drawer {
		top: 46px;
	}
}

#bofworld-menu {
	position: relative;
	top: 0;
	flex: 0 0 var(--bof-menu-width);
	width: var(--bof-menu-width);
	max-width: var(--bof-menu-width);
	margin: 0;
	padding: 0;
	align-self: flex-start;
	display: block;
	visibility: visible;
}

#bofworld-menu .bofworld-menu-top-image {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 0 10px;
	padding: 0;
	line-height: 0;
	width: 100%;
	box-sizing: border-box;
}

#bofworld-menu .bofworld-menu-top-image__img {
	display: block;
	width: auto;
	max-width: 50%;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
}

/* Discord : colonne latérale (desktop) ; variante mobile sous le contenu (voir .bofworld-discord--footer). */
.bofworld-discord--footer {
	display: none;
}

#bofworld-menu .bofworld-discord--sidebar {
	margin: 0 0 10px;
	padding: 0;
	line-height: 0;
	text-align: center;
}

.bofworld-discord__link {
	display: inline-block;
	line-height: 0;
	border-radius: 6px;
}

.bofworld-discord__link:focus-visible {
	outline: 2px solid var(--bof-accent);
	outline-offset: 4px;
}

.bofworld-discord__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
}

#bofworld-menu nav,
#bofworld-menu .bofworld-menu-custom,
#bofworld-menu .menu {
	display: block;
}

/* Widgets (Custom Sidebars / widget Menu de navigation) — mêmes contraintes de largeur que le menu natif. */
#bofworld-menu .bofworld-sidebar-widgets .widget {
	margin: 0 0 10px;
}

#bofworld-menu .bofworld-sidebar-widgets .widget-title {
	font: 600 13px/1.3 "Segoe UI", system-ui, -apple-system, sans-serif;
	color: var(--bof-menu-title);
	margin: 0 0 6px;
}

#bofworld-menu .bofworld-sidebar-widgets .widget_nav_menu .widget-title {
	text-align: center;
	width: 100%;
}

#bofworld-menu .bofworld-sidebar-widgets .widget_nav_menu ul,
#bofworld-menu .bofworld-sidebar-widgets .widget_nav_menu ul.menu {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}

/* Liste verticale (menu WordPress : pages / sous-éléments en sous-niveau). */
#bofworld-menu .bofworld-menu-list,
#bofworld-menu .bofworld-menu-list.menu {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}

#bofworld-menu ul {
	list-style-type: none;
	width: 100%;
	max-width: 138px;
	margin: 0 0 10px;
	padding: 0;
}

#bofworld-menu li {
	font: 15px/1.35 "Segoe UI", system-ui, -apple-system, sans-serif;
	margin-left: 10px;
}

/* Classe CSS « menu-title » sur un lien du menu (Apparence → Menus → Options de l’écran). */
#bofworld-menu li.menu-title {
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(26, 45, 74, 0.98) 100%);
	border: 1px solid var(--bof-border-soft);
	border-radius: 4px;
	width: 130px;
	min-height: 20px;
	margin-bottom: 0;
	text-align: center;
	font: 600 13px/20px "Segoe UI", system-ui, -apple-system, sans-serif;
	color: var(--bof-menu-title);
}

#bofworld-menu li a {
	width: 130px;
	text-align: center;
	display: block;
	text-decoration: none;
	color: var(--bof-menu-link);
	font-size: 15px;
	font-weight: 500;
	border-radius: 8px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

#bofworld-menu li a:hover {
	background: var(--bof-menu-hover-bg);
	color: var(--bof-menu-link-hover);
	text-decoration: none;
}

#bofworld-menu .sub-menu {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	list-style: none;
	margin: 0.25em 0 0.5em 0.35em;
	padding: 0;
}

#bofworld-menu .sub-menu a {
	width: auto;
	min-width: 120px;
	max-width: 100%;
	text-align: left;
	font-size: 14px;
}

#bofworld-menu .sub-menu .sub-menu {
	margin-left: 0.5em;
}

/* Pied de page (footer_bofworld.png). */
#bofworld-footer {
	width: 100%;
}

#bofworld-container > #bofworld-footer {
	display: block;
	margin: 0;
	padding: 0;
	line-height: 0;
	width: 100%;
	clear: both;
}

#bofworld-footer .bofworld-footer__inner {
	position: relative;
	margin: 0;
	padding: 0;
	width: 100%;
}

/*
 * Lien visuel shell → footer : voile intermédiaire (ni trop doux ni trop sombre sur l’image).
 */
#bofworld-footer .bofworld-footer__inner::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: var(--bof-footer-fade-height);
	pointer-events: none;
	z-index: 1;
	background: linear-gradient(
		to bottom,
		rgba(26, 45, 74, 0.52) 0%,
		rgba(26, 45, 74, 0.26) 44%,
		rgba(26, 45, 74, 0.08) 72%,
		rgba(26, 45, 74, 0) 100%
	);
}

#bofworld-footer .bofworld-footer__img {
	display: block;
	position: relative;
	z-index: 0;
	margin: 0;
	padding: 0;
	border: 0;
	width: 100%;
	max-width: none;
	height: auto;
}

/*
 * Copyright Astra : bas à gauche ; fond = même couleur que #bofworld-container (--bof-shell-bg).
 * dragon_copyright.png de part et d’autre (droite = inversé en CSS).
 */
#bofworld-footer .bofworld-footer__copyright {
	margin: 0;
	padding: 0.45em 0.85em 0.5em;
	text-align: left;
	line-height: 1.35;
	font-size: clamp(12px, 1.5vw, 14px);
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--bof-text);
	background-color: var(--bof-shell-bg);
	border: 1px solid var(--bof-border-soft);
	border-radius: 8px;
	box-shadow: 0 4px 18px rgba(8, 11, 20, 0.35);
	text-shadow: none;
}

#bofworld-footer .bofworld-footer__inner > .bofworld-footer__copyright {
	position: absolute;
	left: clamp(10px, 2.5vw, 28px);
	right: auto;
	bottom: clamp(8px, 2vw, 22px);
	top: auto;
	transform: none;
	width: auto;
	max-width: min(94%, 34rem);
	z-index: 2;
}

#bofworld-footer .bofworld-footer__copyright-wrap {
	position: absolute;
	left: clamp(10px, 2.5vw, 28px);
	right: auto;
	bottom: clamp(8px, 2vw, 22px);
	top: auto;
	transform: none;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: clamp(6px, 1.2vw, 12px);
	z-index: 2;
	max-width: min(96%, 52rem);
}

#bofworld-footer .bofworld-footer__copyright-wrap .bofworld-footer__copyright {
	position: relative;
	flex: 0 1 auto;
	max-width: min(100%, 34rem);
}

#bofworld-footer .bofworld-footer__copyright-flank {
	display: block;
	height: clamp(26px, 5vw, 44px);
	width: auto;
	max-width: clamp(72px, 14vw, 138px);
	flex-shrink: 0;
	object-fit: contain;
}

#bofworld-footer .bofworld-footer__copyright-flank--mirror {
	transform: scaleX(-1);
}

#bofworld-footer .bofworld-footer__copyright p {
	margin: 0;
}

#bofworld-footer .bofworld-footer__copyright a {
	color: var(--bof-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

#bofworld-footer .bofworld-footer__copyright a:hover {
	color: var(--bof-accent-hover);
}

.ast-separate-container #secondary {
	display: none;
}

@media (max-width: 840px) {
	:root {
		--bof-header-bottom-fade-height: 56px;
	}

	#content .ast-container {
		max-width: 100%;
		padding: 0;
	}

	#bofworld-container {
		margin-top: var(--bof-viewport-shell-gap-mobile);
		margin-bottom: var(--bof-viewport-shell-gap-mobile);
	}

	/* Menu burger unifié : pas de barre horizontale ni de colonne latérale en flux. */
	#bofworld-container.bofworld2-has-mobile-drawer .bofworld-primary-nav {
		display: none;
	}

	#bofworld-container.bofworld2-has-mobile-drawer #bofworld-menu {
		display: none !important;
	}

	#bofworld-container,
	#bofworld-footer {
		width: 100%;
		max-width: 100%;
	}

	.bofworld-discord--sidebar {
		display: none !important;
	}

	.bofworld-discord--footer {
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 0;
		padding: 0.85rem 10px 1rem;
		box-sizing: border-box;
		border-top: 1px solid var(--bof-border-soft);
		background-color: var(--bof-shell-bg);
	}

	.bofworld-discord--footer .bofworld-discord__img {
		max-width: min(120px, 42vw);
	}

	/* Copyright au-dessus de l’image, pleine largeur du shell (plus de superposition). */
	#bofworld-container > #bofworld-footer {
		line-height: normal;
	}

	#bofworld-footer .bofworld-footer__inner {
		display: flex;
		flex-direction: column;
	}

	#bofworld-footer .bofworld-footer__inner::after {
		display: none;
	}

	#bofworld-footer .bofworld-footer__img {
		order: 2;
	}

	#bofworld-footer .bofworld-footer__inner > .bofworld-footer__copyright {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		bottom: auto;
		order: 1;
		width: 100%;
		max-width: none;
		box-sizing: border-box;
		margin: 0;
		padding: 0.55em 10px;
		border-radius: 0;
		border-width: 1px 0 0;
		box-shadow: none;
	}

	#bofworld-footer .bofworld-footer__copyright-wrap {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		bottom: auto;
		order: 1;
		width: 100%;
		max-width: none;
		box-sizing: border-box;
		margin: 0;
		padding: 0.55em 10px;
		align-self: stretch;
		justify-content: flex-start;
		gap: 8px;
		border-radius: 0;
		background-color: var(--bof-shell-bg);
		border: solid var(--bof-border-soft);
		border-width: 1px 0 0;
		box-shadow: none;
	}

	#bofworld-footer .bofworld-footer__copyright-wrap .bofworld-footer__copyright {
		min-width: 0;
		flex: 1 1 auto;
		max-width: none;
		padding: 0;
		border: none;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
	}

	#bofworld-bantop {
		width: 100%;
		margin: 0;
		height: 200px;
		background-size: cover;
	}

	.bofworld-site-logo {
		left: 6px;
		right: auto;
		top: 6px;
		transform: none;
	}

	#bofworld-page {
		left: 0;
		top: 0;
		flex-direction: column;
		width: 100%;
		padding: 0 10px;
		box-sizing: border-box;
		gap: 0;
	}

	/* Bandeau → Menu et Menu → contenu : même valeur (--bof-mobile-band-gap) */
	#bofworld-menu-toggle {
		margin-top: var(--bof-mobile-band-gap);
		margin-bottom: var(--bof-mobile-band-gap);
	}

	#bofworld-page #primary {
		margin-top: 0;
		padding-top: 0;
	}

	#bofworld-page .site-main {
		padding-top: 0;
	}

	#bofworld-menu {
		position: static;
		flex: none;
		align-self: stretch;
		width: calc(100% + 20px);
		max-width: none;
		margin-left: -10px;
		margin-right: -10px;
		padding: 10px 10px;
		box-sizing: border-box;
		background: rgba(14, 21, 37, 0.96);
		border-bottom: 1px solid var(--bof-border-soft);
	}

	#bofworld-menu .bofworld-menu-custom,
	#bofworld-menu .bofworld-menu-top-image {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	#bofworld-menu ul {
		max-width: none;
		width: 100%;
	}

	#bofworld-menu li {
		margin-left: 0;
	}

	#bofworld-menu li a {
		width: 100%;
		max-width: none;
		box-sizing: border-box;
	}

	#bofworld-menu li.menu-title {
		width: 100%;
		max-width: none;
	}

	#bofworld-page #primary,
	#bofworld-page .ast-article-single,
	#bofworld-page .post,
	#bofworld-page .page,
	#bofworld-page .site-main > article {
		width: 100%;
	}
}
