/* WP Simulateur de Prêt */
.wsp {
	--wsp-accent: #EC6525;
	--wsp-texte: #1d1b1b;
	--wsp-doux: #5f5959;
	--wsp-ligne: #e6e1de;
	--wsp-fond: #f9f6f4;
	--wsp-interets: #b9b2ae;
	--wsp-assurance: #e8ded8;
	box-sizing: border-box;
	max-width: 960px;
	margin: 0 auto 2em;
	color: var(--wsp-texte);
	font-size: 16px;
	line-height: 1.45;
	-webkit-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
}
.wsp *, .wsp *::before, .wsp *::after { box-sizing: border-box; -webkit-hyphens: none; hyphens: none; }

/* Police du site (Inter sur le thème jlsavarin.immo), même si le simulateur est placé dans un bloc qui en impose une autre. */
.wsp,
.wsp input,
.wsp summary,
.wsp table {
	font-family: var(--wsp-police, var(--wp--preset--font-family--inter, inherit));
}
.wsp { white-space: normal; }
.wsp-mensualite, .wsp-detail dd, .wsp .wsp-valeur input[type="text"], .wsp .wsp-biens strong { font-variant-numeric: tabular-nums; }

.wsp-titre {
	margin: 0 0 .8em;
	font-size: 1.6em;
	line-height: 1.2;
}

.wsp-grille {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}
@media (max-width: 760px) {
	.wsp-grille { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* Saisie */
.wsp-saisie { margin: 0; padding: 0; }
.wsp-champ { margin: 0 0 22px; }
.wsp-champ:last-child { margin-bottom: 0; }
.wsp-entete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}
.wsp-entete label {
	margin: 0;
	font-weight: 600;
	font-size: 15px;
}
.wsp-entete label small {
	display: block;
	font-weight: 400;
	font-size: 12.5px;
	color: var(--wsp-doux);
}
.wsp-valeur {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	border: 1px solid var(--wsp-ligne);
	border-radius: 8px;
	background: #fff;
	padding: 0 10px;
}
.wsp-valeur:focus-within { border-color: var(--wsp-accent); }
.wsp .wsp-valeur input[type="text"] {
	width: 7.5em;
	margin: 0;
	padding: 8px 4px;
	border: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
	font: inherit;
	font-weight: 700;
	font-size: 16px;
	text-align: right;
	color: var(--wsp-texte);
	height: auto;
	min-height: 0;
}
.wsp .wsp-valeur input[data-wsp="duree"],
.wsp .wsp-valeur input[data-wsp="taux"],
.wsp .wsp-valeur input[data-wsp="assurance"] { width: 3.6em; }
.wsp-unite { color: var(--wsp-doux); font-size: 14px; margin-left: 2px; }

.wsp-curseur {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 6px;
	margin: 6px 0 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: var(--wsp-ligne);
	accent-color: var(--wsp-accent);
	cursor: pointer;
}
.wsp-curseur::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wsp-accent);
	border: 3px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.wsp-curseur::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wsp-accent);
	border: 3px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.wsp-curseur:focus-visible { outline: 2px solid var(--wsp-accent); outline-offset: 4px; }

/* Résultat */
.wsp-resultat {
	background: var(--wsp-fond);
	border-radius: 14px;
	padding: 22px 22px 18px;
}
.wsp-intitule {
	margin: 0;
	font-size: 14px;
	color: var(--wsp-doux);
}
.wsp-mensualite {
	margin: 2px 0 14px;
	font-size: 2.3em;
	font-weight: 800;
	line-height: 1.1;
	color: var(--wsp-accent);
	white-space: nowrap;
}
.wsp-par-mois { font-size: .45em; font-weight: 600; color: var(--wsp-doux); }
.wsp-incomplet .wsp-resultat { opacity: .45; }

