﻿/**
 * NIYAPRESS — Premium Editorial Design System v3
 * Haute couture : hairlines, asymétrie, rythme typographique d'élite
 */

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════ */
:root {
	/* Palette */
	--np-accent: #001D83;
	--np-accent-bright: #063FEB;
	--np-gold: #FAA31B;
	--np-ink: #0f0f10;
	--np-text: #2a2a2e;
	--np-muted: #9a9aa2;
	--np-hairline: #ececef;
	--np-hairline-soft: #f5f5f7;
	--np-bg: #F3F4F6;
	--np-white: #ffffff;
	--np-surface: #fafafb;

	/* Radius — sharp, institutional */
	--np-r-xs: 3px;
	--np-r-sm: 5px;
	--np-r: 8px;
	--np-r-lg: 10px;

	/* Shadows — hairline precision, not heavy boxes */
	--np-shadow-1: 0 1px 0 rgba(0,0,0,0.03);
	--np-shadow-2: 0 0 0 1px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.04);
	--np-shadow-3: 0 0 0 1px rgba(0,29,131,0.06), 0 4px 20px rgba(0,0,0,0.06);
	--np-shadow-float: 0 0 0 1px rgba(0,29,131,0.08), 0 8px 32px rgba(0,0,0,0.08);

	/* Motion */
	--np-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--np-dur: 0.22s;
	--np-dur-slow: 0.4s;

	/* Layout */
	--np-container: 1280px;
	--np-gap: clamp(16px, 2vw, 20px);
	--np-section: clamp(40px, 5vw, 56px);
}

/* ═══════════════════════════════════════════════════
   CONTAINER & SECTION
   ═══════════════════════════════════════════════════ */
.np-container {
	width: 100%;
	max-width: var(--np-container);
	margin-inline: auto;
	padding-inline: clamp(16px, 3vw, 24px);
	box-sizing: border-box;
}

.np-section {
	padding-block: var(--np-section);
}

.np-section--alt {
	background: var(--np-bg);
}

/* ═══════════════════════════════════════════════════
   SECTION HEAD — Barre d'accent verticale 3px
   ═══════════════════════════════════════════════════ */
.np-section-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
	position: relative;
}

.np-section-head::before {
	content: '';
	width: 3px;
	height: 32px;
	background: var(--np-accent);
	border-radius: 1.5px;
	flex-shrink: 0;
}

.np-section-title {
	font-size: clamp(1.125rem, 1.8vw, 1.5rem);
	font-weight: 900;
	color: var(--np-ink);
	margin: 0;
	letter-spacing: -0.015em;
	line-height: 1;
}

.np-section-more {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--np-muted);
	text-decoration: none;
	margin-inline-start: auto;
	white-space: nowrap;
	letter-spacing: 0.02em;
	transition: color var(--np-dur) ease;
}

.np-section-more:hover {
	color: var(--np-accent);
}

.np-section-more::after {
	content: ' ←';
	opacity: 0.5;
}

/* ═══════════════════════════════════════════════════
   GRID SYSTEMS — Asymétriques
   ═══════════════════════════════════════════════════ */
.np-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--np-gap);
}

.np-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--np-gap);
}

.np-grid-hero-side {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: var(--np-gap);
	align-items: stretch;
}

.np-grid-main-side {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: var(--np-gap);
	align-items: start;
}

/* ═══════════════════════════════════════════════════
   SIDEBAR ADS — Intégration invisible
   ═══════════════════════════════════════════════════ */
.np-sidebar {
	position: sticky;
	top: calc(var(--niyapress-header-h, 160px) + 24px);
	display: flex;
	flex-direction: column;
	gap: var(--np-gap);
}

.np-ad-slot {
	border: 1px solid var(--np-hairline);
	border-radius: var(--np-r-sm);
	overflow: hidden;
	background: var(--np-white);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.np-ad-slot::before {
	content: 'إعلان';
	position: absolute;
	top: 6px;
	inset-inline-end: 8px;
	font-size: 0.5625rem;
	font-weight: 500;
	color: var(--np-muted);
	letter-spacing: 0.08em;
	z-index: 1;
	pointer-events: none;
	opacity: 0.5;
}

.np-ad-slot img {
	display: block;
	max-width: 100%;
	height: auto;
}

.np-ad-slot--300x250 {
	aspect-ratio: 300 / 250;
	max-height: 250px;
}

.np-ad-slot--300x600 {
	aspect-ratio: 5 / 10;
	max-height: 600px;
}

/* ═══════════════════════════════════════════════════
   HERO SECTION (وطنية) — Bold, asymmetric
   ═══════════════════════════════════════════════════ */
.np-hero {
	background: var(--np-bg);
}

.np-hero-main {
	position: relative;
	border-radius: var(--np-r-lg);
	overflow: hidden;
	box-shadow: var(--np-shadow-2);
	border: 1px solid var(--np-hairline);
	transition: transform var(--np-dur-slow) var(--np-ease), box-shadow var(--np-dur) ease, border-color var(--np-dur) ease;
}

.np-hero-main:hover {
	border-color: rgba(0,29,131,0.15);
	box-shadow: var(--np-shadow-float);
	transform: translateY(-2px);
}

.np-hero-main-link {
	display: block;
	position: relative;
	min-height: 440px;
}

.np-hero-main-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--np-ease);
}

