.asmc-directory {
	--asmc-primary: #021e3d;
	--asmc-accent: #d23d33;
	--asmc-surface: #fff;
	--asmc-soft: #f3f6f9;
	--asmc-text: #142337;
	--asmc-muted: #617084;
	--asmc-radius: 16px;
	position: relative;
	width: 100%;
	max-width: 1440px;
	margin: 30px auto;
	color: var(--asmc-text);
	font: inherit;
}

.asmc-directory *,
.asmc-directory *::before,
.asmc-directory *::after {
	box-sizing: border-box;
}

/* En-tête et filtres : même langage visuel que l'extension Galerie. */
.asmc-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}

.asmc-heading h2 {
	margin: 0 0 8px;
	color: var(--asmc-primary);
	font-size: clamp(1.65rem, 3vw, 2.5rem);
	line-height: 1.15;
}

.asmc-heading p {
	max-width: 680px;
	margin: 0;
	color: var(--asmc-muted);
}

.asmc-count {
	flex: 0 0 auto;
	padding: 9px 15px;
	border-radius: 999px;
	background: var(--asmc-primary);
	color: #fff;
	font-size: .9rem;
	font-weight: 700;
}

.asmc-filters {
	display: grid;
	grid-template-columns: minmax(210px, 1.45fr) minmax(170px, 1fr) auto auto;
	align-items: center;
	gap: 12px;
	margin-bottom: 28px;
	padding: 16px;
	border: 1px solid #dbe3eb;
	border-radius: var(--asmc-radius);
	background: var(--asmc-soft);
}

.asmc-filters input,
.asmc-filters select {
	width: 100%;
	min-height: 44px;
	border: 1px solid #c9d4df;
	border-radius: 10px;
	background-color: #fff;
	color: var(--asmc-text);
	font: inherit;
}

.asmc-filters input {
	padding: 8px 12px 8px 42px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 24 24' fill='none' stroke='%23617084' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 13px center;
}

.asmc-filters select {
	padding: 8px 38px 8px 12px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'%3E%3Cpath fill='%23021E3D' d='m5 7 5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

.asmc-filters button,
.asmc-filters__reset {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 9px 16px;
	border: 1px solid transparent;
	border-radius: 10px;
	font: inherit;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}

.asmc-filters button {
	background: var(--asmc-accent);
	color: #fff;
	cursor: pointer;
}

.asmc-filters button:hover {
	background: #b83129;
}

.asmc-filters__reset {
	border-color: #c9d4df;
	background: #fff;
	color: var(--asmc-primary) !important;
}

.asmc-filters input:focus,
.asmc-filters select:focus,
.asmc-filters button:focus-visible,
.asmc-filters__reset:focus-visible,
.asmc-card__socials a:focus-visible {
	outline: 3px solid var(--asmc-accent);
	outline: 3px solid color-mix(in srgb, var(--asmc-accent) 60%, white);
	outline-offset: 2px;
}

.asmc-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

/* Carte aviation premium conforme à l'identité visuelle du site. */
.asmc-card {
	--asmc-seniority-color: #fff;
	position: relative;
	isolation: isolate;
	display: flex;
	min-width: 0;
	min-height: 440px;
	overflow: hidden;
	align-items: center;
	flex-direction: column;
	padding: 45px 26px 30px;
	border: 1px solid rgba(66, 119, 163, .52);
	border-radius: 24px;
	background: linear-gradient(145deg, #03172e 0%, #062442 53%, #07335a 100%);
	box-shadow: 0 8px 28px rgba(2, 30, 61, .13);
	color: #fff;
	text-align: center;
	transition: box-shadow .2s ease, transform .2s ease;
}

.asmc-card:hover {
	box-shadow: 0 14px 38px rgba(2, 30, 61, .22);
	transform: translateY(-3px);
}

.asmc-card::before,
.asmc-card::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
}

.asmc-card::before {
	right: -18%;
	bottom: -106px;
	width: 130%;
	height: 190px;
	border-radius: 52% 48% 0 0 / 36% 34% 0 0;
	background: rgba(10, 59, 101, .88);
	transform: rotate(-5deg);
}

.asmc-card::after {
	right: -32%;
	bottom: -137px;
	width: 154%;
	height: 218px;
	border-radius: 48% 52% 0 0 / 34% 30% 0 0;
	background: rgba(24, 91, 139, .64);
	transform: rotate(6deg);
}

.asmc-card > * {
	position: relative;
	z-index: 1;
}

.asmc-card__glow {
	position: absolute;
	z-index: 0;
	top: -84px;
	left: 50%;
	width: 280px;
	height: 220px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(57, 139, 199, .22), transparent 68%);
	pointer-events: none;
}

