/**
 * Widget 3 — Formulaire multi-étapes (style Typeform).
 * Une étape visible à la fois ; transition glissée horizontale via translateX
 * sur la piste interne.
 */

.ccw-ms {
	background: #fff;
	color: #111827;
	border-radius: 18px;
	padding: 40px clamp( 24px, 5vw, 56px );
	max-width: 680px;
	margin: 0 auto;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.10 );
}

/* Barre de progression. */
.ccw-ms__progress {
	height: 6px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 8px;
}
.ccw-ms__progress-bar {
	height: 100%;
	width: 0;
	background: #2563eb;
	border-radius: 999px;
	transition: width 0.35s ease;
}
.ccw-ms__counter {
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 20px;
	text-align: right;
}

/* Viewport masque le débordement ; la piste glisse. */
.ccw-ms__viewport {
	overflow: hidden;
}
.ccw-ms__track {
	display: flex;
	align-items: flex-start;
	transition: transform 0.4s ease;
	will-change: transform;
}

/* Chaque étape occupe 100 % de la largeur du viewport. */
.ccw-ms__step {
	flex: 0 0 100%;
	min-width: 100%;
	box-sizing: border-box;
	padding: 4px;
	/* Les étapes inactives restent dans le DOM mais sont masquées aux lecteurs d'écran via aria-hidden. */
}

.ccw-ms__step-title {
	margin: 0 0 28px;
	font-size: clamp( 22px, 3vw, 30px );
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* Champs (réutilise les mêmes classes que la pop-up). */
.ccw-field {
	margin-bottom: 18px;
}
.ccw-field__label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}
.ccw-req {
	color: #dc2626;
}
/* ----- Champ de saisie libre (texte, email, tél, zone de texte, liste) ----- */
.ccw-input {
	width: 100%;
	padding: 15px 18px;
	border: 1.5px solid #e5e7eb;
	border-radius: 12px;
	font-size: 16px;
	line-height: 1.4;
	box-sizing: border-box;
	font-family: inherit;
	background: #fafafa;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.ccw-input::placeholder {
	color: #9ca3af;
}
.ccw-input:focus {
	background: #fff;
	border-color: #2563eb; /* surchargé par l'accent Elementor */
	outline: none;
	box-shadow: 0 0 0 3px rgba( 37, 99, 235, 0.12 );
}
textarea.ccw-input {
	resize: vertical;
	min-height: 110px;
}
select.ccw-input {
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8 0 0h12z'/%3E%3C/svg%3E" );
	background-repeat: no-repeat;
	background-position: right 18px center;
	padding-right: 44px;
}

/* ----- Options : cases à cocher / boutons radio, présentés en cartes ----- */
.ccw-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.ccw-option {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	padding: 14px 18px;
	border: 1.5px solid #e5e7eb;
	border-radius: 12px;
	background: #fafafa;
	font-size: 16px;
	transition: border-color 0.18s ease, background 0.18s ease, transform 0.05s ease;
}
.ccw-option:hover {
	border-color: #c7d2fe;
	background: #fff;
}
.ccw-option:active {
	transform: scale( 0.995 );
}
.ccw-option input {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	accent-color: #2563eb; /* surchargé par l'accent Elementor */
	cursor: pointer;
}
/* Carte mise en avant quand son option est cochée (border-color piloté par l'accent). */
.ccw-option:has( input:checked ) {
	background: #fff;
	border-color: #2563eb;
	font-weight: 600;
}

/* Note en étoiles. */
.ccw-rating {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	font-size: 32px;
	line-height: 1;
}
.ccw-rating input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.ccw-rating label {
	color: #d1d5db;
	cursor: pointer;
	padding: 0 2px;
	transition: color 0.15s ease;
}
.ccw-rating label:hover,
.ccw-rating label:hover ~ label,
.ccw-rating input:checked + label,
.ccw-rating input:checked + label ~ label {
	color: #2563eb;
}

/* Erreur de validation. */
.ccw-field.has-error .ccw-input,
.ccw-field.has-error .ccw-option {
	border-color: #dc2626;
}

/* Navigation. */
.ccw-ms__nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
}
.ccw-ms__btn {
	padding: 14px 34px;
	border: 1.5px solid #d1d5db;
	border-radius: 12px;
	background: transparent;
	color: #374151; /* surchargé par le contrôle « Précédent » */
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.18s ease, transform 0.05s ease, box-shadow 0.18s ease;
}
.ccw-ms__btn:hover {
	opacity: 0.92;
}
.ccw-ms__btn:active {
	transform: translateY( 1px );
}
.ccw-ms__btn--primary {
	border: none;
	background: #2563eb;      /* surchargé par l'accent Elementor */
	color: #fff;             /* surchargé par le contrôle « couleur du texte » */
	margin-left: auto;        /* pousse Suivant/Envoyer à droite quand Précédent est masqué */
	box-shadow: 0 6px 16px rgba( 0, 0, 0, 0.12 );
}
.ccw-ms__btn:disabled {
	opacity: 0.6;
	cursor: default;
	box-shadow: none;
}

.ccw-ms__message {
	margin-top: 12px;
	font-size: 14px;
	min-height: 1em;
}
.ccw-ms__message.is-error {
	color: #dc2626;
}
.ccw-ms__message.is-success {
	color: #16a34a;
}

/* Accessibilité : pas de glissement si l'utilisateur le demande. */
@media (prefers-reduced-motion: reduce) {
	.ccw-ms__track,
	.ccw-ms__progress-bar {
		transition: none;
	}
}
