/* =====================================================================
 * Article — tronc commun aux 3 familles (standard / histoire / technique).
 * Reproduit article_collection.html / "article restauration.html" (CSS
 * quasi identiques dans les maquettes elles-mêmes). Chargé sur tout
 * is_singular('post'). article-histoire.css et article-technique.css ne
 * redéfinissent ensuite que les accents visuels propres à leur famille.
 * ===================================================================== */

/* ---------- Barre de progression de lecture (partagée, orange par défaut) ---------- */
.reading-progress {
	position: fixed;
	top: var(--nav-h);
	left: 0; right: 0;
	height: 3px;
	background: transparent;
	z-index: 99;
}
.reading-progress-bar { display: block; height: 100%; width: 0%; background: var(--orange); transition: width .1s linear; }

/* ---------- Hero (photo sombre pleine largeur) ---------- */
.article-hero {
	position: relative;
	/* Même trick que .hero (front-page.css) : annule le padding-top: var(--nav-h)
	   global du body pour que le fond sombre remonte sous la nav fixe. */
	margin-top: calc(-1 * var(--nav-h));
	min-height: 60vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	color: var(--blanc);
}
.article-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(135deg, #1e1008 0%, #3d2005 60%, #0a0a08 100%);
}
.article-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(to top, rgba(10,10,8,.98) 0%, rgba(10,10,8,.55) 40%, rgba(10,10,8,.15) 100%),
		linear-gradient(to right, rgba(10,10,8,.5) 0%, transparent 70%);
}
.article-hero .container { position: relative; z-index: 2; max-width: 900px; padding-top: calc(var(--nav-h) + 56px); padding-bottom: 56px; }
.article-hero h1 { margin: 0 0 20px; max-width: 900px; color: var(--blanc); line-height: .95; }

.article-hero .breadcrumb {
	display: flex; align-items: center; gap: 8px;
	font-size: 12px; color: rgba(255,255,255,.35);
	margin-bottom: 20px;
}
.article-hero .breadcrumb a { color: rgba(255,255,255,.55); transition: color .2s; }
.article-hero .breadcrumb a:hover { color: var(--orange); }

.article-tag {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--orange); color: var(--blanc);
	font-size: 11px; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
	padding: 5px 14px; border-radius: 4px;
	margin-bottom: 18px;
}
.article-tag svg { width: 12px; }

.article-hero-excerpt {
	font-size: 15px; font-weight: 300;
	color: rgba(255,255,255,.6);
	line-height: 1.65; max-width: 560px;
	margin-bottom: 28px;
}

.article-meta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.meta-author { display: flex; align-items: center; gap: 10px; }
.meta-avatar {
	width: 36px; height: 36px; border-radius: 50%;
	background: var(--orange);
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-display); font-size: 14px; font-weight: 800;
	color: var(--blanc); flex-shrink: 0;
}
.meta-author-name { font-size: 13px; font-weight: 500; color: var(--blanc); }
.meta-author-role { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 1px; }
.meta-sep { width: 1px; height: 28px; background: rgba(255,255,255,.15); }
.meta-info { font-size: 12px; color: rgba(255,255,255,.4); line-height: 1.6; }
.meta-info strong { color: rgba(255,255,255,.7); font-weight: 500; }

.meta-share { margin-left: auto; display: flex; gap: 8px; }
.share-btn {
	width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid rgba(255,255,255,.18);
	display: flex; align-items: center; justify-content: center;
	color: rgba(255,255,255,.5);
	transition: border-color .2s, color .2s, background .2s;
}
.share-btn:hover, .share-btn.is-copied { border-color: var(--orange); color: var(--orange); background: rgba(232,104,26,.08); }
.share-btn svg { width: 15px; }

/* ---------- Layout article (corps + sidebar) ---------- */
.article-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 64px;
	align-items: start;
	padding: 64px 0 80px;
}
@media (max-width: 960px) {
	.article-layout { grid-template-columns: 1fr; }
}

/* ---------- Corps de l'article ---------- */
.article-content { max-width: 680px; }

.article-cover {
	border-radius: 6px; overflow: hidden;
	margin-bottom: 48px;
	position: relative;
}
.article-cover img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.article-cover figcaption {
	font-size: 11px; color: var(--gris-mid);
	font-style: italic; text-align: center; margin-top: 10px;
}

