/* ---------- Fenêtre modale ---------- */

.sac-adhesion-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sac-adhesion-modal[hidden] {
	display: none;
}

.sac-adhesion-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 20, 45, 0.55);
	backdrop-filter: blur(2px);
}

.sac-adhesion-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
	background: #ffffff;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 20px 60px rgba(10, 20, 45, 0.35);
}

.sac-adhesion-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: #f1f3f6;
	color: #0e2555;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.sac-adhesion-modal-close:hover {
	background: #e2e6ea;
}

.sac-adhesion-modal-title {
	margin: 0 32px 8px 0;
	color: #0e2555;
	font-size: 1.5rem;
}

.sac-adhesion-modal-intro {
	margin: 0 0 22px 0;
	color: #4b5568;
	font-size: 0.96rem;
	line-height: 1.5;
}

body.sac-modal-open {
	overflow: hidden;
}

/* ---------- Formulaire (à l'intérieur de la modale) ---------- */

.sac-adhesion-form {
	max-width: 100%;
}

.sac-af-row {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.sac-af-row:last-of-type {
	margin-bottom: 0;
}

.sac-af-field {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sac-af-field label {
	font-weight: 600;
	font-size: 0.92rem;
	color: #0e2555;
}

.sac-af-optional {
	font-weight: 400;
	color: #7a8698;
	font-size: 0.82em;
}

.sac-af-field input,
.sac-af-field select {
	padding: 11px 14px;
	border: 1px solid #d7dce3;
	border-radius: 8px;
	font-size: 1rem;
	color: #16223e;
	background: #fbfcfe;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sac-af-field select {
	appearance: auto;
	cursor: pointer;
}

.sac-af-field input:focus,
.sac-af-field select:focus {
	outline: none;
	border-color: #6db53a;
	box-shadow: 0 0 0 3px rgba(109, 181, 58, 0.18);
	background: #ffffff;
}

.sac-af-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sac-af-submit {
	margin-top: 22px;
	width: 100%;
	border: none;
	cursor: pointer;
	font-size: 1.05rem;
	padding: 14px 20px;
}

.sac-af-submit[disabled] {
	opacity: 0.65;
	cursor: not-allowed;
}

.sac-af-message {
	margin-top: 16px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.sac-af-message.is-error {
	color: #c02626;
}

.sac-af-message.is-success {
	color: #1c6b2c;
}

.sac-af-preview {
	margin-top: 14px;
	text-align: center;
}

.sac-af-preview img {
	max-width: 100%;
	width: 340px;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 6px 18px rgba(14, 37, 85, 0.25);
	border: 1px solid rgba(14, 37, 85, 0.15);
}

.sac-af-message a.sac-af-download {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 10px 18px;
	background: #0e2555;
	color: #ffffff !important;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
}

.sac-af-message a.sac-af-download:hover {
	background: #163a80;
}

.sac-af-download-warning {
	margin-top: 8px;
	font-size: 0.85rem;
	color: #8a5a00;
}

.sac-af-noscript {
	margin-top: 14px;
	color: #c02626;
}

@media (max-width: 560px) {
	.sac-af-row {
		flex-direction: column;
		gap: 16px;
	}
	.sac-adhesion-form {
		padding: 20px;
	}
}
