/* ==========================================================================
   EDW Inscription & Paiement — styles frontend
   Toutes les classes sont préfixées "edw-payment-" pour éviter tout conflit
   avec Elementor / le thème. Aucun sélecteur générique (button, input, p...).
   ========================================================================== */

.edw-payment-wrapper {
	--edw-blue: #2952d3;
	--edw-blue-dark: #1f3fa8;
	--edw-blue-bg: #eef2ff;
	--edw-green: #2fa84f;
	--edw-red: #d9483f;
	--edw-gray-900: #1c2333;
	--edw-gray-600: #5b6472;
	--edw-gray-300: #d9dee6;
	--edw-gray-100: #f5f7fa;
	--edw-radius: 14px;
	--edw-shadow: 0 4px 20px rgba(16, 24, 40, 0.06);

	box-sizing: border-box;
	max-width: 80%;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--edw-gray-900);
}

.edw-payment-wrapper *,
.edw-payment-wrapper *::before,
.edw-payment-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Barre de progression ---------- */

.edw-payment-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.edw-payment-button-label {
	color: #fff !important;
}

.edw-payment-button.edw-payment-button-secondary {
	color: #fff !important;
}

.edw-payment-progress-step {
	display: flex;
	align-items: center;
	gap: 8px;
	opacity: 0.5;
	transition: opacity 0.25s ease;
}

.edw-payment-progress-step.is-active,
.edw-payment-progress-step.is-done {
	opacity: 1;
}

.edw-payment-progress-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--edw-gray-300);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	flex-shrink: 0;
	transition: background 0.25s ease, transform 0.2s ease;
}

.edw-payment-progress-step.is-active .edw-payment-progress-dot {
	background: var(--edw-blue);
	transform: scale(1.08);
}

.edw-payment-progress-step.is-done .edw-payment-progress-dot {
	background: var(--edw-green);
}

.edw-payment-progress-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--edw-gray-600);
	white-space: nowrap;
}

.edw-payment-progress-line {
	width: 48px;
	height: 2px;
	background: var(--edw-gray-300);
}

/* ---------- Alerte globale ---------- */

.edw-payment-alert {
	padding: 12px 16px;
	border-radius: 10px;
	background: #fdeceb;
	border: 1px solid #f3b9b4;
	color: var(--edw-red);
	font-size: 14px;
	margin-bottom: 16px;
}

.edw-payment-alert.is-success {
	background: #eaf7ed;
	border-color: #b7e4c1;
	color: var(--edw-green);
}

/* ---------- Carte / conteneur d'étape ---------- */

.edw-payment-card {
	background: #fff;
	border: 1px solid var(--edw-gray-300);
	border-radius: var(--edw-radius);
	box-shadow: var(--edw-shadow);
	padding: 28px;
	animation: edw-fade-in 0.25s ease;
}

@keyframes edw-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.edw-payment-card-header {
	margin-bottom: 20px;
}

.edw-payment-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 6px;
}

.edw-payment-subtitle {
	font-size: 14px;
	color: var(--edw-gray-600);
	margin: 0;
}

.edw-payment-amount-badge {
	display: inline-block;
	margin-top: 12px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--edw-blue-bg);
	color: var(--edw-blue-dark);
	font-size: 13px;
	font-weight: 700;
}

/* ---------- Formulaire ---------- */

.edw-payment-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
}

.edw-payment-field-full {
	grid-column: 1 / -1;
}

.edw-payment-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--edw-gray-900);
}

.edw-payment-field input,
.edw-payment-field select,
.edw-payment-field textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--edw-gray-300);
	border-radius: 10px;
	font-size: 14px;
	background: #fff;
	color: var(--edw-gray-900);
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.edw-payment-field input:focus,
.edw-payment-field select:focus,
.edw-payment-field textarea:focus {
	outline: none;
	border-color: var(--edw-blue);
	box-shadow: 0 0 0 3px rgba(41, 82, 211, 0.15);
}

.edw-payment-field.has-error input,
.edw-payment-field.has-error select,
.edw-payment-field.has-error textarea {
	border-color: var(--edw-red);
}

.edw-payment-field-error {
	font-size: 12px;
	color: var(--edw-red);
	margin-top: 4px;
}

.edw-payment-phone {
	display: flex;
	align-items: center;
	gap: 8px;
}

.edw-payment-phone-flag {
	padding: 11px 10px;
	border: 1px solid var(--edw-gray-300);
	border-radius: 10px;
	font-size: 13px;
	background: var(--edw-gray-100);
	flex-shrink: 0;
}

.edw-payment-phone input {
	flex: 1;
}

/* ---------- Boutons ---------- */

.edw-payment-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
	font-family: inherit;
}

.edw-payment-button:active {
	transform: translateY(1px);
}

