.asp-wrapper {
	width: 100%;
	max-width: 100%;
	margin: 12px 0 20px;
	padding: 10px 2px 6px;
	box-sizing: border-box;
	position: relative;
	/* Pas d'overflow:hidden ici : le scroll horizontal est géré uniquement
	   par .asp-carousel, pour ne jamais tronquer le contenu des cercles. */
}

.asp-title {
	font-size: 1.1rem;
	margin: 0 0 .75rem;
}

.asp-carousel {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: flex-start;
	gap: 14px;
	width: 100%;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	padding: 4px 6px 8px;
	margin: 0;
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	cursor: grab;
	user-select: none;
	list-style: none;
}

.asp-item {
	flex-shrink: 0 !important;
}

.asp-carousel.asp-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.asp-carousel::-webkit-scrollbar {
	height: 6px;
}
.asp-carousel::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 4px;
}

/* Dégradés en bord de carrousel pour indiquer visuellement qu'on peut
   défiler à gauche / à droite (purement décoratif, en CSS, poids nul). */
.asp-wrapper::before,
.asp-wrapper::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 12px;
	width: 28px;
	pointer-events: none;
	z-index: 2;
	opacity: 0;
	transition: opacity .2s ease;
}
.asp-wrapper::before {
	left: 0;
	background: linear-gradient(90deg, var(--asp-edge-bg, #fff), transparent);
}
.asp-wrapper::after {
	right: 0;
	background: linear-gradient(270deg, var(--asp-edge-bg, #fff), transparent);
}
.asp-wrapper.asp-can-scroll-left::before,
.asp-wrapper.asp-can-scroll-right::after {
	opacity: 1;
}

.asp-item {
	flex: 0 0 auto;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 70px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
}

.asp-item-ring {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	padding: 3px;
	background: var(--asp-color, linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888));
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}

.asp-item:hover .asp-item-ring,
.asp-item:focus-visible .asp-item-ring {
	transform: scale(1.06);
}

.asp-item-ring img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #fff;
	display: block;
}

.asp-item-label {
	display: none; /* le titre passe désormais par une infobulle native (title="") */
}

.asp-item-skeleton .asp-item-ring {
	background: #eee;
	animation: asp-pulse 1.2s ease-in-out infinite;
}

@keyframes asp-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .45; }
}

.asp-sentinel {
	height: 1px;
}

/* ============ Lecteur de Stories plein écran (façon Instagram) ============ */

.asp-viewer[hidden] { display: none; }

.asp-viewer {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.asp-viewer-inner {
	position: relative;
	width: 100%;
	height: 100%;
	max-width: 480px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	touch-action: pan-y;
}

/* Barres de progression façon Stories (une par image) */
.asp-viewer-progress {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	z-index: 3;
	display: flex;
	gap: 4px;
}

.asp-progress-seg {
	flex: 1 1 0;
	height: 3px;
	background: rgba(255,255,255,.35);
	border-radius: 3px;
	overflow: hidden;
}

.asp-progress-fill {
	height: 100%;
	width: 0%;
	background: #fff;
	border-radius: 3px;
}

.asp-viewer-head {
	position: absolute;
	top: 22px;
	left: 10px;
	right: 10px;
	z-index: 3;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}

.asp-viewer-caption {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-shadow: 0 1px 3px rgba(0,0,0,.5);
	padding-top: 2px;
	max-width: 75%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.asp-viewer-close {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	padding: 2px 4px;
	line-height: 1;
}

.asp-viewer-close-icon {
	font-size: 26px;
}

.asp-viewer-close-label {
	font-size: 10px;
	opacity: .85;
}

.asp-viewer-stage {
	flex: 1;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	user-select: none;
	-webkit-user-select: none;
}

.asp-viewer-stage img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none; /* le clic est géré par le stage, pas par l'image */
}

@media (max-width: 480px) {
	.asp-item { width: 66px; }
	.asp-item-ring { width: 60px; height: 60px; }
}
