/* NWH Budget Simulator — styles widget front-end (3 écrans)
 * DA NWH : moderne, épuré, beaucoup d'espace blanc, glassmorphism léger.
 *
 * Toutes les règles sont préfixées par #nwh-simulator (sélecteur ID) afin de
 * battre Elementor / Hello theme en spécificité sans recourir à !important.
 */

:root {
	--nwh-primary: #66B09D;          /* vert teal */
	--nwh-light: #E6F2F1;            /* blanc menthe */
	--nwh-gradient: linear-gradient(to bottom, #E6F2F1 0%, #66B09D 100%);
	--nwh-text: #2d2d2d;
	--nwh-white: #ffffff;
	--nwh-font: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--nwh-font-title: 'Satoshi', 'DM Sans', system-ui, sans-serif; /* titres */
	--nwh-radius: 16px;
	--nwh-radius-sm: 8px;
	--nwh-shadow: 0 4px 24px rgba(102, 176, 157, 0.15);
	--nwh-shadow-hover: 0 8px 40px rgba(102, 176, 157, 0.25);
	--nwh-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset scopé au widget (évite les conflits avec le thème / Elementor) --- */
#nwh-simulator,
#nwh-simulator * {
	box-sizing: border-box;
}

#nwh-simulator button {
	font-family: inherit;
	margin: 0;
}

/* --- Conteneur plein écran --- */
#nwh-simulator {
	font-family: var(--nwh-font);
	background: var(--nwh-gradient);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	color: var(--nwh-text);
	line-height: 1.5;
}

/* --- Carte centrale (glassmorphism) --- */
#nwh-simulator .nwh-widget-inner {
	background: rgba(255, 255, 255, 0.62) !important;
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border-radius: 24px;
	padding: 48px 40px;
	max-width: 680px;
	width: 100%;
	box-shadow: var(--nwh-shadow);
}

/* --- Gestion des écrans + transitions fade --- */
#nwh-simulator .nwh-screen {
	display: none;
	opacity: 1;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

#nwh-simulator .nwh-screen.active {
	display: block;
}

#nwh-simulator .nwh-screen.nwh-leaving,
#nwh-simulator .nwh-screen.nwh-entering {
	opacity: 0;
	transform: translateY(8px);
}

/* --- En-tête --- */
#nwh-simulator .nwh-header {
	text-align: center;
	margin-bottom: 32px;
}

#nwh-simulator .nwh-logo {
	height: 32px;
	width: auto;
	margin-bottom: 20px;
}

#nwh-simulator .nwh-h2 {
	font-family: var(--nwh-font-title);
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--nwh-text);
}

#nwh-simulator .nwh-section {
	margin-bottom: 28px;
}

#nwh-simulator .nwh-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
	color: var(--nwh-text);
}

/* --- Cartes services --- */
#nwh-simulator .nwh-services-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

#nwh-simulator .nwh-service-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	min-width: 0;
	overflow-wrap: break-word;
	background: rgba(255, 255, 255, 0.40);
	border: 1.5px solid rgba(102, 176, 157, 0.20);
	border-radius: 16px;
	padding: 20px;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	text-align: left;
	width: 100%;
	box-shadow: none;
}

#nwh-simulator .nwh-service-card:hover {
	background: rgba(102, 176, 157, 0.10);
	border-color: rgba(102, 176, 157, 0.50);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(102, 176, 157, 0.15);
}

#nwh-simulator .nwh-service-card.selected {
	background: rgba(102, 176, 157, 0.18);
	border-color: #66B09D;
	box-shadow: 0 0 0 3px rgba(102, 176, 157, 0.20);
}

#nwh-simulator .nwh-card-icon {
	font-size: 24px;
	line-height: 1;
}

#nwh-simulator .nwh-card-title,
#nwh-simulator .nwh-card-desc {
	display: block;
	width: 100%;
	overflow-wrap: break-word;
	word-break: break-word;
}

#nwh-simulator .nwh-card-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--nwh-text);
}

