/* ─────────────────────────────────────────
   Next Digital — Contact page
   Loaded only on template-contact.php
   Lives inside .nd-site-wrap (dark bezel)
───────────────────────────────────────── */

.nd-contact-main {
	max-width: 1180px;
	margin: 0 auto;
	padding: 72px 48px 32px;
	position: relative;
	z-index: 1;
}

/* ── Full-page animated backdrop (sticky pattern)
   The bg is a sibling of <main> inside .nd-site-wrap. It pins to top:0 of
   the scroll container and stays in view while <main> scrolls over it via
   the -100vh margin-bottom trick. */
.nd-contact-bg {
	position: sticky;
	top: 0;
	width: 100%;
	height: 100vh;
	margin-bottom: -100vh;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}
.nd-contact-bg .nd-bg-svg {
	position: absolute;
	inset: -6%;
	display: block;
	opacity: 0.7;
	will-change: transform, opacity;
}
.nd-bg-svg-1 { color: oklch(72% 0.18 200); }
.nd-bg-svg-2 { color: oklch(68% 0.16 185); mix-blend-mode: screen; }

/* Lueurs — radial gradients pré-floutés, animés en transform/opacity
   uniquement par GSAP. filter:blur set une fois → texture cachée. */
.nd-bg-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	mix-blend-mode: screen;
	will-change: transform, opacity;
	opacity: 0.55;
}
.nd-bg-glow-1 {
	top: -8%; left: -4%;
	width: 520px; height: 520px;
	background: radial-gradient(circle, oklch(62% 0.26 200 / 0.85) 0%, transparent 65%);
}
.nd-bg-glow-2 {
	top: 18%; right: -10%;
	width: 580px; height: 580px;
	background: radial-gradient(circle, oklch(58% 0.22 190 / 0.7) 0%, transparent 65%);
}
.nd-bg-glow-3 {
	bottom: -8%; left: 22%;
	width: 460px; height: 460px;
	background: radial-gradient(circle, oklch(65% 0.20 215 / 0.65) 0%, transparent 65%);
}
.nd-bg-glow-4 {
	top: 55%; left: 8%;
	width: 380px; height: 380px;
	background: radial-gradient(circle, oklch(70% 0.18 175 / 0.5) 0%, transparent 65%);
}

/* All page sections sit above the sticky bg. */
.nd-contact-hero,
.nd-contact-grid,
.nd-contact-map-section {
	position: relative;
	z-index: 1;
}

/* ── Hero ── */
.nd-contact-hero {
	position: relative;
	padding: 48px 0 64px;
	text-align: left;
	max-width: 780px;
}
.nd-contact-hero-bloom {
	position: absolute;
	top: -120px; left: -180px;
	width: 520px; height: 520px;
	background: radial-gradient(circle, oklch(60% 0.24 200 / 0.18) 0%, transparent 65%);
	filter: blur(40px);
	pointer-events: none;
	z-index: 0;
}
.nd-contact-hero > *:not(.nd-contact-hero-bloom) { position: relative; z-index: 1; }

.nd-contact-eyebrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--nd-accent);
	margin: 0 0 22px;
}
.nd-eyebrow-dot {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--nd-accent);
	box-shadow: 0 0 12px var(--nd-accent);
}

.nd-contact-title {
	font-family: 'DM Sans', sans-serif;
	font-size: clamp(36px, 6vw, 68px);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 24px;
	color: var(--nd-text);
}
.nd-contact-title em {
	font-style: italic;
	font-weight: 300;
	color: var(--nd-accent);
}

.nd-contact-sub {
	font-size: 17px;
	line-height: 1.6;
	color: var(--nd-text-mid);
	max-width: 560px;
	margin: 0;
}

/* When intro comes from Gutenberg pattern */
.nd-contact-intro h1 {
	font-size: clamp(36px, 6vw, 68px);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 24px;
}
.nd-contact-intro h1 em { font-style: italic; font-weight: 300; color: var(--nd-accent); }
.nd-contact-intro p {
	font-size: 17px;
	line-height: 1.6;
	color: var(--nd-text-mid);
	max-width: 560px;
}

/* Reduced motion — GSAP also bails out, this is the static fallback. */
@media (prefers-reduced-motion: reduce) {
	.nd-bg-svg,
	.nd-bg-glow { animation: none; transform: none !important; }
}

/* ── Grid ── */
.nd-contact-grid {
	display: grid;
	grid-template-columns: 1.45fr 1fr;
	gap: 24px;
	position: relative;
	z-index: 1;
}

