/* Panneau de confirmation d'ajout au panier (inc/panneau-panier.php), lot 1, v2 du 20/10/2026 */

/* Message vert de WooCommerce remplacé par le panneau : caché dès l'affichage (pas de clignotement).
   Le body ne porte cette classe que sur la fiche où le panneau est écrit ; <noscript> le réaffiche. */
body.anaaz-panneau-page .woocommerce-message:has(.anaaz-panneau-marque) {
	display: none !important;
}

.anaaz-panneau {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 1001; /* au-dessus de l'en-tête fixe (1000), sous la bannière cookies */
	box-sizing: border-box;
	width: 360px;
	max-width: calc(100vw - 32px);
	padding: 16px;
	background: #fff;
	color: #111;
	border: 1px solid #e3e3e3;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
	font-size: 14px;
	line-height: 1.4;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.anaaz-panneau[hidden] {
	display: none !important;
}

.anaaz-panneau--ouvert {
	opacity: 1;
	transform: none;
}

.anaaz-panneau p {
	margin: 0;
}

.anaaz-panneau__tete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.anaaz-panneau__titre {
	font-weight: 600;
	font-size: 15px;
	color: #111;
}

.anaaz-panneau__coche {
	color: #1e7b34;
}

.anaaz-panneau__fermer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: -8px -8px -8px 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #111;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.anaaz-panneau__fermer:hover {
	background: #f2f2f2;
}

.anaaz-panneau__fermer:focus-visible,
.anaaz-panneau__bouton:focus-visible {
	outline: 2px solid #1c2b36;
	outline-offset: 2px;
}

.anaaz-panneau__produit {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.anaaz-panneau__image {
	flex: 0 0 72px;
}

.anaaz-panneau__image img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 4px;
}

.anaaz-panneau__infos {
	min-width: 0;
}

.anaaz-panneau__nom {
	font-weight: 600;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.anaaz-panneau__option {
	color: #444;
	font-size: 13px;
}

.anaaz-panneau__prix {
	margin-top: 4px !important;
	font-weight: 600;
}

.anaaz-panneau__prix del {
	color: #666;
	font-weight: 400;
	margin-right: 4px;
}

.anaaz-panneau__prix ins {
	text-decoration: none;
}

.anaaz-panneau__total {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-top: 12px !important;
	padding-top: 12px;
	border-top: 1px solid #ececec;
}

.anaaz-panneau__boutons {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.anaaz-panneau__bouton {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid #1c2b36;
	border-radius: 4px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	text-align: center;
	cursor: pointer;
}

/* Bouton principal : foncé */
.anaaz-panneau__bouton--panier {
	background: #1c2b36;
	color: #fff !important;
}

.anaaz-panneau__bouton--panier:hover {
	background: #2c4152;
}

/* Bouton secondaire : contour, ferme le panneau */
.anaaz-panneau__bouton--continuer {
	background: #fff;
	color: #1c2b36 !important;
}

.anaaz-panneau__bouton--continuer:hover {
	background: #f4f4f4;
}

/* Téléphone : en bas de l'écran, boutons faciles à toucher */
@media (max-width: 767px) {
	.anaaz-panneau {
		top: auto !important;
		right: 0 !important;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
		border-radius: 12px 12px 0 0;
		border-width: 1px 0 0;
		transform: translateY(16px);
	}

	.anaaz-panneau--ouvert {
		transform: none;
	}

	.anaaz-panneau__bouton {
		min-height: 48px;
		font-size: 15px;
	}

	.anaaz-panneau__fermer {
		width: 44px;
		height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.anaaz-panneau {
		transition: none;
		transform: none;
	}
}
