/* « Ma sélection » (Saphonyx Product Finder 0.2.7). Colours: card border #e2e2e2, site link blue #2ea3f2,
   filled blue #1f6fae (white on it: 5.3:1). The cards' inline styles set padding:0 on titles, hence !important. */

/* 0.2.9: floated before the title (not absolute), so text wraps around the button and never runs under it.
   Relative + z-index keep it above the card's full-card link (z-index 1). */
.spx-sel-btn {
	position: relative; z-index: 3; float: right;
	box-sizing: border-box; width: 38px; height: 38px; min-height: 0; margin: -4px -6px 6px 12px; padding: 0;
	display: flex; align-items: center; justify-content: center;
	background: #fff; color: #8a8a8a; border: 1px solid #e2e2e2; border-radius: 4px; box-shadow: none;
	font: inherit; line-height: 1; text-transform: none; cursor: pointer;
	transition: color .15s, border-color .15s, background-color .15s;
}
.spx-sel-btn:hover { color: #1f6fae; border-color: #2ea3f2; }
.spx-sel-btn[aria-pressed="true"] { background: #1f6fae; border-color: #1f6fae; color: #fff; }
.spx-sel-btn[aria-pressed="true"]:hover { background: #185a8f; border-color: #185a8f; color: #fff; }
.spx-sel-btn > span { display: flex; }
.spx-sel-btn .spx-i-on,
.spx-sel-btn[aria-pressed="true"] .spx-i-off { display: none; }
.spx-sel-btn[aria-pressed="true"] .spx-i-on { display: flex; }

.spx-sel-btn:focus-visible, .spx-sel-fab:focus-visible, .spx-sel-dlg button:focus-visible,
.spx-sel-go:focus-visible, .spx-sel-add:focus-visible, .spx-sel-view:focus-visible {
	outline: 2px solid #1f6fae; outline-offset: 2px;
}

/* the « Ma sélection (n) » button */
.spx-sel-fab {
	position: fixed; right: 16px; bottom: 16px; z-index: 99990;
	display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px 10px 16px;
	background: #1f6fae; color: #fff; border: 0; border-radius: 24px;
	font: 700 15px/1.2 Arial, Helvetica, sans-serif; text-transform: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer;
}
.spx-sel-fab:hover { background: #185a8f; }
.spx-sel-fab[hidden], .spx-sel-toast[hidden], .spx-sel-fill[hidden], .spx-sel-hint[hidden],
.spx-sel-dlg [hidden] { display: none !important; }
.spx-sel-n {
	min-width: 22px; padding: 2px 6px; box-sizing: border-box; border-radius: 11px;
	background: #fff; color: #1f6fae; font-size: 13px; text-align: center;
}

/* notice after a click on a card */
.spx-sel-toast {
	position: fixed; right: 16px; bottom: 72px; z-index: 99991; max-width: min(420px, calc(100vw - 32px));
	box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
	padding: 10px 14px; background: #2b2b2b; color: #fff; border-radius: 6px;
	font: 14px/1.4 Arial, Helvetica, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.spx-sel-view {
	margin: 0; padding: 0; background: none; border: 0; color: #8fd0ff; font: inherit; font-weight: 700;
	text-decoration: underline; cursor: pointer;
}
.spx-sel-live {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* the pop-up */
.spx-sel-dlg {
	box-sizing: border-box; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
	margin: auto; padding: 0; border: 0; border-radius: 8px; overflow: auto;
	background: #fff; color: #2b2b2b; font: 15px/1.5 Arial, Helvetica, sans-serif;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.spx-sel-dlg::backdrop { background: rgba(0, 0, 0, .45); }
.spx-sel-in { padding: 18px 20px 16px; }
.spx-sel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
.spx-sel-head h2 { margin: 0; padding: 0; font-size: 20px; line-height: 1.3; color: #2b2b2b; font-weight: 700; }
.spx-sel-close, .spx-sel-rm {
	flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
	width: 36px; height: 36px; margin: 0; padding: 0; background: #fff; color: #666;
	border: 1px solid transparent; border-radius: 4px; cursor: pointer;
}
.spx-sel-close:hover, .spx-sel-rm:hover { color: #b3261e; border-color: #e2e2e2; }
.spx-sel-rm svg { width: 18px; height: 18px; }
.spx-sel-count, .spx-sel-empty { margin: 0 0 10px; padding: 0; color: #555; font-size: 14px; }
.spx-sel-list {
	list-style: none; margin: 0 0 14px; padding: 0; max-height: 42vh; overflow: auto;
	border-top: 1px solid #eee;
}
.spx-sel-list li {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	margin: 0; padding: 4px 0 4px 2px; border-bottom: 1px solid #eee; list-style: none;
}
.spx-sel-name { font-weight: 700; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
/* the three form buttons: same look as the site's Divi buttons « Commander / Demande d'information / Conseils techniques »
   (white, 2px #2ea3f2 border, radius 3px, #2ea3f2 Arial text, shadow 0 2px 18px, line icon in #438fc6 before the label) */
.spx-sel-actions { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; }   /* stacked: each label on one line */
.spx-sel-go {
	box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 8px;
	margin: 0; padding: 8px 12px; background: #fff; color: #2ea3f2 !important; border: 2px solid #2ea3f2; border-radius: 3px;
	font: 500 16px/1.3 Arial, Helvetica, sans-serif; text-align: center; text-decoration: none !important;
	box-shadow: 0 2px 18px rgba(0, 0, 0, .3); transition: background-color .3s, box-shadow .3s;
}
.spx-sel-go svg { flex: none; width: 20px; height: 20px; color: #438fc6; }
.spx-sel-go:hover { background: #f0f8fe; box-shadow: 0 2px 22px rgba(0, 0, 0, .35); }
.spx-sel-note { margin: 0 0 10px; padding: 0; color: #666; font-size: 13px; line-height: 1.45; }
.spx-sel-clear {
	display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 0; background: none; border: 0;
	color: #666; font: 14px/1.3 Arial, Helvetica, sans-serif; cursor: pointer;
}
.spx-sel-clear svg { width: 18px; height: 18px; }
.spx-sel-clear:hover { color: #b3261e; }

/* under the forms' product field */
.spx-sel-fill { margin: 6px 0 0; }
.spx-sel-add {
	display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px;
	background: #fff; color: #1f6fae; border: 1px solid #1f6fae; border-radius: 4px;
	font: 700 14px/1.3 Arial, Helvetica, sans-serif; text-transform: none; cursor: pointer;
}
.spx-sel-add svg { width: 18px; height: 18px; }
.spx-sel-add:hover:not(:disabled) { background: #eef5fb; }
.spx-sel-add:disabled { color: #2e7d32; border-color: #b9d8bb; background: #f3faf3; cursor: default; }
.spx-sel-hint { margin: 6px 0 0; padding: 0; color: #555; font-size: 13px; line-height: 1.45; }

@media (max-width: 480px) {
	.spx-sel-fab .spx-sel-lab { display: none; }
	.spx-sel-fab { padding: 12px 12px 12px 14px; }
}
@media print {
	.spx-sel-btn, .spx-sel-fab, .spx-sel-toast, .spx-sel-fill { display: none !important; }
}