.asmc-card__logo {
	position: absolute;
	z-index: 2;
	top: 17px;
	right: 18px;
	width: 49px;
	height: 49px;
	object-fit: contain;
	opacity: .2;
	filter: saturate(.72);
}

.asmc-card__logo-fallback {
	position: absolute;
	z-index: 2;
	top: 19px;
	right: 19px;
	display: grid;
	width: 43px;
	height: 43px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 50%;
	color: rgba(255, 255, 255, .28);
	font-size: .72rem;
	font-weight: 900;
}

.asmc-card__user-icon {
	display: grid;
	width: 106px;
	height: 106px;
	margin: 0 auto 17px;
	place-items: center;
	border: 2px solid currentColor;
	border-radius: 50%;
	background: rgba(1, 14, 29, .35);
	box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .035), 0 9px 24px rgba(0, 0, 0, .2);
	color: var(--asmc-seniority-color);
}

.asmc-card__user-icon svg {
	width: 75px;
	height: 75px;
	fill: currentColor;
	filter: drop-shadow(0 5px 14px rgba(0, 0, 0, .2));
}

.asmc-card__name,
.asmc-card h3 {
	margin: 0 0 13px;
	color: var(--asmc-seniority-color);
	font-size: clamp(1.45rem, 2.1vw, 1.8rem);
	font-weight: 850;
	line-height: 1.15;
	text-shadow: 0 2px 8px rgba(0, 0, 0, .22);
	word-break: break-word;
}

