/*
 * Fiches produits premium — styles des blocs additifs uniquement (voir
 * inc/product-premium.php). Ne touche à aucun élément natif WooCommerce/
 * Blocksy. Chargé uniquement sur is_product() (voir functions.php,
 * zb_enqueue_product_premium_assets).
 */

.zb-pp-check {
	flex: 0 0 auto;
	color: var(--zb-accent-deep, #237a3d);
}

/* ---------- Disponibilité ---------- */

.zb-pp-availability {
	display: inline-flex;
	align-items: center;
	font-size: 14px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	margin: 12px 0;
}

.zb-pp-availability--in {
	background: rgba(57, 167, 81, 0.12);
	color: var(--zb-accent-deep, #237a3d);
}

.zb-pp-availability--low {
	background: rgba(214, 158, 46, 0.16);
	color: #8a5a10;
}

.zb-pp-availability--backorder {
	background: rgba(90, 110, 150, 0.14);
	color: #3d4f6e;
}

.zb-pp-availability--out {
	background: rgba(190, 60, 60, 0.14);
	color: #a33333;
}

/* ---------- Clarté prix + actions de conversion ---------- */

.zb-pp-unit-context {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: -2px 0 14px;
	padding: 7px 11px;
	border: 1px solid var(--zb-border-subtle, #e6e0d3);
	border-radius: 999px;
	background: #f7faf7;
	color: var(--zb-text-secondary, #5f6259);
	font-size: 13px;
	line-height: 1.2;
}

.zb-pp-unit-context strong {
	color: var(--zb-text-heading, #23261f);
	font-weight: 700;
}

.zb-pp-purchase-anchor {
	display: block;
	height: 0;
	scroll-margin-top: 110px;
}

.zb-pp-project-actions {
	display: grid;
	gap: 14px;
	margin: 16px 0 20px;
	padding: 16px;
	border: 1px solid #d9e8db;
	border-radius: 14px;
	background: linear-gradient(135deg, #f7fbf7 0%, #eef6ef 100%);
}

.zb-pp-project-actions__copy {
	display: grid;
	gap: 4px;
}

.zb-pp-project-actions__copy strong {
	color: var(--zb-text-heading, #23261f);
	font-size: 15px;
}

.zb-pp-project-actions__copy span {
	color: var(--zb-text-secondary, #5f6259);
	font-size: 13px;
	line-height: 1.45;
}

.zb-pp-project-actions__buttons {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

.zb-pp-project-actions__buttons a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.zb-pp-project-actions__buttons a:hover {
	transform: translateY(-1px);
}

.zb-pp-project-actions__quote {
	border: 1px solid var(--zb-accent-deep, #237a3d);
	background: var(--zb-accent-deep, #237a3d);
	color: #fff;
}

.zb-pp-project-actions__quote:hover {
	background: #185d2d;
	color: #fff;
}

.zb-pp-project-actions__delivery {
	border: 1px solid #bfd3c1;
	background: #fff;
	color: var(--zb-accent-deep, #237a3d);
}

.zb-pp-project-actions__delivery:hover {
	border-color: var(--zb-accent-deep, #237a3d);
	color: var(--zb-accent-deep, #237a3d);
}

.zb-pp-mobile-sticky {
	display: none;
}

/* ---------- Réassurance ---------- */

/* Ligne mascotte + liste (lot extension Zako, 01/08/2026) : la liste garde
   exactement ses règles d'origine, seule sa largeur cède la place à la
   mascotte via flex plutôt que d'occuper 100% de la colonne. */
.zb-pp-reassurance-row {
	display: flex;
	align-items: center;
	gap: 16px;
}

.zb-pp-reassurance-row .zb-pp-reassurance {
	flex: 1 1 auto;
	min-width: 0;
}

.zb-pp-reassurance-row__mascot {
	flex: 0 0 auto;
}

.zb-pp-reassurance-row__mascot .zako-mascot__image {
	display: block;
	width: 100px;
	height: auto;
}

.zb-pp-reassurance {
	list-style: none;
	margin: 16px 0;
	padding: 14px 16px;
	background: var(--zb-surface-alt, #f1ece3);
	border-radius: 10px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px 16px;
}

.zb-pp-reassurance li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--zb-text-body, #40433c);
}

/* ---------- Pourquoi choisir ---------- */

.zb-pp-why {
	margin: 20px 0;
}

.zb-pp-why__title,
.zb-pp-section-title {
	font-size: 16px;
	color: var(--zb-text-heading, #23261f);
	margin: 0 0 10px;
}

.zb-pp-why__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.zb-pp-why__list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	color: var(--zb-text-body, #40433c);
}

/* ---------- Bloc combiné (applications → FAQ) ---------- */

.zb-pp-block {
	/* Largeur/centrage horizontal delegues a .is-width-constrained (classe
	   Blocksy reutilisee, voir la marque .zb-pp-block.is-width-constrained
	   dans product-premium.php) plutot qu'une valeur en dur ici, pour rester
	   coherent avec l'espacement du haut de fiche produit (galerie/resume). */
	margin-top: 32px;
	margin-bottom: 32px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.zb-pp-chip-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.zb-pp-chip {
	background: var(--zb-surface-alt, #f1ece3);
	color: var(--zb-text-heading, #23261f);
	border: 1px solid var(--zb-border-subtle, #e6e0d3);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
}

.zb-pp-specs__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.zb-pp-specs__table th,
.zb-pp-specs__table td {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 1px solid var(--zb-border-subtle, #e6e0d3);
}

.zb-pp-specs__table th {
	color: var(--zb-text-secondary, #5f6259);
	font-weight: 600;
	width: 40%;
}

.zb-pp-specs__table td {
	color: var(--zb-text-body, #40433c);
}

.zb-pp-product-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.zb-pp-product-card a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-decoration: none;
	color: inherit;
}

.zb-pp-product-card img {
	border-radius: 8px;
	width: 100%;
	height: auto;
	display: block;
}

.zb-pp-product-card__title {
	font-size: 13px;
	color: var(--zb-text-heading, #23261f);
	font-weight: 600;
}

.zb-pp-product-card__price {
	font-size: 13px;
	color: var(--zb-accent-deep, #237a3d);
}

.zb-pp-product-card a:focus-visible {
	outline: 2px solid var(--zb-accent-deep, #237a3d);
	outline-offset: 3px;
}

.zb-pp-calculator a,
.zb-pp-guide a {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: var(--zb-accent-deep, #237a3d);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.zb-pp-calculator a:focus-visible,
.zb-pp-guide a:focus-visible {
	outline: 2px solid var(--zb-accent-deep, #237a3d);
	outline-offset: 2px;
}

.zb-pp-faq__item {
	border-bottom: 1px solid var(--zb-border-subtle, #e6e0d3);
	padding: 10px 0;
}

.zb-pp-faq__item summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--zb-text-heading, #23261f);
	font-size: 14px;
}

.zb-pp-faq__item summary:focus-visible {
	outline: 2px solid var(--zb-accent-deep, #237a3d);
	outline-offset: 2px;
}

.zb-pp-faq__item p {
	margin: 8px 0 0;
	font-size: 14px;
	color: var(--zb-text-body, #40433c);
	line-height: 1.5;
}

/* ---------- Tablette ---------- */

@media (max-width: 900px) {
	.zb-pp-product-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.zb-pp-reassurance-row__mascot .zako-mascot__image {
		width: 84px;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
	body.single-product {
		padding-bottom: calc(76px + env(safe-area-inset-bottom));
	}

	.zb-pp-reassurance {
		grid-template-columns: 1fr;
	}

	.zb-pp-reassurance-row {
		flex-direction: column;
	}

	.zb-pp-reassurance-row__mascot {
		display: none;
	}

	.zb-pp-project-actions__buttons {
		grid-template-columns: 1fr;
	}

	.zb-pp-mobile-sticky {
		position: fixed;
		z-index: 9998;
		right: 0;
		bottom: 0;
		left: 0;
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
		gap: 9px;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		border-top: 1px solid rgba(20, 50, 28, 0.12);
		background: rgba(255, 255, 255, 0.97);
		box-shadow: 0 -10px 28px rgba(17, 45, 25, 0.13);
		backdrop-filter: blur(10px);
	}

	.zb-pp-mobile-sticky a {
		display: inline-flex;
		min-height: 48px;
		align-items: center;
		justify-content: center;
		border-radius: 10px;
		font-size: 14px;
		font-weight: 700;
		line-height: 1.1;
		text-align: center;
		text-decoration: none;
	}

	.zb-pp-mobile-sticky__buy {
		border: 1px solid #c7d7c9;
		background: #fff;
		color: var(--zb-accent-deep, #237a3d);
	}

	.zb-pp-mobile-sticky__quote {
		border: 1px solid var(--zb-accent-deep, #237a3d);
		background: var(--zb-accent-deep, #237a3d);
		color: #fff;
	}

	.zb-pp-mobile-sticky__quote.is-full {
		grid-column: 1 / -1;
	}

	.single-product .zb-whatsapp-float {
		bottom: calc(86px + env(safe-area-inset-bottom));
	}

	.zb-pp-product-grid {
		grid-template-columns: 1fr 1fr;
	}

	/* Titre produit + prix compactés sous 480px : sur les titres longs
	   (2 lignes), le bloc titre+prix atterrit dans la même bande que les
	   boutons flottants WhatsApp/Zako (position fixed, bas d'écran) au
	   premier chargement — chevauchement visuel constaté (signalé
	   01/08/2026). Un titre de 30px/45px de hauteur de ligne est
	   surdimensionné sur 390px de large de toute façon ; le compacter ici
	   réduit la hauteur du bloc et le fait terminer plus tôt, avant la zone
	   occupée par les boutons flottants, sans toucher à leur position ni à
	   la mise en page desktop/tablette. */
	h1.product_title {
		font-size: 24px;
		line-height: 30px;
	}

	.summary .price {
		margin-bottom: 16px;
	}

	/* La galerie affiche les photos produit (souvent carrées à la source,
	   ex. 343×343px) dans un cadre bien plus haut que large (mesuré :
	   343×458px, ratio ~3:4) — object-fit:cover recadre donc inutilement
	   l'image. Sur 390px de large, ce cadre à lui seul occupe plus de la
	   moitié de la hauteur d'écran, ce qui pousse titre+prix jusque dans la
	   bande occupée par les boutons flottants WhatsApp/Zako. Contraint la
	   hauteur à un ratio plus proche du carré natif (recadrage bien moins
	   sévère qu'avant, pas de déformation, object-fit:cover inchangé) :
	   la photo reste lisible, et titre+prix remontent d'assez pour ne plus
	   chevaucher les boutons flottants au premier chargement. */
	.woocommerce-product-gallery {
		max-height: 360px;
	}

	.woocommerce-product-gallery__wrapper,
	.woocommerce-product-gallery .zoomImg,
	.woocommerce-product-gallery img {
		max-height: 360px;
	}
}
