/* =========================================================
   Bandeau du calendrier de l'Avent (thème 2.2.12) — inc/calendrier-avent.php
   Même style que le bandeau de Noël (assets/css/noel.css), avec un paquet cadeau dans l'étiquette.
   ========================================================= */

.pcl-avent-bandeau {
	--pcl-avent-rouge: #b3121f;
	--pcl-avent-rouge-fonce: #7d0b15;
	--pcl-avent-or: #ffc24a;
	--pcl-avent-or-clair: #ffe3a3;
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle, rgba(255, 255, 255, .22) 1.2px, transparent 1.8px) 0 0 / 34px 22px,
		radial-gradient(circle, rgba(255, 255, 255, .14) 1px, transparent 1.6px) 13px 9px / 26px 18px,
		linear-gradient(90deg, var(--pcl-avent-rouge-fonce), var(--pcl-avent-rouge) 50%, var(--pcl-avent-rouge-fonce));
	color: #ffffff;
	font-size: 14px;
	line-height: 1.35;
}

.pcl-avent-bandeau::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--pcl-avent-or), transparent);
}

.pcl-avent-bandeau__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	align-items: center;
	justify-content: center;
	max-width: 1400px;
	margin: 0 auto;
	padding: 9px 52px 9px 16px;
	text-align: center;
}

.pcl-avent-bandeau__titre {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 6px;
	background: var(--pcl-avent-or);
	color: var(--pcl-avent-rouge-fonce);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.pcl-avent-bandeau__titre svg {
	width: 14px;
	height: 14px;
	flex: none;
}

.pcl-avent-bandeau__texte {
	font-weight: 600;
}

.pcl-avent-bandeau__compte {
	display: none;
	color: var(--pcl-avent-or-clair);
	font-weight: 700;
}

.pcl-avent-bandeau__court {
	display: none;
}

.pcl-avent-bandeau a.pcl-avent-bandeau__bouton {
	padding: 5px 14px;
	border: 1px solid rgba(255, 227, 163, .55);
	border-radius: 999px;
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.pcl-avent-bandeau a.pcl-avent-bandeau__bouton:hover,
.pcl-avent-bandeau a.pcl-avent-bandeau__bouton:focus-visible {
	border-color: var(--pcl-avent-or);
	color: var(--pcl-avent-or);
}

/* Cadeau à ouvrir : le bouton passe en or */
.pcl-avent-bandeau[data-etat="ouvrir"] a.pcl-avent-bandeau__bouton {
	background: var(--pcl-avent-or);
	border-color: var(--pcl-avent-or);
	color: var(--pcl-avent-rouge-fonce);
}

.pcl-avent-bandeau[data-etat="ouvrir"] a.pcl-avent-bandeau__bouton:hover,
.pcl-avent-bandeau[data-etat="ouvrir"] a.pcl-avent-bandeau__bouton:focus-visible {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--pcl-avent-rouge-fonce);
}

.pcl-avent-bandeau__fermer {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #ffffff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: .85;
}

.pcl-avent-bandeau__fermer:hover,
.pcl-avent-bandeau__fermer:focus-visible {
	background: rgba(255, 255, 255, .18);
	opacity: 1;
}

/* Mobile et tablette : en bas, juste au-dessus de la barre d'onglets, comme les bandeaux Black Friday et Noël */
@media (max-width: 991px) {
	.pcl-avent-bandeau {
		position: fixed;
		left: 0;
		right: 0;
		bottom: calc(var(--m-tab-h, 64px) + var(--m-safe, 0px));
		z-index: 998;
		box-shadow: 0 -6px 18px rgba(0, 0, 0, .18);
	}

	.pcl-avent-bandeau::after {
		top: 0;
		bottom: auto;
	}

	.pcl-avent-bandeau__inner {
		flex-wrap: nowrap;
		justify-content: space-between;
		padding: 7px 12px;
		font-size: 13px;
	}

	.pcl-avent-bandeau__texte,
	.pcl-avent-bandeau__long,
	.pcl-avent-bandeau__fermer {
		display: none;
	}

	.pcl-avent-bandeau__court {
		display: inline;
	}

	.pcl-avent-bandeau__compte {
		display: inline;
		font-size: 12.5px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		min-width: 0;
	}

	.pcl-avent-bandeau__titre {
		font-size: 11px;
	}

	.pcl-avent-bandeau a.pcl-avent-bandeau__bouton {
		padding: 4px 10px;
		font-size: 12.5px;
	}

	/* Fiche produit : la barre d'achat est déjà en bas, le bandeau s'efface */
	html.pcl-buybar-on .pcl-avent-bandeau {
		display: none;
	}
}

@media (max-width: 768px) {
	/* Le bouton « Besoin d'aide » remonte au-dessus du bandeau */
	html:not(.pcl-buybar-on) body.pcl-avent-actif .floating-help-button.pcl-aide {
		bottom: calc(var(--m-tab-h, 64px) + var(--m-safe, 0px) + 52px) !important;
	}
}

@media print {
	.pcl-avent-bandeau {
		display: none;
	}
}
