/* Ajout au panier : états du bouton + tiroir de confirmation. */
:root {
	--vtr-a-encre: #14171f;
	--vtr-a-doux: #5a5f55;
	--vtr-a-gris: #8a8e84;
	--vtr-a-ligne: #e6e6e1;
	--vtr-a-fond: #f5f4f0;
	--vtr-a-courbe: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Bouton de la fiche ---------- */
.single_add_to_cart_button.vtr-ajout-en-cours,
.single_add_to_cart_button.vtr-ajout-fait {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 12px;
}
.single_add_to_cart_button.vtr-ajout-en-cours {
	cursor: progress;
	pointer-events: none;
}
.vtr-ajout__tourne {
	animation: vtr-ajout-tourne .8s linear infinite;
}
@keyframes vtr-ajout-tourne {
	to {
		transform: rotate(360deg);
	}
}
.vtr-ajout-avis:empty {
	display: none;
}
.vtr-ajout-avis {
	margin-bottom: 16px;
}

/* ---------- Pastille du panier ---------- */
.ast-icon-shopping-cart.vtr-ajout-pulse::after,
.vtr-ajout-pulse:not(.ast-icon-shopping-cart) {
	animation: vtr-ajout-pulse .7s var(--vtr-a-courbe);
}
@keyframes vtr-ajout-pulse {
	35% {
		transform: scale(1.45);
	}
}

/* ---------- Fenêtre ---------- */
html.vtr-ajout-ouvert {
	overflow: hidden;
}
.vtr-ajout {
	position: fixed;
	inset: 0;
	width: 100vw;
	max-width: none;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(20, 23, 31, 0);
	color: var(--vtr-a-encre);
	overflow: hidden;
	transition: background-color .45s ease;
}
.vtr-ajout::backdrop {
	background: transparent;
}
.vtr-ajout.is-ouvert {
	background: rgba(20, 23, 31, .38);
}
.vtr-ajout__tiroir {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(460px, 100vw);
	background: #fff;
	display: flex;
	flex-direction: column;
	/* Petit glissement + fondu : le tiroir ne traverse pas tout l'écran. */
	opacity: 0;
	transform: translateX(48px);
	transition: transform .45s var(--vtr-a-courbe), opacity .3s ease;
	box-sizing: border-box;
}
.vtr-ajout.is-ouvert .vtr-ajout__tiroir {
	opacity: 1;
	transform: none;
}
.vtr-ajout__poignee {
	display: none;
}
.vtr-ajout__tete {
	flex: none;
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px 0 32px;
	border-bottom: 1px solid var(--vtr-a-ligne);
}
.vtr-ajout__titre {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.2;
}
.vtr-ajout__coche {
	stroke-dasharray: 24;
	stroke-dashoffset: 24;
	transition: stroke-dashoffset .5s ease .3s;
}
.vtr-ajout.is-ouvert .vtr-ajout__coche {
	stroke-dashoffset: 0;
}
.vtr-ajout .vtr-ajout__fermer,
.vtr-ajout .vtr-ajout__fermer:hover,
.vtr-ajout .vtr-ajout__fermer:focus {
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--vtr-a-encre);
	display: grid;
	place-items: center;
	cursor: pointer;
}
.vtr-ajout__fermer:focus-visible {
	outline: 1px solid var(--vtr-a-encre);
	outline-offset: -4px;
}
.vtr-ajout__contenu {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 32px 32px;
}

/* Entrée échelonnée des blocs. */
.vtr-ajout__entree {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .45s ease, transform .6s var(--vtr-a-courbe);
}
.vtr-ajout.is-ouvert .vtr-ajout__entree {
	opacity: 1;
	transform: none;
}
.vtr-ajout.is-ouvert .vtr-ajout__entree:nth-child(1) { transition-delay: .18s; }
.vtr-ajout.is-ouvert .vtr-ajout__entree:nth-child(2) { transition-delay: .26s; }
.vtr-ajout.is-ouvert .vtr-ajout__entree:nth-child(3) { transition-delay: .34s; }
.vtr-ajout.is-ouvert .vtr-ajout__entree:nth-child(4) { transition-delay: .42s; }
.vtr-ajout__contenu.is-maj .vtr-ajout__entree {
	transition: none;
}

/* Article */
.vtr-ajout__article {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 20px;
	padding: 28px 0 24px;
}
.vtr-ajout__visuel img,
.vtr-ajout .vtr-ajout__img {
	width: 96px !important;
	height: 120px !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	background: var(--vtr-a-fond);
}
.vtr-ajout__infos {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.vtr-ajout__marque,
.vtr-ajout__sur-titre {
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--vtr-a-gris);
}
.vtr-ajout__nom {
	font-size: 17px;
	font-weight: 300;
	line-height: 1.3;
}
.vtr-ajout__options,
.vtr-ajout__qte {
	font-size: 13px;
	font-weight: 300;
	color: var(--vtr-a-doux);
}
.vtr-ajout__bas {
	margin-top: auto;
	padding-top: 8px;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}
