/* =========================================================
   Ruban Publicitaire — Frontend
   ========================================================= */

.ruban-wrapper {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	/* background appliqué en inline style depuis PHP (couleur ou transparent) */
	margin: 20px 0;
	overflow: hidden;
	-webkit-user-select: none;
	        user-select: none;
}

/* ---- Viewport ---- */
.ruban-viewport {
	flex: 1 1 0;
	overflow: hidden;
	cursor: grab;
	display: flex;
	align-items: stretch;
}

.ruban-viewport.is-dragging {
	cursor: grabbing;
}

/* ---- Track ---- */
.ruban-track {
	display: flex;
	align-items: stretch;
	gap: 0;
	padding: 0;
	will-change: transform;
}

/* ---- Item (lien) ---- */
.ruban-item {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	padding: 14px 24px;
	min-width: 120px;
	max-width: 220px;
	transition: opacity 0.22s ease, filter 0.22s ease;
}

.ruban-item:hover {
	opacity: 0.85;
}

.ruban-item img {
	display: block;
	max-height: var(--logo-h, 60px);
	max-width: 160px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(25%) opacity(0.85);
	transition: filter 0.22s ease;
}

.ruban-item:hover img {
	filter: grayscale(0%) opacity(1);
}

.ruban-text-logo {
	font-size: 15px;
	font-weight: 700;
	color: #444;
	white-space: nowrap;
	letter-spacing: 0.02em;
}

.ruban-item:hover .ruban-text-logo {
	color: #0073aa;
}

/* ---- Dégradés latéraux (masque) ---- */
.ruban-viewport::before,
.ruban-viewport::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 60px;
	pointer-events: none;
	z-index: 1;
}

.ruban-viewport::before {
	left: 0;
	background: linear-gradient(to right, var(--ruban-bg, #ffffff), transparent);
}

.ruban-viewport::after {
	right: 0;
	background: linear-gradient(to left, var(--ruban-bg, #ffffff), transparent);
}

/* ---- Message vide ---- */
.ruban-empty {
	padding: 12px;
	color: #888;
	font-style: italic;
}
