/* ============================================================
   NAYA THEME — Sidebar gauche, grille de cartes
   ============================================================ */

:root {
	--sidebar-w:        250px;
	--color-text:       #1a1a1a;
	--color-text-muted: #666;
	--color-text-light: #999;
	--color-border:     #e0e0e0;
	--color-bg:         #fff;
	--color-bg-page:    #f2f2f2;
	--color-bg-alt:     #f7f7f7;
	--font-ui:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font-ui); color: var(--color-text); background: var(--color-bg-page); }
a { color: var(--color-text); text-decoration: underline; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   LAYOUT GLOBAL — sidebar fixe à gauche, contenu à droite
   ============================================================ */
.site-layout {
	display: flex;
	min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
	width: var(--sidebar-w);
	min-width: var(--sidebar-w);
	background: var(--color-bg);
	border-right: 1px solid var(--color-border);
	padding: 2.5rem 1.5rem;
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 0;
	z-index: 50;
}

/* Logo */
.site-branding { margin-bottom: 1.5rem; }

.site-logo-link { display: block; text-decoration: none; }

.site-logo {
	max-width: 100%;
	max-height: 160px;
	width: auto;
	height: auto;
}

.site-title-text {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--color-text);
	line-height: 1.2;
}

.site-tagline {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-top: 0.5rem;
}

/* Séparateurs */
.sidebar-divider {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 1.25rem 0;
}

/* Navigation */
.site-nav ul { list-style: none; }

.site-nav li { margin-bottom: 0.1rem; }

.site-nav a {
	display: block;
	padding: 0.3rem 0;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--color-text-muted);
	transition: color 0.15s;
}

.site-nav a:hover { color: var(--color-text); }

.site-nav a.current {
	color: var(--color-text);
}

.nav-marker {
	display: inline-block;
	margin-right: 0.3rem;
	color: var(--color-text);
}

/* Widgets */
.widget { margin-bottom: 0; }
.widget-title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-text-light);
	margin-bottom: 0.6rem;
}

/* Recherche */
.search-wrap {
	display: flex;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	overflow: hidden;
	max-width: 200px;
}
.search-wrap input[type="search"] {
	flex: 1;
	border: none;
	padding: 0.45rem 0.6rem;
	font-size: 0.85rem;
	font-family: var(--font-ui);
	color: var(--color-text);
	background: var(--color-bg);
	outline: none;
	min-width: 0;
}
.search-wrap button {
	background: var(--color-bg-alt);
	border: none;
	border-left: 1px solid var(--color-border);
	padding: 0 0.6rem;
	cursor: pointer;
	color: var(--color-text-muted);
	display: flex;
	align-items: center;
	flex-shrink: 0;
}
.search-wrap button:hover { background: var(--color-border); }

/* Lien réseau social */
.widget-social { margin-top: 1.5rem; }

.social-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.75rem;
	color: var(--color-text-muted);
	text-decoration: none !important;
}

.social-link:hover { color: #019EBD; }

.social-link svg { flex-shrink: 0; width: 14px; height: 14px; }

/* Liste catégories */
.sidebar-list { list-style: none; }
.sidebar-list li { border-bottom: 1px solid var(--color-border); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
	display: block;
	padding: 0.35rem 0;
	font-size: 0.85rem;
	color: var(--color-text-muted);
	text-decoration: none;
}
.sidebar-list a:hover { color: var(--color-text); }

/* Footer sidebar */
.sidebar-footer {
	margin-top: auto;
	padding-top: 1.5rem;
	font-size: 0.75rem;
	color: var(--color-text-light);
}
.sidebar-footer a { color: var(--color-text-muted); text-decoration: none; }
.sidebar-footer a:hover { color: var(--color-text); }

/* ============================================================
   CONTENU PRINCIPAL
   ============================================================ */
.content-area {
	margin-left: var(--sidebar-w);
	flex: 1;
	padding: 2rem 2rem 3rem;
	min-width: 0;
}

/* ============================================================
   GRILLE DE CARTES
   ============================================================ */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	grid-auto-rows: min-content;
	gap: 1.25rem;
	align-items: start;
}

.post-card {
	background: var(--color-bg);
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s;
	break-inside: avoid;
}

.post-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.post-thumbnail {
	display: block;
	overflow: hidden;
}

.post-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.post-thumbnail:hover img { transform: scale(1.03); }

.post-card-body {
	padding: 1rem 1.1rem 1.25rem;
}

.post-title {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 0.5rem;
}

