/* Ma Signalétique — formulaires de leads */

.masi-form-wrap {
	--masi-primary: #1a56db;
	--masi-primary-dark: #1140ad;
	--masi-text: #16181d;
	--masi-muted: #6b7280;
	--masi-line: #d9dde3;
	--masi-bg-soft: #f6f8fb;
	--masi-error: #b32d2e;
	--masi-success: #0a7c2f;
	--masi-radius: 12px;

	max-width: 780px;
	margin: 0 auto;
	color: var(--masi-text);
	font-size: 16px;
	line-height: 1.5;
}

.masi-form-wrap *,
.masi-form-wrap *::before,
.masi-form-wrap *::after {
	box-sizing: border-box;
}

.masi-form {
	background: #fff;
	border: 1px solid var(--masi-line);
	border-radius: var(--masi-radius);
	padding: 28px;
}

@media (max-width: 640px) {
	.masi-form { padding: 20px 16px; }
}

/* ------------------------------------------------------------- progression */

.masi-progress {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	counter-reset: none;
}

.masi-progress li {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--masi-muted);
	padding-top: 12px;
	border-top: 3px solid var(--masi-line);
	transition: color .2s, border-color .2s;
}

.masi-progress li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--masi-line);
	color: #fff;
	font-size: 12px;
	flex: 0 0 auto;
}

.masi-progress li.is-active,
.masi-progress li.is-done {
	color: var(--masi-primary);
	border-top-color: var(--masi-primary);
}

.masi-progress li.is-active span,
.masi-progress li.is-done span {
	background: var(--masi-primary);
}

.masi-progress li.is-done { cursor: pointer; }

@media (max-width: 640px) {
	.masi-progress li { font-size: 0; gap: 0; }
	.masi-progress li span { font-size: 12px; }
}

/* -------------------------------------------------------------- étapes */

.masi-step {
	border: 0;
	margin: 0;
	padding: 0;
	display: none;
}

.masi-step.is-active {
	display: block;
	animation: masi-fade .25s ease;
}

@keyframes masi-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.masi-step.is-active { animation: none; }
}

.masi-legend {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 20px;
	padding: 0;
	line-height: 1.3;
}

.masi-short-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 16px;
}

/* -------------------------------------------------------------- champs */

.masi-field { margin-bottom: 18px; }

.masi-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

@media (max-width: 640px) {
	.masi-grid-2 { grid-template-columns: 1fr; }
}

.masi-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}

.masi-req { color: var(--masi-error); }

.masi-input {
	width: 100%;
	padding: 12px 14px;
	font-size: 16px;
	font-family: inherit;
	color: var(--masi-text);
	background: #fff;
	border: 1px solid var(--masi-line);
	border-radius: 9px;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
}

select.masi-input {
	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='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
}

.masi-input:focus {
	outline: none;
	border-color: var(--masi-primary);
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .16);
}

.masi-input.is-loading {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='%23d9dde3' stroke-width='2'/%3E%3Cpath d='M8 2a6 6 0 0 1 6 6' fill='none' stroke='%231a56db' stroke-width='2' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 8 8' to='360 8 8' dur='.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

textarea.masi-input { resize: vertical; min-height: 110px; }

.has-error .masi-input,
.has-error .masi-card,
.masi-check.has-error {
	border-color: var(--masi-error);
}

.has-error .masi-label { color: var(--masi-error); }

.masi-hint {
	font-size: 13px;
	color: var(--masi-muted);
	margin: 6px 0 0;
}

.masi-hint--warn { color: #9a5b00; }

.masi-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--masi-primary);
	text-decoration: underline;
	cursor: pointer;
}

/* -------------------------------------------------- cartes de sélection */

.masi-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}

.masi-card { position: relative; display: block; cursor: pointer; }

.masi-card input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.masi-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	height: 100%;
	padding: 14px;
	border: 1.5px solid var(--masi-line);
	border-radius: 10px;
	background: #fff;
	transition: border-color .15s, background .15s, transform .1s;
}

