/* ================================================
   STYLES DEDIES AUX PAGES ARTICLES
   (articles, sidebars, galeries, carrousels)
   ================================================ */

/* Container principal article */
.article-page {
	background: #f7f8fb;
	color: #0f1426;
	padding: 120px 48px 60px;
}

.article-container {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 48px;
}

/* Contenu principal */
.article-main {
	background: #ffffff;
	border-radius: 16px;
	padding: 38px 42px;
	box-shadow: 0 16px 36px rgba(15, 20, 38, 0.08);
	animation: fade-up 0.8s ease both;
}

.article-tag {
	display: inline-block;
	background: #ffffff;
	color: #7a8ba8;
	padding: 6px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 18px;
	animation: fade-up 0.6s ease 0.2s both;
}

.article-title {
	margin: 0 0 16px;
	font-size: clamp(26px, 3.8vw, 38px);
	line-height: 1.3;
	font-family: var(--font-display);
	animation: fade-up 0.7s ease 0.3s both;
}

.article-meta {
	display: flex;
	gap: 18px;
	margin-bottom: 28px;
	padding-bottom: 22px;
	border-bottom: 1px solid #e6e8f5;
	color: #5a6b8a;
	font-size: 14px;
}

.article-content {
	line-height: 1.8;
	color: #2a3548;
	animation: fade-up 0.8s ease 0.4s both;
}

.article-content p {
	margin: 0 0 18px;
}

.article-content h2 {
	margin: 32px 0 14px;
	font-size: 26px;
	color: #0f1426;
}

.article-content h3 {
	margin: 24px 0 12px;
	font-size: 20px;
	color: #1a2537;
}

.article-content ul, .article-content ol {
	margin: 16px 0;
	padding-left: 28px;
}

.article-content li {
	margin: 8px 0;
}

/* Video embarquee */
.article-video {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	margin: 28px 0;
	border-radius: 12px;
	background: #000;
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-video:hover {
	transform: scale(1.01);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.article-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Navigation entre articles */
.article-nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 42px;
	padding-top: 28px;
	border-top: 1px solid #e6e8f5;
}

.article-nav a {
	padding: 10px 18px;
	border-radius: 10px;
	background: #f4f6ff;
	color: #4e6ef2;
	font-weight: 600;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.article-nav a:hover {
	background: #e8ebff;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(78, 110, 242, 0.15);
}

/* Sidebar */
.article-sidebar {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.sidebar-section {
	background: #ffffff;
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 12px 28px rgba(15, 20, 38, 0.06);
	animation: fade-up 0.7s ease both;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-section:nth-child(1) {
	animation-delay: 0.5s;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.sidebar-section:nth-child(2) {
	animation-delay: 0.6s;
}

.sidebar-section:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(15, 20, 38, 0.1);
}

.sidebar-section h3 {
	margin: 0 0 18px;
	font-size: 18px;
	color: #0f1426;
	flex-shrink: 0;
}

/* Posts recents */
.recent-posts {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.recent-post-item {
	padding-bottom: 14px;
	border-bottom: 1px solid #f0f2f8;
	transition: transform 0.2s ease;
}

.recent-post-item:hover {
	transform: translateX(4px);
}

.recent-post-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.recent-post-item h4 {
	margin: 0 0 6px;
	font-size: 15px;
	line-height: 1.4;
}

.recent-post-item a {
	color: #2a3548;
	transition: color 0.2s ease;
}

.recent-post-item a:hover {
	color: #4e6ef2;
}

body.theme-dark .recent-post-item {
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .sidebar-section h3 {
	color: #e4e7f7;
}

.recent-post-item time {
	font-size: 13px;
	color: #7a8ba8;
}

/* Liste categories */
.category-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.category-list li a {
	display: block;
	padding: 9px 14px;
	border-radius: 8px;
	background: #f7f9ff;
	color: #3a4a68;
	font-size: 14px;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-list li a:hover {
	background: #e8ebff;
	color: #4e6ef2;
	transform: translateX(4px);
}

body.theme-dark .category-list li a {
	background: rgba(122, 160, 255, 0.15);
	color: #9bb7ff;
}

body.theme-dark .category-list li a:hover {
	background: rgba(122, 160, 255, 0.25);
	color: #c5d9ff;
}

/* Article responsive mobile */
@media (max-width: 640px) {
	.article-container {
		grid-template-columns: 1fr;
		padding: 0;
	}
	.article-page {
		padding: 100px 16px 40px;
	}
	.article-main {
		padding: 24px 18px;
	}
	.article-nav {
		flex-direction: column;
	}
}

/* ====== GALERIE PHOTO ====== */
.photo-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 16px;
	margin: 30px 0;
}

.photo-gallery img {
	width: 100%;
	height: 250px;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
}

.photo-gallery img:hover {
	transform: scale(1.05) translateY(-8px);
	box-shadow: 0 16px 40px rgba(122, 160, 255, 0.3);
	filter: brightness(1.1);
}

/* ====== CARROUSEL D'IMAGES ====== */
.carousel {
	margin: 40px 0;
}

.carousel h3 {
	color: var(--accent);
	font-size: 1.6rem;
	margin-bottom: 20px;
	text-align: center;
	font-family: var(--font-display);
}

.carousel-container {
	position: relative;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--card);
	box-shadow: var(--shadow);
}

.carousel-images {
	position: relative;
	width: 100%;
	height: 500px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.carousel-image {
	display: none;
	width: 100%;
	height: 100%;
	object-fit: contain;
	animation: fadeIn 0.5s ease-in-out;
}

.carousel-image.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(122, 160, 255, 0.9);
	color: white;
	border: none;
	font-size: 2rem;
	padding: 16px 20px;
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.3s ease;
	z-index: 10;
	backdrop-filter: blur(10px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
	background: rgba(122, 160, 255, 1);
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 24px rgba(122, 160, 255, 0.5);
}

.carousel-btn.prev {
	left: 20px;
}

.carousel-btn.next {
	right: 20px;
}

@media (max-width: 768px) {
	.photo-gallery {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 12px;
	}

	.photo-gallery img {
		height: 150px;
	}

	.carousel-images {
		height: 300px;
	}

	.carousel-btn {
		font-size: 1.5rem;
		padding: 12px 16px;
	}

	.carousel-btn.prev {
		left: 10px;
	}

	.carousel-btn.next {
		right: 10px;
	}
}
