/**
 * ZD Humanitarian Hub — CSS frontend (Phase 1 : Reports).
 *
 * - Aucun !important : laisse les contrôles Elementor utilisateur s'appliquer.
 * - Tout le style « identitaire » est exprimé en variables CSS pour
 *   permettre un override propre depuis Elementor.
 */

/* =========================================================
 * Variables par défaut
 * ========================================================= */
.zdh-reports-wrapper {
	--zdh-bg: #ffffff;
	--zdh-border: #e8eef0;
	--zdh-text: #0f1f1d;
	--zdh-text-muted: #5a6b6a;
	--zdh-text-faded: #8a9a99;
	--zdh-accent: #0d9488;
}

/* =========================================================
 * Grille
 * ========================================================= */
.zdh-reports-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 968px) {
	.zdh-reports-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.zdh-reports-grid {
		grid-template-columns: 1fr;
	}
}

.zdh-reports-empty {
	text-align: center;
	color: var(--zdh-text-muted);
	font-style: italic;
	padding: 32px 16px;
}

/* =========================================================
 * Carte
 * ========================================================= */
.zdh-report-card {
	background: var(--zdh-bg);
	border: 1px solid var(--zdh-border);
	border-radius: 16px;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: relative;
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
		box-shadow 0.3s ease,
		border-color 0.3s ease;
}

/* Liseré coloré au top de carte (visible uniquement si .has-accent-bar). */
.zdh-reports-wrapper.has-accent-bar .zdh-report-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--zdh-accent-override, var(--zdh-accent));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s ease;
}

.zdh-reports-wrapper.has-accent-bar .zdh-report-card:hover::before {
	transform: scaleX(1);
}

.zdh-report-card:hover {
	border-color: transparent;
}

/* =========================================================
 * Header (tags + icône)
 * ========================================================= */
.zdh-report-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}

.zdh-report-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.zdh-report-type {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	background: color-mix(in srgb, var(--zdh-accent-override, var(--zdh-accent)) 15%, transparent);
	color: var(--zdh-accent-override, var(--zdh-accent));
}

/* Fallback pour navigateurs sans color-mix. */
@supports not (background: color-mix(in srgb, red, blue)) {
	.zdh-report-type {
		background: rgba(13, 148, 136, 0.12);
	}
}

.zdh-report-year {
	font-family: "Fraunces", Georgia, serif;
	font-size: 13px;
	font-weight: 600;
	color: var(--zdh-text-faded);
}

.zdh-report-icon {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: color-mix(in srgb, var(--zdh-accent-override, var(--zdh-accent)) 12%, transparent);
}

.zdh-report-icon svg {
	width: 22px;
	height: 22px;
	fill: var(--zdh-accent-override, var(--zdh-accent));
}

@supports not (background: color-mix(in srgb, red, blue)) {
	.zdh-report-icon {
		background: rgba(13, 148, 136, 0.12);
	}
}

/* =========================================================
 * Titre, info, extrait
 * ========================================================= */
.zdh-report-title {
	font-family: "Fraunces", Georgia, serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--zdh-text);
	margin: 0;
}

.zdh-report-title a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.3s ease;
}

.zdh-report-title a:hover {
	background-size: 100% 1px;
}

.zdh-report-info {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 13px;
	color: var(--zdh-text-muted);
}

.zdh-report-info-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.zdh-report-info-item svg {
	width: 14px;
	height: 14px;
	fill: var(--zdh-text-faded);
	flex-shrink: 0;
}

.zdh-report-excerpt {
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--zdh-text-muted);
	margin: 0;
	flex: 1;
}

/* =========================================================
 * Footer (pages + CTA)
 * ========================================================= */
.zdh-report-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 16px;
	margin-top: auto;
	border-top: 1px solid var(--zdh-border);
}

.zdh-report-pages {
	font-size: 13px;
	color: var(--zdh-text-faded);
	font-weight: 500;
}

.zdh-report-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	background: var(--zdh-accent-override, var(--zdh-accent));
	color: #ffffff;
	border-radius: 100px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.zdh-report-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(15, 31, 29, 0.15);
	color: #ffffff;
}

.zdh-report-cta svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

/* =========================================================
 * Single page
 * ========================================================= */
.zdh-single-report {
	--zdh-text: #0f1f1d;
	--zdh-text-muted: #5a6b6a;
	--zdh-text-faded: #8a9a99;
	--zdh-accent: #0d9488;
	--zdh-border: #e8eef0;

	max-width: 880px;
	margin: 0 auto;
	padding: 64px 24px;
	font-family: "Plus Jakarta Sans", -apple-system, sans-serif;
	color: var(--zdh-text);
}