.article-body { font-size: 15px; line-height: 1.85; color: #2a2a28; }
.article-body > *:first-child { margin-top: 0; }

/* Chapeau (premier paragraphe en intro, si l'auteur utilise cette classe) */
.article-body .article-intro,
.article-body > p:first-of-type.has-drop-cap {
	font-size: 18px; font-weight: 300;
	color: var(--gris-mid); line-height: 1.75;
	border-left: 3px solid var(--orange);
	padding-left: 20px;
	margin-bottom: 36px;
}

.article-body p { margin-bottom: 22px; }
.article-body h2 {
	font-family: var(--font-display);
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -.005em;
	color: var(--noir);
	margin: 48px 0 18px;
	line-height: 1;
	display: flex; align-items: center; gap: 12px;
	scroll-margin-top: calc(var(--nav-h) + 20px);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h2::before {
	content: '';
	display: block;
	width: 4px; height: 28px;
	background: var(--orange);
	border-radius: 2px;
	flex-shrink: 0;
}
.article-body h3 { font-size: 17px; font-weight: 600; text-transform: none; color: var(--noir); margin: 28px 0 12px; line-height: 1.35; }

.article-body img { border-radius: 4px; margin: 32px 0 10px; }
.article-body figure { margin: 32px 0 10px; }
.article-body figcaption {
	font-size: 12px; color: var(--gris-light);
	font-style: italic; margin-bottom: 28px; margin-top: 10px;
	text-align: center;
}

.article-body ul, .article-body ol { margin: 0 0 22px; list-style: none; }
.article-body li { font-size: 15px; line-height: 1.75; color: #2a2a28; margin-bottom: 10px; padding-left: 24px; position: relative; }
.article-body ul li::before {
	content: '';
	position: absolute; left: 0; top: 10px;
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--orange);
}
.article-body ol { counter-reset: to-list; }
.article-body ol li { counter-increment: to-list; }
.article-body ol li::before {
	content: counter(to-list);
	position: absolute; left: 0; top: 0;
	font-family: var(--font-display);
	font-size: 18px; font-weight: 800;
	color: var(--orange);
}

/* Citation mise en avant */
.article-body blockquote,
.callout--quote {
	margin: 36px 0;
	padding: 28px 32px;
	background: var(--creme);
	border-radius: 4px;
	border-left: none;
	position: relative;
	font-style: normal;
}
.article-body blockquote::before,
.callout--quote::before {
	content: '"';
	font-family: Georgia, serif;
	font-size: 80px;
	color: var(--orange);
	opacity: .25;
	line-height: 1;
	position: absolute;
	top: 8px; left: 20px;
}
.article-body blockquote p, .callout--quote p {
	font-size: 18px; font-weight: 400;
	font-style: italic; color: var(--noir);
	line-height: 1.6; margin: 0;
	padding-left: 32px;
}
.article-body blockquote cite, .callout--quote cite {
	display: block;
	font-size: 12px; font-weight: 600;
	letter-spacing: .06em; text-transform: uppercase;
	color: var(--orange); margin-top: 12px;
	padding-left: 32px; font-style: normal;
}

/* Astuce (verte) */
.callout--info, .article-tip {
	display: flex; gap: 16px;
	background: var(--vert-bg); border-radius: 4px;
	padding: 20px 24px; margin: 28px 0;
	border-left: 4px solid var(--vert-badge);
}
.article-tip-icon { font-size: 22px; flex-shrink: 0; }
.callout--info p, .article-tip-text { font-size: 14px; color: #1e3d0a; line-height: 1.65; margin: 0; }
.callout--info strong, .article-tip-text strong { font-weight: 600; display: block; margin-bottom: 4px; }

/* Avertissement (orange sur fond jaune pâle) */
.article-body .callout--warning, .article-warning {
	display: flex; gap: 16px;
	background: var(--jaune-bg); border-radius: 4px;
	padding: 20px 24px; margin: 28px 0;
	border-left: 4px solid var(--orange);
}
.article-warning-icon { font-size: 22px; flex-shrink: 0; }
.article-body .callout--warning p, .article-warning-text { font-size: 14px; color: #633806; line-height: 1.65; margin: 0; }
.article-body .callout--warning strong, .article-warning-text strong { font-weight: 600; display: block; margin-bottom: 4px; }

/* Danger (rouge, family "standard" l'utilise rarement mais reste disponible) */
.article-body .callout--danger {
	display: flex; gap: 16px;
	background: var(--rouge-bg); border-radius: 4px;
	padding: 20px 24px; margin: 28px 0;
	border-left: 4px solid var(--rouge-badge);
}
.article-body .callout--danger p { font-size: 14px; color: var(--rouge-badge); line-height: 1.65; margin: 0; }
.article-body .callout--danger strong { font-weight: 700; display: block; margin-bottom: 4px; }

/* Tableau */
.article-body table, .article-table {
	width: 100%; border-collapse: collapse;
	font-size: 14px; margin: 28px 0;
}
.article-body table th, .article-table th {
	background: var(--noir); color: var(--blanc);
	font-family: var(--font-display); font-size: 13px;
	font-weight: 700; text-transform: uppercase;
	letter-spacing: .04em;
	padding: 12px 16px; text-align: left;
	border: none;
}
.article-body table th:first-child, .article-table th:first-child { border-radius: 4px 0 0 0; }
.article-body table th:last-child, .article-table th:last-child { border-radius: 0 4px 0 0; }
.article-body table td, .article-table td { padding: 11px 16px; color: #2a2a28; border: none; border-bottom: 1px solid rgba(0,0,0,.07); }
.article-body table tr:nth-child(even) td, .article-table tr:nth-child(even) td { background: var(--creme); }
.article-body table td:first-child, .article-table td:first-child { font-weight: 600; color: var(--noir); }

/* Séparateur de section */
.article-divider { width: 48px; height: 3px; background: var(--orange); border-radius: 2px; margin: 40px 0; }

/* Frise chronologique inline (variante enrichie point/année/titre/texte) */
.inline-timeline { margin: 36px 0; border-left: 2px solid rgba(0,0,0,.1); padding-left: 28px; display: flex; flex-direction: column; }
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -35px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid var(--blanc); box-shadow: 0 0 0 2px var(--orange); }
.tl-year { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--orange); line-height: 1; margin-bottom: 4px; }
.tl-title { font-size: 14px; font-weight: 600; color: var(--noir); margin-bottom: 4px; }
.tl-desc { font-size: 13px; color: var(--gris-mid); line-height: 1.6; }

/* Tags de fin d'article */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 24px; padding-top: 28px; border-top: 1px solid rgba(0,0,0,.08); }
.article-tags .pill {
	font-size: 12px; font-weight: 500;
	padding: 5px 12px; border-radius: 40px;
	background: var(--creme);
	border: 1px solid rgba(0,0,0,.1);
	color: var(--gris-mid);
	transition: border-color .2s, color .2s;
}
.article-tags .pill:hover { border-color: var(--orange); color: var(--orange); background: var(--creme); }

/* Navigation précédent / suivant */
.article-nav-prevnext {
	display: grid; grid-template-columns: 1fr 1fr;
	gap: 16px; margin-top: 48px;
	border-top: none; padding-top: 0;
	font-family: inherit; font-weight: normal; text-transform: none; font-size: inherit;
}
.article-nav-prev, .article-nav-next {
	padding: 20px;
	background: var(--creme);
	border: 1px solid rgba(0,0,0,.08);
	border-radius: 4px;
	transition: border-color .2s, transform .2s var(--ease);
	font-family: var(--font-display);
	font-weight: 600; text-transform: none; font-size: 14px;
	color: var(--noir); line-height: 1.35;
}
.article-nav-prev:hover, .article-nav-next:hover { border-color: var(--orange); transform: translateY(-2px); color: var(--noir); }
.article-nav-next { text-align: right; margin-left: 0; }
.article-nav-prev a, .article-nav-next a { display: block; color: inherit; }

/* ---------- Sidebar ---------- */
.article-aside { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 24px; }

.article-toc { background: var(--creme); border-radius: 4px; padding: 20px 22px; border-left: 3px solid var(--orange); }
.article-toc h4 {
	font-family: var(--font-display); font-size: 14px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .05em;
	color: var(--noir); margin-bottom: 14px;
}
.article-toc ul { display: flex; flex-direction: column; gap: 0; counter-reset: to-toc; }
.article-toc li { position: relative; padding-left: 26px; border-bottom: 1px solid rgba(0,0,0,.06); }
.article-toc li:last-child { border-bottom: none; }
.article-toc li::before {
	counter-increment: to-toc;
	content: counter(to-toc);
	position: absolute; left: 0; top: 6px;
	font-family: var(--font-display); font-size: 15px; font-weight: 800;
	color: var(--orange); line-height: 1.2;
}
.article-toc a {
	font-size: 13px; color: var(--gris-mid);
	padding: 6px 0; border-left: none; display: block;
	transition: color .2s;
}
.article-toc a:hover, .article-toc a.is-active { color: var(--orange); border-left-color: transparent; }

.article-author-box { background: var(--noir); border-radius: 4px; padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0; }
.article-author-box img { border-radius: 50%; margin-bottom: 12px; }
.article-author-box strong { font-size: 14px; font-weight: 600; color: var(--blanc); margin-bottom: 4px; font-family: var(--font-display); text-transform: none; }
.article-author-box p { font-size: 12px; color: rgba(255,255,255,.35); line-height: 1.65; margin-top: 4px; text-align: center; }

.article-related-products h4 {
	font-family: var(--font-display); font-size: 14px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .05em;
	color: var(--noir); margin-bottom: 12px;
	display: flex; align-items: center; gap: 8px;
}
.article-related-products h4::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,.1); }
.related-products-list { display: flex; flex-direction: column; gap: 0; }

.article-sidebar-stats dl, .article-fiche-technique dl { display: flex; flex-direction: column; gap: 0; }
.sidebar-stat-row, .fiche-row {
	display: flex; justify-content: space-between; gap: 12px;
	font-size: 13px; padding: 9px 0;
	border-bottom: 1px solid rgba(0,0,0,.07);
}
.sidebar-stat-row:last-child, .fiche-row:last-child { border-bottom: none; }
.sidebar-stat-row dt, .fiche-row dt { color: var(--gris-mid); font-size: 12px; }
.sidebar-stat-row dd, .fiche-row dd { font-weight: 600; text-align: right; }

/* =====================================================================
 * RESPONSIVE
 * ===================================================================== */
@media (max-width: 1024px) {
	.article-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 640px) {
	.article-hero .container { padding-top: calc(var(--nav-h) + 44px); padding-bottom: 44px; }
	.article-layout { padding: 44px 0 60px; }
	.article-nav-prevnext { grid-template-columns: 1fr; }
	.article-aside { grid-template-columns: 1fr; }
	.meta-share { display: none; }
}