.masi-card:hover .masi-card__body { border-color: #aab3c0; }

.masi-card input:checked + .masi-card__body {
	border-color: var(--masi-primary);
	background: rgba(26, 86, 219, .05);
}

.masi-card input:focus-visible + .masi-card__body {
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .2);
}

.masi-card__label { font-size: 14px; font-weight: 600; line-height: 1.35; }

.masi-card__icon {
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--masi-bg-soft) center/16px no-repeat;
	flex: 0 0 auto;
}

.masi-card input:checked + .masi-card__body .masi-card__icon {
	background-color: rgba(26, 86, 219, .12);
}

/* Pictogrammes : SVG inline en data-URI, aucun appel réseau. */
.masi-card__icon[data-icon="lightbulb"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.5.4.8 1 .8 1.6V16h5.4v-.5c0-.6.3-1.2.8-1.6A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="sign"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M4 6h12l3 3-3 3H4z'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="car"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 16v2.5M20 16v2.5M3 16h18v-4l-2-.5-1.8-3.6A2 2 0 0 0 15.4 7H8.6a2 2 0 0 0-1.8 1.1L5 11.5 3 12z'/%3E%3Ccircle cx='7.5' cy='16' r='1.4'/%3E%3Ccircle cx='16.5' cy='16' r='1.4'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="board"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='11' rx='1.5'/%3E%3Cpath d='M12 15v6M8 21h8'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="flag"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V3M5 4h13l-2.5 4L18 12H5'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="sticker"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v11l-5 5H4z'/%3E%3Cpath d='M20 15h-5v5'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="magnet"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4v8a7 7 0 0 0 14 0V4h-5v8a2 2 0 0 1-4 0V4z'/%3E%3Cpath d='M5 8h5M14 8h5'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="tent"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h18l-1.5-4.5h-15zM4.5 9v11h15V9M9 20v-6h6v6'/%3E%3C/svg%3E"); }
.masi-card__icon[data-icon="question"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.4 9.3a2.7 2.7 0 0 1 5.2.9c0 1.8-2.6 2.3-2.6 3.8'/%3E%3Cpath d='M12 17.2h.01'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------- puces */

.masi-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.masi-chip { position: relative; cursor: pointer; }

.masi-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.masi-chip span {
	display: inline-block;
	padding: 9px 14px;
	border: 1.5px solid var(--masi-line);
	border-radius: 999px;
	font-size: 14px;
	transition: border-color .15s, background .15s, color .15s;
}

.masi-chip input:checked + span {
	border-color: var(--masi-primary);
	background: rgba(26, 86, 219, .07);
	color: var(--masi-primary-dark);
	font-weight: 600;
}

.masi-chip input:focus-visible + span {
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .2);
}

/* ---------------------------------------------------------- cases à cocher */

.masi-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
	margin-bottom: 14px;
}

.masi-check input {
	margin: 2px 0 0;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	accent-color: var(--masi-primary);
}

.masi-consent {
	background: var(--masi-bg-soft);
	padding: 14px;
	border-radius: 10px;
	border: 1px solid transparent;
}

.masi-consent.has-error { border-color: var(--masi-error); }

.masi-consent a { color: var(--masi-primary); }

/* ------------------------------------------------------ autocomplétion */

.masi-autocomplete { position: relative; }

.masi-suggest {
	position: absolute;
	z-index: 40;
	top: 100%;
	left: 0;
	right: 0;
	margin: 4px 0 0;
	padding: 4px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--masi-line);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
	max-height: 280px;
	overflow-y: auto;
}

.masi-suggest li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 9px 11px;
	border-radius: 7px;
	cursor: pointer;
}

.masi-suggest li:hover,
.masi-suggest li.is-active {
	background: var(--masi-bg-soft);
}

.masi-suggest__main { font-size: 14px; font-weight: 600; }
.masi-suggest__sub { font-size: 12.5px; color: var(--masi-muted); }

/* ---------------------------------------------------------- fichiers */