.zdh-single-report__type {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	text-decoration: none;
	background: color-mix(in srgb, var(--zdh-accent) 12%, transparent);
	color: var(--zdh-accent);
	margin-bottom: 20px;
}

.zdh-single-report__title {
	font-family: "Fraunces", Georgia, serif;
	font-size: 42px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 24px;
}

.zdh-single-report__info {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	color: var(--zdh-text-muted);
	font-size: 14px;
	margin-bottom: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--zdh-border);
}

.zdh-single-report__info strong {
	color: var(--zdh-text);
	margin-right: 4px;
}

.zdh-single-report__thumbnail {
	margin-bottom: 32px;
	border-radius: 12px;
	overflow: hidden;
}

.zdh-single-report__thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}

.zdh-single-report__content {
	font-size: 16px;
	line-height: 1.7;
	margin-bottom: 48px;
}

.zdh-single-report__download {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 28px;
	background: color-mix(in srgb, var(--zdh-accent) 6%, #ffffff);
	border: 1px solid color-mix(in srgb, var(--zdh-accent) 25%, transparent);
	border-radius: 16px;
}

.zdh-single-report__download-info {
	display: flex;
	align-items: center;
	gap: 16px;
}

.zdh-single-report__download-info .dashicons {
	font-size: 36px;
	width: 36px;
	height: 36px;
	color: var(--zdh-accent);
}

.zdh-single-report__download-title {
	font-family: "Fraunces", Georgia, serif;
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 4px;
}

.zdh-single-report__download-meta {
	margin: 0;
	font-size: 13px;
	color: var(--zdh-text-faded);
}

.zdh-single-report__download-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	background: var(--zdh-accent);
	color: #ffffff;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zdh-single-report__download-cta:hover {
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(15, 31, 29, 0.18);
}

.zdh-single-report__download-cta svg {
	fill: currentColor;
}

/* =========================================================
 * PROJECTS — variables par défaut
 * ========================================================= */
.zdh-projects-wrapper {
	--zdh-bg: #ffffff;
	--zdh-border: #e8eef0;
	--zdh-text: #0f1f1d;
	--zdh-text-muted: #5a6b6a;
	--zdh-text-faded: #8a9a99;
	--zdh-accent: #0d9488;
	--zdh-status: #10b981;
}

.zdh-projects-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 968px) {
	.zdh-projects-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.zdh-projects-grid {
		grid-template-columns: 1fr;
	}
}

.zdh-projects-empty {
	text-align: center;
	color: var(--zdh-text-muted);
	font-style: italic;
	padding: 32px 16px;
}

/* =========================================================
 * Carte projet
 * ========================================================= */
.zdh-project-card {
	background: var(--zdh-bg);
	border: 1px solid var(--zdh-border);
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
		box-shadow 0.3s ease,
		border-color 0.3s ease;
}

.zdh-project-card:hover {
	border-color: transparent;
}

/* =========================================================
 * Image
 * ========================================================= */
.zdh-project-image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	display: block;
	background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}

.zdh-project-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.zdh-project-image-placeholder {
	width: 100%;
	height: 100%;
}

/* =========================================================
 * Badges (glassmorphism)
 * ========================================================= */
.zdh-project-badges {
	position: absolute;
	top: 16px;
	left: 16px;
	right: 16px;
	display: flex;
	justify-content: space-between;
	gap: 8px;
	z-index: 2;
}

.zdh-project-badges--inline {
	position: static;
	margin: 16px 16px 0;
}

.zdh-project-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 24px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.4px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.zdh-project-badge-status {
	background: color-mix(in srgb, var(--zdh-status) 92%, transparent);
	color: #ffffff;
}

@supports not (background: color-mix(in srgb, red, blue)) {
	.zdh-project-badge-status {
		background: rgba(16, 185, 129, 0.92);
	}
}

.zdh-project-badge-status.has-pulse::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ffffff;
	animation: zdh-pulse 2s ease infinite;
}

@keyframes zdh-pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.4;
		transform: scale(0.85);
	}
}

.zdh-project-badge-category {
	background: rgba(255, 255, 255, 0.92);
	color: var(--zdh-text);
}

/* =========================================================
 * Corps de la carte
 * ========================================================= */
.zdh-project-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 16px;
}

.zdh-project-location {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--zdh-text-muted);
}

.zdh-project-location svg {
	width: 14px;
	height: 14px;
	fill: var(--zdh-accent);
}