.edw-payment-button[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.edw-payment-button-primary {
	background: var(--edw-blue);
	color: #fff;
}

.edw-payment-button-primary:hover {
	background: var(--edw-blue-dark);
}

.edw-payment-button-secondary {
	background: #fff;
	color: var(--edw-gray-900);
	border-color: var(--edw-gray-300);
}

.edw-payment-button-secondary:hover {
	background: var(--edw-gray-100);
}

.edw-payment-button-block {
	width: 100%;
	margin-top: 24px;
}

.edw-payment-spinner {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	animation: edw-spin 0.7s linear infinite;
}

@keyframes edw-spin {
	to {
		transform: rotate(360deg);
	}
}

.edw-payment-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
}

/* ---------- Récapitulatif (étape 2) ---------- */

.edw-payment-summary {
	background: var(--edw-gray-100);
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 24px;
}

.edw-payment-summary-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 12px;
}

.edw-payment-summary-list {
	margin: 0;
}

.edw-payment-summary-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--edw-gray-300);
	font-size: 14px;
}

.edw-payment-summary-row:last-child {
	border-bottom: none;
}

.edw-payment-summary-row dt {
	color: var(--edw-gray-600);
}

.edw-payment-summary-row dd {
	margin: 0;
	font-weight: 600;
}

.edw-payment-summary-row-highlight dd {
	color: var(--edw-blue);
	font-size: 16px;
}

/* ---------- Modes de paiement ---------- */

.edw-payment-methods {
	border: none;
	padding: 0;
	margin: 0 0 20px;
}

.edw-payment-methods legend {
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 12px;
	padding: 0;
}

.edw-payment-method {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	border: 1.5px solid var(--edw-gray-300);
	border-radius: 12px;
	margin-bottom: 12px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.edw-payment-method:hover {
	border-color: var(--edw-blue);
}

.edw-payment-method:has(input:checked) {
	border-color: var(--edw-blue);
	background: var(--edw-blue-bg);
}

.edw-payment-method input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--edw-blue);
	flex-shrink: 0;
}

.edw-payment-method-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.edw-payment-method-title {
	font-size: 14px;
	font-weight: 700;
}

.edw-payment-method-desc {
	font-size: 12px;
	color: var(--edw-gray-600);
}

.edw-payment-method-icons {
	font-size: 12px;
	color: var(--edw-gray-600);
	flex-shrink: 0;
}

/* ---------- Bloc sécurité ---------- */

.edw-payment-security {
	background: var(--edw-blue-bg);
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 13px;
	color: var(--edw-blue-dark);
	line-height: 1.5;
}

/* ---------- Étape 3 : prestataire ---------- */

.edw-payment-card-provider {
	text-align: center;
}

#PAYMENT_PROVIDER_CONTAINER {
	min-height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed var(--edw-gray-300);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 16px;
}

.edw-payment-provider-loading {
	color: var(--edw-gray-600);
	font-size: 14px;
	margin: 0;
}

.edw-payment-provider-return a {
	color: var(--edw-gray-600);
	font-size: 13px;
	text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE
   Desktop ≥1200px (styles par défaut ci-dessus)
   ========================================================================== */

/* Laptop */
@media (max-width: 1199px) {
	.edw-payment-wrapper {
		max-width: 680px;
	}
}

/* Tablet */
@media (max-width: 991px) {
	.edw-payment-card {
		padding: 22px;
	}

	.edw-payment-progress-line {
		width: 32px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.edw-payment-wrapper {
		max-width: 100%;
		padding: 0 4px;
	}

	.edw-payment-grid {
		grid-template-columns: 1fr;
	}

	.edw-payment-card {
		padding: 18px;
		border-radius: 12px;
	}

	.edw-payment-title {
		font-size: 18px;
	}

	.edw-payment-progress-label {
		display: none;
	}

	.edw-payment-progress-line {
		width: 20px;
	}

	.edw-payment-actions {
		flex-direction: column-reverse;
	}

	.edw-payment-button-block,
	.edw-payment-actions .edw-payment-button {
		width: 100%;
	}
}

/* Petit mobile */
@media (max-width: 480px) {
	.edw-payment-card {
		padding: 14px;
	}

	.edw-payment-summary-row {
		font-size: 13px;
	}

	.edw-payment-method {
		padding: 12px;
		gap: 10px;
	}

	.edw-payment-phone-flag {
		font-size: 12px;
		padding: 11px 8px;
	}
}

/* Focus visible clavier (accessibilité) */
.edw-payment-wrapper a:focus-visible,
.edw-payment-wrapper button:focus-visible,
.edw-payment-wrapper input:focus-visible,
.edw-payment-wrapper select:focus-visible,
.edw-payment-wrapper textarea:focus-visible {
	outline: 2px solid var(--edw-blue);
	outline-offset: 2px;
}