/* ================================================================
   BLOG - Liste, Article single, Page auteur
   ================================================================ */

/* ── Variables ───────────────────────────────────────────────── */
/* --accent et --accent-dark déjà définis dans custom.css */

/* ── Blog index : grille d'articles ─────────────────────────── */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2em;
	margin: 2em 0 3em;
}

.blog-card {
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(212,212,255,0.1);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.blog-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.35);
	border-color: rgba(232,160,32,0.4);
}

.blog-card__thumb {
	width: 100%;
	aspect-ratio: 16/9;
	overflow: hidden;
	background: rgba(255,255,255,0.06);
	flex-shrink: 0;
}
.blog-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s;
}
.blog-card:hover .blog-card__thumb img {
	transform: scale(1.04);
}
.blog-card__thumb .no-thumb {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5em;
	opacity: 0.25;
}

.blog-card__body {
	padding: 1.4em 1.6em 1.2em;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.blog-card__cat {
	display: inline-block;
	font-size: 0.68em;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 0.7em;
}

.blog-card__title {
	font-size: 1em;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 0.8em;
	color: #fff;
}
.blog-card__title a {
	color: inherit;
	border-bottom: none;
	text-decoration: none;
}
.blog-card__title a:hover { color: var(--accent); }

.blog-card__excerpt {
	font-size: 0.82em;
	line-height: 1.65;
	opacity: 0.75;
	flex: 1;
	margin: 0 0 1.2em;
}

.blog-card__meta {
	display: flex;
	align-items: center;
	gap: 1em;
	font-size: 0.75em;
	opacity: 0.55;
	border-top: 1px solid rgba(255,255,255,0.07);
	padding-top: 0.9em;
	margin-top: auto;
}
.blog-card__meta .sep { opacity: 0.4; }

/* ── Pagination ──────────────────────────────────────────────── */
.blog-pagination {
	display: flex;
	justify-content: center;
	gap: 0.6em;
	margin: 2em 0 1em;
	flex-wrap: wrap;
}
.blog-pagination a,
.blog-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4em;
	height: 2.4em;
	padding: 0 0.8em;
	border: 1px solid rgba(212,212,255,0.15);
	border-radius: 4px;
	font-size: 0.85em;
	color: #ccc;
	text-decoration: none;
	transition: all 0.2s;
}
.blog-pagination a:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.blog-pagination .current {
	background: var(--accent);
	border-color: var(--accent);
	color: #111;
	font-weight: 700;
}

/* ── Article single ──────────────────────────────────────────── */
.post-banner-meta {
	display: flex;
	align-items: center;
	gap: 1.2em;
	flex-wrap: wrap;
	font-size: 0.8em;
	opacity: 0.75;
	margin-top: 1.2em;
}
.post-banner-meta .cat-badge {
	background: rgba(232,160,32,0.18);
	color: var(--accent);
	border: 1px solid rgba(232,160,32,0.35);
	border-radius: 3px;
	padding: 0.15em 0.6em;
	font-weight: 700;
	font-size: 0.85em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.post-banner-meta .sep { opacity: 0.35; }

/* Hero image sous le banner */
.post-hero-img {
	width: 100%;
	max-height: 440px;
	object-fit: cover;
	display: block;
	border-radius: 0;
}

/* Contenu de l'article */
.post-content {
	line-height: 1.8;
	font-size: 0.97em;
}
.post-content h2 {
	font-size: 1.4em;
	margin: 2.2em 0 0.8em;
	color: #fff;
}
.post-content h3 {
	font-size: 1.15em;
	margin: 1.8em 0 0.6em;
	color: #e8e8ff;
}
.post-content h2:first-child,
.post-content h3:first-child { margin-top: 0; }
.post-content p { margin: 0 0 1.2em; }
.post-content ul, .post-content ol {
	padding-left: 1.6em;
	margin: 0 0 1.2em;
}
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
	border-left: 3px solid var(--accent);
	padding: 0.8em 1.4em;
	margin: 1.5em 0;
	background: rgba(232,160,32,0.06);
	border-radius: 0 4px 4px 0;
	font-style: italic;
	opacity: 0.9;
}
.post-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 1.2em 0;
}
.post-content a {
	color: var(--accent);
	border-bottom: 1px solid rgba(232,160,32,0.35);
}
.post-content a:hover { border-bottom-color: var(--accent); }
.post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 0.9em;
}
.post-content table th {
	background: rgba(232,160,32,0.15);
	color: var(--accent);
	padding: 0.7em 1em;
	text-align: left;
	border-bottom: 2px solid var(--accent);
}
.post-content table td {
	padding: 0.6em 1em;
	border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Layout 2 colonnes : contenu + sidebar */
.post-layout {
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: 3.5em;
	align-items: start;
}

/* Sidebar article */
.post-sidebar {
	position: sticky;
	top: 100px;
}

.sidebar-box {
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(212,212,255,0.1);
	border-radius: 8px;
	padding: 1.5em;
	margin-bottom: 1.5em;
}
.sidebar-box h4 {
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
	margin: 0 0 1em;
	padding-bottom: 0.7em;
	border-bottom: 1px solid rgba(212,212,255,0.1);
}

/* Auteur mini-card dans sidebar */
.sidebar-author {
	display: flex;
	align-items: center;
	gap: 1em;
}
.sidebar-author img {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--accent);
	flex-shrink: 0;
}
.sidebar-author .sa-name {
	font-weight: 700;
	font-size: 0.92em;
	color: #fff;
}
.sidebar-author .sa-role {
	font-size: 0.75em;
	opacity: 0.65;
	margin-top: 0.15em;
}