.zdh-project-title {
	font-family: "Fraunces", Georgia, serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--zdh-text);
	margin: 0;
}

.zdh-project-title a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.3s ease;
}

.zdh-project-title a:hover {
	background-size: 100% 1px;
}

.zdh-project-excerpt {
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.55;
	color: var(--zdh-text-muted);
	margin: 0;
	flex: 1;
}

/* =========================================================
 * Barre de progression
 * ========================================================= */
.zdh-project-progress {
	margin-top: 4px;
}

.zdh-progress-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 8px;
}

.zdh-progress-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--zdh-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

.zdh-progress-value {
	font-family: "Fraunces", Georgia, serif;
	font-size: 18px;
	font-weight: 700;
	color: var(--zdh-accent);
}

.zdh-progress-bar {
	width: 100%;
	height: 6px;
	background: color-mix(in srgb, var(--zdh-accent) 12%, transparent);
	border-radius: 100px;
	overflow: hidden;
	position: relative;
}

@supports not (background: color-mix(in srgb, red, blue)) {
	.zdh-progress-bar {
		background: rgba(13, 148, 136, 0.12);
	}
}

.zdh-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--zdh-accent) 0%, var(--zdh-accent) 100%);
	border-radius: 100px;
	transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================
 * Footer
 * ========================================================= */
.zdh-project-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--zdh-border);
	margin-top: auto;
}

.zdh-project-beneficiaries {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--zdh-text);
}

.zdh-project-beneficiaries svg {
	width: 16px;
	height: 16px;
	fill: var(--zdh-text-muted);
}

.zdh-project-beneficiaries strong {
	font-family: "Fraunces", Georgia, serif;
	font-weight: 700;
}

.zdh-project-cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--zdh-accent);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.zdh-project-cta svg {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
	fill: currentColor;
}

.zdh-project-card:hover .zdh-project-cta svg {
	transform: translateX(3px);
}

/* =========================================================
 * Single project
 * ========================================================= */
.zdh-single-project {
	--zdh-bg: #ffffff;
	--zdh-border: #e8eef0;
	--zdh-text: #0f1f1d;
	--zdh-text-muted: #5a6b6a;
	--zdh-text-faded: #8a9a99;
	--zdh-accent: #0d9488;
	--zdh-status: #10b981;

	max-width: 980px;
	margin: 0 auto;
	padding: 64px 24px;
	font-family: "Plus Jakarta Sans", -apple-system, sans-serif;
	color: var(--zdh-text);
}

.zdh-single-project__badges {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
}

.zdh-single-project__status,
.zdh-single-project__category {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	text-decoration: none;
}

.zdh-single-project__status {
	background: var(--zdh-status);
	color: #ffffff;
}

.zdh-single-project__status.has-pulse::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ffffff;
	animation: zdh-pulse 2s ease infinite;
}

.zdh-single-project__category {
	background: color-mix(in srgb, var(--zdh-accent) 12%, transparent);
	color: var(--zdh-accent);
}

@supports not (background: color-mix(in srgb, red, blue)) {
	.zdh-single-project__category {
		background: rgba(13, 148, 136, 0.12);
	}
}

.zdh-single-project__title {
	font-family: "Fraunces", Georgia, serif;
	font-size: 44px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
}

.zdh-single-project__location {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--zdh-text-muted);
	font-size: 15px;
	margin: 0 0 32px;
}

.zdh-single-project__location svg {
	fill: var(--zdh-accent);
}

.zdh-single-project__thumbnail {
	margin-bottom: 32px;
	border-radius: 12px;
	overflow: hidden;
}

.zdh-single-project__thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}

.zdh-single-project__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 24px;
	padding: 28px;
	margin-bottom: 40px;
	background: color-mix(in srgb, var(--zdh-accent) 5%, #ffffff);
	border: 1px solid color-mix(in srgb, var(--zdh-accent) 20%, transparent);
	border-radius: 16px;
}

.zdh-single-project__stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.zdh-single-project__stat-value {
	font-family: "Fraunces", Georgia, serif;
	font-size: 32px;
	font-weight: 700;
	color: var(--zdh-accent);
	line-height: 1;
}

.zdh-single-project__stat-label {
	font-size: 13px;
	color: var(--zdh-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.6px;
	font-weight: 600;
}

.zdh-single-project__stat .zdh-progress-bar {
	margin-top: 12px;
}

.zdh-single-project__content {
	font-size: 16px;
	line-height: 1.7;
}
