/* Protéalpes – Panier latéral
 * Charte : police New Hero (ExtraBold italique pour les titres et boutons), noir / blanc, angles droits. */

/* ---------- Typographies ----------
 * Reprises des polices globales de Divi (Divi > Options du thème > Typographie) :
 *  - paragraphes, champs, liens  → police du corps de texte ;
 *  - titres, noms de produits, prix, libellés et BOUTONS → police des titres.
 * Les valeurs de repli ne servent que si Divi n'est pas chargé. */
.ppsc, .ppsc-trigger {
	--ppsc-font-body: var(--et_global_body_font, "New Hero"), sans-serif;
	--ppsc-font-head: var(--et_global_heading_font, "New Hero"), sans-serif;
	--ppsc-w-body: var(--et_global_body_font_weight, 400);
	--ppsc-w-head: var(--et_global_heading_font_weight, 800);
}

/* ---------- Icône du header ---------- */
.ppsc-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 30px;
	vertical-align: top; /* évite le décalage de la ligne de base : l'icône reste au niveau des autres icônes du header */
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	line-height: 1;
}
.ppsc-trigger-icon { display: inline-flex; }
.ppsc-trigger .ppsc-icon-bag { width: 22px; height: 26px; }
.ppsc-trigger-count {
	position: absolute;
	top: -4px;
	right: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #000;
	color: #fff;
	font-family: var(--ppsc-font-body);
	font-weight: var(--ppsc-w-body);
	font-size: 10px;
	line-height: 18px;
	text-align: center;
	visibility: hidden;
}
/* Un parent du header peut inverser les couleurs (filtre invert) : le script ajoute .ppsc-flip, on pré-inverse
   la pastille pour qu'elle s'affiche TOUJOURS noire avec un texte blanc. */
.ppsc-trigger.ppsc-flip .ppsc-trigger-count { background: #fff; color: #000; }
.ppsc-trigger-sub {
	margin-left: 6px;
	font-family: var(--ppsc-font-head);
	font-style: normal;
	font-weight: var(--ppsc-w-head);
	font-size: 14px;
	line-height: 1;
}
body.ppsc-ready .ppsc-trigger-count { visibility: visible; }
body.ppsc-ready .ppsc-trigger[data-hide-zero="1"]:not(.ppsc-has-items) .ppsc-trigger-count { visibility: hidden; }

html.ppsc-lock { overflow: hidden; }

/* ---------- Panneau ---------- */
.ppsc {
	--ppsc-width: 500px;
	--ppsc-ink: #000;
	--ppsc-bg: #fff;
	--ppsc-body-bg: #f8f9fa;
	--ppsc-line: #e4e6e8;
	font-family: var(--ppsc-font-body);
	font-weight: var(--ppsc-w-body);
	font-size: var(--et_global_body_font_size, 16px);
	line-height: 1.55;
	color: var(--ppsc-ink);
}
.ppsc *, .ppsc *::before, .ppsc *::after { box-sizing: border-box; }
:where(.ppsc button) { font-family: inherit; } /* :where() → sans poids de spécificité : les boutons gardent la police des titres */
.ppsc a { color: inherit; }

.ppsc-overlay {
	position: fixed;
	inset: 0;
	z-index: 999998;
	background: rgba(0, 0, 0, .2);
	opacity: 0;
	visibility: hidden;
	transition: opacity .5s, visibility .5s;
}
.ppsc-panel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	width: var(--ppsc-width);
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	background: var(--ppsc-bg);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .5s, visibility .5s;
}
.ppsc.ppsc-open .ppsc-overlay { opacity: 1; visibility: visible; }
.ppsc.ppsc-open .ppsc-panel { transform: none; visibility: visible; }

/* En-tête */
.ppsc-header {
	position: relative;
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	padding: 8px 52px 8px 12px;
	background: var(--ppsc-bg);
}
.ppsc-basket {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 37px;
	height: 39px;
	flex: none;
}
.ppsc-basket-count {
	position: absolute;
	left: 0;
	right: 0;
	top: 62%;
	transform: translateY(-50%);
	font-size: 14px;
	line-height: 1;
	text-align: center;
}
.ppsc-title {
	font-size: 21px;
	font-family: var(--ppsc-font-head);
	font-style: normal;
	font-weight: var(--ppsc-w-head);
	line-height: 1.55;
	text-transform: uppercase;
}
.ppsc-close {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}