/* Bandeau sombre simple : seul le texte reprend la couleur du rôle Base44. */
.asmc-card__role {
	--asmc-role: #475569;
	display: inline-flex;
	min-height: 34px;
	max-width: 100%;
	align-items: center;
	justify-content: center;
	padding: 6px 20px;
	border: 1px solid rgba(255, 255, 255, .17);
	border-radius: 6px;
	background: linear-gradient(180deg, rgba(23, 38, 61, .96) 0%, rgba(5, 17, 34, .97) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 12px rgba(0, 0, 0, .23);
	color: var(--asmc-role);
	font-size: .84rem;
	font-weight: 850;
	line-height: 1.15;
	text-shadow: 0 0 9px color-mix(in srgb, var(--asmc-role) 35%, transparent);
}

.asmc-card--new_member {
	--asmc-seniority-color: #b8bec7;
}

.asmc-card--cadet,
.asmc-card--first_officer,
.asmc-card--captain {
	--asmc-seniority-color: #d2d7de;
}

.asmc-card--legend {
	--asmc-seniority-color: #f5c13a;
}

.asmc-card__seniority {
	display: flex;
	min-width: 0;
	min-height: 48px;
	max-width: 100%;
	align-items: center;
	justify-content: center;
	margin: 18px 0 0;
	color: #fff;
	line-height: 1.2;
}

.asmc-epaulette {
	position: relative;
	display: inline-flex;
	max-width: 100%;
	height: 35px;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 4px 12px 4px 18px;
	border: 1px solid #667385;
	border-radius: 4px;
	background: linear-gradient(180deg, #273247 0%, #0b1425 48%, #1b273b 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 3px 8px rgba(0, 0, 0, .48);
	white-space: nowrap;
}

.asmc-epaulette::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 10px;
	border-radius: 3px 0 0 3px;
	background: linear-gradient(90deg, #4e5866 0%, #f4f5f6 48%, #697381 100%);
	box-shadow: inset -1px 0 1px rgba(0, 0, 0, .58), 1px 0 2px rgba(0, 0, 0, .5);
}

.asmc-epaulette--new_member {
	border-color: #555f6c;
	background: linear-gradient(180deg, #171c24 0%, #030507 49%, #111720 100%);
}

.asmc-epaulette i {
	display: block;
	flex: 0 0 8px;
	width: 8px;
	height: 23px;
	margin: 0;
	border-radius: 1px;
	background: linear-gradient(90deg, #737d89 0%, #f4f5f6 42%, #c4cad1 72%, #707a86 100%);
	box-shadow: inset 1px 0 0 rgba(255, 255, 255, .72), 1px 0 1px rgba(0, 0, 0, .55);
}

.asmc-epaulette__rank {
	margin-left: 8px;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	text-shadow: 0 1px 1px rgba(0, 0, 0, .58);
}

.asmc-epaulette__duration {
	margin-left: 6px;
	color: #d2d7de;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
}

.asmc-epaulette--legend {
	border-color: #77818f;
	background: linear-gradient(180deg, #253148 0%, #081326 49%, #18263c 100%);
}

.asmc-epaulette--legend::before {
	background: linear-gradient(90deg, #895b00 0%, #ffd23b 48%, #9e6900 100%);
}

.asmc-epaulette--legend i {
	background: linear-gradient(90deg, #a66e00 0%, #ffdc4c 40%, #efb719 72%, #8c5b00 100%);
	box-shadow: inset 1px 0 0 rgba(255, 246, 161, .75), 1px 0 1px rgba(0, 0, 0, .52);
}

.asmc-epaulette--legend .asmc-epaulette__duration {
	color: #f5c13a;
}

/* Un seul bandeau neutre, extensible et automatiquement replié sur plusieurs lignes. */
.asmc-card__socials {
	display: flex;
	width: fit-content;
	min-width: min(240px, 100%);
	max-width: 100%;
	min-height: 47px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 3px;
	margin-top: 19px;
	padding: 5px 8px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 7px;
	background: linear-gradient(180deg, rgba(19, 34, 55, .94), rgba(4, 16, 31, .96));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 4px 12px rgba(0, 0, 0, .2);
	color: var(--asmc-seniority-color);
}

.asmc-card__socials a {
	display: grid;
	width: 35px;
	height: 35px;
	flex: 0 0 35px;
	place-items: center;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	text-decoration: none !important;
	transition: background-color .2s ease, transform .2s ease;
}

.asmc-card__socials a:hover,
.asmc-card__socials a:focus-visible {
	background: rgba(255, 255, 255, .1);
	color: inherit;
	transform: translateY(-2px);
}

.asmc-card__socials svg {
	display: block;
	width: 20px;
	height: 20px;
	overflow: visible;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.asmc-card__socials .fill {
	fill: currentColor;
	stroke: none;
}

.asmc-card__socials .asmc-icon-cutout {
	fill: #07182e;
	stroke: none;
}

.asmc-social-custom-icon {
	display: block;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: var(--asmc-social-mask) center / contain no-repeat;
	mask: var(--asmc-social-mask) center / contain no-repeat;
}

.asmc-empty {
	padding: 55px 20px;
	border: 1px dashed #b8c5d1;
	border-radius: var(--asmc-radius);
	background: var(--asmc-soft);
	text-align: center;
}

.asmc-empty span {
	display: inline-block;
	color: var(--asmc-accent);
	font-size: 40px;
	line-height: 1;
}

.asmc-empty h3 {
	margin: 8px 0 4px;
	color: var(--asmc-primary);
}

.asmc-empty p {
	margin: 0;
	color: var(--asmc-muted);
}

.asmc-pagination {
	margin-top: 30px;
}

.asmc-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.asmc-pagination a,
.asmc-pagination span {
	display: flex;
	min-width: 40px;
	min-height: 40px;
	align-items: center;
	justify-content: center;
	padding: 7px 12px;
	border: 1px solid #ccd7e1;
	border-radius: 9px;
	color: var(--asmc-primary);
	text-decoration: none;
}

.asmc-pagination .current {
	border-color: var(--asmc-primary);
	background: var(--asmc-primary);
	color: #fff;
}

.asmc-directory .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	margin: -1px !important;
	padding: 0 !important;
	clip: rect(0, 0, 0, 0) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

@media (max-width: 980px) {
	.asmc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.asmc-filters {
		grid-template-columns: repeat(2, minmax(150px, 1fr));
	}

	.asmc-card {
		min-height: 430px;
	}
}

@media (max-width: 640px) {
	.asmc-directory {
		margin: 20px auto;
	}

	.asmc-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 14px;
	}

	.asmc-filters {
		grid-template-columns: 1fr;
		padding: 13px;
	}

	.asmc-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.asmc-card {
		min-height: 420px;
		padding: 42px 20px 27px;
	}

	.asmc-card__user-icon {
		width: 98px;
		height: 98px;
	}

	.asmc-card__user-icon svg {
		width: 69px;
		height: 69px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asmc-card,
	.asmc-card__socials a {
		transition: none;
	}
}