#nwh-simulator .nwh-card-desc {
	font-size: 12.5px;
	color: #666;
	line-height: 1.35;
}

#nwh-simulator .nwh-card-check {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--nwh-primary);
	color: var(--nwh-white);
	font-size: 13px;
	line-height: 22px;
	text-align: center;
	opacity: 0;
	transform: scale(0.6);
	transition: var(--nwh-transition);
}

#nwh-simulator .nwh-service-card.selected .nwh-card-check {
	opacity: 1;
	transform: scale(1);
}

/* --- Boutons budget (pills) --- */
#nwh-simulator .nwh-budget-options {
	display: flex;
	flex-direction: row;
	gap: 8px;
	flex-wrap: wrap;
}

#nwh-simulator .nwh-budget-btn {
	background: var(--nwh-white);
	border: 1.5px solid #e0e0e0;
	border-radius: 50px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	color: var(--nwh-text);
	cursor: pointer;
	transition: var(--nwh-transition);
}

#nwh-simulator .nwh-budget-btn:hover {
	border-color: var(--nwh-primary);
}

#nwh-simulator .nwh-budget-btn.selected {
	background: var(--nwh-primary);
	border-color: var(--nwh-primary);
	color: var(--nwh-white);
}

/* --- Champs de formulaire --- */
#nwh-simulator .nwh-textarea,
#nwh-simulator .nwh-input {
	width: 100%;
	border: 1.5px solid #e0e0e0;
	border-radius: var(--nwh-radius-sm);
	padding: 14px 16px;
	font-size: 15px;
	font-family: inherit;
	color: var(--nwh-text);
	background: var(--nwh-white);
	transition: var(--nwh-transition);
}

#nwh-simulator .nwh-textarea {
	resize: vertical;
	min-height: 110px;
}

#nwh-simulator .nwh-input {
	margin-bottom: 14px;
}

#nwh-simulator .nwh-textarea:focus,
#nwh-simulator .nwh-input:focus {
	border-color: var(--nwh-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(102, 176, 157, 0.15);
}

#nwh-simulator .nwh-input.nwh-input-error {
	border-color: #e05858;
}

#nwh-simulator .nwh-input::placeholder,
#nwh-simulator .nwh-textarea::placeholder {
	color: #aaa;
}

/* --- Boutons d'action --- */
#nwh-simulator .nwh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50px;
	padding: 16px 32px;
	font-weight: 600;
	font-size: 16px;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: var(--nwh-transition);
}

#nwh-simulator .nwh-btn-full {
	width: 100%;
}

#nwh-simulator .nwh-btn-primary {
	background: var(--nwh-text);
	color: var(--nwh-white);
}

#nwh-simulator .nwh-btn-primary:hover {
	background: var(--nwh-primary);
	transform: translateY(-1px);
}

#nwh-simulator .nwh-btn-primary:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
	background: var(--nwh-text);
}

#nwh-simulator .nwh-btn-secondary {
	background: transparent;
	color: var(--nwh-text);
	border: 1.5px solid #d5d5d5;
}

#nwh-simulator .nwh-btn-secondary:hover {
	border-color: var(--nwh-primary);
	color: var(--nwh-primary);
}

#nwh-simulator .nwh-btn-back {
	background: none;
	border: none;
	color: #888;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	padding: 8px 4px;
	transition: var(--nwh-transition);
}

#nwh-simulator .nwh-btn-back:hover {
	color: var(--nwh-primary);
}

#nwh-simulator .nwh-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 8px;
}

#nwh-simulator .nwh-actions-stack {
	flex-direction: column;
	margin-top: 24px;
}

#nwh-simulator .nwh-actions-stack .nwh-btn {
	width: 100%;
}

/* --- Barre de progression --- */
#nwh-simulator .nwh-progress {
	width: 100%;
	height: 3px;
	background: rgba(102, 176, 157, 0.2);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 16px;
}

#nwh-simulator .nwh-progress-fill {
	height: 100%;
	background: var(--nwh-primary);
	border-radius: 3px;
	transition: width 0.4s ease;
}