.vtr-ajout__prix {
	font-size: 16px;
	white-space: nowrap;
}
.vtr-ajout__ht {
	font-size: 11px;
	letter-spacing: .06em;
	color: var(--vtr-a-gris);
}
.vtr-ajout .woocommerce-Price-amount {
	font-weight: inherit;
}

/* Résumé + franco */
.vtr-ajout__resume {
	padding: 20px;
	background: var(--vtr-a-fond);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.vtr-ajout__total {
	margin: 0;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	font-weight: 300;
}
.vtr-ajout__total strong {
	font-weight: 400;
	white-space: nowrap;
}
.vtr-ajout__jauge {
	height: 3px;
	background: #dedcd4;
}
.vtr-ajout__jauge span {
	display: block;
	width: 0;
	height: 3px;
	background: var(--vtr-a-encre);
	transition: width .9s var(--vtr-a-courbe) .5s;
}
.vtr-ajout__franco {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 300;
	line-height: 1.4;
	color: #3d4137;
}
.vtr-ajout__franco svg {
	flex: none;
}
.vtr-ajout__franco strong,
.vtr-ajout__franco .woocommerce-Price-amount {
	font-weight: 500;
}

/* Actions */
.vtr-ajout__actions {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.vtr-ajout .vtr-ajout__bouton {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 56px;
	padding: 0 20px;
	box-sizing: border-box;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.vtr-ajout .vtr-ajout__bouton--plein,
.vtr-ajout .vtr-ajout__bouton--plein:focus {
	background: var(--vtr-a-encre);
	color: #fff;
}
.vtr-ajout .vtr-ajout__bouton--plein:hover,
.vtr-ajout .vtr-ajout__bouton--plein:focus-visible {
	background: #2b2f38;
	color: #fff;
}
.vtr-ajout .vtr-ajout__bouton--contour,
.vtr-ajout .vtr-ajout__bouton--contour:focus {
	height: 52px;
	border: 1px solid var(--vtr-a-encre);
	color: var(--vtr-a-encre);
}
.vtr-ajout .vtr-ajout__bouton--contour:hover,
.vtr-ajout .vtr-ajout__bouton--contour:focus-visible {
	background: var(--vtr-a-encre);
	color: #fff;
}
.vtr-ajout .vtr-ajout__continuer,
.vtr-ajout .vtr-ajout__continuer:hover,
.vtr-ajout .vtr-ajout__continuer:focus {
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 300;
	letter-spacing: 0;
	text-transform: none;
	color: var(--vtr-a-encre);
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Compléments */
.vtr-ajout__complements {
	margin-top: 16px;
}
.vtr-ajout__sur-titre {
	margin: 0;
	padding-bottom: 12px;
	font-size: 11px;
}
.vtr-ajout__complements ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.vtr-ajout__mini {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid var(--vtr-a-ligne);
}
.vtr-ajout__mini:nth-child(n+3) {
	display: none;
}
.vtr-ajout__mini-visuel img {
	width: 64px !important;
	height: 80px !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	background: var(--vtr-a-fond);
}
.vtr-ajout__mini-infos {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-size: 13px;
	font-weight: 300;
	color: var(--vtr-a-doux);
}
.vtr-ajout .vtr-ajout__mini-infos a {
	font-size: 14px;
	font-weight: 400;
	color: var(--vtr-a-encre);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vtr-ajout .vtr-ajout__plus,
.vtr-ajout .vtr-ajout__plus:hover,
.vtr-ajout .vtr-ajout__plus:focus {
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid #d8d8d2;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: var(--vtr-a-encre);
	display: grid;
	place-items: center;
	cursor: pointer;
}
.vtr-ajout .vtr-ajout__plus:hover {
	border-color: var(--vtr-a-encre);
}

/* ---------- Mobile : panneau par le bas ---------- */
@media (max-width: 767px) {
	.vtr-ajout__tiroir {
		top: auto;
		left: 0;
		width: 100%;
		max-height: 88dvh;
		transform: translateY(40px);
		padding-bottom: env(safe-area-inset-bottom);
	}
	.vtr-ajout__poignee {
		display: block;
		width: 40px;
		height: 4px;
		margin: 10px auto 0;
		border-radius: 2px;
		background: #d8d8d2;
	}
	.vtr-ajout__tete {
		height: 56px;
		padding: 0 8px 0 20px;
	}
	.vtr-ajout__contenu {
		padding: 0 20px 20px;
	}
	.vtr-ajout__article {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 14px;
		padding: 16px 0;
	}
	.vtr-ajout__visuel img,
	.vtr-ajout .vtr-ajout__img {
		width: 64px !important;
		height: 80px !important;
	}
	.vtr-ajout__nom {
		font-size: 15px;
	}
	.vtr-ajout__resume {
		padding: 14px 16px;
		gap: 10px;
	}
	.vtr-ajout__actions {
		margin-top: 16px;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
	.vtr-ajout .vtr-ajout__bouton,
	.vtr-ajout .vtr-ajout__bouton--contour {
		height: 52px;
		padding: 0 8px;
		font-size: 12px;
		letter-spacing: .14em;
	}
	/* « Voir le panier » à gauche, « Commander » à droite, sous le pouce. */
	.vtr-ajout__bouton--contour {
		order: -1;
	}
	.vtr-ajout .vtr-ajout__continuer {
		grid-column: 1 / -1;
	}
	.vtr-ajout__complements ul {
		display: flex;
		gap: 10px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		margin: 0 -20px;
		padding: 0 20px 4px;
		scrollbar-width: none;
	}
	.vtr-ajout__complements ul::-webkit-scrollbar {
		display: none;
	}
	.vtr-ajout__mini,
	.vtr-ajout__mini:nth-child(n+3) {
		flex: 0 0 min(78vw, 300px);
		display: grid;
		scroll-snap-align: start;
		padding: 10px;
		border: 1px solid var(--vtr-a-ligne);
	}
}

@media (prefers-reduced-motion: reduce) {
	.vtr-ajout,
	.vtr-ajout__tiroir,
	.vtr-ajout__entree,
	.vtr-ajout__coche,
	.vtr-ajout__jauge span {
		transition: none !important;
	}
	.vtr-ajout-pulse::after,
	.vtr-ajout-pulse {
		animation: none !important;
	}
}

/* ---------- Attente de la réponse du serveur ---------- */
.vtr-ajout__attente {
	display: none;
	animation: vtr-ajout-tourne .8s linear infinite;
}
.vtr-ajout.is-attente .vtr-ajout__attente {
	display: block;
}
.vtr-ajout.is-attente .vtr-ajout__titre > svg:first-child {
	display: none;
}
.vtr-ajout.is-attente .vtr-ajout__coche,
.vtr-ajout:not(.is-ouvert) .vtr-ajout__coche {
	stroke-dashoffset: 24;
}
.vtr-ajout__resume.is-squelette {
	gap: 12px;
}
.vtr-ajout__resume.is-squelette span {
	display: block;
	height: 12px;
	background: linear-gradient(90deg, #e9e7e0 0%, #f7f6f2 50%, #e9e7e0 100%);
	background-size: 200% 100%;
	animation: vtr-ajout-reflet 1.2s ease-in-out infinite;
}
.vtr-ajout__resume.is-squelette span:nth-child(1) { width: 70%; }
.vtr-ajout__resume.is-squelette span:nth-child(2) { width: 100%; height: 3px; }
.vtr-ajout__resume.is-squelette span:nth-child(3) { width: 85%; }
@keyframes vtr-ajout-reflet {
	from { background-position: 100% 0; }
	to { background-position: -100% 0; }
}
.vtr-ajout .vtr-ajout__bouton.is-attente {
	opacity: .7;
	cursor: progress;
}
.vtr-ajout__contenu.is-maj .vtr-ajout__resume,
.vtr-ajout__contenu.is-maj .vtr-ajout__complements {
	animation: vtr-ajout-apparition .4s ease both;
}
@keyframes vtr-ajout-apparition {
	from { opacity: 0; transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
	.vtr-ajout__resume.is-squelette span,
	.vtr-ajout__contenu.is-maj .vtr-ajout__resume,
	.vtr-ajout__contenu.is-maj .vtr-ajout__complements {
		animation: none;
	}
}

/* Interlignage propre au tiroir (celui du thème, très aéré, écartait les noms sur deux lignes). */
.vtr-ajout {
	line-height: 1.4;
}
.vtr-ajout .vtr-ajout__mini-infos,
.vtr-ajout .vtr-ajout__mini-infos a {
	line-height: 1.35;
}
.vtr-ajout .vtr-ajout__mini-infos {
	gap: 4px;
}

/* Réduction : pastille, prix barré et économie totale. */
.vtr-ajout__remise,
.vtr-ajout__economies {
	font-size: 12px;
	font-weight: 300;
	color: var(--vtr-a-encre, #14171f);
}
.vtr-ajout__remise {
	margin-top: 6px;
}
.vtr-ajout__remise strong {
	display: inline-block;
	padding: 1px 6px;
	background: #f2d500;
	font-weight: 500;
}
.vtr-ajout__prix del {
	margin-right: 4px;
	font-size: 12px;
	font-weight: 300;
	color: var(--vtr-a-gris);
}
.vtr-ajout__economies {
	margin: 0;
	font-size: 13px;
}
.vtr-ajout__economies strong {
	font-weight: 500;
}
