/* Nous rejoindre — styles front */

.nrj-wrap {
	--nrj-accent: #1d3557;
	--nrj-accent-soft: #457b9d;
	--nrj-gold: #e9c46a;
	--nrj-radius: 14px;
	display: inline-block;
}

.nrj-wrap *,
.nrj-modal *,
.nrj-monitor * {
	box-sizing: border-box;
}

/* ---------- Bouton d'ouverture ---------- */
.nrj-open-btn {
	appearance: none;
	cursor: pointer;
	border: none;
	background: var(--nrj-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	padding: 14px 28px;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(29, 53, 87, 0.28);
	transition: transform 0.15s ease, background 0.15s ease;
}

.nrj-open-btn:hover {
	background: var(--nrj-accent-soft);
	transform: translateY(-2px);
}

/* ---------- Modal ---------- */
.nrj-modal { --nrj-accent: #1d3557; --nrj-accent-soft: #457b9d; --nrj-gold: #e9c46a; }

.nrj-modal[hidden] {
	display: none;
}

.nrj-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

.nrj-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(2px);
}

.nrj-modal__box {
	position: relative;
	background: #fff;
	border-radius: 18px;
	max-width: 560px;
	width: 100%;
	max-height: 92vh;
	overflow-y: auto;
	padding: 30px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
	animation: nrj-pop 0.22s ease;
}

@keyframes nrj-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.nrj-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	border: none;
	background: transparent;
	font-size: 2rem;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
}

.nrj-modal__close:hover {
	color: var(--nrj-accent);
}

.nrj-modal__title {
	margin: 0 0 18px;
	font-size: 1.5rem;
	color: var(--nrj-accent);
	padding-right: 24px;
}

/* ---------- Formulaire ---------- */
.nrj-field {
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
}

.nrj-field label {
	font-weight: 600;
	margin-bottom: 5px;
	color: #1f2937;
	font-size: 0.92rem;
}

.nrj-field input[type="text"],
.nrj-field input[type="tel"],
.nrj-field input[type="email"],
.nrj-field input[type="file"],
.nrj-field select,
.nrj-section-control input,
.nrj-section-control select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	font-size: 1rem;
	background: #fff;
	color: #1f2937;
}

.nrj-field input:focus,
.nrj-field select:focus,
.nrj-section-control input:focus,
.nrj-section-control select:focus {
	outline: none;
	border-color: var(--nrj-accent-soft);
	box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.15);
}

.nrj-grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

.nrj-req {
	color: #d63638;
}

.nrj-hint {
	font-size: 0.78rem;
	color: #64748b;
	margin-top: 4px;
}

.nrj-zone {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.nrj-radio {
	flex-direction: row !important;
	align-items: center;
	gap: 8px;
	font-weight: 500 !important;
	cursor: pointer;
	margin: 0 !important;
	display: inline-flex;
}

.nrj-radio input {
	width: auto !important;
}

.nrj-sep {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 18px 0 12px;
}

.nrj-optional-note {
	margin: 0 0 12px;
	font-size: 0.85rem;
	color: #64748b;
	font-style: italic;
}

.nrj-submit {
	appearance: none;
	cursor: pointer;
	border: none;
	width: 100%;
	background: var(--nrj-gold);
	color: #1d1d1d;
	font-weight: 800;
	font-size: 1.05rem;
	padding: 14px;
	border-radius: 10px;
	margin-top: 8px;
	transition: filter 0.15s ease;
}

.nrj-submit:hover {
	filter: brightness(0.96);
}

.nrj-submit:disabled {
	opacity: 0.7;
	cursor: default;
}

.nrj-alert {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	padding: 10px 12px;
	border-radius: 10px;
	margin-bottom: 14px;
	font-size: 0.92rem;
}

/* Honeypot : masqué visuellement mais accessible aux robots. */
.nrj-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Confirmation ---------- */
.nrj-success {
	text-align: center;
	padding: 30px 10px;
}

.nrj-success__icon {
	font-size: 3rem;
	display: block;
	margin-bottom: 12px;
}

.nrj-success__text {
	margin: 0 auto;
	max-width: 420px;
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--nrj-accent);
	line-height: 1.5;
}

