/**
 * Onboarding Styles - Cohérent avec SureDash
 * 
 * @package AfreeMember
 */

/* Container */
.afreemember-onboarding-container {
	max-width: 800px;
	margin: 0 auto;
}

/* Loader Animation */
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Pulse Animation for Play Button */
@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	}
	50% {
		transform: scale(1.05);
		box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
	}
}

/* Video Fade Gradient */
.video-fade-gradient {
	background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.5) 40%, var(--portal-global-color-5, #ffffff) 100%);
}

/* Onboarding Title Responsive */
@media (max-width: 768px) {
	.onboarding-main-title {
		font-size: 32px !important;
	}
	
	.step-subtitle {
		font-size: 16px !important;
	}
}

/* Benefits Cards */
.benefit-item {
	transition: all 0.3s ease;
}

.benefit-item:hover {
	transform: translateY(-4px);
	border-color: var(--e-global-color-primary, #2563eb) !important;
}

/* Video Thumbnail */
.video-thumbnail-wrapper {
	box-shadow: none !important;
}

/* Video Thumbnail Hover */
.video-thumbnail-wrapper:hover .play-button-wrapper {
	transform: scale(1.1);
	transition: transform 0.3s ease;
}

/* CTA Button Onboarding - Centré et sans effets */
.onboarding-cta-btn {
	margin: 0 auto !important;
	display: inline-flex !important;
}

.onboarding-cta-btn:hover {
	background: var(--e-global-color-primary) !important;
	transform: none !important;
	box-shadow: none !important;
	filter: none !important;
	outline: none !important;
}

/* Legal Links */
.onboarding-legal-text .legal-link {
	color: var(--portal-text-color) !important;
	text-decoration: underline;
	transition: color 0.3s ease;
}

.onboarding-legal-text .legal-link:hover {
	color: var(--e-global-color-primary) !important;
}

.btn-next:hover {
	transform: translateY(-2px);
}

/* Video Lightbox */
.video-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.95);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: fadeIn 0.3s;
}

.video-lightbox-content {
	position: relative;
	width: 100%;
	max-width: 1200px;
	aspect-ratio: 16 / 9;
}

.video-lightbox-close {
	position: absolute;
	top: -50px;
	right: 0;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s;
}

.video-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

.video-lightbox iframe {
	width: 100%;
	height: 100%;
	border: 4px solid var(--e-global-color-primary, #2563eb);
	border-radius: 12px;
}

/* Progress Bar */
.onboarding-progress {
	margin-bottom: 30px;
}

.progress-steps {
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
	gap: 10px;
}

.progress-steps .step {
	flex: 1;
	text-align: center;
	opacity: 0.5;
	transition: opacity 0.3s;
}

.progress-steps .step.active,
.progress-steps .step.completed {
	opacity: 1;
}

.progress-steps .step-number {
	width: 40px;
	height: 40px;
	margin: 0 auto 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #e5e7eb;
	color: #6b7280;
	font-weight: 600;
	transition: all 0.3s;
}

.progress-steps .step.active .step-number {
	background: #2563eb;
	color: white;
}

.progress-steps .step.completed .step-number {
	background: #10b981;
	color: white;
}

.progress-steps .step-label {
	font-size: 12px;
	color: #6b7280;
}

.progress-bar {
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #2563eb, #10b981);
	transition: width 0.3s ease;
}

/* Steps */
.onboarding-steps {
	position: relative;
}

.onboarding-step {
	display: none;
}

.onboarding-step.active {
	display: block;
	animation: fadeIn 0.3s;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.step-title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 8px;
	color: #111827;
	text-align: center;
}

.step-description {
	color: #6b7280;
	margin-bottom: 48px;
	text-align: center;
}

/* Benefits List */
.benefits-list {
	list-style: none;
	padding: 0;
	margin: 24px 0;
}

.benefits-list li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	color: #374151;
}

.benefits-list li svg {
	color: #10b981;
	flex-shrink: 0;
}

/* Form Fields */
.onboarding-form {
	margin-bottom: 24px;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.form-field {
	margin-bottom: 20px;
}

.form-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #374151;
}

.form-field input,
.form-field select,
.form-field textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 15px;
	transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	border: 1px solid #0f0f0f !important;
	outline: 3px solid #e3e3e3 !important;
}

.password-field-wrapper {
	position: relative;
}

.password-field-wrapper input {
	padding-right: 45px;
}

