/* ==========================================================================
   Mon Don — styles du widget [mon_don]
   Palette : papier blanc chaud + accent personnalisable (--mondon-accent)
   Typo : Fraunces (chiffres / titres) + Inter (interface)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

.mondon-widget {
	--mondon-accent: #BB5A3C;
	--mondon-ink: #1E1B18;
	--mondon-muted: #8A8275;
	--mondon-border: #E8E3D9;
	--mondon-surface: #FFFFFF;
	--mondon-surface-tint: #FAF8F4;

	box-sizing: border-box;
	max-width: 460px;
	width: 100%;
	margin: 0 auto;
	padding: 28px;
	background: var(--mondon-surface);
	border: 1px solid var(--mondon-border);
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(30, 27, 24, 0.04), 0 12px 32px -16px rgba(30, 27, 24, 0.12);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--mondon-ink);
}

.mondon-widget *,
.mondon-widget *::before,
.mondon-widget *::after {
	box-sizing: border-box;
}

/* ---- Onglets Une fois / Chaque mois ---- */

.mondon-tabs {
	display: flex;
	gap: 4px;
	background: var(--mondon-surface-tint);
	border-radius: 999px;
	padding: 4px;
	margin-bottom: 20px;
}

.mondon-tab {
	flex: 1;
	border: none;
	background: transparent;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--mondon-muted);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mondon-tab.is-active {
	background: var(--mondon-ink);
	color: #fff;
}

/* ---- Grille de montants ---- */

.mondon-amounts {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 18px;
}

.mondon-amount-btn {
	border: 1.5px solid var(--mondon-border);
	background: var(--mondon-surface);
	border-radius: 8px;
	padding: 14px 10px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mondon-amount-btn:hover {
	border-color: var(--mondon-accent);
}

.mondon-amount-btn.is-active {
	border-color: var(--mondon-accent);
	background: color-mix(in srgb, var(--mondon-accent) 8%, white);
}

.mondon-amount-fig {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.1;
}

.mondon-amount-label {
	font-size: 12px;
	color: var(--mondon-muted);
	letter-spacing: 0.01em;
}

/* ---- Montant libre ---- */

.mondon-custom-amount {
	margin-bottom: 18px;
}

.mondon-custom-amount label,
.mondon-email-row label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--mondon-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 6px;
}

.mondon-custom-input-wrap {
	position: relative;
}

.mondon-custom-input-wrap input,
.mondon-email-row input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--mondon-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 15px;
	color: var(--mondon-ink);
	background: var(--mondon-surface);
}

.mondon-custom-input-wrap input:focus,
.mondon-email-row input:focus,
.mondon-amount-btn:focus-visible,
.mondon-tab:focus-visible,
.mondon-rate-btn:focus-visible,
.mondon-submit:focus-visible {
	outline: 2px solid var(--mondon-accent);
	outline-offset: 1px;
}

.mondon-currency-suffix {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--mondon-muted);
	font-size: 14px;
	pointer-events: none;
}

/* ---- Contribution complémentaire ---- */

.mondon-contribution {
	background: var(--mondon-surface-tint);
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 18px;
}

.mondon-contribution-text {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--mondon-muted);
	line-height: 1.45;
}

.mondon-contribution-rates {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mondon-rate-btn {
	border: 1.5px solid var(--mondon-border);
	background: var(--mondon-surface);
	border-radius: 999px;
	padding: 7px 14px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--mondon-ink);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.mondon-rate-btn.is-active {
	border-color: var(--mondon-accent);
	background: var(--mondon-accent);
	color: #fff;
}

/* ---- Total ---- */

.mondon-total-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 14px 0;
	border-top: 1px solid var(--mondon-border);
	border-bottom: 1px solid var(--mondon-border);
	margin-bottom: 18px;
}

.mondon-total-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--mondon-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.mondon-total-value {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 26px;
	font-weight: 600;
}

/* ---- E-mail ---- */

.mondon-email-row {
	margin-bottom: 18px;
}

/* ---- Erreur ---- */

.mondon-error {
	background: #FBEAE5;
	border: 1px solid #E3A38C;
	color: #8A3A20;
	font-size: 13px;
	padding: 10px 12px;
	border-radius: 8px;
	margin: 0 0 14px;
}

/* ---- Bouton de soumission ---- */

.mondon-submit {
	width: 100%;
	border: none;
	background: var(--mondon-accent);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	padding: 15px 16px;
	border-radius: 8px;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.05s ease;
}

.mondon-submit:hover {
	opacity: 0.92;
}

.mondon-submit:active {
	transform: translateY(1px);
}

.mondon-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.mondon-trust {
	text-align: center;
	font-size: 12px;
	color: var(--mondon-muted);
	margin: 14px 0 0;
}

/* ---- Respect des préférences de mouvement réduit ---- */

@media (prefers-reduced-motion: reduce) {
	.mondon-widget * {
		transition: none !important;
	}
}

/* ---- Petits écrans ---- */

@media (max-width: 360px) {
	.mondon-widget {
		padding: 20px;
	}
	.mondon-amount-fig {
		font-size: 18px;
	}
}
