/* Atelier Gaming — lisibilité des articles (chargé uniquement sur les articles) */

/* Largeur de lecture : ~70 caractères par ligne, panneau centré */
body.ag-v2.single-post .site-main > article.type-post {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

body.single-post .site-main > article .entry-content {
	font-size: 18px;
	line-height: 1.75;
	color: #2a2c38;
	overflow-wrap: break-word;
	hyphens: auto;
}

body.single-post .site-main > article .entry-content > p,
body.single-post .site-main > article .entry-content > ul,
body.single-post .site-main > article .entry-content > ol {
	margin: 0 0 1.15em;
}

body.single-post .site-main > article .entry-content li {
	margin-bottom: 0.45em;
	line-height: 1.65;
}

body.single-post .site-main > article .entry-content li::marker {
	color: var(--ag-violet, #7c5cff);
	font-weight: 700;
}

body.single-post .site-main > article .entry-content h2 {
	font-size: clamp(1.35rem, 2vw, 1.65rem);
	line-height: 1.3;
	margin: 2.2em 0 0.7em;
	color: #10111a;
	scroll-margin-top: 110px;
}

body.single-post .site-main > article .entry-content h3 {
	font-size: clamp(1.12rem, 1.6vw, 1.28rem);
	line-height: 1.35;
	margin: 1.7em 0 0.55em;
	color: #10111a;
	scroll-margin-top: 110px;
}

body.single-post .site-main > article .entry-content a:not(.ag-related-card):not(.ag-related-more) {
	color: #5b3fe0;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(91, 63, 224, 0.35);
}

body.single-post .site-main > article .entry-content a:not(.ag-related-card):not(.ag-related-more):hover {
	text-decoration-color: currentColor;
}

body.single-post .site-main > article .entry-content strong {
	color: #10111a;
}

/* Temps de lecture */
body.single-post .entry-content .ag-readtime {
	display: inline-block;
	margin: 0 0 1.4em;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f0f1f7;
	color: #5a5e72;
	font-size: 14px;
	line-height: 1.4;
}

/* Sommaire */
body.single-post .entry-content .ag-toc {
	margin: 1.6em 0 2em;
	border: 1px solid #e3e5ef;
	border-left: 4px solid var(--ag-violet, #7c5cff);
	border-radius: 12px;
	background: #f6f7fb;
	font-size: 16px;
}

body.single-post .entry-content .ag-toc summary {
	cursor: pointer;
	padding: 12px 18px;
	font-weight: 800;
	color: #10111a;
	letter-spacing: 0.01em;
	list-style: none;
}

body.single-post .entry-content .ag-toc summary::-webkit-details-marker { display: none; }

body.single-post .entry-content .ag-toc summary::after {
	content: "▾";
	float: right;
	color: #8a8ea3;
	transition: transform 0.2s;
}

body.single-post .entry-content .ag-toc details:not([open]) summary::after { transform: rotate(-90deg); }

body.single-post .entry-content .ag-toc ol {
	margin: 0;
	padding: 0 18px 14px 40px;
}

body.single-post .entry-content .ag-toc li {
	margin: 0.25em 0;
	line-height: 1.45;
}

body.single-post .entry-content .ag-toc a {
	color: #2a2c38 !important;
	text-decoration: none !important;
}

body.single-post .entry-content .ag-toc a:hover {
	color: #5b3fe0 !important;
	text-decoration: underline !important;
}

/* Encadrés automatiques */
body.single-post .entry-content p.ag-callout {
	padding: 14px 18px;
	border-radius: 12px;
	border-left: 4px solid;
	font-size: 16.5px;
	line-height: 1.65;
}

body.single-post .entry-content .ag-callout--warn { background: #fff6e8; border-color: #f59e0b; }
body.single-post .entry-content .ag-callout--info { background: #eef4ff; border-color: #3b82f6; }
body.single-post .entry-content .ag-callout--tip  { background: #effaf3; border-color: #22a55a; }

/* Images et légendes */
body.single-post .entry-content figure.wp-block-image,
body.single-post .entry-content figure {
	margin: 1.8em 0;
}

body.single-post .entry-content figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(16, 17, 26, 0.16);
}

body.single-post .entry-content figcaption {
	margin-top: 0.6em;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: #6b6f82;
}

/* Tableaux */
body.single-post .entry-content .ag-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.6em 0;
	border: 1px solid #e3e5ef;
	border-radius: 12px;
}

body.single-post .entry-content .ag-table-wrap table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 15.5px;
	line-height: 1.5;
	border: 0;
}

body.single-post .entry-content .ag-table-wrap th {
	background: #10111a;
	color: #fff;
	font-weight: 700;
	text-align: left;
	white-space: nowrap;
}

body.single-post .entry-content .ag-table-wrap th,
body.single-post .entry-content .ag-table-wrap td {
	padding: 10px 14px;
	border: 0;
	border-bottom: 1px solid #e9ebf2;
	vertical-align: top;
}

body.single-post .entry-content .ag-table-wrap tbody tr:nth-child(even) td { background: #f7f8fb; }
body.single-post .entry-content .ag-table-wrap tbody tr:last-child td { border-bottom: 0; }
body.single-post .entry-content .ag-table-wrap th a { color: #fff !important; }

body.single-post .entry-content figure.wp-block-table { margin: 1.6em 0; }
body.single-post .entry-content figure.wp-block-table .ag-table-wrap { margin: 0; }

/* Citations */
body.single-post .entry-content blockquote {
	margin: 1.6em 0;
	padding: 12px 20px;
	font-style: italic;
}

/* Barre de progression de lecture */
.ag-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 100000;
	pointer-events: none;
}

.ag-progress span {
	display: block;
	height: 100%;
	background: var(--ag-grad, linear-gradient(90deg, #ff5a36, #7c5cff));
	transform: scaleX(0);
	transform-origin: 0 50%;
}

@media (prefers-reduced-motion: reduce) {
	.ag-progress { display: none; }
}

/* Mobile */
@media (max-width: 700px) {
	body.single-post .site-main > article .entry-content {
		font-size: 17px;
		line-height: 1.7;
		hyphens: auto;
	}
	body.single-post .entry-content .ag-table-wrap table { font-size: 14.5px; }
	body.single-post .entry-content .ag-table-wrap th,
	body.single-post .entry-content .ag-table-wrap td { padding: 8px 10px; }
	body.single-post .entry-content p.ag-callout { padding: 12px 14px; font-size: 16px; }
}
