/* Bandeau « Pièce introuvable ? » des fiches produit (bandeau.php). Animation de la loupe (animation.php) incluse. */

/* Animation de la loupe : en pause tant que le bandeau n'est pas visible (bandeau.js ajoute .spx-bp--actif). */
.spx-la{display:block;width:100%;height:auto;overflow:visible}

.spx-la-chercher{transform-box:view-box;transform-origin:0 0;animation:spx-la-chercher 12s ease-in-out infinite}

.spx-la-piece{opacity:0;transform:scale(.2);transform-box:view-box;transform-origin:0 0;animation:spx-la-piece 12s ease-out infinite}

.spx-la-p2{animation-delay:3s}
.spx-la-p3{animation-delay:6s}
.spx-la-p4{animation-delay:9s}

@keyframes spx-la-chercher{0%,100%{transform:translate(0,0) rotate(-4deg)}
6%,21%{transform:translate(-28px,-4px) rotate(-10deg)}
31%,46%{transform:translate(24px,-8px) rotate(5deg)}
56%,71%{transform:translate(-6px,8px) rotate(-2deg)}
81%,96%{transform:translate(20px,4px) rotate(7deg)}
}

@keyframes spx-la-piece{0%,7%{opacity:0;transform:scale(.2)}
10%{opacity:1;transform:scale(1.08)}
12%,20%{opacity:1;transform:scale(1)}
23%,100%{opacity:0;transform:scale(.2)}
}


.spx-bp .spx-la-chercher,
.spx-bp .spx-la-piece,
.spx-bp__comete { animation-play-state: paused; }
.spx-bp--actif .spx-la-chercher,
.spx-bp--actif .spx-la-piece,
.spx-bp--actif .spx-bp__comete { animation-play-state: running; }

/* Section */
.spx-bp {
	background: #F7F7F1;
	padding: 30px 20px;
}

/* Bordure : dégradé clair fixe + deux comètes (bleu, jaune) qui font le tour dans le sens horaire. */
.spx-bp__bord {
	position: relative;
	max-width: 1290px;
	margin: 0 auto;
	padding: 3px;
	border-radius: 19px;
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient(90deg, #CFE1FF, #E9EEDB 55%, #FDF6B8);
	box-shadow: 0 4px 20px 2px rgba(0, 0, 0, 0.1);
}

.spx-bp__comete {
	position: absolute;
	left: 0;
	top: 0;
	width: 360px;
	height: 7px;
	border-radius: 4px;
	z-index: 0;
	offset-path: inset(1.5px round 17.5px);
	offset-rotate: auto;
	animation: spx-bp-tour 7s linear infinite;
}

.spx-bp__comete--bleu { background: linear-gradient(90deg, rgba(4, 116, 242, 0), #0474F2 50%, rgba(4, 116, 242, 0)); }
.spx-bp__comete--jaune { background: linear-gradient(90deg, rgba(254, 241, 13, 0), #FEF10D 50%, rgba(254, 241, 13, 0)); animation-delay: -3.5s; }

@keyframes spx-bp-tour {
	from { offset-distance: 0%; }
	to { offset-distance: 100%; }
}

/* Carte : fond blanc, taches bleue et jaune floutées, grain (texture répétée en mode overlay). */
.spx-bp__carte {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 154px;
	box-sizing: border-box;
	padding: 0 40px 0 20px;
	border-radius: 16px;
	overflow: hidden;
	background:
		radial-gradient(ellipse 24% 120% at 58% -18%, rgba(70, 140, 240, .85) 0%, rgba(90, 155, 242, .55) 32%, rgba(120, 170, 245, .2) 62%, rgba(120, 170, 245, 0) 82%),
		radial-gradient(ellipse 24% 120% at 84% 118%, rgba(253, 240, 80, .95) 0%, rgba(253, 242, 110, .6) 34%, rgba(254, 246, 160, .22) 62%, rgba(254, 246, 160, 0) 82%),
		#fff;
}

.spx-bp__carte::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: url(img/grain.webp) repeat;
	background-size: 64px 64px;
	mix-blend-mode: overlay;
	opacity: .55;
}

.spx-bp__carte > * { position: relative; z-index: 1; }

.spx-bp__anim { width: 190px; flex: none; }

.spx-bp__texte { flex: 1; min-width: 0; }

.spx-bp__surtitre {
	margin: 0;
	font-size: 20px;
	line-height: 26px;
	font-weight: 600;
	color: #0474F2;
}

.spx-bp .spx-bp__titre {
	margin: 6px 0 0;
	font-size: 24px;
	line-height: 32px;
	font-weight: 600;
	letter-spacing: 0;
	color: #000;
}

.spx-bp__cta {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 20px 0;
}

.spx-bp__bouton,
.spx-bp__bouton:visited {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 50px;
	box-sizing: border-box;
	padding: 0 28px;
	border-radius: 30px;
	background: #0474F2;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s;
}

.spx-bp__bouton:hover,
.spx-bp__bouton:focus-visible { background: #035BC0; color: #fff; }

.spx-bp__delai { font-size: 12px; color: #6b6b6b; }

/* Mobile et tablette : animation au-dessus, textes à gauche, bouton pleine largeur. */
@media (max-width: 860px) {
	.spx-bp { padding: 24px 16px; }
	.spx-bp__carte {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 20px 18px;
		background:
			radial-gradient(ellipse 75% 48% at 52% -10%, rgba(70, 140, 240, .85) 0%, rgba(90, 155, 242, .55) 32%, rgba(120, 170, 245, .2) 62%, rgba(120, 170, 245, 0) 82%),
			radial-gradient(ellipse 75% 42% at 88% 108%, rgba(253, 240, 80, .95) 0%, rgba(253, 242, 110, .6) 34%, rgba(254, 246, 160, .22) 62%, rgba(254, 246, 160, 0) 82%),
			#fff;
	}
	.spx-bp__anim { width: 142px; margin: -8px auto 6px; }
	.spx-bp__surtitre { font-size: 18px; }
	.spx-bp .spx-bp__titre { margin-top: 4px; font-size: 19px; line-height: 26px; }
	.spx-bp__cta { padding: 16px 0 0; gap: 10px; }
	.spx-bp__bouton { width: 100%; justify-content: center; height: 48px; font-size: 15px; }
	.spx-bp__comete { width: 220px; }
}

/* Mouvements réduits : tout reste immobile, le sac est affiché dans la loupe. */
@media (prefers-reduced-motion: reduce) {
	.spx-bp .spx-la-chercher,
	.spx-bp .spx-la-piece,
	.spx-bp__comete { animation: none; }
	.spx-bp .spx-la-p1 { opacity: 1; transform: none; }
}
