/**
 * Section Impact Social — tableau de bord frontend.
 */

.nut-impact-dashboard {
	position: relative;
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	padding: clamp(3.5rem, 7vw, 5.5rem) 0;
	background: linear-gradient(160deg, var(--nut-navy, #050A5E) 0%, var(--nut-navy-dark, #030740) 55%, #061060 100%);
	overflow: hidden;
	box-sizing: border-box;
}

.nut-impact-dashboard::before {
	content: '';
	position: absolute;
	top: -40%;
	right: -15%;
	width: min(520px, 70vw);
	height: min(520px, 70vw);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(57, 181, 74, 0.18) 0%, transparent 70%);
	pointer-events: none;
}

.nut-impact-dashboard::after {
	content: '';
	position: absolute;
	bottom: -30%;
	left: -10%;
	width: min(400px, 60vw);
	height: min(400px, 60vw);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
	pointer-events: none;
}

.nut-impact-dashboard__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 clamp(1rem, 4vw, 2rem);
	box-sizing: border-box;
}

.nut-impact-dashboard__header {
	text-align: center;
	margin-bottom: clamp(2rem, 4vw, 3rem);
	max-width: 52ch;
	margin-left: auto;
	margin-right: auto;
}

.nut-impact-dashboard__eyebrow {
	display: inline-block;
	font-family: 'Quicksand', sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nut-green, #39B54A);
	margin-bottom: 0.65rem;
}

.nut-impact-dashboard__title {
	font-family: 'Quicksand', sans-serif;
	font-size: clamp(1.65rem, 3.5vw, 2.35rem);
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.75rem;
	line-height: 1.2;
}

.nut-impact-dashboard__subtitle {
	font-family: 'Open Sans', sans-serif;
	font-size: 0.95rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.72);
	margin: 0;
}

.nut-impact-dashboard__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: clamp(1.25rem, 3vw, 2rem);
	align-items: stretch;
}

.nut-impact-dashboard__stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

.nut-impact-stat {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 1rem 1.1rem;
	background: rgba(255, 255, 255, 0.97);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 1rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nut-impact-stat:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.nut-impact-stat__icon {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: linear-gradient(135deg, rgba(57, 181, 74, 0.18) 0%, rgba(5, 10, 94, 0.08) 100%);
	flex-shrink: 0;
	position: relative;
}

.nut-impact-stat__icon::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 18px;
	height: 18px;
	background: var(--nut-green, #39B54A);
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
}

.nut-impact-stat--jobs .nut-impact-stat__icon::after {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E");
}

.nut-impact-stat--producers .nut-impact-stat__icon::after {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3Zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3Zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5C15 14.17 10.33 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3Zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3Zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5C15 14.17 10.33 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5Z'/%3E%3C/svg%3E");
}

.nut-impact-stat--hectares .nut-impact-stat__icon::after {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 3 2 12h3v8h6v-6h2v6h6v-8h3L12 3Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 3 2 12h3v8h6v-6h2v6h6v-8h3L12 3Z'/%3E%3C/svg%3E");
}

.nut-impact-stat--trees .nut-impact-stat__icon::after {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17 8C17 5.24 14.76 3 12 3S7 5.24 7 8c-1.66 0-3 1.34-3 3 0 1.31.84 2.41 2 2.83V21h8v-7.17c1.16-.42 2-1.52 2-2.83 0-1.66-1.34-3-3-3Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17 8C17 5.24 14.76 3 12 3S7 5.24 7 8c-1.66 0-3 1.34-3 3 0 1.31.84 2.41 2 2.83V21h8v-7.17c1.16-.42 2-1.52 2-2.83 0-1.66-1.34-3-3-3Z'/%3E%3C/svg%3E");
}

.nut-impact-stat--tons .nut-impact-stat__icon::after {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-7 14H7v-2h5v2Zm5-4H7v-2h10v2Zm0-4H7V7h10v2Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-7 14H7v-2h5v2Zm5-4H7v-2h10v2Zm0-4H7V7h10v2Z'/%3E%3C/svg%3E");
}

.nut-impact-stat--co2 .nut-impact-stat__icon::after {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17 8C17 5.24 14.76 3 12 3S7 5.24 7 8c-1.66 0-3 1.34-3 3 0 1.31.84 2.41 2 2.83V21h8v-7.17c1.16-.42 2-1.52 2-2.83 0-1.66-1.34-3-3-3Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17 8C17 5.24 14.76 3 12 3S7 5.24 7 8c-1.66 0-3 1.34-3 3 0 1.31.84 2.41 2 2.83V21h8v-7.17c1.16-.42 2-1.52 2-2.83 0-1.66-1.34-3-3-3Z'/%3E%3C/svg%3E");
}

.nut-impact-stat--families .nut-impact-stat__icon::after {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8h5Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8h5Z'/%3E%3C/svg%3E");
}

.nut-impact-stat__body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.nut-impact-stat__value {
	font-family: 'Quicksand', sans-serif;
	font-size: clamp(1.35rem, 2.5vw, 1.75rem);
	font-weight: 700;
	line-height: 1;
	color: var(--nut-navy, #050A5E);
	font-variant-numeric: tabular-nums;
}

.nut-impact-stat__label {
	font-family: 'Open Sans', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--nut-text-muted, #5A5A6E);
}

.nut-impact-dashboard__chart-panel {
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.97);
	border-radius: 1.15rem;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.nut-impact-dashboard__chart-head {
	margin-bottom: 1rem;
}

.nut-impact-dashboard__chart-title {
	font-family: 'Quicksand', sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--nut-navy, #050A5E);
	margin: 0 0 0.35rem;
}

.nut-impact-dashboard__chart-desc {
	font-family: 'Open Sans', sans-serif;
	font-size: 0.82rem;
	color: var(--nut-text-muted, #5A5A6E);
	margin: 0;
	line-height: 1.5;
}

.nut-impact-chart {
	position: relative;
	flex: 1;
	min-height: 260px;
}

.nut-impact-chart canvas {
	width: 100% !important;
	height: 100% !important;
	max-height: 320px;
}

.nut-impact-dashboard__footnote {
	text-align: center;
	margin: 2rem 0 0;
}

.nut-impact-dashboard__footnote a {
	font-family: 'Quicksand', sans-serif;
	font-weight: 700;
	font-size: 0.9rem;
	color: #fff;
	text-decoration: none;
	border-bottom: 2px solid var(--nut-green, #39B54A);
	padding-bottom: 2px;
	transition: color 0.2s, border-color 0.2s;
}

.nut-impact-dashboard__footnote a:hover {
	color: var(--nut-green, #39B54A);
}

@media (max-width: 960px) {
	.nut-impact-dashboard__layout {
		grid-template-columns: 1fr;
	}

	.nut-impact-dashboard__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nut-impact-chart {
		min-height: 220px;
	}
}

@media (max-width: 560px) {
	.nut-impact-dashboard__stats {
		grid-template-columns: 1fr;
	}

	.nut-impact-stat {
		padding: 0.9rem 1rem;
	}
}