.post-title a { text-decoration: none; color: var(--color-text); }
.post-title a:hover { text-decoration: none; color: #019EBD; }

.post-excerpt {
	font-size: 0.875rem;
	color: var(--color-text-muted);
	line-height: 1.55;
	font-style: italic;
	margin-top: auto;
	overflow: hidden;
	max-height: 6.5em;
}

.post-excerpt p { margin-bottom: 0.5rem; }
.post-excerpt p:last-child { margin-bottom: 0; }
.post-excerpt > *:first-child { margin-top: 0; }

.read-more {
	display: inline-block;
	margin-top: 0.6rem;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	color: #019EBD;
}
.read-more:hover { text-decoration: underline; }

/* ============================================================
   ARTICLE INDIVIDUEL
   ============================================================ */
/* ===== VUE ARTICLE ===== */
.single-post {
	background: var(--color-bg);
	width: 90%;
	max-width: 980px;
	margin: 0 auto;
	padding: 3rem 4rem;
	border-radius: 6px;
}

.post-header { margin-bottom: 2.5rem; }

.post-header .post-title {
	font-size: 1.6rem;
	line-height: 1.3;
	margin-bottom: 1rem;
	font-weight: 700;
}

.post-meta {
	font-size: 0.8rem;
	color: var(--color-text-light);
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

.post-cat a {
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: 3px;
	padding: 0.1rem 0.5rem;
	text-decoration: none;
	color: var(--color-text-muted);
	font-size: 0.75rem;
}
.post-cat a:hover { background: var(--color-border); }

.post-content {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text);
}
.post-content h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; font-family: var(--font-ui); font-weight: 700; line-height: 1.3; }
.post-content h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; font-family: var(--font-ui); font-weight: 700; }
.post-content p  { margin-bottom: 1rem; }
.post-content ul, .post-content ol { margin: 0 0 1.75rem 1.5rem; }
.post-content li { margin-bottom: 0.6rem; }
.post-content blockquote {
	border-left: 3px solid var(--color-border);
	padding: 0.75rem 1.5rem;
	margin: 2rem 0;
	color: var(--color-text-muted);
	font-style: italic;
}
.post-content img { border-radius: 4px; margin: 1.5rem 0; max-width: 100%; }
.post-content a { color: var(--color-text); text-decoration: underline; }
.post-content a:hover { text-decoration: none; }
.post-content code { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 3px; padding: 0.1em 0.4em; font-size: 0.9em; font-family: monospace; }
.post-content pre { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 4px; padding: 1rem; overflow-x: auto; margin: 1.5rem 0; }
.post-content pre code { background: none; border: none; padding: 0; }

.post-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 3px; padding: 0.2rem 0.6rem; font-size: 0.8rem; text-decoration: none; color: var(--color-text-muted); }
.tag:hover { background: var(--color-border); }

.post-navigation { display: flex; gap: 1rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--color-border); flex-wrap: wrap; }
.nav-prev, .nav-next { flex: 1; display: flex; flex-direction: column; text-decoration: none; color: var(--color-text); font-size: 0.9rem; }
.nav-next { align-items: flex-end; text-align: right; }
.nav-label { font-size: 0.75rem; color: var(--color-text-light); margin-bottom: 0.2rem; }
.nav-post-title { font-weight: 600; }
.nav-prev:hover .nav-post-title, .nav-next:hover .nav-post-title { text-decoration: underline; }

/* ============================================================
   ARCHIVES
   ============================================================ */
.archive-header { margin-bottom: 1.5rem; }
.archive-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-light); margin-bottom: 0.3rem; }
.archive-title { font-size: 1.5rem; font-weight: 700; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 0 0; font-size: 0.9rem; }
.pagination a { text-decoration: none; color: var(--color-text-muted); font-weight: 600; }
.pagination a:hover { color: var(--color-text); text-decoration: underline; }
.pagination-info { color: var(--color-text-light); font-size: 0.8rem; }

/* ============================================================
   DIVERS
   ============================================================ */
.no-posts { color: var(--color-text-muted); font-style: italic; padding: 2rem 0; }

/* Burger — caché sur desktop */
.nav-toggle { display: none; }

/* ============================================================
   RESPONSIVE MOBILE
   ============================================================ */
@media (max-width: 768px) {

	.site-layout { flex-direction: column; }

	.sidebar {
		position: fixed;
		left: -100%;
		width: 80vw;
		max-width: 300px;
		height: 100vh;
		transition: left 0.25s ease;
		z-index: 200;
		box-shadow: 4px 0 20px rgba(0,0,0,0.12);
	}

	.sidebar.open { left: 0; }

	.content-area {
		margin-left: 0;
		padding: 1rem 1rem 3rem;
	}

	.nav-toggle {
		display: flex;
		flex-direction: column;
		gap: 5px;
		position: fixed;
		top: 1rem;
		left: 1rem;
		z-index: 300;
		background: var(--color-bg);
		border: 1px solid var(--color-border);
		border-radius: 4px;
		padding: 8px 10px;
		cursor: pointer;
	}

	.nav-toggle span {
		display: block;
		width: 20px;
		height: 2px;
		background: var(--color-text);
		transition: transform 0.2s, opacity 0.2s;
	}

	.posts-grid {
		grid-template-columns: 1fr;
	}

	.single-post { padding: 1.5rem 1.25rem; }
	.post-header .post-title { font-size: 1.5rem; }
}