body.nrj-modal-open {
	overflow: hidden;
}

@media (max-width: 520px) {
	.nrj-grid2 {
		grid-template-columns: 1fr;
	}
	.nrj-modal__box {
		padding: 22px 18px;
	}
}

/* ===================================================================
   Moniteur
   =================================================================== */
.nrj-monitor {
	--nrj-accent: #1d3557;
	--nrj-accent-soft: #457b9d;
	--nrj-gold: #e9c46a;
	max-width: 960px;
	margin: 0 auto;
}

.nrj-monitor--locked {
	text-align: center;
	padding: 30px;
	border: 1px dashed #cbd5e1;
	border-radius: 14px;
	color: #64748b;
}

.nrj-stats {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 22px;
}

.nrj-stat {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 18px 24px;
	text-align: center;
	min-width: 160px;
}

.nrj-stat--main {
	background: linear-gradient(135deg, var(--nrj-accent), var(--nrj-accent-soft));
	border: none;
	color: #fff;
}

.nrj-stat__num {
	display: block;
	font-size: 2.4rem;
	font-weight: 800;
	line-height: 1;
}

.nrj-stat__label {
	display: block;
	margin-top: 6px;
	font-size: 0.85rem;
	opacity: 0.9;
}

/* Répartition par département */
.nrj-bydept {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 18px 20px;
	margin-bottom: 22px;
}

.nrj-bydept__title {
	margin: 0 0 14px;
	color: var(--nrj-accent);
	font-size: 1rem;
}

.nrj-bydept__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nrj-bydept__item {
	display: grid;
	grid-template-columns: 160px 1fr 48px;
	align-items: center;
	gap: 12px;
	font-size: 0.9rem;
}

.nrj-bydept__name {
	color: #334155;
	font-weight: 600;
}

.nrj-bydept__bar {
	background: #eef2f7;
	border-radius: 999px;
	height: 10px;
	overflow: hidden;
}

.nrj-bydept__bar span {
	display: block;
	height: 100%;
	background: var(--nrj-gold);
	border-radius: 999px;
}

.nrj-bydept__num {
	text-align: right;
	font-weight: 700;
	color: var(--nrj-accent);
}

/* Filtres */
.nrj-filters {
	display: flex;
	gap: 16px;
	align-items: flex-end;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.nrj-filters .nrj-field {
	margin-bottom: 0;
	min-width: 200px;
}

.nrj-filters__reset {
	color: var(--nrj-accent-soft);
	text-decoration: underline;
	font-size: 0.9rem;
	padding-bottom: 10px;
}

/* Table */
.nrj-table-wrap {
	overflow-x: auto;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
}

.nrj-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 0.92rem;
}

.nrj-table th,
.nrj-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid #eef1f5;
}

.nrj-table th {
	background: #f8fafc;
	color: var(--nrj-accent);
	font-weight: 700;
	white-space: nowrap;
}

.nrj-table tbody tr:hover {
	background: #f8fafc;
}

.nrj-table__empty {
	text-align: center;
	color: #94a3b8;
	padding: 24px;
}

/* Pagination */
.nrj-pagination {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 16px;
	justify-content: center;
}

.nrj-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	color: var(--nrj-accent);
	text-decoration: none;
	font-weight: 600;
}

.nrj-page--current {
	background: var(--nrj-accent);
	color: #fff;
	border-color: var(--nrj-accent);
}

@media (max-width: 640px) {
	.nrj-bydept__item {
		grid-template-columns: 110px 1fr 40px;
		font-size: 0.82rem;
	}

	/* Table → cartes empilées sur mobile */
	.nrj-table thead {
		display: none;
	}
	.nrj-table,
	.nrj-table tbody,
	.nrj-table tr,
	.nrj-table td {
		display: block;
		width: 100%;
	}
	.nrj-table tr {
		border-bottom: 2px solid #eef1f5;
		padding: 8px 0;
	}
	.nrj-table td {
		border: none;
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 6px 14px;
	}
	.nrj-table td::before {
		content: attr(data-label);
		font-weight: 700;
		color: #64748b;
	}
}
