/* =============================================================================
   Astrolabe — Widget : Auteurs Listing (jxc-auteurs-listing-widget)
   Layout 2 colonnes : sidebar gauche (recherche + alphabet) | contenu droite (grille)
   ============================================================================= */

/* --- Layout principal --- */

.jxc-auteurs-listing-widget {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 40px;
}

.jxc-listing-sidebar {
	width: 260px;
	flex-shrink: 0;
}

.jxc-listing-content {
	flex: 1;
	min-width: 0;
}

/* --- Barre de recherche --- */

.jxc-search-bar {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0 0 20px;
}

.jxc-search-bar__input {
	width: 100%;
	padding: 10px 40px 10px 14px;
	font-family: 'Jost', sans-serif;
	font-size: 15px;
	font-weight: 400;
	color: #212121;
	background: #ffffff;
	border: 2px solid #DDDDE0;
	border-radius: 4px;
	outline: none;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.jxc-search-bar__input:focus {
	border-color: #212121;
}

.jxc-search-bar__clear {
	position: absolute;
	right: 12px;
	background: none;
	border: none;
	font-size: 16px;
	color: #888;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}

.jxc-search-bar__clear:hover { color: #212121; }

/* --- Barre d'alphabet (sidebar gauche, verticale) --- */

.jxc-alphabet-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 6px;
	margin: 0;
	list-style: none;
	padding: 0;
}

.jxc-alphabet-bar__letter {
	min-width: 32px;
	padding: 5px 7px;
	font-family: 'Jost', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #212121;
	background: #ffffff;
	border: 2px solid #DDDDE0;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	text-align: center;
	line-height: 1.4;
}

.jxc-alphabet-bar__letter:hover {
	background-color: #212121;
	border-color: #212121;
	color: #ffffff;
}

.jxc-alphabet-bar__letter.is-active {
	background-color: #F6AD1F;
	border-color: #F6AD1F;
	color: #ffffff;
}

/* --- Compteur résultats --- */

.jxc-auteurs-count {
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	color: #888;
	text-align: left;
	margin: 0 0 20px;
}

.jxc-auteurs-count__number {
	font-weight: 700;
	color: #212121;
}

/* --- Cards auteur --- */

.jxc-auteur-card {
	text-align: center;
}

.jxc-auteur-card__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: inherit;
}

.jxc-auteur-card__photo {
	width: 150px;
	height: 200px;
	border-radius: 4px;
	overflow: hidden;
	margin: 0 auto 12px;
	flex-shrink: 0;
	background: #DDE2EA;
	transition: box-shadow 0.2s ease;
}

.jxc-auteur-card:hover .jxc-auteur-card__photo {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.jxc-auteur-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.jxc-auteur-card:hover .jxc-auteur-card__photo img {
	transform: scale(1.07);
}

.jxc-auteur-card__info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.jxc-auteur-card__name {
	display: block;
	font-family: 'Jost', sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: #212121;
	white-space: nowrap;
	transition: color 0.2s ease;
	line-height: 1.25;
}

.jxc-auteur-card__nom {
	text-transform: uppercase;
}

.jxc-auteur-card:hover .jxc-auteur-card__name {
	color: #F6AD1F;
}

.jxc-auteur-card__role {
	display: block;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #646464;
}

/* État loading */
.jxc-auteurs-grid.is-loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* --- Infinite scroll sentinel + loader --- */

.jxc-auteurs-sentinel {
	height: 1px;
	margin-top: 20px;
}

.jxc-auteurs-loader {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px 0;
}

.jxc-auteurs-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #DDDDE0;
	border-top-color: #F6AD1F;
	border-radius: 50%;
	animation: jxc-spin 0.7s linear infinite;
	display: block;
}

@keyframes jxc-spin {
	to { transform: rotate(360deg); }
}

/* --- Responsive --- */

@media (max-width: 1024px) {
	.jxc-listing-sidebar { width: 200px; }
	.jxc-auteurs-listing-widget { gap: 24px; }
	.jxc-auteur-card__photo { width: 120px; height: 160px; }
}

@media (max-width: 767px) {
	.jxc-auteurs-listing-widget {
		flex-direction: column;
		gap: 20px;
	}
	.jxc-listing-sidebar { width: 100%; }
	.jxc-alphabet-bar { justify-content: center; }
	.jxc-alphabet-bar__letter { min-width: 28px; padding: 4px 5px; font-size: 12px; }
	.jxc-auteur-card__photo { width: 90px; height: 120px; }
	.jxc-auteur-card__name { font-size: 13px; }
}
