/* ==========================================================================
   Atelier Gaming — Menu latéral global
   Menu fixe à gauche sur ordinateur, tiroir sur mobile ; le contenu occupe
   toute la largeur restante. Tout est scopé sous body.ag-sidenav.
   Les couleurs reprennent les variables de la refonte v2 quand elle est
   active, avec des valeurs de repli sinon.
   ========================================================================== */

body.ag-sidenav {
	--sn-w: 272px;
	--sn-top: 0px;
	--sn-bg: rgba(9, 10, 20, 0.88);
	--sn-line: var(--ag-line, rgba(255, 255, 255, 0.09));
	--sn-text: var(--ag-text, #eef0f7);
	--sn-dim: var(--ag-text-dim, #a4a9bf);
	--sn-mute: var(--ag-text-mute, #6f7590);
	--sn-hover: var(--ag-surface-2, rgba(255, 255, 255, 0.08));
	--sn-grad: var(--ag-grad, linear-gradient(90deg, #ff5a36 0%, #ff9a3d 35%, #7c5cff 70%, #22d3ee 100%));
	--sn-ease: var(--ag-ease, cubic-bezier(0.2, 0.8, 0.2, 1));
}

body.ag-sidenav.admin-bar {
	--sn-top: 32px;
}

@media screen and (max-width: 782px) {
	body.ag-sidenav.admin-bar {
		--sn-top: 46px;
	}
}

/* L'ancienne navigation horizontale et la colonne de droite disparaissent */
body.ag-sidenav .primary-navigation-wrap,
body.ag-sidenav #secondary.sidebar {
	display: none !important;
}

/* --- Panneau latéral ---------------------------------------------------- */
body.ag-sidenav .ag-sn {
	position: fixed;
	top: var(--sn-top);
	bottom: 0;
	left: 0;
	z-index: 1100;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: var(--sn-w);
	padding: 18px 12px 24px;
	background: var(--sn-bg);
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
	border-right: 1px solid var(--sn-line);
	color: var(--sn-text);
	font-size: 15px;
}

/* Liseré lumineux de la refonte v2, à la verticale */
body.ag-sidenav .ag-sn::after {
	content: "";
	position: absolute;
	top: 0;
	right: -1px;
	bottom: 0;
	width: 2px;
	background: var(--sn-grad);
	background-size: 100% 200%;
	opacity: 0.75;
	pointer-events: none;
}

body.ag-sidenav .ag-sn-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 6px 14px;
}

body.ag-sidenav .ag-sn-logo {
	min-width: 0;
}

body.ag-sidenav .ag-sn-logo a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

body.ag-sidenav .ag-sn-logo img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 48px;
}

/* Logo vectoriel de la refonte v2 (taille en em) : réduit pour tenir dans le menu */
body.ag-sidenav .ag-sn-logo .ag-logo {
	font-size: 18px;
	white-space: nowrap;
}

body.ag-sidenav .ag-sn-sitename {
	color: var(--sn-text);
	font-size: 1.15rem;
	font-weight: 800;
}

body.ag-sidenav .ag-sn-close {
	display: none;
}

/* Bouton de recherche : ouvre la recherche instantanée (ag-search) */
body.ag-sidenav .ag-sn-search {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	padding: 10px 12px;
	width: 100%;
	border: 1px solid var(--sn-line);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--sn-dim);
	font: inherit;
	font-size: 0.92rem;
	text-align: left;
	cursor: pointer;
	transition: color 0.2s var(--sn-ease), border-color 0.2s var(--sn-ease), background 0.2s var(--sn-ease);
}

body.ag-sidenav .ag-sn-search span {
	flex: 1;
}

body.ag-sidenav .ag-sn-search kbd {
	padding: 1px 7px;
	border: 1px solid var(--sn-line);
	border-radius: 6px;
	color: var(--sn-mute);
	font: inherit;
	font-size: 0.78rem;
}

body.ag-sidenav .ag-sn-search:hover,
body.ag-sidenav .ag-sn-search:focus-visible {
	border-color: rgba(255, 255, 255, 0.22);
	background: var(--sn-hover);
	color: #fff;
}

/* --- Menu en accordéon -------------------------------------------------- */
body.ag-sidenav .ag-sn-nav {
	flex: 1;
	min-height: 0;
	margin: 0 -12px;
	padding: 0 12px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

body.ag-sidenav .ag-sn-menu,
body.ag-sidenav .ag-sn-menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.ag-sidenav .ag-sn-menu li {
	position: relative;
	margin: 0;
	padding: 0;
}

body.ag-sidenav .ag-sn-menu a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 40px 8px 12px;
	border-radius: 10px;
	color: var(--sn-dim);
	line-height: 1.3;
	text-decoration: none;
	transition: color 0.2s var(--sn-ease), background 0.2s var(--sn-ease);
}

/* Chevron ajouté par Tortuga dans les liens : remplacé par le bouton .ag-sn-toggle */
body.ag-sidenav .ag-sn-menu a .icon {
	display: none;
}

body.ag-sidenav .ag-sn-menu a:hover,
body.ag-sidenav .ag-sn-menu a:focus-visible {
	background: var(--sn-hover);
	color: #fff;
}

/* Premier niveau : les jeux, avec leur pastille de couleur */
body.ag-sidenav .ag-sn-menu > li {
	margin-bottom: 2px;
}

body.ag-sidenav .ag-sn-menu > li > a {
	color: var(--sn-text);
	font-size: 0.95rem;
	font-weight: 700;
}

body.ag-sidenav .ag-sn-menu > li > a::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--g, var(--sn-mute));
	box-shadow: 0 0 10px var(--g, transparent);
	opacity: 0.85;
}

