/**
 * Pop-up "produit ajouté au panier" — Woo Tiles
 * Overlay noir 25% + carte centrée (style As de Carreaux).
 * Toutes les classes sont préfixées .wtcp- pour éviter tout conflit.
 */

.wtcp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.25); /* fond noir 25% demandé */
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.wtcp-overlay.wtcp-visible {
	opacity: 1;
	visibility: visible;
}

.wtcp-modal {
	/* --------------------------------------------------------------
	 * Charte CLIPÉO — à ajuster ici, et nulle part ailleurs.
	 * Ce sont les 3 seules couleurs de marque du pop-up : si la charte
	 * bouge, ces 3 lignes suffisent.
	 * (Reprend le vert-de-gris #3a7d7b des plugins SPC. À confirmer
	 *  avec les globales Elementor du site.)
	 * -------------------------------------------------------------- */
	--wtcp-accent: #3a7d7b;       /* base des CTA et des bordures */
	--wtcp-accent-dark: #2c5f5e;  /* titres, prix */
	--wtcp-accent-hover: #2c5f5e; /* hover du CTA principal */

	background: #fff;
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.2s ease;
	font-family: "Outfit", Sans-serif;
}

.wtcp-overlay.wtcp-visible .wtcp-modal {
	transform: none;
}

/* --- En-tête --- */
.wtcp-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 48px;
	border-bottom: 1px solid #eee;
}

.wtcp-header__icon {
	color: var(--wtcp-accent);
	display: flex;
	flex: 0 0 auto;
}

.wtcp-header__title {
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	font-size: 15px;
	color: var(--wtcp-accent-dark);
	text-align: center;
}

/* !important + scope pour neutraliser le style de bouton du thème (fond rose) */
.wtcp-overlay .wtcp-modal .wtcp-close {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	cursor: pointer;
	padding: 8px !important;
	min-width: 0 !important;
	width: auto !important;
	height: auto !important;
	line-height: 0;
	color: #555 !important;
	border-radius: 8px;
}

.wtcp-overlay .wtcp-modal .wtcp-close:hover {
	background: #f2f2f2 !important;
	color: #111 !important;
}

/* --- Corps : produit à gauche, récap à droite --- */
.wtcp-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding: 22px;
}

.wtcp-product {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.wtcp-product__img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 10px;
	background: #f5f5f5;
	flex: 0 0 auto;
}

.wtcp-product__name {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.35;
	color: var(--wtcp-accent-dark);
	margin: 0 0 10px;
}

/* Liste des méta (prix au m², quantité, surfaces) */
.wtcp-product__meta {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
}

.wtcp-product__meta-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 3px 0;
	font-size: 13px;
	color: #555;
}

.wtcp-product__meta-label {
	color: #888;
}

.wtcp-product__meta-value {
	color: var(--wtcp-accent-dark);
	font-weight: 600;
	text-align: right;
}

.wtcp-product__price {
	color: var(--wtcp-accent-dark);
	font-weight: 700;
	font-size: 18px;
}

.wtcp-product__price-label {
	color: #555;
	font-weight: 600;
	font-size: 14px;
}

.wtcp-product__price del {
	color: #999;
	font-weight: 400;
	font-size: 14px;
	margin-right: 6px;
}

/* --- Récap panier --- */
.wtcp-summary {
	background: #fafafa;
	border-radius: 10px;
	padding: 16px;
	align-self: start;
}

.wtcp-summary__count {
	font-size: 14px;
	color: #444;
	margin: 0 0 12px;
}

.wtcp-summary__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 0;
	font-size: 14px;
	color: #444;
}

/* Port inconnu à ce stade (panier contenant du carrelage) : mention
   discrète, pour qu'on ne la lise pas comme un montant. */
.wtcp-shipping--pending {
	color: #888;
	font-size: 13px;
	text-align: right;
	font-weight: 400;
}

/* Relance « encore X échantillon(s) dans cette boîte » */
.wtcp-summary__note {
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--wtcp-accent-dark);
}

.wtcp-summary__row--total {
	border-top: 1px solid #e6e6e6;
	margin-top: 6px;
	padding-top: 12px;
	font-weight: 700;
	color: var(--wtcp-accent-dark);
	font-size: 15px;
}

.wtcp-loading {
	color: #999;
	font-size: 14px;
}

/* --- Actions --- */
.wtcp-actions {
	display: flex;
	gap: 12px;
	padding: 0 22px 14px;
	flex-wrap: wrap;
}

