/* =========================================================================
   Anciens élèves — VWEB
   Module front : grille filtrable + profil modal
   ========================================================================= */

.ae-module {
	--ae-gold: #c9a14a;
	--ae-dark: #1c1c1c;
	--ae-ink: #2a2a2a;
	--ae-muted: #6b7280;
	--ae-line: #e5e7eb;
	--ae-bg-soft: #f5f6f7;
	--ae-radius: 14px;
	--ae-columns: 4;
	--ae-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);

	width: 100%;
	max-width: none;
	margin: 0;
	padding: 8px 0 40px;
	color: var(--ae-ink);
	font-family: inherit;
	box-sizing: border-box;
}
.ae-module *,
.ae-module *::before,
.ae-module *::after { box-sizing: border-box; }

/* ---------- Barre de filtres ---------- */
.ae-toolbar { margin-bottom: 28px; }
.ae-toolbar__title {
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	margin: 0 0 14px;
}
.ae-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
}
.ae-select {
	flex: 1 1 220px;
	min-width: 180px;
	position: relative;
}
.ae-select__label {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ae-muted);
	margin-bottom: 6px;
}
.ae-filter {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: #fff;
	border: 1px solid var(--ae-line);
	border-radius: 10px;
	padding: 13px 40px 13px 16px;
	font-size: 0.95rem;
	color: var(--ae-ink);
	cursor: pointer;
	transition: border-color 0.18s, box-shadow 0.18s;
}
.ae-filter:focus {
	outline: none;
	border-color: var(--ae-gold);
	box-shadow: 0 0 0 3px rgba(201, 161, 74, 0.18);
}
.ae-select::after {
	content: "";
	position: absolute;
	right: 16px;
	bottom: 20px;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--ae-muted);
	border-bottom: 2px solid var(--ae-muted);
	transform: rotate(45deg);
	pointer-events: none;
}
.ae-reset {
	flex: 0 0 auto;
	background: var(--ae-dark);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 13px 22px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s, transform 0.12s;
}
.ae-reset:hover { background: #000; }
.ae-reset:active { transform: translateY(1px); }

/* ---------- Grille ---------- */
.ae-grid {
	display: grid;
	grid-template-columns: repeat(var(--ae-columns), 1fr);
	gap: 20px;
}

/* ---------- Carte ---------- */
.ae-card {
	position: relative;
	border-radius: var(--ae-radius);
	overflow: hidden;
	cursor: pointer;
	background: var(--ae-bg-soft);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	outline: none;
}
.ae-card:hover,
.ae-card:focus-visible {
	transform: translateY(-5px);
	box-shadow: var(--ae-shadow);
}
.ae-card:focus-visible { box-shadow: 0 0 0 3px rgba(201, 161, 74, 0.55), var(--ae-shadow); }

.ae-card__media {
	position: relative;
	aspect-ratio: 3 / 4;
	background-size: cover;
	background-position: center;
	background-color: #d7dbe0;
	display: flex;
	align-items: flex-end;
}
.ae-card__noimg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.4rem;
	opacity: 0.4;
}
.ae-card__media::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 42%, rgba(0, 0, 0, 0) 70%);
	transition: opacity 0.25s;
}
.ae-card:hover .ae-card__media::before { opacity: 0.92; }

.ae-card__overlay {
	position: relative;
	z-index: 1;
	padding: 18px 18px 20px;
	color: #fff;
	width: 100%;
}
.ae-card__subtitle {
	font-size: 0.74rem;
	font-weight: 600;
	margin: 0 0 6px;
	opacity: 0.92;
	line-height: 1.3;
}
.ae-card__title {
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 8px;
}
.ae-card__lieu {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	margin: 0;
	opacity: 0.9;
}

/* Épingle de localisation */
.ae-pin {
	display: inline-block;
	width: 11px;
	height: 11px;
	border-radius: 50% 50% 50% 0;
	background: currentColor;
	transform: rotate(-45deg);
	position: relative;
	flex: 0 0 auto;
}
.ae-pin::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 5px;
	height: 5px;
	background: #fff;
	border-radius: 50%;
}
.ae-pin--dark { color: var(--ae-gold); }
.ae-pin--dark::after { background: #fff; }

/* ---------- États vides ---------- */
.ae-empty,
.ae-noresult {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--ae-muted);
	padding: 40px 0;
	font-size: 1rem;
}

/* ---------- Modale profil ---------- */
.ae-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	overflow-y: auto;
}
.ae-modal.is-open { display: flex; }
.ae-modal__overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 15, 0.6);
	backdrop-filter: blur(3px);
	animation: ae-fade 0.2s ease;
}
.ae-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 980px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	margin: auto;
	animation: ae-pop 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
	overflow: hidden;
}
.ae-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ae-dark);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	transition: background 0.15s, transform 0.15s;
}
.ae-modal__close:hover { background: #fff; transform: rotate(90deg); }

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

/* ---------- Profil ---------- */
.ae-profile {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
}
.ae-profile__main { padding: 44px 40px 40px; }
.ae-profile__header { margin-bottom: 22px; }
.ae-profile__eyebrow {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ae-muted);
	margin: 0 0 8px;
}
.ae-profile__name {
	font-size: 1.9rem;
	font-weight: 700;
	line-height: 1.1;
	margin: 0 0 10px;
}
.ae-profile__lieu {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 0.9rem;
	color: var(--ae-muted);
	margin: 0;
}