.wsp-detail { margin: 0; padding: 0; }
.wsp-detail > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid var(--wsp-ligne);
	font-size: 14.5px;
}
.wsp-detail > div:last-child { border-bottom: 0; }
.wsp-detail dt { margin: 0; font-weight: 400; color: var(--wsp-doux); }
.wsp-detail dd { margin: 0; font-weight: 600; white-space: nowrap; text-align: right; }
.wsp-detail .wsp-sep { margin-top: 6px; }
.wsp-detail .wsp-total dt, .wsp-detail .wsp-total dd { color: var(--wsp-texte); font-weight: 700; }

.wsp-barre {
	display: flex;
	height: 10px;
	margin: 16px 0 8px;
	border-radius: 5px;
	overflow: hidden;
	background: var(--wsp-ligne);
}
.wsp-barre span { display: block; height: 100%; transition: width .2s ease; }
.wsp-barre-capital, .wsp-pastille-capital { background: var(--wsp-accent); }
.wsp-barre-interets, .wsp-pastille-interets { background: var(--wsp-interets); }
.wsp-barre-assurance, .wsp-pastille-assurance { background: var(--wsp-assurance); }
.wsp-legende {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12.5px;
	color: var(--wsp-doux);
}
.wsp-legende li { margin: 0; padding: 0; display: flex; align-items: center; }
.wsp-legende li::before { content: none; }
.wsp-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* Tableau d'amortissement */
.wsp-amortissement {
	margin-top: 22px;
	border-top: 1px solid var(--wsp-ligne);
	padding-top: 12px;
}
.wsp-amortissement summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--wsp-accent);
	padding: 4px 0;
}
.wsp-tableau-scroll { overflow-x: auto; margin-top: 10px; -webkit-overflow-scrolling: touch; }
.wsp-tableau {
	width: 100%;
	min-width: 520px;
	margin: 0;
	border-collapse: collapse;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}
.wsp-tableau th, .wsp-tableau td {
	padding: 7px 10px;
	border: 0;
	border-bottom: 1px solid var(--wsp-ligne);
	text-align: right;
	white-space: nowrap;
}
.wsp-tableau th { font-weight: 600; color: var(--wsp-doux); background: transparent; }
.wsp-tableau th:first-child, .wsp-tableau td:first-child { text-align: left; }
.wsp-tableau tbody tr:nth-child(even) td { background: var(--wsp-fond); }

/* Mention : justifié, dernière ligne à gauche */
.wsp-mention {
	margin: 16px 0 0;
	font-size: 12.5px;
	color: var(--wsp-doux);
	text-align: justify;
	text-align-last: left;
}