.masi-dropzone {
	border: 1.5px dashed var(--masi-line);
	border-radius: 10px;
	padding: 22px 16px;
	text-align: center;
	cursor: pointer;
	background: var(--masi-bg-soft);
	transition: border-color .15s, background .15s;
}

.masi-dropzone:hover,
.masi-dropzone:focus-visible,
.masi-dropzone.is-drag {
	border-color: var(--masi-primary);
	background: rgba(26, 86, 219, .05);
	outline: none;
}

.masi-dropzone__text { margin: 0 0 4px; font-size: 14px; }
.masi-dropzone .masi-hint { margin: 0; }

.masi-filelist { list-style: none; margin: 10px 0 0; padding: 0; }

.masi-filelist li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border: 1px solid var(--masi-line);
	border-radius: 8px;
	margin-bottom: 6px;
	font-size: 14px;
}

.masi-filelist__name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.masi-filelist__size { color: var(--masi-muted); font-size: 13px; }

.masi-filelist__remove {
	background: none;
	border: 0;
	font-size: 20px;
	line-height: 1;
	color: var(--masi-muted);
	cursor: pointer;
	padding: 0 4px;
}

.masi-filelist__remove:hover { color: var(--masi-error); }

/* -------------------------------------------------------- récapitulatif */

.masi-recap {
	background: var(--masi-bg-soft);
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 18px;
}

.masi-recap:empty { display: none; }

.masi-recap__title {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--masi-muted);
}

.masi-recap dl { margin: 0; }

.masi-recap dl > div {
	display: flex;
	gap: 10px;
	padding: 4px 0;
	font-size: 14px;
}

.masi-recap dt { color: var(--masi-muted); min-width: 110px; }
.masi-recap dd { margin: 0; font-weight: 600; }

/* -------------------------------------------------------------- boutons */

.masi-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 24px;
	flex-wrap: wrap;
}

.masi-btn {
	font: inherit;
	font-weight: 600;
	border-radius: 9px;
	padding: 13px 26px;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: background .15s, border-color .15s, transform .08s;
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

.masi-btn:active { transform: translateY(1px); }

.masi-btn--primary {
	background: var(--masi-primary);
	color: #fff;
	margin-left: auto;
}

.masi-btn--primary:hover { background: var(--masi-primary-dark); }

.masi-btn--ghost {
	background: #fff;
	border-color: var(--masi-line);
	color: var(--masi-text);
}

.masi-btn--ghost:hover { border-color: #aab3c0; }

.masi-btn[disabled] { opacity: .65; cursor: not-allowed; }

.masi-btn--submit { font-size: 16px; padding: 14px 30px; }

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

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

.masi-reassure {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--masi-muted);
	text-align: center;
}

/* ------------------------------------------------------------- messages */

.masi-alert {
	padding: 12px 14px;
	border-radius: 9px;
	font-size: 14px;
	margin-bottom: 18px;
}

.masi-alert--error {
	background: #fdecec;
	color: var(--masi-error);
	border: 1px solid #f5c2c2;
}

.masi-draft-notice {
	background: #fff8e6;
	border: 1px solid #f2d78a;
	color: #7a5300;
	font-size: 13.5px;
	padding: 10px 13px;
	border-radius: 9px;
	margin: 0 0 18px;
}

.masi-success {
	text-align: center;
	background: #fff;
	border: 1px solid var(--masi-line);
	border-radius: var(--masi-radius);
	padding: 44px 28px;
}

.masi-success__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: rgba(10, 124, 47, .1);
	color: var(--masi-success);
	font-size: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.masi-success h3 { margin: 0 0 10px; font-size: 21px; }
.masi-success p { margin: 0 0 8px; color: var(--masi-muted); }

/* --------------------------------------------------------------- divers */

.masi-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.masi-turnstile { margin: 14px 0; }

.masi-form-wrap--short { max-width: 460px; }
.masi-form-wrap--short .masi-form { padding: 22px; }
.masi-form-wrap--short .masi-btn--primary { width: 100%; justify-content: center; margin-left: 0; }
