/* =================================================================
   PALETTE DE MARQUE — Vert Caméléon
   Seul bloc à modifier pour ajuster les couleurs.
   ================================================================= */
.asw-widget {
	--asw-primary: #7dff7d;      /* Couleur principale */
	--asw-darkest: #0d1c0d;      /* Titres */
	--asw-dark: #2d392d;         /* Paragraphes */
	--asw-medium: #939f93;       /* Bordures non décoratives (inputs...) */
	--asw-light: #e1ebe1;        /* Bordures décoratives */
	--asw-lightest: #f8fcf8;     /* Fonds alternatifs */
	--asw-white: #ffffff;        /* Fond principal */
	--asw-purple: #8080ff;       /* Accent secondaire */
	--asw-yellow: #fbff7d;       /* Avertissement / en cours */
	--asw-red: #ff5959;          /* Problème / indisponible */
	--asw-radius: 16px;

	width: 680px;
	max-width: 100%;
	margin: 0 auto;
	font-family: inherit;
	color: var(--asw-dark);
	box-sizing: border-box;
}

.asw-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	box-sizing: border-box;
	padding: 28px;
	border-radius: var(--asw-radius);
	background: var(--asw-lightest);
	border: 1px solid var(--asw-light);
}

/* Indicateur d'étapes */
.asw-steps-indicator {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 16px;
}

.asw-step-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid var(--asw-darkest);
	background: var(--asw-white);
	color: var(--asw-darkest);
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.2s ease, color 0.2s ease;
}

.asw-step-dot.is-active,
.asw-step-dot.is-done {
	background: var(--asw-primary);
}

.asw-step-line {
	width: 60px;
	height: 3px;
	border-radius: 999px;
	background: var(--asw-light);
	overflow: hidden;
}

.asw-step-line-fill {
	height: 100%;
	width: 0%;
	background: var(--asw-primary);
	transition: width 0.3s ease;
}

/* Étapes du formulaire */
.asw-step {
	display: none;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	box-sizing: border-box;
}
.asw-step.is-active {
	display: flex;
}

.asw-step-actions {
	display: flex;
	gap: 10px;
	align-items: stretch;
}
.asw-step-actions .asw-submit {
	flex: 1;
}

.asw-back {
	padding: 15px 18px;
	border: 1px solid var(--asw-darkest);
	border-radius: 4px;
	background: var(--asw-white);
	color: var(--asw-darkest);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}
.asw-back:hover {
	background: var(--asw-lightest);
}

.asw-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
	color: var(--asw-darkest);
}

.asw-field input {
	width: 100%;
	padding: 12px !important;
	border: 1px solid var(--asw-medium);
	border-radius: 10px;
	font-size: 15px;
	box-sizing: border-box;
	background: var(--asw-white);
	color: var(--asw-dark);
}

.asw-field input:focus {
	outline: 2px solid var(--asw-darkest);
	outline-offset: 1px;
	border-color: var(--asw-darkest);
}

/* Chrome/Safari appliquent un fond jaunâtre + un style interne très fort
   sur les champs auto-remplis (mot de passe/email enregistrés), qui
   masque le changement de bordure au focus. On neutralise ce style pour
   que la bordure reste visible, comme sur le champ URL. */
.asw-field input:-webkit-autofill,
.asw-field input:-webkit-autofill:hover,
.asw-field input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--asw-dark);
	-webkit-box-shadow: 0 0 0px 1000px var(--asw-white) inset;
	box-shadow: 0 0 0px 1000px var(--asw-white) inset;
	transition: background-color 5000s ease-in-out 0s;
}

/* Bouton "dur" façon neubrutalisme : vert en permanence, seule l'ombre
   portée disparaît et le bouton se déplace au survol/clic. */
.asw-submit {
	--asw-shadow-offset: 4px;
	padding: 15px 22px;
	border: 1px solid var(--asw-darkest);
	border-radius: 4px;
	background: var(--asw-primary);
	color: var(--asw-darkest);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: var(--asw-shadow-offset) var(--asw-shadow-offset) 0 0 var(--asw-darkest);
	transform: translate(0, 0);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.asw-submit:hover:not(:disabled) {
	box-shadow: none;
	transform: translate(var(--asw-shadow-offset), var(--asw-shadow-offset));
}

.asw-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.asw-note {
	margin: 0;
	font-size: 13px;
	color: var(--asw-dark);
	opacity: 0.75;
}

/* Loading */
.asw-loading {
	align-items: center;
	gap: 14px;
	padding: 28px;
}
.asw-loading.is-visible { display: flex !important; }

.asw-loading-content {
	flex: 1;
}

.asw-progress-track {
	width: 100%;
	height: 8px;
	border-radius: 999px;
	background: var(--asw-light);
	overflow: hidden;
	margin-bottom: 8px;
}

.asw-progress-bar {
	height: 100%;
	width: 0%;
	border-radius: 999px;
	background: var(--asw-primary);
	transition: width 0.4s ease;
}

.asw-loading p {
	margin: 0;
	font-size: 13px;
	color: var(--asw-dark);
}

/* Error */
.asw-error {
	padding: 16px 18px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--asw-red) 12%, white);
	border: 1px solid var(--asw-red);
	color: var(--asw-darkest);
	margin-top: 16px;
}
.asw-error.is-visible { display: block !important; }