.np-hero-main:hover .np-hero-main-img {
	transform: scale(1.03);
}

.np-hero-main-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(175deg, rgba(0,0,0,0) 25%, rgba(0,0,0,0.55) 65%, rgba(0,0,0,0.9) 100%);
}

.np-hero-main-body {
	position: absolute;
	bottom: 0;
	inset-inline: 0;
	padding: clamp(28px, 4vw, 40px);
}

.np-hero-main-cat {
	display: inline-block;
	background: var(--np-accent);
	color: #fff;
	font-size: 0.625rem;
	font-weight: 800;
	padding: 4px 12px;
	border-radius: var(--np-r-xs);
	margin-bottom: 14px;
	letter-spacing: 0.08em;
}

.np-hero-main-title {
	font-size: clamp(1.375rem, 2.4vw, 1.875rem);
	font-weight: 900;
	line-height: 1.18;
	color: #fff;
	margin: 0 0 10px;
	letter-spacing: -0.02em;
	max-width: 88%;
}

.np-hero-main-excerpt {
	font-size: 0.875rem;
	line-height: 1.7;
	color: rgba(255,255,255,0.7);
	margin: 0 0 12px;
	max-width: 76%;
	font-weight: 400;
}

.np-hero-main-meta {
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--np-gold);
	letter-spacing: 0.02em;
}

/* Hero side — hairline list */
.np-hero-side {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--np-hairline);
	border-radius: var(--np-r);
	overflow: hidden;
	background: var(--np-white);
}

.np-hero-side-item {
	background: var(--np-white);
	border-bottom: 1px solid var(--np-hairline);
	transition: background var(--np-dur) ease;
}

.np-hero-side-item:last-child {
	border-bottom: none;
}

.np-hero-side-item:hover {
	background: rgba(0,29,131,0.025);
}

.np-hero-side-link {
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	text-decoration: none;
	color: inherit;
	align-items: center;
}

.np-hero-side-thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 48px;
	border-radius: var(--np-r-xs);
	overflow: hidden;
	position: relative;
}

.np-hero-side-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s var(--np-ease);
}

.np-hero-side-item:hover .np-hero-side-img {
	transform: scale(1.06);
}

.np-hero-side-body {
	flex: 1;
	min-width: 0;
}

.np-hero-side-title {
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--np-ink);
	margin: 0 0 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color var(--np-dur) ease;
	letter-spacing: -0.005em;
}

.np-hero-side-item:hover .np-hero-side-title {
	color: var(--np-accent);
}

.np-hero-side-time {
	font-size: 0.6875rem;
	font-weight: 500;
	color: var(--np-muted);
}

/* ═══════════════════════════════════════════════════
   CATEGORY BLOCK — Hairline, élégant
   ═══════════════════════════════════════════════════ */
.np-cat-block {
	background: var(--np-white);
	border: 1px solid var(--np-hairline);
	border-radius: var(--np-r);
	padding: 18px 18px 16px;
	box-shadow: var(--np-shadow-1);
	transition: border-color var(--np-dur) ease, box-shadow var(--np-dur) ease;
}

.np-cat-block:hover {
	border-color: rgba(0,29,131,0.12);
	box-shadow: var(--np-shadow-2);
}

.np-cat-block-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.np-cat-block-head::before {
	content: '';
	width: 3px;
	height: 22px;
	background: var(--np-accent);
	border-radius: 1.5px;
	flex-shrink: 0;
}

.np-cat-block-title {
	font-size: 1rem;
	font-weight: 900;
	color: var(--np-ink);
	margin: 0;
	letter-spacing: -0.01em;
	line-height: 1;
}

.np-cat-block-title a {
	color: inherit;
	text-decoration: none;
}

/* Featured inside cat block */
.np-cat-block-featured {
	margin-bottom: 14px;
}

.np-cat-block-feat-link {
	display: block;
	position: relative;
	border-radius: var(--np-r-sm);
	overflow: hidden;
}

.np-cat-block-feat-img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	transition: transform 0.45s var(--np-ease), filter var(--np-dur) ease;
}

