/**
 * [Trésor] Boutons — boutons (lien URL ou ajout au panier).
 *
 * Couleurs, typographie, padding et rayon sont pilotés par les options du
 * widget (une par bouton). Cette feuille pose la structure et les états.
 */

.ct-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
}

.ct-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	background: #4eac52;
	color: #291d1c;
	text-decoration: none;
	border: 0;
	border-radius: 999px;
	padding: 12px 24px;
	font: inherit;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.ct-btn:hover {
	filter: brightness(0.96);
}

.ct-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ct-btn[disabled],
.ct-btn.is-empty {
	opacity: 0.55;
	cursor: not-allowed;
	filter: none;
}

.ct-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 1.2em;
	height: 1.2em;
}

.ct-btn__icon svg,
.ct-btn__icon img {
	display: block;
	width: 100%;
	height: 100%;
}

.ct-btn__form {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	margin: 0;
}

.ct-btn__form.is-loading .ct-btn {
	opacity: 0.6;
	pointer-events: none;
}

.ct-btn__msg {
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 1.3;
}

.ct-btn__msg.is-error {
	color: #c0392b;
}

.ct-btn__msg.is-success {
	color: #4eac52;
}

.ct-buttons__empty {
	padding: 16px;
	border: 1px dashed #ccc;
	color: #777;
	text-align: center;
}