/* Résultats */
.asw-results {
	margin-top: 24px;
	flex-direction: column;
	gap: 20px;
}
.asw-results.is-visible { display: flex !important; }

.asw-confirmation {
	padding: 24px;
	border-radius: var(--asw-radius);
	background: var(--asw-lightest);
	border: 1px solid var(--asw-darkest);
	text-align: center;
}

.asw-confirmation-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: var(--asw-darkest);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.asw-confirmation-title img {
	width: 28px;
	height: 28px;
}

/* Score Caméléon — un dial par pilier. Les cartes fonctionnent comme des
   onglets : cliquer affiche le détail correspondant juste en dessous. */
.asw-pillars-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
}

.asw-pillar {
	--asw-shadow-offset: 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	padding: 20px 16px;
	border-radius: var(--asw-radius);
	background: var(--asw-lightest);
	border: 1px solid var(--asw-darkest);
	box-shadow: var(--asw-shadow-offset) var(--asw-shadow-offset) 0 0 var(--asw-darkest);
	transform: translate(0, 0);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.asw-pillar.is-active {
	background: var(--asw-white);
	box-shadow: none;
	transform: translate(var(--asw-shadow-offset), var(--asw-shadow-offset));
	/* La couleur de bordure est appliquée en inline par le JS, selon la
	   couleur de la note (rouge/jaune/vert). */
}

.asw-cameleon-dial {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	border: 1px solid var(--asw-darkest);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	font-weight: 700;
	color: var(--asw-darkest);
	transition: background 0.4s ease;
}

.asw-pillar-title {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	color: var(--asw-darkest);
}

.asw-pillar-subtitle {
	margin: 0;
	font-size: 12px;
	color: var(--asw-dark);
	opacity: 0.75;
}

.asw-pillar-insight {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.05;
	color: var(--asw-dark);
}

/* Blocs de détail par pilier — un seul visible à la fois (piloté par JS) */
.asw-detail-block {
	display: none;
	border: 1px solid var(--asw-light);
	border-radius: 12px;
	padding: 18px 22px;
	background: var(--asw-white);
}
.asw-detail-block.is-active { display: block; }

.asw-detail-block h4 {
	margin: 0 0 12px;
	font-size: 15px;
	color: var(--asw-darkest);
}

.asw-detail-block h5 {
	margin: 16px 0 10px;
	font-size: 13px;
	color: var(--asw-darkest);
}

.asw-detail-block ul {
	margin: 0;
	padding-left: 18px;
}

.asw-detail-block li {
	margin-bottom: 6px;
	font-size: 14px;
	color: var(--asw-dark);
}

.asw-breakdown {
	list-style: none;
	padding: 0;
}
.asw-breakdown li {
	padding: 6px 0;
	border-bottom: 1px solid var(--asw-light);
}
.asw-breakdown li:last-child { border-bottom: none; }

/* Metrics pills */
.asw-metrics {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
	color: var(--asw-dark);
}
.asw-metrics span {
	background: var(--asw-lightest);
	padding: 4px 12px;
	border-radius: 999px;
	border: 1px solid var(--asw-light);
}

/* Recommandations */
.asw-reco-list, .asw-checklist {
	border: 1px solid var(--asw-light);
	border-radius: 12px;
	padding: 18px 22px;
	background: var(--asw-white);
}

.asw-reco-list h4, .asw-checklist h4 {
	margin: 0 0 12px;
	font-size: 15px;
	color: var(--asw-darkest);
}

.asw-reco-list ul {
	margin: 0;
	padding-left: 18px;
}

.asw-reco-list li {
	margin-bottom: 6px;
	font-size: 14px;
	color: var(--asw-dark);
}

/* Checklist SEO technique */
.asw-checklist ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.asw-check-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	color: var(--asw-dark);
}

.asw-check-icon {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	margin-top: 1px;
}
.asw-check-icon.pass { background: var(--asw-primary); color: var(--asw-darkest); }
.asw-check-icon.fail { background: var(--asw-red); color: var(--asw-white); }

.asw-check-detail {
	display: block;
	color: var(--asw-dark);
	opacity: 0.7;
	font-size: 12px;
	margin-top: 2px;
}

/* Phrases d'insight contextuelles (sous une note ou un critère) */
.asw-insight {
	margin: 4px 0 0;
	font-size: 13px;
	line-height: 1.1;
	font-style: italic;
	color: var(--asw-dark);
}

/* Autorité de domaine */
.asw-authority-note {
	font-size: 12px;
	color: var(--asw-dark);
	opacity: 0.7;
	margin-top: 6px;
}