/* Lien vers les biens à vendre */
.wsp .wsp-biens {
	display: block;
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 999px;
	background: var(--wsp-accent);
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: filter .15s ease;
}
.wsp .wsp-biens strong { font-weight: 700; white-space: nowrap; }
.wsp .wsp-biens:hover, .wsp .wsp-biens:focus-visible { color: #fff; filter: brightness(.92); text-decoration: none; }

/* Encart de contact (bloc à part, placé sous le simulateur ou sous le bandeau photo du thème) */
.wsp--contact { margin-top: 28px; margin-bottom: 2em; }
.wsp--contact .wsp-contact { margin-top: 0; }
.wsp-contact {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-top: 28px;
	padding: 22px 24px;
	border-radius: 14px;
	background: var(--wsp-fond);
}
.wsp-contact__photo {
	flex: 0 0 auto;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.wsp-contact__texte { flex: 1 1 auto; min-width: 0; }
.wsp-contact__titre { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--wsp-texte); }
.wsp-contact__para { margin: 0 0 14px; color: var(--wsp-texte); text-align: justify; text-align-last: left; }
.wsp .wsp-contact__bouton {
	display: inline-block;
	padding: 11px 22px;
	border-radius: 999px;
	background: var(--wsp-accent);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.wsp .wsp-contact__bouton:hover, .wsp .wsp-contact__bouton:focus-visible { color: #fff; filter: brightness(.92); }
.wsp-contact__signature { margin: 10px 0 0; font-size: 13px; color: var(--wsp-doux); }
.wsp-nowrap { white-space: nowrap; }
.wsp-mention--credit { margin-top: 22px; font-weight: 600; color: var(--wsp-texte); }
.wsp-mention--credit + .wsp-mention { margin-top: 6px; }
@media (max-width: 600px) {
	.wsp-contact { flex-direction: column; text-align: center; padding: 20px 18px; gap: 14px; }
	.wsp-contact__para { text-align: justify; text-align-last: left; }
	.wsp .wsp-contact__bouton { display: block; }
	.wsp .wsp-contact p.wsp-contact__signature { text-align: center; text-align-last: center; }
}

@media (max-width: 480px) {
	.wsp-resultat { padding: 18px 16px 14px; }
	.wsp-mensualite { font-size: 2em; }
	.wsp .wsp-valeur input[type="text"] { width: 6.5em; }
}

/* ------------------------------------------------------------------
   Version condensée pour la page d'accueil : [simulateur_pret format="accueil"]
   ------------------------------------------------------------------ */
.wsp--accueil {
	max-width: 1140px;
	margin-bottom: 1.5em;
	font-size: 15px;
}
.wsp--accueil .wsp-titre {
	margin: 0 0 .7em;
	font-size: 1.35em;
}
/* Mise en page selon la largeur réelle du bloc (et non de l'écran) :
   la même version s'adapte à une section pleine largeur comme à une colonne étroite. */
.wsp--accueil { container: wspaccueil / inline-size; }
.wsp--accueil .wsp-grille {
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	align-items: stretch;
}
.wsp--accueil .wsp-saisie {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	align-content: center;
}
@container wspaccueil (min-width: 540px) {
	.wsp--accueil .wsp-saisie { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; }
}
@container wspaccueil (min-width: 860px) {
	.wsp--accueil .wsp-grille { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; }
}
.wsp--accueil .wsp-champ { margin: 0; }
.wsp--accueil .wsp-entete { margin-bottom: 4px; gap: 8px; }
.wsp--accueil .wsp-entete label { font-size: 14px; line-height: 1.25; }
.wsp--accueil .wsp-entete label small { font-size: 11.5px; }
.wsp--accueil .wsp-valeur { padding: 0 8px; border-radius: 7px; }
.wsp--accueil .wsp-valeur input[type="text"] { padding: 6px 3px; font-size: 15px; width: 6.6em; }
.wsp--accueil .wsp-valeur input[data-wsp="duree"],
.wsp--accueil .wsp-valeur input[data-wsp="taux"],
.wsp--accueil .wsp-valeur input[data-wsp="assurance"] { width: 3.2em; }
.wsp--accueil .wsp-unite { font-size: 13px; }

.wsp--accueil .wsp-resultat {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 16px 20px;
	border-radius: 12px;
}
.wsp--accueil .wsp-intitule { font-size: 13px; }
.wsp--accueil .wsp-mensualite { margin: 0 0 8px; font-size: 2em; }
.wsp--accueil .wsp-detail > div { padding: 4px 0; font-size: 13.5px; }
.wsp--accueil .wsp-lien {
	display: inline-block;
	margin-top: 10px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wsp-accent);
	text-decoration: none;
}
.wsp--accueil .wsp-lien::after { content: " \2192"; }
.wsp--accueil .wsp-lien:hover, .wsp--accueil .wsp-lien:focus { text-decoration: underline; }
.wsp--accueil .wsp-mention { margin-top: 10px; font-size: 11.5px; }

/* Téléphone */
@media (max-width: 560px) {
	.wsp--accueil .wsp-resultat { padding: 14px 16px; }
	.wsp--accueil .wsp-mensualite { font-size: 1.85em; }
	.wsp--accueil .wsp-valeur input[type="text"] { width: 6.2em; }
}

/* Libellés courts : jamais justifiés, même si le thème justifie les paragraphes */
.wsp .wsp-resultat p.wsp-intitule,
.wsp .wsp-resultat p.wsp-mensualite,
.wsp .wsp-contact p.wsp-contact__titre {
	text-align: left;
	text-align-last: auto;
}
@media (max-width: 600px) {
	.wsp .wsp-contact p.wsp-contact__titre { text-align: center; }
}