/* Articles liés dans sidebar */
.sidebar-related a {
	display: flex;
	gap: 0.8em;
	padding: 0.7em 0;
	border-bottom: 1px solid rgba(255,255,255,0.06);
	text-decoration: none;
	align-items: flex-start;
}
.sidebar-related a:last-child { border-bottom: none; }
.sidebar-related .sr-thumb {
	width: 54px;
	height: 40px;
	object-fit: cover;
	border-radius: 3px;
	flex-shrink: 0;
}
.sidebar-related .sr-title {
	font-size: 0.8em;
	line-height: 1.35;
	color: #ddd;
	transition: color 0.2s;
}
.sidebar-related a:hover .sr-title { color: var(--accent); }

/* CTA sidebar */
.sidebar-cta {
	background: linear-gradient(135deg, rgba(232,160,32,0.12), rgba(232,160,32,0.06));
	border: 1px solid rgba(232,160,32,0.35);
	border-radius: 8px;
	padding: 1.5em;
	text-align: center;
	margin-bottom: 1.5em;
}
.sidebar-cta h4 {
	font-size: 0.88em;
	color: var(--accent);
	margin: 0 0 0.6em;
}
.sidebar-cta p {
	font-size: 0.78em;
	opacity: 0.8;
	margin: 0 0 1em;
	line-height: 1.5;
}
.sidebar-cta .button {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	font-size: 0.82em !important;
	white-space: normal;
}

/* Byline auteur en bas d'article */
.post-byline {
	display: flex;
	gap: 1.5em;
	align-items: flex-start;
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(212,212,255,0.1);
	border-radius: 8px;
	padding: 1.6em 2em;
	margin: 3em 0 2em;
}
.post-byline img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--accent);
	flex-shrink: 0;
}
.post-byline .pb-name {
	font-weight: 700;
	font-size: 1em;
	color: #fff;
}
.post-byline .pb-role {
	font-size: 0.8em;
	color: var(--accent);
	margin: 0.15em 0 0.5em;
}
.post-byline .pb-bio {
	font-size: 0.82em;
	line-height: 1.6;
	opacity: 0.8;
	margin: 0 0 0.7em;
}
.post-byline .pb-link {
	font-size: 0.78em;
	color: var(--accent);
}