.np-cat-block-feat-link:hover .np-cat-block-feat-img {
	transform: scale(1.03);
	filter: brightness(1.04);
}

.np-cat-block-feat-overlay {
	position: absolute;
	bottom: 0;
	inset-inline: 0;
	padding: 14px;
	background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.15) 70%, transparent);
}

.np-cat-block-feat-title {
	font-size: 0.9375rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
	line-height: 1.3;
	letter-spacing: -0.005em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* List items inside cat block */
.np-cat-block-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.np-cat-block-item {
	padding: 10px 0;
	border-top: 1px solid var(--np-hairline-soft);
}

.np-cat-block-item:first-child {
	border-top: none;
	padding-top: 0;
}

.np-cat-block-item-link {
	display: flex;
	gap: 10px;
	text-decoration: none;
	color: inherit;
	align-items: center;
}

.np-cat-block-item-thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 42px;
	border-radius: var(--np-r-xs);
	overflow: hidden;
	position: relative;
}

.np-cat-block-item-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s var(--np-ease);
}

.np-cat-block-item-link:hover .np-cat-block-item-img {
	transform: scale(1.06);
}

.np-cat-block-item-body {
	flex: 1;
	min-width: 0;
}

.np-cat-block-item-title {
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--np-ink);
	margin: 0 0 2px;
	letter-spacing: -0.003em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color var(--np-dur) ease;
}

.np-cat-block-item-link:hover .np-cat-block-item-title {
	color: var(--np-accent);
}

.np-cat-block-item-time {
	font-size: 0.6875rem;
	font-weight: 500;
	color: var(--np-muted);
}

.np-cat-block-more {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--np-hairline);
}

.np-cat-block-more a {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--np-accent);
	text-decoration: none;
	letter-spacing: 0.01em;
	transition: opacity var(--np-dur) ease;
}

.np-cat-block-more a:hover {
	opacity: 0.65;
}

/* ═══════════════════════════════════════════════════
   VIDEO CAROUSEL — Play icon, hairline cards
   ═══════════════════════════════════════════════════ */
.np-video-track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.np-video-track::-webkit-scrollbar {
	display: none;
}

.np-video-card {
	flex: 0 0 280px;
	scroll-snap-align: start;
	background: var(--np-white);
	border: 1px solid var(--np-hairline);
	border-radius: var(--np-r);
	overflow: hidden;
	transition: border-color var(--np-dur) ease, transform var(--np-dur) var(--np-ease), box-shadow var(--np-dur) ease;
}

.np-video-card:hover {
	border-color: rgba(0,29,131,0.15);
	transform: translateY(-2px);
	box-shadow: var(--np-shadow-3);
}

.np-video-link {
	display: block;
	position: relative;
}

.np-video-img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	transition: transform 0.4s var(--np-ease);
}

.np-video-card:hover .np-video-img {
	transform: scale(1.03);
}

.np-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	background: rgba(0,0,0,0.65);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	transition: background var(--np-dur) ease, transform var(--np-dur) ease;
}

.np-video-card:hover .np-video-play {
	background: var(--np-accent);
	transform: translate(-50%, -50%) scale(1.12);
}

.np-video-caption {
	padding: 10px 12px 12px;
}

.np-video-cat {
	font-size: 0.625rem;
	font-weight: 800;
	color: var(--np-accent);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 4px;
	display: block;
}

.np-video-title {
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--np-ink);
	margin: 0;
	letter-spacing: -0.003em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
	.np-grid-hero-side,
	.np-grid-main-side {
		grid-template-columns: 1fr;
	}

	.np-sidebar {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.np-sidebar .np-ad-slot {
		flex: 1 1 250px;
	}

	.np-ad-slot--300x600 {
		display: none !important;
	}

	.np-hero-main-link {
		min-height: 340px;
	}

	.np-grid-3 {
		grid-template-columns: 1fr 1fr;
	}

	.np-video-card {
		flex: 0 0 260px;
	}
}

@media (max-width: 768px) {
	:root {
		--np-section: clamp(28px, 4.5vw, 40px);
		--np-gap: 14px;
	}

	.np-grid-2,
	.np-grid-3 {
		grid-template-columns: 1fr;
	}

	.np-hero-main-link {
		min-height: 280px;
	}

	.np-hero-main-title {
		font-size: 1.1875rem;
		max-width: 100%;
	}

	.np-hero-main-excerpt {
		display: none;
	}

	.np-video-card {
		flex: 0 0 230px;
	}

	.np-section-head {
		margin-bottom: 16px;
	}

	.np-section-head::before {
		height: 26px;
	}
}

@media (max-width: 480px) {
	.np-video-card {
		flex: 0 0 200px;
	}
}