/* JDT – Barre d'ajout au panier fixe (fiche produit). Charte : vert #85A743, angles droits, Roboto. */

html body .jdt-barre:not(#jdt-barre) {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99990;
	box-sizing: border-box;
	margin: 0;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	border-top: 3px solid #85a743;
	background: #fff;
	box-shadow: 0 -6px 18px rgba(0, 0, 0, .12);
	color: #222;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.3;
	transform: translateY(110%);
	transition: transform .25s ease;
}

html body .jdt-barre[hidden]:not(#jdt-barre) {
	display: none;
}

html body .jdt-barre.jdt-barre--visible:not(#jdt-barre) {
	transform: translateY(0);
}

/* « Mobiles et tablettes seulement » : jamais au-delà de 1024 px */
@media (min-width: 1025px) {
	html body .jdt-barre:not(.jdt-barre--tous):not(#jdt-barre) {
		display: none;
	}
}

html body .jdt-barre .jdt-barre__interieur {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	max-width: 1200px;
	margin: 0 auto;
}

html body .jdt-barre .jdt-barre__infos {
	display: flex;
	flex: 1 1 100%;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
}

@media (min-width: 768px) {
	html body .jdt-barre .jdt-barre__infos {
		flex: 1 1 220px;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}
}

html body .jdt-barre .jdt-barre__nom {
	overflow: hidden;
	margin: 0;
	color: #85a743;
	font-family: "Inria Serif", serif;
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
	text-overflow: ellipsis;
}

html body .jdt-barre .jdt-barre__prix {
	flex: none;
	margin: 2px 0 0;
	color: #222;
	font-size: 15px;
	font-weight: 500;
}

html body .jdt-barre .jdt-barre__prix del {
	opacity: .55;
}

html body .jdt-barre .jdt-barre__actions {
	display: flex;
	flex: 1 1 320px;
	gap: 8px;
	min-width: 0;
}

html body .jdt-barre .jdt-barre__choix {
	display: flex;
	flex: 1 1 auto;
	gap: 8px;
	min-width: 0;
}

html body .jdt-barre .jdt-barre__choix:empty {
	display: none;
}

html body .jdt-barre .jdt-barre__select {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

html body .jdt-barre select:not(#jdt-barre) {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	min-height: 0;
	margin: 0;
	padding: 0 36px 0 12px;
	border: 1px solid #666;
	border-radius: 0;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px 14px;
	color: #222;
	font-family: Roboto, sans-serif;
	font-size: 16px;
}

html body .jdt-barre .jdt-barre__bouton:not(#jdt-barre),
html body .jdt-barre .jdt-barre__bouton:not(#jdt-barre):focus,
html body .jdt-barre .jdt-barre__bouton:not(#jdt-barre):active {
	flex: 0 0 auto;
	height: 46px;
	min-height: 0;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 0;
	background: #85a743;
	box-shadow: none;
	color: #fff;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
}

html body .jdt-barre .jdt-barre__bouton:not(#jdt-barre):hover {
	background: #6f8d35;
	color: #fff;
}

html body .jdt-barre .jdt-barre__bouton:not(#jdt-barre):focus-visible,
html body .jdt-barre select:not(#jdt-barre):focus-visible {
	outline: 2px solid transparent;
	box-shadow: 0 0 0 3px rgba(133, 167, 67, .55);
}

html body .jdt-barre .jdt-barre__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Aucun poids choisi : la liste est mise en évidence */
html body .jdt-barre.jdt-barre--attention select:not(#jdt-barre) {
	border-color: #a83c3c;
	animation: jdt-barre-secoue .35s ease;
}

@keyframes jdt-barre-secoue {
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

/* Place réservée en bas de page pendant que la barre est affichée */
body.jdt-barre-active {
	padding-bottom: 110px;
}

@media (min-width: 600px) {
	body.jdt-barre-active {
		padding-bottom: 80px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html body .jdt-barre:not(#jdt-barre) {
		transition: none;
	}

	html body .jdt-barre.jdt-barre--attention select:not(#jdt-barre) {
		animation: none;
	}
}