body.ag-sidenav .ag-sn-menu > li.current-menu-item > a,
body.ag-sidenav .ag-sn-menu > li.current-menu-ancestor > a,
body.ag-sidenav .ag-sn-menu > li.current-menu-parent > a {
	background: var(--sn-hover);
	color: #fff;
	box-shadow: inset 3px 0 0 var(--g, #ff5a36);
}

/* Icônes de jeu (monogrammes) : remplacent la pastille de couleur */
body.ag-sidenav .ag-sn-menu > li > a:has(.ag-sn-ico)::before {
	display: none;
}

body.ag-sidenav .ag-sn-ico-wrap {
	display: contents;
}

body.ag-sidenav .ag-sn-ico {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 26px;
	height: 26px;
	border: 1px solid color-mix(in srgb, var(--g, #7c5cff) 55%, transparent);
	border-radius: 8px;
	background: color-mix(in srgb, var(--g, #7c5cff) 20%, rgba(9, 10, 20, 0.6));
	color: color-mix(in srgb, var(--g, #7c5cff) 45%, #fff);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1;
	overflow: hidden;
	transition: border-color 0.2s var(--sn-ease), background 0.2s var(--sn-ease);
}

body.ag-sidenav .ag-sn-ico[data-len="3"] {
	font-size: 8.5px;
	letter-spacing: 0;
}

body.ag-sidenav .ag-sn-ico-svg {
	--g: #a4a9bf;
}

body.ag-sidenav .ag-sn-ico.has-img {
	padding: 0;
	border: 0;
	background: none;
}

body.ag-sidenav .ag-sn-ico img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

body.ag-sidenav .ag-sn-menu a:hover .ag-sn-ico,
body.ag-sidenav .ag-sn-menu .current-menu-item > a .ag-sn-ico,
body.ag-sidenav .ag-sn-menu .current-menu-ancestor > a .ag-sn-ico {
	border-color: var(--g, #7c5cff);
	background: color-mix(in srgb, var(--g, #7c5cff) 32%, rgba(9, 10, 20, 0.6));
}

body.ag-sidenav .ag-sn-menu .sub-menu .ag-sn-ico {
	width: 22px;
	height: 22px;
	border-radius: 7px;
	font-size: 8px;
}

body.ag-sidenav .ag-sn-menu > li > a {
	padding-top: 6px;
	padding-bottom: 6px;
}

/* Sous-niveaux */
body.ag-sidenav .ag-sn-menu .sub-menu {
	display: none;
	margin: 2px 0 6px 17px;
	padding-left: 8px;
	border-left: 1px solid var(--sn-line);
}

body.ag-sidenav .ag-sn-menu li.is-open > .sub-menu {
	display: block;
}

body.ag-sidenav .ag-sn-menu .sub-menu a {
	padding-top: 6px;
	padding-bottom: 6px;
	font-size: 0.88rem;
}

body.ag-sidenav .ag-sn-menu .sub-menu .menu-item-has-children > a {
	color: var(--sn-text);
	font-weight: 600;
}

body.ag-sidenav .ag-sn-menu .sub-menu .current-menu-item > a {
	background: var(--sn-hover);
	color: #fff;
	box-shadow: inset 2px 0 0 var(--g, #ff5a36);
}

body.ag-sidenav .ag-sn-toggle {
	position: absolute;
	top: 3px;
	right: 4px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--sn-mute);
	cursor: pointer;
	transition: color 0.2s var(--sn-ease), background 0.2s var(--sn-ease);
}

body.ag-sidenav .ag-sn-menu .sub-menu .ag-sn-toggle {
	top: 1px;
}

body.ag-sidenav .ag-sn-toggle svg {
	transition: transform 0.25s var(--sn-ease);
}

body.ag-sidenav .ag-sn-toggle:hover,
body.ag-sidenav .ag-sn-toggle:focus-visible {
	background: var(--sn-hover);
	color: #fff;
}

body.ag-sidenav .ag-sn-menu li.is-open > .ag-sn-toggle svg {
	transform: rotate(90deg);
}

/* --- Ordinateur : menu fixe, contenu pleine largeur --------------------- */
@media only screen and (min-width: 60.001em) {
	body.ag-sidenav {
		padding-left: var(--sn-w);
	}

	/* Le logo et la recherche sont dans le menu : l'en-tête horizontal n'a plus lieu d'être */
	body.ag-sidenav .site-header {
		display: none !important;
	}

	html:has(body.ag-sidenav) {
		scroll-padding-top: 24px;
	}

	body.ag-sidenav .ag-sn-backdrop {
		display: none !important;
	}
}

body.ag-sidenav .container {
	max-width: none;
	padding-left: clamp(16px, 2.6vw, 48px);
	padding-right: clamp(16px, 2.6vw, 48px);
}

body.ag-sidenav.no-sidebar .content-area,
body.ag-sidenav .site-content .centered-content-area {
	max-width: none;
	width: 100%;
}

/* --- Listes d'articles : plus de colonnes, vignettes plus petites ------
   Avec le contenu en pleine largeur, 3 colonnes fixes donnaient des
   vignettes énormes. On remplit la largeur avec des cartes d'environ
   280 px : 6 à 7 par ligne sur grand écran, 1 sur mobile. */
body.ag-sidenav .ag-grid-page .wp-block-post-template,
body.ag-sidenav.post-layout-columns .post-wrapper {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 18px;
	margin-right: 0;
}

/* Le clearfix du thème deviendrait une cellule vide de la grille */
body.ag-sidenav.post-layout-columns .post-wrapper::before,
body.ag-sidenav.post-layout-columns .post-wrapper::after {
	display: none;
}

body.ag-sidenav.post-layout-columns .post-wrapper .post-column {
	width: auto;
	padding-right: 0;
}

body.ag-sidenav.post-layout-columns .post-column article.type-post {
	width: 100%;
	margin-bottom: 0;
}

body.ag-sidenav .ag-grid-page .wp-block-post-featured-image,
body.ag-sidenav.post-layout-columns .post-column .wp-post-image-link {
	aspect-ratio: 16 / 9;
}

body.ag-sidenav .ag-grid-page .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Pages rubriques : articles à gauche, guides et outils à droite ----
   Le découpage HTML est fait par ag-sidenav.php (.ag-hub-split). La
   colonne de droite reprend les blocs existants en version compacte. */
body.ag-sidenav .ag-hub-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(320px, 22vw, 400px);
	gap: 32px;
	align-items: start;
}

body.ag-sidenav .ag-hub-main > .ag-section-title:first-child {
	margin-top: 0 !important;
}

body.ag-sidenav .ag-hub-side-btn {
	display: none;
}

body.ag-sidenav .ag-hub-side-body {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

/* Les rangées de deux blocs s'empilent */
body.ag-sidenav .ag-hub-side .a2h-row,
body.ag-sidenav .ag-hub-side .hl-solo {
	display: flex !important;
	flex-direction: column;
	gap: 22px;
}

body.ag-sidenav .ag-hub-side .ag-home-block {
	margin: 0 !important;
	padding: 16px;
	border: 1px solid var(--sn-line);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.03);
}

body.ag-sidenav .ag-hub-side .ag-home-head {
	margin-bottom: 10px;
}

body.ag-sidenav .ag-hub-side .ag-section-title {
	margin: 2px 0 0 !important;
	font-size: 1.05rem !important;
}

body.ag-sidenav .ag-hub-side .ag-section-title::after {
	display: none;
}

body.ag-sidenav .ag-hub-side .ag-hub-eyebrow {
	margin: 0;
	font-size: 0.68rem;
}

/* Tuiles en liste compacte : icône, nom, description sur une ligne */
body.ag-sidenav .ag-hub-side .ag-tiles {
	display: flex !important;
	flex-direction: column;
	gap: 2px !important;
}

body.ag-sidenav .ag-hub-side .ag-tile {
	flex-direction: row !important;
	align-items: center !important;
	gap: 10px !important;
	padding: 7px 8px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: transparent !important;
	box-shadow: none !important;
	transform: none !important;
}

body.ag-sidenav .ag-hub-side .ag-tile::before,
body.ag-sidenav .ag-hub-side .ag-tile::after {
	display: none !important;
}

body.ag-sidenav .ag-hub-side .ag-tile:hover,
body.ag-sidenav .ag-hub-side .ag-tile:focus-visible {
	background: var(--sn-hover) !important;
}

body.ag-sidenav .ag-hub-side .ag-tile-ico {
	flex: none;
	width: 30px !important;
	height: 30px !important;
	border-radius: 9px !important;
}

body.ag-sidenav .ag-hub-side .ag-tile-ico svg {
	width: 16px;
	height: 16px;
}

body.ag-sidenav .ag-hub-side .ag-tile-body {
	min-width: 0;
}

body.ag-sidenav .ag-hub-side .ag-tile-name {
	font-size: 0.9rem !important;
	line-height: 1.25;
}

body.ag-sidenav .ag-hub-side .ag-tile-desc {
	display: block !important;
	overflow: hidden;
	font-size: 0.76rem !important;
	white-space: nowrap;
	text-overflow: ellipsis;
}

body.ag-sidenav .ag-hub-side .ag-tile-arrow {
	display: none !important;
}

/* Classes Aion 2 : grille de 2 en version réduite */
body.ag-sidenav .ag-hub-side .a2h-classes {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 8px !important;
}

body.ag-sidenav .ag-hub-side .a2h-class {
	padding: 10px 8px !important;
}

body.ag-sidenav .ag-hub-side .a2h-class img {
	max-width: 36px;
	height: auto;
}

/* Éléments Aniimo */
body.ag-sidenav .ag-hub-side .an-elements {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 8px !important;
}

/* Écran moyen ou petit : une colonne, guides repliables sous la bannière */
@media only screen and (max-width: 1300px) {
	body.ag-sidenav .ag-hub-split {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	body.ag-sidenav .ag-hub-side {
		order: -1;
	}

	body.ag-sidenav .ag-hub-side-btn {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 12px 16px;
		border: 1px solid var(--sn-line);
		border-radius: 14px;
		background: rgba(255, 255, 255, 0.04);
		color: var(--sn-text);
		font: inherit;
		font-weight: 700;
		cursor: pointer;
	}

	body.ag-sidenav .ag-hub-side-btn svg {
		transition: transform 0.25s var(--sn-ease);
	}

	body.ag-sidenav .ag-hub-side.is-open .ag-hub-side-btn svg {
		transform: rotate(180deg);
	}

	body.ag-sidenav .ag-hub-side-body {
		display: none;
		margin-top: 14px;
	}

	body.ag-sidenav .ag-hub-side.is-open .ag-hub-side-body {
		display: flex;
	}

	/* Repliés, les blocs ont la place de se remettre côte à côte */
	body.ag-sidenav .ag-hub-side .a2h-row {
		display: grid !important;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
		gap: 16px;
	}

	body.ag-sidenav .ag-hub-side .a2h-classes {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
	}
}

/* --- Lisibilité générale ---------------------------------------------- */

/* Filet de sécurité : aucun élément ne doit faire défiler la page en largeur */
body.ag-sidenav #page {
	overflow-x: clip;
}

/* Visuels à fond transparent (Pokémon) dans la une de l'accueil : affichés en entier au lieu d'être recadrés */
body.ag-sidenav .ag-hero-image img[src$=".png"],
body.ag-sidenav .ag-hero-image img[src$=".webp"] {
	height: 100% !important;
	object-fit: contain !important; /* le bloc image met object-fit: cover en style inline */
	background: radial-gradient(circle at 50% 45%, #1c2140, #0a0c18 75%);
}

/* L'image dépassait du cadre 16:9 de la une (cadre plus bas que l'image) */
body.ag-sidenav .ag-hero-image .wp-block-post-featured-image,
body.ag-sidenav .ag-hero-image .wp-block-post-featured-image a {
	display: block;
	height: 100%;
	margin: 0;
}

/* --- Mobile : lisibilité ------------------------------------------------- */
@media only screen and (max-width: 40em) {
	/* « Choisis ton jeu » : la rangée défilante débordait de quelques pixels */
	body.ag-sidenav .ag-games {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	/* Onglets de la carte Aion 2 : passent à la ligne au lieu de déborder */
	body.ag-sidenav .a2m-map-tabs {
		flex-wrap: wrap;
	}

	/* Étiquettes secondaires des outils : 12 px minimum */
	body.ag-sidenav .a2b-stat-effect,
	body.ag-sidenav .a2b-hint,
	body.ag-sidenav .a2b-arcana-role,
	body.ag-sidenav .a2b-disclaimer,
	body.ag-sidenav .a2m-credit,
	body.ag-sidenav .a2g-src,
	body.ag-sidenav .ant-card-stage,
	body.ag-sidenav .ant-member-role,
	body.ag-sidenav .ant-modal-stage,
	body.ag-sidenav .dqm-note,
	body.ag-sidenav .pgo-cp-boosted,
	body.ag-sidenav .pgo-event-badge {
		font-size: 12px !important;
	}

	/* Listes d'articles en format liste : vignette à gauche, titre à droite,
	   pour voir 5 à 6 articles par écran au lieu d'un seul */
	body.ag-sidenav .ag-grid-page .wp-block-post-template,
	body.ag-sidenav.post-layout-columns .post-wrapper {
		gap: 10px;
	}

	body.ag-sidenav .ag-grid-page .wp-block-post,
	body.ag-sidenav.post-layout-columns .post-column article.type-post {
		display: grid !important;
		grid-template-columns: 116px minmax(0, 1fr);
		grid-template-rows: auto auto 1fr;
		align-items: start;
		gap: 4px 12px;
		padding: 10px !important;
		border-radius: 14px !important;
	}

	body.ag-sidenav .ag-grid-page .wp-block-post-featured-image,
	body.ag-sidenav.post-layout-columns .post-column .wp-post-image-link {
		grid-row: 1 / span 3;
		grid-column: 1;
		width: 116px;
		margin: 0 !important;
		aspect-ratio: 4 / 3;
		border-radius: 10px;
	}

	body.ag-sidenav .ag-grid-page .wp-block-post > :not(.wp-block-post-featured-image) {
		grid-column: 2;
		margin: 0 !important;
	}

	body.ag-sidenav .ag-grid-page .wp-block-post-title,
	body.ag-sidenav.post-layout-columns .post-column .entry-title {
		font-size: 0.95rem !important;
		line-height: 1.3 !important;
	}

	body.ag-sidenav .ag-grid-page .tortuga-cat-badge a {
		padding: 2px 7px !important;
		font-size: 0.62rem !important;
	}

	body.ag-sidenav .ag-grid-page .wp-block-post-excerpt,
	body.ag-sidenav.post-layout-columns .post-column .entry-excerpt,
	body.ag-sidenav.post-layout-columns .post-column .read-more,
	body.ag-sidenav.post-layout-columns .post-column .meta-author {
		display: none !important;
	}

	body.ag-sidenav.post-layout-columns .post-column .entry-header {
		display: flex;
		flex-direction: column;
		gap: 4px;
		grid-column: 2;
		grid-row: 1 / span 3;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Le badge de catégorie était posé en absolu au-dessus du titre : on le remet dans le flux */
	body.ag-sidenav.post-layout-columns .post-column .entry-meta {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 4px 8px;
		margin: 0;
		font-size: 0.75rem;
	}

	body.ag-sidenav.post-layout-columns .post-column .meta-category {
		position: static !important;
		order: -1;
		width: 100%;
	}

	body.ag-sidenav.post-layout-columns .post-column .entry-title {
		order: 1;
		margin: 0 !important;
	}

	body.ag-sidenav.post-layout-columns .post-column .entry-meta {
		order: 0;
	}
}

/* --- Annonces automatiques AdSense --------------------------------------
   Google insère ses annonces (div.google-auto-placed / ins.adsbygoogle) entre
   les éléments du contenu. Dans les grilles de la mise en page, elles
   occuperaient une seule case : on leur donne toute la largeur. */
body.ag-sidenav .wp-block-post-template > .google-auto-placed,
body.ag-sidenav .wp-block-post-template > ins.adsbygoogle,
body.ag-sidenav .post-wrapper > .google-auto-placed,
body.ag-sidenav .post-wrapper > ins.adsbygoogle,
body.ag-sidenav .ag-hub-split > .google-auto-placed,
body.ag-sidenav .ag-hub-split > ins.adsbygoogle,
body.ag-sidenav .ag-tiles > .google-auto-placed,
body.ag-sidenav .a2h-classes > .google-auto-placed {
	grid-column: 1 / -1;
	width: 100% !important;
	min-width: 0;
}

body.ag-sidenav .ag-hub-side .google-auto-placed,
body.ag-sidenav .ag-hub-main .google-auto-placed {
	width: 100% !important;
	max-width: 100%;
	overflow: hidden;
}

/* --- Mobile et tablette : tiroir ---------------------------------------- */
@media only screen and (max-width: 60em) {
	body.ag-sidenav .ag-sn {
		width: min(86vw, 320px);
		transform: translateX(-102%);
		visibility: hidden;
		transition: transform 0.3s var(--sn-ease), visibility 0s linear 0.3s;
		background: rgba(9, 10, 20, 0.97);
		box-shadow: none;
	}

	html.ag-sn-open body.ag-sidenav .ag-sn {
		transform: none;
		visibility: visible;
		transition: transform 0.3s var(--sn-ease), visibility 0s;
		box-shadow: 20px 0 60px rgba(0, 0, 0, 0.55);
	}

	html.ag-sn-open {
		overflow: hidden;
	}

	body.ag-sidenav .ag-sn-close {
		display: grid;
		place-items: center;
		width: 40px;
		height: 40px;
		padding: 0;
		border: 0;
		border-radius: 10px;
		background: transparent;
		color: var(--sn-dim);
		cursor: pointer;
	}

	body.ag-sidenav .ag-sn-close:hover,
	body.ag-sidenav .ag-sn-close:focus-visible {
		background: var(--sn-hover);
		color: #fff;
	}

	body.ag-sidenav .ag-sn-backdrop {
		position: fixed;
		inset: 0;
		z-index: 1099;
		background: rgba(3, 4, 10, 0.6);
	}

	body.ag-sidenav .ag-sn-menu a {
		padding-top: 10px;
		padding-bottom: 10px;
	}

	body.ag-sidenav .ag-sn-toggle {
		top: 4px;
		width: 34px;
		height: 34px;
	}

	/* Bouton « Menu » ajouté dans l'en-tête */
	body.ag-sidenav .header-main {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	body.ag-sidenav .ag-sn-burger {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		order: -1;
		flex: none;
		padding: 9px 12px;
		border: 1px solid var(--sn-line);
		border-radius: 12px;
		background: rgba(255, 255, 255, 0.05);
		color: var(--sn-text);
		font: inherit;
		font-size: 0.9rem;
		font-weight: 600;
		cursor: pointer;
	}

	body.ag-sidenav .ag-sn-burger:hover,
	body.ag-sidenav .ag-sn-burger:focus-visible {
		background: var(--sn-hover);
	}

	/* En-tête mobile en une ligne : Menu · logo · loupe, sans chevauchement */
	body.ag-sidenav .header-main .site-branding {
		flex: 1;
		min-width: 0;
		margin: 0;
	}

	body.ag-sidenav .site-header .ags-btn {
		position: static;
		flex: none;
		margin-left: auto;
		transform: none;
	}
}

@media only screen and (max-width: 30em) {
	body.ag-sidenav .ag-sn-burger {
		padding: 9px;
	}

	body.ag-sidenav .ag-sn-burger span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	body.ag-sidenav .site-branding .ag-logo {
		font-size: 18px !important;
	}
}

@media only screen and (min-width: 60.001em) {
	body.ag-sidenav .ag-sn-burger {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.ag-sidenav .ag-sn,
	body.ag-sidenav .ag-sn-toggle svg {
		transition: none !important;
	}
}

/* Annonces automatiques : Google laisse parfois un emplacement vide
   (data-ad-status="unfilled") ou en glisse un à l'intérieur d'une carte
   d'article, ce qui crée un grand trou étiqueté « Publicité ». */
ins.adsbygoogle[data-ad-status="unfilled"],
.google-auto-placed:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none !important;
}
body.ag-sidenav:not(.single) .ag-hub-main article .google-auto-placed,
body.ag-sidenav article article .google-auto-placed,
body.ag-sidenav .ag-tile .google-auto-placed,
body.ag-sidenav .wp-block-post .google-auto-placed {
	display: none !important;
}