/* Tags */
.post-tags {
	margin: 1.5em 0;
	display: flex;
	gap: 0.5em;
	flex-wrap: wrap;
}
.post-tags a {
	display: inline-block;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(212,212,255,0.15);
	border-radius: 3px;
	padding: 0.2em 0.7em;
	font-size: 0.76em;
	color: #bbb;
	text-decoration: none;
	transition: all 0.2s;
}
.post-tags a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* ── Page auteur ─────────────────────────────────────────────── */
.author-hero {
	display: flex;
	gap: 2.5em;
	align-items: flex-start;
	margin: 2em 0 3em;
}
.author-hero__photo {
	flex-shrink: 0;
}
.author-hero__photo img {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--accent);
	display: block;
}
.author-hero__info h2 {
	margin: 0 0 0.2em;
	font-size: 1.8em;
}
.author-hero__info .ah-role {
	color: var(--accent);
	font-size: 0.9em;
	font-weight: 600;
	margin-bottom: 0.8em;
}
.author-hero__info .ah-bio {
	font-size: 0.88em;
	line-height: 1.7;
	opacity: 0.85;
	max-width: 640px;
}

/* CV Timeline */
.cv-section {
	margin: 3em 0;
}
.cv-section h3 {
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--accent);
	margin: 0 0 1.4em;
	padding-bottom: 0.6em;
	border-bottom: 1px solid rgba(232,160,32,0.3);
}
.cv-timeline {
	list-style: none;
	padding: 0;
	margin: 0;
	position: relative;
}
.cv-timeline::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 6px;
	bottom: 6px;
	width: 2px;
	background: rgba(232,160,32,0.25);
}
.cv-timeline li {
	padding: 0 0 1.8em 2.2em;
	position: relative;
}
.cv-timeline li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 6px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--accent);
	border: 3px solid #1a1a2e;
	box-sizing: border-box;
}
.cv-timeline .cv-period {
	font-size: 0.72em;
	font-weight: 700;
	color: var(--accent);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.2em;
}
.cv-timeline .cv-title {
	font-size: 0.95em;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.15em;
}
.cv-timeline .cv-company {
	font-size: 0.82em;
	opacity: 0.7;
	margin-bottom: 0.4em;
}
.cv-timeline .cv-desc {
	font-size: 0.82em;
	line-height: 1.6;
	opacity: 0.8;
}

/* Compétences */
.skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1em;
	margin: 0.5em 0;
}
.skill-item {
	background: rgba(255,255,255,0.04);
	border-radius: 6px;
	padding: 1em 1.2em;
}
.skill-item .sk-name {
	font-size: 0.85em;
	font-weight: 600;
	margin-bottom: 0.5em;
	display: flex;
	justify-content: space-between;
}
.skill-item .sk-name span { opacity: 0.6; font-weight: 400; }
.skill-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; }
.skill-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* Articles de l'auteur */
.author-articles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5em;
	margin: 1.5em 0;
}

/* ── Responsive blog ─────────────────────────────────────────── */
@media screen and (max-width: 980px) {
	.blog-grid { grid-template-columns: repeat(2, 1fr); }
	.post-layout { grid-template-columns: 1fr; gap: 2.5em; }
	.post-sidebar { position: static; }
}

@media screen and (max-width: 736px) {
	.blog-grid { grid-template-columns: 1fr; gap: 1.2em; }
	.blog-card__body { padding: 1.1em 1.2em 1em; }
	.author-hero { flex-direction: column; gap: 1.5em; align-items: center; text-align: center; }
	.author-hero__photo img { width: 110px; height: 110px; }
	.author-hero__info .ah-bio { max-width: 100%; }
	.post-byline { flex-direction: column; align-items: center; text-align: center; gap: 1em; padding: 1.3em; }
	.post-byline img { width: 60px; height: 60px; }
	.sidebar-author { flex-direction: column; align-items: center; text-align: center; }
	.cv-timeline::before { display: none; }
	.cv-timeline li { padding-left: 0; }
	.cv-timeline li::before { display: none; }
}

@media screen and (max-width: 480px) {
	.blog-card__thumb { aspect-ratio: 4/3; }
	.post-banner-meta { gap: 0.6em; }
	.skills-grid { grid-template-columns: 1fr; }
}