.nd-contact-card {
	background: oklch(12% 0.04 215 / 0.55);
	border: 1px solid oklch(100% 0 0 / 0.10);
	border-radius: 20px;
	padding: 40px;
	backdrop-filter: blur(10px) saturate(1.2);
	-webkit-backdrop-filter: blur(10px) saturate(1.2);
	position: relative;
	overflow: hidden;
	box-shadow:
		inset 0 1px 0 oklch(100% 0 0 / 0.06),
		0 20px 60px -20px oklch(0% 0 0 / 0.5);
}
.nd-contact-card::before {
	content: '';
	position: absolute; inset: 0;
	background:
		radial-gradient(ellipse 70% 40% at 0% 0%, oklch(60% 0.24 200 / 0.10) 0%, transparent 60%),
		linear-gradient(135deg, oklch(100% 0 0 / 0.04) 0%, transparent 40%);
	pointer-events: none;
}

.nd-card-title {
	font-family: 'DM Sans', sans-serif;
	font-size: 22px;
	font-weight: 400;
	color: var(--nd-text);
	margin: 0 0 6px;
	letter-spacing: -0.01em;
}
.nd-card-sub {
	font-size: 13px;
	color: var(--nd-text-dim);
	margin: 0 0 28px;
}

/* ── Form ── */
.nd-contact-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: relative;
}

.nd-form-row {
	display: grid;
	gap: 18px;
}
.nd-form-row-2 { grid-template-columns: 1fr 1fr; }

.nd-field { display: flex; flex-direction: column; gap: 8px; }
.nd-field-label {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: oklch(78% 0.03 215);
}
.nd-field-optional {
	color: var(--nd-text-dim);
	text-transform: none;
	letter-spacing: 0;
	font-size: 10px;
	margin-left: 4px;
}

.nd-field input,
.nd-field select,
.nd-field textarea {
	width: 100%;
	background: oklch(8% 0.04 215 / 0.6);
	border: 1px solid oklch(100% 0 0 / 0.10);
	border-radius: 10px;
	padding: 13px 16px;
	font-family: 'DM Sans', sans-serif;
	font-size: 14.5px;
	color: var(--nd-text);
	transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
	outline: none;
}
.nd-field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.nd-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0b4bf' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px;
	padding-right: 42px;
}

.nd-field input:focus,
.nd-field select:focus,
.nd-field textarea:focus {
	border-color: oklch(60% 0.24 200 / 0.6);
	background: oklch(10% 0.05 215 / 0.7);
	box-shadow: 0 0 0 3px oklch(60% 0.24 200 / 0.12);
}

.nd-field input::placeholder,
.nd-field textarea::placeholder { color: oklch(55% 0.04 215); }

/* Honeypot — hidden from real users, present for bots */
.nd-field-honeypot {
	position: absolute;
	left: -10000px;
	width: 1px; height: 1px;
	overflow: hidden;
}

.nd-form-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-top: 8px;
	flex-wrap: wrap;
}
.nd-form-legal {
	font-size: 11px;
	color: var(--nd-text-dim);
	margin: 0;
	max-width: 280px;
	line-height: 1.5;
}

.nd-form-alert {
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14px;
	margin-bottom: 24px;
	line-height: 1.5;
}
.nd-form-alert-ok {
	background: oklch(60% 0.20 160 / 0.12);
	border: 1px solid oklch(60% 0.20 160 / 0.35);
	color: oklch(85% 0.12 160);
}
.nd-form-alert-err {
	background: oklch(60% 0.22 25 / 0.12);
	border: 1px solid oklch(60% 0.22 25 / 0.35);
	color: oklch(85% 0.14 25);
}
.nd-form-alert strong { display: block; margin-bottom: 2px; font-weight: 500; }

/* ── Info card — datasheet style, no glass.
   Strong typography, vertical accent bar on the left, numbered items.
   Solid dark bg so the animated paths don't bleed through. */
.nd-contact-card.nd-contact-info {
	background: oklch(7% 0.035 220);
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	padding: 40px 36px 32px;
	border: 1px solid oklch(100% 0 0 / 0.06);
	box-shadow: none;
}
.nd-contact-card.nd-contact-info::before {
	background: linear-gradient(180deg,
		var(--nd-accent) 0%,
		oklch(60% 0.24 200 / 0.5) 35%,
		transparent 100%);
	inset: 20px auto 20px 0;
	width: 2px;
	height: auto;
	left: 0;
	border-radius: 0 2px 2px 0;
}
.nd-contact-info .nd-card-title {
	margin-bottom: 32px;
}

.nd-info-list {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	counter-reset: nd-info;
}
.nd-info-item {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 4px 16px;
	padding: 20px 0;
	border-bottom: 1px solid oklch(100% 0 0 / 0.05);
	counter-increment: nd-info;
}
.nd-info-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.nd-info-item::before {
	content: counter(nd-info, decimal-leading-zero);
	grid-row: 1 / 3;
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	letter-spacing: 1px;
	color: oklch(50% 0.12 200);
	padding-top: 3px;
}

