@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   FACT Annuaire - v3 (Montserrat 96px title, search below, chips)
   ============================================ */

.fact-annuaire { --fa-navy:#0e1a3a; --fa-navy-2:#19264a; --fa-text:#1a1a1a; --fa-muted:#6b7280; --fa-line:#e5e7eb; --fa-card:#f3f3f4; --fa-chip:#ffffff; --fa-chip-border:#dcdfe5; --fa-chip-count:#e7e9ee; }
.fact-annuaire * { box-sizing: border-box; }

/* --- HERO (655px desktop, sharp photo, title centered) --- */
.fact-annuaire-hero {
	position: relative; width: 100%;
	height: 655px;
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
	margin: 0;
}
.fact-annuaire-hero__bg {
	position: absolute; inset: -20px;
	background-size: cover; background-position: center;
	filter: blur(8px);
	transform: scale(1.05);
	z-index: 0;
}
.fact-annuaire-hero__overlay {
	position: absolute; inset: 0; z-index: 0;
	background: linear-gradient( 180deg, rgba(14,26,58,.10) 0%, rgba(14,26,58,.25) 100% );
}
.fact-annuaire-hero__inner {
	position: relative; z-index: 1;
	max-width: 1187px; padding: 0 24px;
	text-align: center;
	width: 100%;
	margin-bottom: 0;
}
.fact-annuaire-hero__title {
	color: #fff; margin: 0;
	width: 100%; max-width: 1187px;
	font-family: 'Montserrat', sans-serif;
	font-size: 96px; font-weight: 700;
	line-height: 1.05; letter-spacing: -1.5px;
	text-shadow: 0 2px 24px rgba(14,26,58,.25);
}

/* --- DIRECTORY CONTAINER --- */
.fact-directory { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; }

/* --- FROSTED GLASS PANEL (search + Filtres + chips) --- */
/* Half above hero bottom, half below into the white area */
.fact-filter-panel {
	position: relative;
	margin-top: -140px;
	z-index: 3;
	padding: 22px 28px 26px;
	background: rgba(255,255,255,.32);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	border-radius: 28px;
	border: 1px solid rgba(255,255,255,.45);
	box-shadow: 0 24px 60px rgba(14,26,58,.18);
}

/* --- SEARCH PILL inside panel --- */
.fact-filter-search {
	position: relative; width: 100%;
}
.fact-annuaire .fact-filter-search input {
	width: 100% !important;
	padding: 18px 26px 18px 70px !important;
	height: auto !important; min-height: 56px !important;
	border: 1px solid rgba(220,223,229,.9) !important;
	border-radius: 999px !important;
	font-size: 16px !important;
	background: rgba(255,255,255,.75) !important;
	color: var(--fa-text) !important;
	font-family: 'Montserrat', sans-serif !important;
	box-shadow: none !important;
	transition: background .2s !important;
	box-sizing: border-box !important;
}
.fact-annuaire .fact-filter-search input::placeholder { color: #9aa0a6; font-weight: 400; }
.fact-annuaire .fact-filter-search input:focus {
	outline: none !important; background: #fff !important;
	box-shadow: none !important;
}
/* circular icon area matching the design */
.fact-annuaire .fact-search-icon {
	position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
	width: 32px; height: 32px; padding: 7px;
	background: var(--fa-chip-count);
	border-radius: 50%;
	color: #8a90a0;
	pointer-events: none;
	box-sizing: border-box;
	z-index: 1;
}

/* --- "Filtres" LABEL + CHIPS --- */
.fact-filters-label {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 20px; font-weight: 500;
	color: #535367;
	margin: 18px 0 12px;
}

.fact-filter-chips {
	display: flex; flex-wrap: wrap; gap: 10px;
	margin-bottom: 8px;
}
.fact-annuaire .fact-chip {
	display: inline-flex !important; align-items: center; gap: 8px;
	padding: 6px 6px 6px 16px !important;
	border-radius: 999px !important;
	background: transparent !important;
	color: #303048 !important;
	font-family: 'Montserrat', sans-serif !important;
	font-size: 13px !important; font-weight: 500 !important;
	border: 1px solid #AAAAB4 !important;
	cursor: pointer; user-select: none;
	transition: background .15s, color .15s, border-color .15s;
	white-space: nowrap;
	text-transform: none !important;
	box-shadow: none !important;
	line-height: 1.2 !important;
	height: auto !important; min-height: 0 !important;
}
.fact-annuaire .fact-chip:hover { border-color: #303048 !important; }
.fact-annuaire .fact-chip.is-active {
	background: #0e1a3a !important; color: #fff !important; border-color: #0e1a3a !important;
}
.fact-annuaire .fact-chip__count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 28px; height: 24px; padding: 0 8px;
	border-radius: 999px;
	background: #e7e9ee; color: #303048;
	font-size: 12px; font-weight: 600;
}
.fact-annuaire .fact-chip.is-active .fact-chip__count {
	background: rgba(255,255,255,.22); color: #fff;
}

.fact-filter-count {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px; color: var(--fa-muted);
	margin: 28px 0 18px;
}

/* --- GRID --- */
.fact-member-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	min-height: 200px;
	position: relative;
	margin-top: 100px;
}
.fact-member-grid.is-loading { opacity: .5; pointer-events: none; }
.fact-member-grid.is-loading::after {
	content: ''; position: absolute; top: 50%; left: 50%;
	width: 36px; height: 36px; margin: -18px 0 0 -18px;
	border: 3px solid var(--fa-navy); border-top-color: transparent;
	border-radius: 50%; animation: fact-spin .8s linear infinite;
}
@keyframes fact-spin { to { transform: rotate(360deg); } }

/* --- CARD --- */
.fact-member-card {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 1 / 1;
	background: var(--fa-card);
	border: 1px solid transparent;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none; color: inherit;
	transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
	padding: 36px;
	background-clip: padding-box;
}
.fact-member-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(14,26,58,.10);
	/* white inner + yellow gradient border */
	background:
		linear-gradient(#ffffff, #ffffff) padding-box,
		linear-gradient(315deg, #f5d04a 0%, #f5d04a 30%, #e5e7eb 65%, #ecedf1 100%) border-box;
}

.fact-card-logo {
	position: relative;
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
}
.fact-card-logo img {
	max-width: 85%; max-height: 70%;
	object-fit: contain;
	transition: opacity .25s ease;
}
/* When a hover image exists, stack both and crossfade */
.fact-card-logo:has(.fact-card-logo-hover) .fact-card-logo-default,
.fact-card-logo:has(.fact-card-logo-hover) .fact-card-logo-hover {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.fact-card-logo-hover { opacity: 0; }
.fact-member-card:hover .fact-card-logo:has(.fact-card-logo-hover) .fact-card-logo-default { opacity: 0; }
.fact-member-card:hover .fact-card-logo-hover { opacity: 1; }

.fact-card-no-logo {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(20px, 2.6vw, 30px);
	font-weight: 800; color: #303048;
	text-align: center;
	max-width: 90%;
	line-height: 1.15;
	letter-spacing: -.5px;
}

/* Category badge (top-left), hidden until hover */
.fact-card-cat {
	position: absolute; top: 12px; left: 12px;
	background: #303048; color: #fff;
	font-family: 'Montserrat', sans-serif;
	font-size: 11px; font-weight: 600;
	padding: 5px 12px; border-radius: 999px;
	opacity: 0; transform: translateY(-4px);
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
	z-index: 1;
}
.fact-member-card:hover .fact-card-cat {
	opacity: 1; transform: translateY(0);
}

/* "Voir le profil ↗" CTA (bottom-right), hidden until hover */
.fact-card-cta {
	position: absolute; bottom: 14px; right: 16px;
	display: inline-flex; align-items: center; gap: 6px;
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 13px; font-weight: 500;
	color: #303048;
	opacity: 0; transform: translateX(-4px);
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
	z-index: 1;
}
.fact-card-cta svg { width: 14px; height: 14px; }
.fact-member-card:hover .fact-card-cta {
	opacity: 1; transform: translateX(0);
}

.fact-no-results {
	grid-column: 1 / -1; text-align: center;
	padding: 80px 20px; color: var(--fa-muted); font-size: 15px;
	font-family: 'Montserrat', sans-serif;
}

/* --- PAGINATION --- */
.fact-annuaire .fact-pagination {
	display: flex; align-items: center; justify-content: center;
	gap: 18px; margin: 56px 0 0;
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 14px;
}
.fact-annuaire .fact-pagination button,
.fact-annuaire .fact-pagination .fact-page-ellipsis {
	background: transparent !important;
	border: 0 !important;
	padding: 4px 2px !important;
	min-width: 0 !important;
	font: inherit !important;
	color: #9aa0a6 !important;
	cursor: pointer;
	border-radius: 0 !important;
	box-shadow: none !important;
	transition: color .15s;
	font-weight: 400 !important;
	letter-spacing: .2px;
	line-height: 1.2 !important;
	height: auto !important;
	text-transform: none !important;
}
.fact-annuaire .fact-pagination button:hover:not(:disabled) {
	color: #303048 !important;
	background: transparent !important;
}
.fact-annuaire .fact-pagination button.is-active {
	color: #1a1a1a !important;
	font-weight: 700 !important;
	background: transparent !important;
}
.fact-annuaire .fact-pagination button:disabled {
	color: #d4d6db !important;
	cursor: not-allowed;
}
.fact-annuaire .fact-pagination .fact-page-nav {
	font-weight: 500 !important;
}
.fact-annuaire .fact-pagination .fact-page-ellipsis {
	cursor: default !important; color: #9aa0a6 !important;
}

/* --- legacy status badge hidden --- */
.fact-card-status { display: none; }

/* ============================================
   SINGLE MEMBER PAGE — v2
   ============================================ */
.fact-single { --fa-yellow:#f5d04a; --fa-yellow-h:#e9c33b; }

.fact-single-hero {
	position: relative; width: 100%;
	height: 460px;
	background-size: cover; background-position: center;
	overflow: hidden;
}
.fact-single-hero__overlay {
	position: absolute; inset: 0;
	background: linear-gradient( 180deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.10) 100% );
}

body.single-fact_member { background: #ffffff !important; }

.fact-single-wrap {
	max-width: 1800px; margin: 0 auto; padding: 0 24px 80px;
}

.fact-single-breadcrumb {
	position: relative; z-index: 2;
	margin-top: -420px; margin-bottom: 360px;
	padding: 14px 0;
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 13px; color: #fff;
}
.fact-single-breadcrumb a {
	color: rgba(255,255,255,.85); text-decoration: none;
	transition: color .15s;
}
.fact-single-breadcrumb a:hover { color: #fff; text-decoration: underline; }
.fact-single-breadcrumb .sep { margin: 0 8px; color: rgba(255,255,255,.6); }
.fact-single-breadcrumb .current { color: #fff; font-weight: 500; }

.fact-single-card {
	position: relative;
	margin-top: -120px;
	background: #FCFCFC;
	border-radius: 22px;
	box-shadow: none;
	padding: 44px 48px;
	display: grid; grid-template-columns: 1fr 576px; gap: 64px;
}

/* Main column */
.fact-single-main { min-width: 0; }
.fact-single-logo {
	width: 220px; height: 130px;
	display: flex; align-items: center; justify-content: flex-start;
	margin-bottom: 22px;
}
.fact-single-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

.fact-single-title {
	font-family: 'Montserrat', sans-serif;
	font-size: 61px; font-weight: 700;
	color: #0e1a3a; letter-spacing: -1px;
	margin: 0 0 18px;
	line-height: 1.1;
}
.fact-single-cat {
	display: inline-block;
	background: #0e1a3a; color: #fff;
	padding: 6px 16px; border-radius: 999px;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px; font-weight: 600;
	letter-spacing: .3px;
}
.fact-single-desc {
	margin: 32px 0 0;
	max-width: 996px;
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 24px; font-weight: 500; line-height: 1.55;
	color: #303048;
}
.fact-single-desc p { margin: 0 0 18px; }

/* Sidebar — its own white card with subtle shadow */
.fact-single-side {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 0 4px 0 #EAEAED;
	padding: 32px 36px;
	margin-top: 152px; /* align with title (below logo) */
}
.fact-side-h2 {
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 31px; font-weight: 700;
	color: #303048; margin: 0 0 32px;
	letter-spacing: -.3px;
}
.fact-side-section { margin-bottom: 36px; position: relative; }
.fact-side-h3 {
	display: flex; align-items: center; gap: 10px;
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 20px; font-weight: 700;
	letter-spacing: -.2px;
	color: #303048; margin: 0 0 22px;
	text-transform: none;
}
.fact-side-h3--contact { font-size: 24px; }
.fact-side-lock { width: 18px; height: 18px; display: inline-block; }
.fact-side-h3--contact .fact-side-lock { width: 22px; height: 22px; }

.fact-side-item {
	display: grid; grid-template-columns: 22px 1fr; gap: 14px;
	margin-bottom: 20px;
	align-items: start;
}
.fact-side-icon {
	width: 22px; height: 22px;
	color: #AAAAB4; margin-top: 4px;
}
.fact-side-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fact-side-label {
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 20px; font-weight: 500; color: #AAAAB4;
	line-height: 1.2;
}
.fact-side-value {
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 24px; font-weight: 500;
	color: #303048; word-break: break-word;
	line-height: 1.3;
}
.fact-side-link { text-decoration: none; }
.fact-side-link:hover { text-decoration: underline; }

.fact-side-locked {
	font-family: 'Inter', 'Montserrat', sans-serif;
	font-size: 13px; color: #6b7280; margin: 0;
}
.fact-side-locked a { color: #0e1a3a; font-weight: 600; }

/* Contact gate (non-adhérent users) — overlays both contact info + CTA */
.fact-side-bottom { position: relative; }
.fact-side-bottom.is-locked .fact-side-contact__content,
.fact-side-bottom.is-locked .fact-side-cta {
	pointer-events: none;
	user-select: none;
}
.fact-side-bottom.is-locked .fact-side-h3--contact {
	position: relative; z-index: 3;
}
.fact-side-gate {
	position: absolute;
	left: -12px; right: -12px;
	top: 60px;
	bottom: -16px;
	display: flex; align-items: stretch; /* stretch the card to fill */
	z-index: 2;
}
.fact-side-gate__card {
	flex: 1;
	background: rgba(255,255,255,.32);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border: 1px solid rgba(255,255,255,.5);
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(14,26,58,.06);
	padding: 28px 24px;
	text-align: center;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
}
.fact-side-gate__title {
	font-family: 'Montserrat', sans-serif;
	font-size: 26px; font-weight: 800;
	color: #0e1a3a; letter-spacing: -.4px;
	margin: 0 0 14px; line-height: 1.15;
}
.fact-side-gate__text {
	font-family: 'Inter', sans-serif;
	font-size: 14px; line-height: 1.5;
	color: #6b7280;
	margin: 0 0 22px;
}
.fact-side-gate__cta {
	display: inline-block;
	background: #f5d04a; color: #0e1a3a;
	font-family: 'Montserrat', sans-serif;
	font-size: 15px; font-weight: 700;
	padding: 12px 28px; border-radius: 999px;
	text-decoration: none;
	transition: background .15s, transform .15s;
}
.fact-side-gate__cta:hover { background: #e9c33b; transform: translateY(-1px); }
.fact-side-gate__login {
	margin: 18px 0 0;
	font-family: 'Inter', sans-serif;
	font-size: 14px; color: #535367;
}
.fact-side-gate__login a {
	color: #0e1a3a; font-weight: 700;
	text-decoration: none;
}
.fact-side-gate__login a:hover { text-decoration: underline; }

.fact-single .fact-side-cta {
	display: block; width: 100%;
	background: var(--fa-yellow); color: #0e1a3a;
	font-family: 'Montserrat', sans-serif;
	font-size: 15px; font-weight: 700;
	text-decoration: none; text-align: center;
	padding: 16px 20px; border-radius: 999px;
	margin-top: 8px;
	border: 0;
	transition: background .15s, transform .15s;
	cursor: pointer;
}
.fact-single .fact-side-cta:hover {
	background: var(--fa-yellow-h);
	transform: translateY(-1px);
}
.fact-single .fact-side-cta.is-disabled {
	background: rgba(245,208,74,.35);
	color: rgba(14,26,58,.5);
	pointer-events: none;
	filter: blur(.5px);
}
.fact-single .fact-side-cta.is-disabled:hover {
	background: rgba(245,208,74,.35);
	transform: none;
}

/* Contact form (logged-out fallback) */
.fact-single-contactform {
	margin-top: 60px;
	background: #f8f9fa;
	padding: 36px 40px;
	border-radius: 18px;
}
.fact-single-contactform h3 {
	font-family: 'Montserrat', sans-serif;
	font-size: 22px; font-weight: 700; color: #0e1a3a;
	margin: 0 0 22px;
}
.fact-single-contactform label {
	display: block; margin-bottom: 6px;
	font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: #535367;
}
.fact-single-contactform input,
.fact-single-contactform textarea {
	width: 100%; padding: 12px 16px;
	border: 1px solid #dcdfe5; border-radius: 10px;
	font-size: 14px; font-family: 'Inter', sans-serif;
	margin-bottom: 16px; background: #fff;
	box-sizing: border-box;
}
.fact-single-contactform textarea { min-height: 130px; resize: vertical; }
.fact-single-contactform button {
	background: var(--fa-yellow); color: #0e1a3a;
	border: 0; padding: 14px 28px;
	border-radius: 999px; font-size: 15px; font-weight: 700;
	font-family: 'Montserrat', sans-serif;
	cursor: pointer; transition: background .15s;
}
.fact-single-contactform button:hover { background: var(--fa-yellow-h); }

/* Alerts */
.fact-single .fact-alert-success,
.fact-single .fact-alert-error {
	margin: 20px 0 0;
	padding: 14px 18px; border-radius: 12px;
	font-family: 'Inter', sans-serif; font-size: 14px;
}
.fact-single .fact-alert-success { background: #d4edda; color: #155724; }
.fact-single .fact-alert-error { background: #f8d7da; color: #721c24; }

/* Responsive single page */
@media (max-width: 1100px) {
	.fact-single-title { font-size: 44px; letter-spacing: -.5px; }
	.fact-single-desc { font-size: 18px; }
	.fact-side-h2 { font-size: 24px; }
	.fact-side-label { font-size: 15px; }
	.fact-side-value { font-size: 18px; }
	.fact-single-card { grid-template-columns: 1fr 360px; gap: 48px; padding: 36px 36px; }
	.fact-single-side { margin-top: 130px; padding: 26px 28px; }
}
@media (max-width: 900px) {
	.fact-single-hero { height: 360px; }
	.fact-single-breadcrumb { margin-top: -320px; margin-bottom: 270px; font-size: 12px; }
	.fact-single-card {
		grid-template-columns: 1fr; gap: 32px;
		padding: 28px 24px;
		margin-top: -80px;
		border-radius: 18px;
	}
	.fact-single-side {
		padding: 24px 22px; margin-top: 0;
	}
	.fact-single-title { font-size: 32px; }
	.fact-single-logo { width: 160px; height: 100px; margin-bottom: 16px; }
	.fact-single-desc { font-size: 16px; }
	.fact-side-h2 { font-size: 22px; margin-bottom: 20px; }
	.fact-side-label { font-size: 14px; }
	.fact-side-value { font-size: 16px; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
	.fact-annuaire-hero { height: 520px; }
	.fact-annuaire-hero__title { font-size: 64px; letter-spacing: -1px; }
	.fact-filter-panel { margin-top: -130px; }
	.fact-member-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.fact-annuaire-hero { height: 460px; }
	.fact-annuaire-hero__inner { padding: 0 20px; }
	.fact-annuaire-hero__title { font-size: 44px; letter-spacing: -.5px; line-height: 1.08; }
	.fact-directory { padding: 0 18px 60px; }
	.fact-filter-panel { margin-top: -110px; padding: 18px 18px 22px; border-radius: 22px; }
	.fact-filter-search input { padding: 16px 20px 16px 64px; font-size: 14px; }
	.fact-search-icon { left: 16px; width: 28px; height: 28px; padding: 6px; }
	.fact-member-card { padding: 22px; border-radius: 14px; }
	.fact-member-grid { gap: 14px; }
	.fact-pagination button { padding: 6px 10px; min-width: 32px; }
}
@media (max-width: 480px) {
	.fact-annuaire-hero { height: 420px; }
	.fact-annuaire-hero__title { font-size: 36px; }
	.fact-filter-panel { margin-top: -90px; padding: 14px 14px 18px; border-radius: 20px; }
	.fact-member-grid { gap: 10px; }
	.fact-member-card { padding: 16px; border-radius: 12px; }
	.fact-card-cta { right: 12px; bottom: 10px; font-size: 12px; }
	.fact-card-cta svg { width: 12px; height: 12px; }
	.fact-single-header { flex-direction: column; }
	.fact-single-logo { width: 120px; min-width: 120px; }
}

/* === Greyscale member-card logos by default; reveal color on card hover === */
.fact-card-logo-default { filter: grayscale(100%); transition: opacity .25s ease, filter .25s ease; }
.fact-member-card:hover .fact-card-logo-default { filter: grayscale(0%); }
.fact-card-logo-hover { filter: none; }