/* Scope + !important pour neutraliser le style de bouton/lien du thème (rose) */
.wtcp-overlay .wtcp-modal .wtcp-btn {
	flex: 1 1 auto;
	min-width: 160px;
	text-align: center;
	padding: 14px 20px;
	font-weight: 500;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none !important;
	border-radius: 14px;
	box-shadow: none !important;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Secondary — contour olive (créé pour le pop-up, absent du DS du site) */
.wtcp-overlay .wtcp-modal .wtcp-btn--ghost {
	background: #fff !important;
	color: var(--wtcp-accent) !important;
	border: 2px solid var(--wtcp-accent) !important;
}

.wtcp-overlay .wtcp-modal .wtcp-btn--ghost:hover {
	background: var(--wtcp-accent) !important;
	color: #fff !important;
}

/* Primary — olive plein, hover orange, aucune bordure visible */
.wtcp-overlay .wtcp-modal .wtcp-btn--primary {
	background: var(--wtcp-accent) !important;
	color: #fff !important;
	border: 2px solid var(--wtcp-accent) !important;
}

.wtcp-overlay .wtcp-modal .wtcp-btn--primary:hover {
	background: var(--wtcp-accent-hover) !important;
	border-color: var(--wtcp-accent-hover) !important;
	color: #fff !important;
}

/* --- Suggestions produits ("On complète la pose ?") --- */
.wtcp-suggestions {
	border-top: 1px solid #eee;
	padding: 16px 22px 4px;
}

.wtcp-suggestions__title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--wtcp-accent-dark);
}

.wtcp-suggestions__row {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 290px;   /* liste scrollable si beaucoup de suggestions */
	overflow-y: auto;
	padding-right: 4px;
}

/* Carte suggestion : photo | (titre + sélecteur) | gros bouton d'ajout */
.wtcp-suggestion {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 12px;
}

.wtcp-suggestion__img {
	width: 92px;
	height: 92px;
	flex: 0 0 auto;
	object-fit: cover;
	border-radius: 10px;
	background: #f5f5f5;
}

.wtcp-suggestion__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
}

.wtcp-suggestion__name {
	font-size: 14px;
	line-height: 1.3;
	color: #333 !important;
	text-decoration: none !important;
	font-weight: 500;
	display: block;
}

.wtcp-suggestion__name:hover {
	color: var(--wtcp-accent) !important;
}

/* Sélecteur − [input] + : boutons olive pleins, champ blanc bordé */
.wtcp-suggestion__stepper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wtcp-suggestion__step {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0 !important;
	border: none !important;
	border-radius: 10px;
	background: var(--wtcp-accent) !important;
	color: #fff !important;
	cursor: pointer;
	box-shadow: none !important;
	min-width: 0 !important;
	line-height: 0;
	transition: background 0.15s ease;
}

.wtcp-suggestion__step:hover {
	background: var(--wtcp-accent-hover) !important;
}

.wtcp-suggestion__qty {
	width: 48px !important;
	height: 46px;
	padding: 0 2px !important;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--wtcp-accent-dark);
	border: 1px solid rgba(58, 125, 123, .45) !important;   /* teinte de l'accent Clipéo */
	border-radius: 10px !important;
	background: #fff;
	-moz-appearance: textfield;
	box-shadow: none !important;
	min-width: 0 !important;
}

.wtcp-suggestion__qty::-webkit-outer-spin-button,
.wtcp-suggestion__qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Gros bouton d'ajout à droite, pleine hauteur, icône panier + */
.wtcp-suggestion__add {
	flex: 0 0 auto;
	align-self: stretch;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px !important;
	min-height: 92px;
	padding: 0 !important;
	border: none !important;
	background: var(--wtcp-accent) !important;
	color: #fff !important;
	border-radius: 12px;
	cursor: pointer;
	box-shadow: none !important;
	min-width: 0 !important;
	line-height: 0;
	transition: background 0.15s ease;
}

.wtcp-suggestion__add:hover {
	background: var(--wtcp-accent-hover) !important; /* orange, comme "Ajouter au panier" */
}

.wtcp-suggestion--added .wtcp-suggestion__add {
	cursor: default;
}

/* Mobile : photo et contrôles plus compacts */
@media (max-width: 480px) {
	.wtcp-suggestion { gap: 10px; padding: 10px; }
	.wtcp-suggestion__img { width: 76px; height: 76px; }
	.wtcp-suggestion__add { width: 52px !important; min-height: 76px; }
	.wtcp-suggestion__step { width: 36px; height: 36px; }
	.wtcp-suggestion__qty { width: 42px !important; height: 36px; font-size: 14px; }
}

.wtcp-viewcart {
	display: block;
	text-align: center;
	padding: 0 22px 20px;
	font-size: 13px;
}

.wtcp-viewcart a {
	color: #666;
	text-decoration: underline;
}

.wtcp-viewcart a:hover {
	color: var(--wtcp-accent);
}

/* --- Responsive --- */
@media (max-width: 640px) {
	.wtcp-body {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.wtcp-actions {
		flex-direction: column;
	}

	.wtcp-btn {
		min-width: 0;
	}
}