.nd-info-label {
	grid-column: 2;
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--nd-text-dim);
	margin-bottom: 4px;
}
.nd-info-value {
	grid-column: 2;
	font-size: 16px;
	line-height: 1.5;
	color: var(--nd-text);
	text-decoration: none;
	font-style: normal;
	transition: color 0.18s;
}
a.nd-info-value:hover { color: var(--nd-accent); }
.nd-info-mute { color: var(--nd-text-dim); font-size: 13px; display: block; margin-top: 2px; }

/* Hint — shimmer line that sweeps across, no pulsing dot. */
.nd-info-hint {
	display: block;
	margin-left: 0;
	padding: 0;
	background: transparent;
	border: 0;
	font-size: 11px;
	color: oklch(78% 0.06 200);
	font-family: 'DM Mono', monospace;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}
.nd-info-hint-text { display: block; margin-bottom: 8px; }
.nd-info-hint-bar {
	display: block;
	height: 1px;
	width: 100%;
	max-width: 200px;
	background: oklch(100% 0 0 / 0.08);
	position: relative;
	overflow: hidden;
	border-radius: 1px;
}
.nd-info-hint-bar::after {
	content: '';
	position: absolute;
	top: 0; left: 0;
	width: 40%;
	height: 100%;
	background: linear-gradient(90deg,
		transparent 0%,
		oklch(60% 0.24 200 / 0.4) 30%,
		oklch(75% 0.20 195 / 1) 50%,
		oklch(60% 0.24 200 / 0.4) 70%,
		transparent 100%);
	animation: nd-shimmer 3.4s ease-in-out infinite;
	will-change: transform;
}
@keyframes nd-shimmer {
	0%   { transform: translateX(-100%); }
	100% { transform: translateX(350%); }
}
@media (prefers-reduced-motion: reduce) {
	.nd-info-hint-bar::after { animation: none; transform: translateX(120%); }
}

/* ── Map ── */
.nd-contact-map-section { margin-bottom: 32px; }
.nd-map-title { margin-bottom: 24px; }

.nd-contact-map-card {
	position: relative;
	border-radius: 22px;
	overflow: hidden;
	border: 1px solid oklch(100% 0 0 / 0.08);
	background: oklch(12% 0.04 215);
	min-height: 420px;
}
.nd-contact-map-frame {
	display: block;
	width: 100%;
	height: 480px;
	border: 0;
	filter: invert(0.92) hue-rotate(170deg) saturate(0.7) brightness(0.95);
}
.nd-contact-map-overlay {
	position: absolute;
	bottom: 20px;
	left: 20px;
	background: oklch(8% 0.04 215 / 0.82);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid oklch(100% 0 0 / 0.10);
	border-radius: 14px;
	padding: 20px 22px;
	max-width: 320px;
	color: var(--nd-text);
}
.nd-map-overlay-h {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--nd-accent);
	margin-bottom: 8px;
}
.nd-map-overlay-addr {
	font-style: normal;
	font-size: 15px;
	line-height: 1.55;
	margin: 0 0 14px;
	color: var(--nd-text);
}
.nd-map-overlay-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-family: 'DM Sans', sans-serif;
	color: var(--nd-accent);
	text-decoration: none;
	border-bottom: 1px solid oklch(60% 0.24 200 / 0.3);
	padding-bottom: 2px;
	transition: border-color 0.18s, color 0.18s;
}
.nd-map-overlay-link:hover {
	color: oklch(72% 0.20 200);
	border-color: var(--nd-accent);
}

/* ── Responsive ── */
@media (max-width: 960px) {
	.nd-contact-grid { grid-template-columns: 1fr; }
	.nd-contact-card { padding: 32px 26px; }
}

@media (max-width: 768px) {
	.nd-contact-main { padding: 48px 22px 24px; }
	.nd-contact-hero { padding: 24px 0 40px; }
	.nd-contact-hero-bloom { width: 320px; height: 320px; top: -80px; left: -120px; }
	.nd-form-row-2 { grid-template-columns: 1fr; }
	.nd-contact-card { padding: 28px 22px; border-radius: 18px; }
	.nd-bg-glow { filter: blur(50px); }
	.nd-bg-glow-1, .nd-bg-glow-2 { width: 360px; height: 360px; }
	.nd-bg-glow-3, .nd-bg-glow-4 { width: 280px; height: 280px; }
	.nd-card-title { font-size: 19px; }
	.nd-form-actions { flex-direction: column; align-items: stretch; }
	.nd-form-actions .nd-btn-primary { justify-content: center; }
	.nd-form-legal { max-width: none; text-align: center; }

	.nd-contact-map-card { min-height: 340px; border-radius: 18px; }
	.nd-contact-map-frame { height: 380px; }
	.nd-contact-map-overlay {
		left: 12px; right: 12px; bottom: 12px;
		max-width: none;
		padding: 16px 18px;
	}
}

@media (max-width: 480px) {
	.nd-contact-main { padding: 36px 14px 16px; }
}