/* Messages */
.ppsc-notices {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 3;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ppsc-notices li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 14px 52px 14px 15px;
	background: #fff;
	border-bottom: 1px solid var(--ppsc-line);
	border-left: 3px solid #000;
	font-size: 14px;
	line-height: 1.4;
}
.ppsc-notices li.ppsc-notice--error { border-left-color: #b3261e; color: #b3261e; }

/* Corps */
.ppsc-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: var(--ppsc-body-bg);
}
.ppsc-products { padding: 0; }
.ppsc-product {
	display: flex;
	gap: 15px;
	padding: 10px 15px;
	border-bottom: 1px solid var(--ppsc-line);
}
.ppsc-product:last-child { border-bottom: 0; }
.ppsc-img { flex: none; width: 132px; }
.ppsc-img a { display: block; }
.ppsc-img img { display: block; width: 100%; height: auto; background: #f1f1f1; }
.ppsc-sum { flex: 1 1 auto; min-width: 0; display: flex; justify-content: space-between; gap: 10px; }
.ppsc-left { min-width: 0; }
.ppsc-name,
.ppsc-name a {
	font-size: 14px;
	font-family: var(--ppsc-font-head);
	font-style: normal;
	font-weight: var(--ppsc-w-head);
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	color: inherit;
}
.ppsc-name a:hover { text-decoration: underline; }
.ppsc-name .wpced { margin-top: 4px; font-size: 12px; }
.ppsc-meta { margin: 4px 0 0; font-size: 13px; line-height: 1.35; }
.ppsc-meta dl, .ppsc-meta p { margin: 0; }
.ppsc-meta dt, .ppsc-meta dd { display: inline; margin: 0; font-family: var(--ppsc-font-body); font-weight: var(--ppsc-w-body); }
.ppsc-meta dt { font-family: var(--ppsc-font-head); font-weight: var(--ppsc-w-head); }
.ppsc-meta dd p { display: inline; }
.ppsc-meta dd::after { content: ""; display: block; }
.ppsc-price { padding: 4px 0; }
.ppsc-price-val, .ppsc-price-val .amount { font-family: var(--ppsc-font-head); font-weight: var(--ppsc-w-head); }
.ppsc-qty-fixed { font-size: 14px; }

/* Packs (Product Bundles) : le pack en ligne parente, ses produits en lignes enfants compactes */
.ppsc-product--parent { border-bottom: 0; padding-bottom: 0; }
.ppsc-product--child { gap: 15px; padding: 5px 15px; border-bottom: 0; align-items: center; }
.ppsc-product--child:last-child,
.ppsc-product--child:has(+ .ppsc-product:not(.ppsc-product--child)) { padding-bottom: 10px; border-bottom: 1px solid var(--ppsc-line); }
.ppsc-product--child .ppsc-img { display: flex; justify-content: center; }
.ppsc-product--child .ppsc-img a { display: block; width: 50px; }
.ppsc-product--child .ppsc-img img { width: 50px; }
.ppsc-product--child .ppsc-name,
.ppsc-product--child .ppsc-name a { font-size: 13px; }
.ppsc-product--child .ppsc-qty-fixed { font-size: 13px; margin-top: 2px; }

.ppsc-qty {
	display: inline-flex;
	width: 75px;
	height: 30px;
	margin-top: 5px;
	border: 1px solid #000;
	background: #fff;
}
.ppsc-qty button {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 28px;
	padding: 0;
	background: #fff;
	border: 0;
	border-radius: 0;
	font-family: var(--ppsc-font-body);
	font-size: 16px;
	font-weight: var(--ppsc-w-body);
	line-height: 1;
	color: #000;
	cursor: pointer;
}
.ppsc-qty button:hover { background: #000; color: #fff; }
.ppsc-qty-input {
	flex: 1 1 auto;
	width: 37px;
	min-width: 0;
	height: 28px;
	margin: 0;
	padding: 0 2px;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: #000;
	font-family: var(--ppsc-font-body);
	font-weight: var(--ppsc-w-body);
	font-size: 14px;
	line-height: 28px;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}
.ppsc-qty-input::-webkit-outer-spin-button,
.ppsc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ppsc-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.ppsc-del {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	margin-top: 2px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}
.ppsc-del:hover { color: #b3261e; }
.ppsc-line-total, .ppsc-line-total .amount { font-family: var(--ppsc-font-head); font-weight: var(--ppsc-w-head); }

/* Livraison offerte */
.ppsc-ship { padding: 12px 15px 14px; background: #fff; border-bottom: 1px solid var(--ppsc-line); font-size: 14px; line-height: 1.4; text-align: center; }
.ppsc-ship-text { margin: 0 0 8px; }
.ppsc-ship-text strong { font-weight: 800; }
.ppsc-ship--done .ppsc-ship-text { display: flex; align-items: center; justify-content: center; gap: 6px; font-style: italic; text-transform: uppercase; }
.ppsc-ship-bar { height: 4px; background: var(--ppsc-line); overflow: hidden; }
.ppsc-ship-bar span { display: block; height: 100%; background: #000; transition: width .5s; }

/* Panier vide */
.ppsc-empty-cart {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 48px 20px;
	text-align: center;
}
.ppsc-empty-text { font-size: 18px; font-family: var(--ppsc-font-head); font-style: normal; font-weight: var(--ppsc-w-head); text-transform: uppercase; }
.ppsc-empty-cart .ppsc-btn { width: auto; min-width: 240px; }

/* Pied */
.ppsc-footer {
	flex: none;
	padding: 10px 20px 14px;
	background: var(--ppsc-bg);
	font-size: 14px;
	line-height: 1.55;
	max-height: 62vh;
	overflow-y: auto;
}
.ppsc-footer[hidden] { display: none; }
.ppsc-clear {
	display: block;
	margin: 0 0 0 auto;
	padding: 10px;
	background: none;
	border: 0;
	font-size: 13px;
	color: inherit;
	cursor: pointer;
}
.ppsc-clear:hover { text-decoration: underline; }

.ppsc-coupon-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 0;
	background: none;
	border: 0;
	font-size: 14px;
	text-align: left;
	color: inherit;
	cursor: pointer;
}
.ppsc-coupon-toggle:hover span { text-decoration: underline; }
.ppsc-coupon-form { display: flex; gap: 8px; padding: 4px 0 10px; }
.ppsc-coupon-form[hidden] { display: none; }
.ppsc-coupon-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #000;
	border-radius: 0;
	background: #fff;
	color: #000;
	font-family: var(--ppsc-font-body);
	font-weight: var(--ppsc-w-body);
	font-size: 14px;
}
.ppsc-coupon-apply {
	flex: none;
	padding: 0 16px;
	background: #000;
	border: 1px solid #000;
	border-radius: 0;
	color: #fff;
	font-family: var(--ppsc-font-head);
	font-style: normal;
	font-weight: var(--ppsc-w-head);
	font-size: 13px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .4s, color .4s ease-in-out;
}
.ppsc-coupon-apply:hover { background: #fff; color: #000; }

.ppsc-totals { margin: 4px 0 12px; }
.ppsc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 3px; }
.ppsc-row-label { font-family: var(--ppsc-font-head); font-weight: var(--ppsc-w-head); flex: none; }
.ppsc-row-value { text-align: right; }
.ppsc-row-value--note { max-width: 62%; }
.ppsc-row--subtotal .ppsc-row-value,
.ppsc-row--total .ppsc-row-value { font-family: var(--ppsc-font-head); font-weight: var(--ppsc-w-head); }
.ppsc-row--total { margin-top: 5px; padding-top: 5px; border-top: 1px dashed #000; }
.ppsc-row--coupon .ppsc-row-label { font-family: var(--ppsc-font-body); font-weight: var(--ppsc-w-body); }
.ppsc-coupon-remove {
	display: inline-grid;
	place-items: center;
	margin-left: 6px;
	padding: 0;
	vertical-align: middle;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}

.ppsc-buttons { display: grid; gap: 10px; }
.ppsc-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 10px;
	background: #000;
	border: 1px solid #fff;
	border-radius: 0;
	color: #fff;
	font-family: var(--ppsc-font-head);
	font-style: normal;
	font-weight: var(--ppsc-w-head);
	font-size: 14px;
	line-height: 1.55;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .4s, color .4s ease-in-out;
}
.ppsc a.ppsc-btn { color: #fff; }
.ppsc-btn:hover,
.ppsc a.ppsc-btn:hover { background: #fff; color: #000; border-color: #000; }

/* Chargement */
.ppsc-loader {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: none;
	background: rgba(255, 255, 255, .6);
}
.ppsc-loader::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	border: 3px solid rgba(0, 0, 0, .15);
	border-top-color: #000;
	border-radius: 50%;
	animation: ppsc-spin .8s linear infinite;
}
.ppsc.ppsc-loading .ppsc-loader { display: block; }
@keyframes ppsc-spin { to { transform: rotate(360deg); } }

/* Bouton « Ajouter au panier » en cours d'envoi */
.single_add_to_cart_button.ppsc-adding { opacity: .6; pointer-events: none; }

@media (max-width: 480px) {
	.ppsc-product { padding: 10px; gap: 10px; }
	.ppsc-img { width: 96px; }
	.ppsc-footer { padding: 8px 14px 12px; }
	.ppsc-title { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.ppsc-overlay, .ppsc-panel, .ppsc-btn { transition: none; }
}

/*
 * Taille des prix : certains thèmes (protealpes.ch) mettent « .woocommerce-Price-amount » à 28 px.
 * Dans le panier, un prix reprend la taille de son bloc (16 px pour la ligne produit, 14 px pour les totaux),
 * comme sur protealpes.com.
 */
#ppsc .amount,
#ppsc .amount bdi,
#ppsc .woocommerce-Price-amount {
	font-size: inherit;
	line-height: inherit;
}