/* Onglets */
.ae-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 1px solid var(--ae-line);
	margin-bottom: 20px;
}
.ae-tab {
	background: none;
	border: none;
	padding: 12px 4px;
	margin-right: 22px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--ae-muted);
	cursor: pointer;
	position: relative;
	transition: color 0.15s;
}
.ae-tab::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 3px;
	background: var(--ae-gold);
	border-radius: 3px 3px 0 0;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s;
}
.ae-tab:hover { color: var(--ae-ink); }
.ae-tab.is-active { color: var(--ae-ink); }
.ae-tab.is-active::after { transform: scaleX(1); }

.ae-tabpanel {
	font-size: 1rem;
	line-height: 1.65;
	color: #3a3a3a;
	animation: ae-fade 0.25s ease;
}
.ae-tabpanel p { margin: 0 0 1em; }
.ae-tabpanel[hidden] { display: none; }

/* Aside : citation + galerie */
.ae-profile__aside {
	background: var(--ae-bg-soft);
	padding: 44px 36px 40px;
}
.ae-quote {
	margin: 0 0 24px;
	padding: 0;
}
.ae-quote__mark {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 3.4rem;
	line-height: 0.6;
	color: var(--ae-gold);
	margin-bottom: 6px;
}
.ae-quote__text {
	font-size: 1.2rem;
	font-style: italic;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
	color: var(--ae-ink);
}
.ae-profile__gallery {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.ae-profile__gallery img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Masque les éléments cachés du body quand la modale est ouverte */
body.ae-modal-open { overflow: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.ae-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
	.ae-grid { grid-template-columns: repeat(2, 1fr); }
	.ae-profile { grid-template-columns: 1fr; }
	.ae-profile__aside { order: -1; }
	.ae-profile__main { padding: 32px 24px 28px; }
	.ae-profile__aside { padding: 36px 24px 28px; }
	.ae-profile__name { font-size: 1.6rem; }
}
@media (max-width: 560px) {
	.ae-filters { flex-direction: column; align-items: stretch; }
	.ae-select { flex-basis: auto; }
	.ae-reset { width: 100%; }
	.ae-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.ae-card__title { font-size: 1rem; }
	.ae-card__subtitle { font-size: 0.66rem; }
	.ae-modal { padding: 0; }
	.ae-modal__dialog { border-radius: 0; min-height: 100%; max-width: 100%; }
}
@media (max-width: 380px) {
	.ae-grid { grid-template-columns: 1fr; }
}

/* Préférence : réduire les animations */
@media (prefers-reduced-motion: reduce) {
	.ae-card, .ae-modal__dialog, .ae-tabpanel, .ae-modal__overlay { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Overrides anti-thème (priorité forcée)
   Certains thèmes WordPress colorent tous les <button> (fond rose, etc.).
   On verrouille ici l'apparence de la croix de fermeture et des onglets.
   ========================================================================== */

/* --- Croix de fermeture : fond foncé, croix blanche, lisible au survol --- */
.ae-module .ae-modal .ae-modal__close,
.ae-modal .ae-modal__close {
	background: #1c1c1c !important;
	background-color: #1c1c1c !important;
	color: #ffffff !important;
	border: none !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
	opacity: 1 !important;
	text-shadow: none !important;
}
.ae-module .ae-modal .ae-modal__close:hover,
.ae-module .ae-modal .ae-modal__close:focus,
.ae-module .ae-modal .ae-modal__close:focus-visible,
.ae-module .ae-modal .ae-modal__close:active,
.ae-modal .ae-modal__close:hover,
.ae-modal .ae-modal__close:focus,
.ae-modal .ae-modal__close:active {
	background: #c9a14a !important;       /* doré au survol, croix blanche bien visible */
	background-color: #c9a14a !important;
	color: #ffffff !important;
	border: none !important;
	outline: none !important;
}

/* --- Onglets : look propre noir / blanc, jamais roses --- */
.ae-module .ae-tabs__nav {
	gap: 8px !important;
}
.ae-module .ae-tab {
	background: transparent !important;
	background-color: transparent !important;
	color: #2a2a2a !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	padding: 9px 16px !important;
	margin: 0 0 -1px 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	font-weight: 600 !important;
}
.ae-module .ae-tab::after { display: none !important; } /* on retire le soulignement, redondant avec le fond plein */

.ae-module .ae-tab:hover,
.ae-module .ae-tab:focus,
.ae-module .ae-tab:focus-visible,
.ae-module .ae-tab:active,
.ae-module .ae-tab.is-active {
	background: #1c1c1c !important;
	background-color: #1c1c1c !important;
	color: #ffffff !important;
	border-color: #1c1c1c !important;
	outline: none !important;
}
