/* Formulaire de don Zakat / Sadaqa */

.zs-form-wrapper {
	--zs-accent: #0092b0;
	--zs-accent-light: #e6f4f7;
	--zs-accent-soft: #f2f9fb;
	--zs-accent-dark: #007590;
	--zs-error: #b42318;
	--zs-border: #5f9aa8;
	--zs-muted: #5b6270;
	--zs-radius: 6px;
	max-width: 40rem;
	margin: 0 auto;
	font-size: 1rem;
	line-height: 1.5;
}

.zs-form-wrapper *,
.zs-form-wrapper *::before,
.zs-form-wrapper *::after {
	box-sizing: border-box;
}

.zs-fieldset {
	margin: 0 0 1.5rem;
	padding: 0;
	border: 0;
	min-width: 0;
}

.zs-legend {
	margin-bottom: 0.75rem;
	padding: 0;
	font-size: 1.15rem;
	font-weight: 700;
}

.zs-field {
	margin-bottom: 1rem;
}

.zs-field label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.zs-field__help {
	margin: 0 0 0.35rem;
	color: var(--zs-muted);
	font-size: 0.9rem;
}

.zs-field input[type="text"],
.zs-field input[type="email"] {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--zs-border);
	border-radius: var(--zs-radius);
	font-size: 1rem;
}

.zs-field input:focus-visible,
.zs-button:focus-visible,
.zs-form-wrapper a:focus-visible {
	outline: 3px solid var(--zs-accent);
	outline-offset: 2px;
}

.zs-field input[aria-invalid="true"] {
	border-color: var(--zs-error);
}

.zs-field__error {
	margin: 0.3rem 0 0;
	color: var(--zs-error);
	font-size: 0.9rem;
	font-weight: 600;
}

/* La Zakat est mise en avant. */
.zs-field--zakat {
	padding: 1rem;
	border: 2px solid var(--zs-accent);
	border-radius: var(--zs-radius);
	background: var(--zs-accent-light);
}

.zs-field--zakat label {
	font-size: 1.1rem;
}

.zs-field--zakat input {
	font-size: 1.25rem;
	font-weight: 700;
}

.zs-amount {
	position: relative;
}

.zs-amount input {
	padding-right: 2rem;
}

.zs-amount__unit {
	position: absolute;
	top: 50%;
	right: 0.75rem;
	transform: translateY(-50%);
	color: var(--zs-muted);
}

.zs-field__more {
	margin: 0.4rem 0 0;
	font-size: 0.95rem;
}

.zs-total {
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: var(--zs-radius);
	background: var(--zs-accent-soft);
	font-size: 1.05rem;
}

.zs-total[hidden] {
	display: none;
}

.zs-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 1rem;
}

@media (min-width: 36em) {
	.zs-row {
		grid-template-columns: 1fr 1fr;
	}
}

.zs-field--consent {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 0.6rem;
	align-items: start;
}

.zs-field--consent input {
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.2rem;
}

.zs-field--consent label {
	font-weight: 400;
}

.zs-field--consent .zs-field__error {
	grid-column: 1 / -1;
}

.zs-required {
	color: var(--zs-error);
}

.zs-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.zs-turnstile {
	margin-bottom: 1rem;
}

.zs-button {
	display: inline-block;
	min-height: 2.75rem;
	padding: 0.6rem 1.25rem;
	border: 2px solid var(--zs-accent);
	border-radius: var(--zs-radius);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

.zs-button--primary {
	background: var(--zs-accent);
	color: #fff;
	/* Texte « grand et gras » (≥ 18,66 px) : le blanc sur #0092b0 (3,66:1) respecte alors le seuil WCAG AA de 3:1. */
	font-size: 19px;
	font-size: max(1.2rem, 19px);
	font-weight: 700;
}

.zs-button--primary:hover {
	background: var(--zs-accent-dark);
	border-color: var(--zs-accent-dark);
}

.zs-button--secondary {
	background: #fff;
	color: var(--zs-accent-dark);
}

.zs-submit .zs-button {
	width: 100%;
}

.zs-privacy,
.zs-legal-required {
	color: var(--zs-muted);
	font-size: 0.85rem;
}

.zs-notice {
	margin-bottom: 1.25rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--zs-muted);
	border-radius: var(--zs-radius);
	background: #f4f5f7;
}

.zs-notice p,
.zs-notice ul {
	margin: 0;
}

.zs-notice ul {
	margin-top: 0.4rem;
	padding-left: 1.2rem;
}

.zs-notice--success {
	border-color: var(--zs-accent);
	background: var(--zs-accent-light);
}

.zs-notice--error {
	border-color: var(--zs-error);
	background: #fef3f2;
}

.zs-notice--error a {
	color: var(--zs-error);
}

.zs-notice--admin {
	border-color: #b54708;
	background: #fffaeb;
}

/* Textes affichés sous le formulaire quand la fenêtre modale n'est pas disponible. */
.zs-info {
	margin-top: 2rem;
	padding: 1rem;
	border: 1px solid var(--zs-border);
	border-radius: var(--zs-radius);
}

.zs-has-dialog .zs-info {
	display: none;
}

.zs-info__title,
.zs-dialog__title {
	margin-top: 0;
	font-size: 1.2rem;
}

.zs-info blockquote,
.zs-dialog blockquote {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--zs-accent);
	background: var(--zs-accent-soft);
	font-style: italic;
}

.zs-info blockquote p,
.zs-dialog blockquote p {
	margin: 0;
}

/* Visible uniquement par les lecteurs d'écran. */
.zs-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.zs-dialog {
	width: min(36rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 0;
	border: 0;
	border-radius: var(--zs-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.zs-dialog::backdrop {
	background: rgba(17, 24, 39, 0.55);
}

.zs-dialog__inner {
	padding: 1.5rem;
}

.zs-dialog__title:focus {
	outline: none;
}

.zs-dialog__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-end;
	margin-top: 1.25rem;
}

.zs-dialog-open {
	overflow: hidden;
}

@media (max-width: 30em) {
	.zs-dialog__actions .zs-button {
		width: 100%;
	}
}
