/* WP Frais de Notaire */
.wfn {
	--wfn-accent: #EC6525;
	--wfn-texte: #1d1b1b;
	--wfn-doux: #5f5959;
	--wfn-ligne: #e6e1de;
	--wfn-fond: #f9f6f4;
	--wfn-notaire: #b9b2ae;
	--wfn-autres: #e8ded8;
	box-sizing: border-box;
	max-width: 960px;
	margin: 0 auto 2em;
	color: var(--wfn-texte);
	font-size: 16px;
	line-height: 1.45;
	-webkit-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
}
.wfn *, .wfn *::before, .wfn *::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. */
.wfn,
.wfn input,
.wfn summary,
.wfn table {
	font-family: var(--wfn-police, var(--wp--preset--font-family--inter, inherit));
}
.wfn { white-space: normal; }
.wfn-total, .wfn-detail dd, .wfn .wfn-valeur input[type="text"] { font-variant-numeric: tabular-nums; }

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

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

/* Saisie */
.wfn-saisie { margin: 0; padding: 0; }
.wfn-champ { margin: 0 0 22px; }
.wfn-champ:last-child { margin-bottom: 0; }
.wfn-entete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}
.wfn-entete label {
	margin: 0;
	font-weight: 600;
	font-size: 15px;
}
.wfn-entete label small {
	display: block;
	font-weight: 400;
	font-size: 12.5px;
	color: var(--wfn-doux);
}
.wfn-valeur {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	border: 1px solid var(--wfn-ligne);
	border-radius: 8px;
	background: #fff;
	padding: 0 10px;
}
.wfn-valeur:focus-within { border-color: var(--wfn-accent); }
.wfn .wfn-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(--wfn-texte);
	height: auto;
	min-height: 0;
}
.wfn-unite { color: var(--wfn-doux); font-size: 14px; margin-left: 2px; }

.wfn-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(--wfn-ligne);
	accent-color: var(--wfn-accent);
	cursor: pointer;
}
.wfn-curseur::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wfn-accent);
	border: 3px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.wfn-curseur::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wfn-accent);
	border: 3px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.wfn-curseur:focus-visible { outline: 2px solid var(--wfn-accent); outline-offset: 4px; }

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

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

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

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

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

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


[hidden] { display: none !important; }
.wfn [hidden] { display: none !important; }

/* Choix ancien / neuf, primo-accédant */
.wfn fieldset.wfn-choix { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.wfn-choix legend { margin: 0 0 8px; padding: 0; font-weight: 600; font-size: 15px; }
.wfn-boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.wfn-boutons label { position: relative; flex: 1 1 0; min-width: 100px; margin: 0; cursor: pointer; }
.wfn-boutons input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.wfn-boutons span {
	display: block;
	padding: 9px 12px;
	border: 1px solid var(--wfn-ligne);
	border-radius: 999px;
	background: #fff;
	font-weight: 600;
	font-size: 15px;
	text-align: center;
	color: var(--wfn-texte);
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.wfn-boutons input:checked + span { background: var(--wfn-accent); border-color: var(--wfn-accent); color: #fff; }
.wfn-boutons input:focus-visible + span { outline: 2px solid var(--wfn-accent); outline-offset: 2px; }
.wfn .wfn-aide,
.wfn p.wfn-aide {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--wfn-doux);
	text-align: left;
	text-align-last: auto;
}

/* Résultat */
.wfn .wfn-resultat p.wfn-pourcentage { margin: -8px 0 12px; font-size: 14px; color: var(--wfn-doux); text-align: left; text-align-last: auto; }
.wfn-pourcentage strong { color: var(--wfn-texte); }
.wfn-detail dt small { display: block; font-size: 12px; color: var(--wfn-doux); font-weight: 400; }
.wfn-detail .wfn-sous-total dt, .wfn-detail .wfn-sous-total dd { color: var(--wfn-texte); font-weight: 700; }
.wfn-detail .wfn-ligne-detail { padding: 3px 0 3px 14px; font-size: 13.5px; border-bottom: 0; }
.wfn-detail .wfn-ligne-detail dt span { color: var(--wfn-doux); opacity: .8; margin-left: 4px; white-space: nowrap; }
.wfn-detail .wfn-ligne-detail dd { font-weight: 500; color: var(--wfn-doux); }
.wfn-detail .wfn-ligne-detail + div:not(.wfn-ligne-detail) { border-top: 1px solid var(--wfn-ligne); }
.wfn-detail .wfn-budget { margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--wfn-ligne); }
.wfn-detail .wfn-budget dt, .wfn-detail .wfn-budget dd { color: var(--wfn-texte); font-weight: 700; }
.wfn-legende strong { font-weight: 600; color: var(--wfn-texte); margin-left: 3px; }
.wfn .wfn-resultat p.wfn-taux { margin: 10px 0 0; font-size: 12px; color: var(--wfn-doux); text-align: left; text-align-last: auto; }

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

/* Département */
.wfn .wfn-label { display: block; margin: 0 0 8px; font-weight: 600; font-size: 15px; }
.wfn .wfn-select {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 10px 40px 10px 14px;
	border: 1px solid var(--wfn-ligne);
	border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f5959' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
	-webkit-appearance: none;
	appearance: none;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--wfn-texte);
	cursor: pointer;
}
.wfn .wfn-select:focus { border-color: var(--wfn-accent); outline: none; }
.wfn select.wfn-select { font-family: var(--wfn-police, var(--wp--preset--font-family--inter, inherit)); }

.wfn p.wfn-aide[data-wfn-note-caution] { margin: -14px 0 22px; }