#nwh-simulator .nwh-step-label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: var(--nwh-primary);
	margin-bottom: 16px;
}

/* --- Mention RGPD --- */
#nwh-simulator .nwh-rgpd {
	font-size: 12.5px;
	color: #888;
	margin: 4px 0 18px;
	text-align: center;
}

/* Honeypot anti-spam : retiré du flux visuel et de la tabulation. */
#nwh-simulator .nwh-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- État de chargement / spinner --- */
#nwh-simulator .nwh-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 32px 0;
	text-align: center;
	color: #555;
}

#nwh-simulator .nwh-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid rgba(102, 176, 157, 0.25);
	border-top-color: var(--nwh-primary);
	border-radius: 50%;
	animation: nwh-spin 0.8s linear infinite;
}

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

/* --- Écran 3 : badge + prix --- */
#nwh-simulator .nwh-badge {
	display: inline-block;
	font-family: var(--nwh-font-title);
	background: rgba(102, 176, 157, 0.12);
	color: var(--nwh-primary);
	font-size: 13px;
	font-weight: 700;
	padding: 6px 16px;
	border-radius: 50px;
	margin-bottom: 16px;
}

#nwh-simulator .nwh-prix {
	font-family: var(--nwh-font-title);
	font-size: 52px;
	font-weight: 900;
	color: var(--nwh-primary);
	letter-spacing: -1px;
	margin-top: 8px;
}

#nwh-simulator .nwh-prix-display {
	text-align: center !important;
	display: block !important;
	width: 100% !important;
	margin: 0 auto 8px !important;
}

#nwh-simulator .nwh-prix-comparatif {
	font-size: 14px !important;
	color: #66B09D !important;
	font-weight: 500 !important;
	text-align: center !important;
	margin: -8px 0 24px !important;
	font-style: italic !important;
}

/* --- Encart IA --- */
#nwh-simulator .nwh-encart {
	background: rgba(102, 176, 157, 0.08);
	border-left: 3px solid var(--nwh-primary);
	border-radius: 0 12px 12px 0;
	padding: 20px 24px;
	font-style: italic;
	color: #444;
	margin-bottom: 24px;
}

/* --- Liste des prestations --- */
#nwh-simulator .nwh-prestations-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

#nwh-simulator .nwh-prestations-list li {
	position: relative;
	padding-left: 28px;
	font-size: 15px;
	color: var(--nwh-text);
}

#nwh-simulator .nwh-prestations-list li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--nwh-primary);
	color: var(--nwh-white);
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

/* --- Réassurance --- */
#nwh-simulator .nwh-reassurance {
	text-align: center;
	color: #555;
	font-size: 14px;
	margin-bottom: 8px;
}

#nwh-simulator .nwh-reassurance-quote {
	font-weight: 700;
	color: var(--nwh-text);
	font-size: 16px;
	margin: 0 0 8px;
}

/* --- Message d'erreur inline --- */
#nwh-simulator .nwh-error {
	background: rgba(224, 88, 88, 0.08);
	border: 1px solid rgba(224, 88, 88, 0.3);
	border-radius: var(--nwh-radius-sm);
	padding: 14px 16px;
	color: #c0392b;
	font-size: 14px;
	margin-bottom: 16px;
}

#nwh-simulator .nwh-error .nwh-retry {
	display: inline-block;
	margin-top: 8px;
	background: none;
	border: none;
	color: var(--nwh-primary);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
}

/* --- Responsive mobile --- */
@media (max-width: 600px) {
	#nwh-simulator .nwh-widget-inner {
		padding: 28px 20px;
	}

	#nwh-simulator .nwh-services-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	#nwh-simulator .nwh-prix {
		font-size: 36px;
	}

	#nwh-simulator .nwh-h2 {
		font-size: 22px;
	}
}

@media (max-width: 380px) {
	#nwh-simulator .nwh-services-grid {
		grid-template-columns: 1fr;
	}
}