.toggle-password {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toggle-password:hover {
	color: #111827;
}

/* Checkbox Cards */
.checkbox-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.checkbox-card {
	cursor: pointer;
}

.checkbox-card input[type="checkbox"] {
	display: none;
}

.checkbox-card .card-content {
	padding: 16px;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	text-align: center;
	transition: all 0.2s;
}

.checkbox-card input:checked + .card-content {
	border-color: #2563eb;
	background: #eff6ff;
}

.checkbox-card .card-icon {
	font-size: 32px;
	display: block;
	margin-bottom: 8px;
}

.checkbox-card .card-label {
	font-size: 14px;
	color: #374151;
	font-weight: 500;
}

/* Subscription Plans */
.subscription-plans {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 32px;
	margin-bottom: 24px;
}

.subscription-card {
	cursor: pointer;
	position: relative;
}

.subscription-card input[type="radio"] {
	display: none;
}

.subscription-card .card-content {
	padding: 24px;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	transition: all 0.3s;
	height: 100%;
}

.subscription-card input:checked + .card-content {
	border-color: var(--e-global-color-primary, #2563eb);
}

.subscription-card.recommended .card-content {
	border: 2px solid #e5e7eb;
	background: transparent;
}

.subscription-card.recommended input:checked + .card-content {
	border-color: var(--e-global-color-primary, #2563eb);
	background: transparent;
}

.subscription-card .card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.subscription-card .card-header h3 {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	margin: 0;
}

.subscription-card .badge {
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}

.badge-popular {
	background: var(--e-global-color-primary, #2563eb);
	color: white;
}

.badge-best {
	background: var(--e-global-color-primary, #2563eb);
	color: white;
}

.subscription-card .card-price {
	margin-bottom: 12px;
}

.subscription-card .price {
	font-size: 32px;
	font-weight: 700;
	color: #111827;
}

.subscription-card .period {
	font-size: 14px;
	color: #6b7280;
	margin-left: 4px;
}

.subscription-card .card-savings {
	background: #fef3c7;
	color: #92400e;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	display: inline-block;
	margin-bottom: 16px;
}

.subscription-card .card-features {
	list-style: none;
	padding: 0;
	margin: 0;
}

.subscription-card .card-features li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	color: #374151;
	font-size: 14px;
}

.subscription-card .card-features li svg {
	color: #10b981;
	flex-shrink: 0;
}

/* Button Fixes */
.btn-prev.sd-button-secondary:hover {
	background-color: #f3f4f6 !important;
	color: #111827 !important;
}

.btn-prev:disabled {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

/* Payment */
.payment-summary {
	background: white;
	padding: 28px;
	border-radius: 12px;
	margin-top: 32px;
	margin-bottom: 32px;
	border: 1px solid #e5e7eb;
}

.payment-summary h3 {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 20px;
	color: #111827;
	padding-bottom: 16px;
	border-bottom: 2px solid #f3f4f6;
}

.payment-summary p {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 12px 0;
	padding: 12px 0;
	color: #6b7280;
	line-height: 1.6;
	font-size: 15px;
}

.payment-summary p:not(:last-child) {
	border-bottom: 1px solid #f3f4f6;
}

.payment-summary strong {
	color: #111827;
	font-weight: 600;
	font-size: 16px;
}

.payment-summary p:last-child {
	margin-top: 16px;
	padding-top: 16px;
	font-size: 18px;
	font-weight: 600;
	color: #111827;
}

.payment-summary p:last-child strong {
	font-size: 20px;
	color: var(--e-global-color-primary, #2563eb);
}

.payment-container {
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.loading-spinner {
	text-align: center;
}

.spinner {
	width: 40px;
	height: 40px;
	margin: 0 auto 16px;
	border: 4px solid #e5e7eb;
	border-top-color: var(--e-global-color-primary, #2563eb);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

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

/* Step Actions */
.step-actions {
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-top: 24px;
}

.step-actions button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.sd-button-primary {
	background: #111827;
	color: white;
}

.sd-button-primary:hover {
	background: #1f2937;
}

.sd-button-primary:focus {
	background: #111827 !important;
	color: white !important;
	outline: none;
}

.sd-button-secondary {
	background: white;
	color: #374151;
	border: 1px solid #d1d5db;
}

.sd-button-secondary:hover {
	background: #f9fafb;
}

.btn-next {
	margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
	.form-row,
	.checkbox-group,
	.subscription-plans {
		grid-template-columns: 1fr;
	}

	.progress-steps .step-label {
		display: none;
	}

	.step-title {
		font-size: 20px;
	}

	.subscription-card .price {
		font-size: 24px;
	}
}

/* Error States */
.form-field.error input,
.form-field.error select {
	border-color: #ef4444;
}

.form-field .error-message {
	color: #ef4444;
	font-size: 13px;
	margin-top: 4px;
}

/* Success States */
.form-field.success input,
.form-field.success select {
	border-color: #10b981;
}
