/* Nos membres — styles front (board + modale) */

.nm-board {
	--nm-columns: 3;
	--nm-accent: #1d3557;
	--nm-accent-soft: #457b9d;
	--nm-bg-card: #ffffff;
	--nm-radius: 16px;
	--nm-shadow: 0 6px 20px rgba(29, 53, 87, 0.12);
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
}

.nm-board *,
.nm-board *::before,
.nm-board *::after {
	box-sizing: border-box;
}

.nm-board__title {
	text-align: center;
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	color: var(--nm-accent);
	margin: 0 0 2rem;
}

.nm-empty {
	text-align: center;
	color: #6b7280;
	font-style: italic;
}

/* ---------- Grille ---------- */
.nm-grid {
	display: grid;
	/* Colonnes plafonnées (cartes plus compactes) et grille centrée. */
	grid-template-columns: repeat(var(--nm-columns), minmax(0, var(--nm-card-max, 200px)));
	justify-content: center;
	gap: 20px;
}

/* Carte unique → centrée. */
.nm-grid--single {
	grid-template-columns: minmax(0, var(--nm-card-max, 200px));
}

@media (max-width: 900px) {
	.nm-grid {
		grid-template-columns: repeat(2, minmax(0, var(--nm-card-max, 200px)));
	}
}

@media (max-width: 560px) {
	.nm-grid {
		/* On garde 2 colonnes sur mobile, avec un espacement réduit. */
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.nm-card__photo {
		width: 72px;
		height: 72px;
	}

	.nm-card__placeholder {
		font-size: 1.5rem;
	}
}

/* ---------- Carte ---------- */
.nm-card {
	appearance: none;
	border: 1px solid rgba(29, 53, 87, 0.08);
	background: var(--nm-bg-card);
	border-radius: var(--nm-radius);
	padding: 18px 14px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	font: inherit;
	color: inherit;
	width: 100%;
}

.nm-card:hover,
.nm-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--nm-shadow);
	outline: none;
	border-color: rgba(69, 123, 157, 0.4);
}

.nm-card__photo {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 12px;
	background: linear-gradient(135deg, var(--nm-accent), var(--nm-accent-soft));
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(29, 53, 87, 0.18);
}

.nm-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nm-card__placeholder {
	color: #fff;
	font-size: 1.9rem;
	font-weight: 700;
	letter-spacing: 1px;
}

.nm-card__name {
	font-size: 1rem;
	font-weight: 700;
	color: var(--nm-accent);
	line-height: 1.3;
}

.nm-card__role {
	margin-top: 3px;
	font-size: 0.82rem;
	color: var(--nm-accent-soft);
	font-weight: 500;
}

/* ---------- Modale ---------- */
.nm-modal[hidden] {
	display: none;
}

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

.nm-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(2px);
	animation: nm-fade 0.2s ease;
}

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

@keyframes nm-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

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

.nm-modal__close {
	position: absolute;
	top: 12px;
	right: 16px;
	border: none;
	background: transparent;
	font-size: 2rem;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 4px 8px;
	transition: color 0.15s ease;
}

.nm-modal__close:hover {
	color: #1d3557;
}

.nm-modal__header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 20px;
	padding-right: 24px;
}

.nm-modal__photo {
	flex: 0 0 auto;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	overflow: hidden;
	background: linear-gradient(135deg, #1d3557, #457b9d);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 2rem;
	font-weight: 700;
}

.nm-modal__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nm-modal__name {
	margin: 0;
	font-size: 1.5rem;
	color: #1d3557;
}

.nm-modal__role {
	margin: 4px 0 0;
	color: #457b9d;
	font-weight: 500;
}

.nm-modal__bio {
	color: #334155;
	line-height: 1.6;
	margin-bottom: 20px;
}

.nm-modal__bio p {
	margin: 0 0 0.8em;
}

.nm-modal__contacts {
	list-style: none;
	margin: 0;
	padding: 16px 0 0;
	border-top: 1px solid #e2e8f0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.nm-modal__contacts li {
	margin: 0;
}

.nm-modal__contacts a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #eef2f7;
	color: #1d3557;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: background 0.15s ease, color 0.15s ease;
}

.nm-modal__contacts a:hover {
	background: #1d3557;
	color: #fff;
}

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