/* Webcomimmo — simulateur de taxe foncière.
 * Police héritée du thème (aucune police externe : pas d'appel Google Fonts, RGPD).
 * Signature visuelle : le résultat reprend la présentation en colonnes d'un avis d'imposition,
 * sur une « feuille » au bord perforé. Le reste reste sobre.
 * Couleurs surchargeables depuis le thème : --wci-tf-encre, --wci-tf-accent, etc. */
.wci-tf {
  --wci-tf-encre: #16343d;
  --wci-tf-texte: #263b41;
  --wci-tf-doux: #5d7177;
  --wci-tf-filet: #cad5d3;
  --wci-tf-brume: #eef3f2;
  --wci-tf-feuille: #ffffff;
  --wci-tf-accent: #b5832a;
  --wci-tf-vert: #2e6a4f;
  --wci-tf-erreur: #9a3b2e;
  color: var(--wci-tf-texte);
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}
.wci-tf *, .wci-tf *::before, .wci-tf *::after { box-sizing: border-box; }
.wci-tf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête de page */
.wci-tf-page { max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }
.wci-tf-page__tete { max-width: 760px; padding: 32px 0 24px; }
.wci-tf-page__tete h1 { color: var(--wci-tf-encre); font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.01em; }
.wci-tf-chapo { font-size: 1.1rem; margin: 0; max-width: 68ch; }
.wci-tf-fil { font-size: .9rem; color: var(--wci-tf-doux); margin: 0 0 10px; }
.wci-tf-fil a { color: inherit; }

/* Grille simulateur */
.wci-tf-sim { display: grid; gap: 32px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
@media (max-width: 900px) { .wci-tf-sim { grid-template-columns: 1fr; } }

/* Formulaire */
.wci-tf-form, .wci-tf-lead { display: grid; gap: 16px; }
.wci-tf-champ { display: grid; gap: 6px; }
.wci-tf-champ > label, .wci-tf-choix legend { font-weight: 600; color: var(--wci-tf-encre); font-size: .95rem; }
.wci-tf input[type=number], .wci-tf input[type=email], .wci-tf input[type=tel], .wci-tf input:not([type]), .wci-tf select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--wci-tf-filet); border-radius: 6px;
  background: var(--wci-tf-feuille); color: var(--wci-tf-texte); font: inherit;
}
.wci-tf input:focus-visible, .wci-tf select:focus-visible, .wci-tf summary:focus-visible, .wci-tf button:focus-visible, .wci-tf a:focus-visible {
  outline: 3px solid var(--wci-tf-accent); outline-offset: 2px;
}
.wci-tf-choix { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wci-tf-choix legend { margin-bottom: 6px; width: 100%; }
.wci-tf-choix label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--wci-tf-filet); border-radius: 6px; cursor: pointer; background: var(--wci-tf-feuille); }
.wci-tf-choix label:has(input:checked) { border-color: var(--wci-tf-encre); box-shadow: inset 0 0 0 1px var(--wci-tf-encre); }
.wci-tf-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.wci-tf-ligne--3 { grid-template-columns: repeat(3, 1fr); }
.wci-tf-champ--case label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--wci-tf-texte); }
.wci-tf-champ--case input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.wci-tf-plus { border-top: 1px solid var(--wci-tf-filet); padding-top: 12px; }
.wci-tf-plus > summary { cursor: pointer; font-weight: 600; color: var(--wci-tf-encre); }
.wci-tf-plus[open] { display: grid; gap: 16px; }
.wci-tf-facultatif { font-weight: 400; color: var(--wci-tf-doux); }
.wci-tf [hidden] { display: none !important; }

/* Résultat : la feuille d'avis */
.wci-tf-resultat { display: grid; gap: 28px; position: sticky; top: 24px; }
@media (max-width: 900px) { .wci-tf-resultat { position: static; } }
.wci-tf-avisbloc {
  position: relative; background: var(--wci-tf-feuille); border: 1px solid var(--wci-tf-filet); border-top: 0;
  padding: 30px 28px 22px; border-radius: 0 0 8px 8px;
}
.wci-tf-avisbloc::before { /* bord perforé de l'avis */
  content: ""; position: absolute; left: -1px; right: -1px; top: -8px; height: 9px;
  background: radial-gradient(circle at 7px 0, transparent 4px, var(--wci-tf-filet) 4.5px, var(--wci-tf-filet) 5px, var(--wci-tf-feuille) 5.5px) 0 0 / 14px 9px repeat-x;
}
.wci-tf-resultat__lib { margin: 0; color: var(--wci-tf-doux); font-size: .95rem; }
.wci-tf-resultat__montant { margin: 4px 0 14px; color: var(--wci-tf-encre); font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.wci-tf-resultat__montant small { display: block; font-size: .95rem; font-weight: 400; color: var(--wci-tf-doux); letter-spacing: 0; margin-top: 6px; }
.wci-tf-resultat__exo, .wci-tf-bloc__exo { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--wci-tf-vert); background: #edf5f0; color: #1f4a37; }
.wci-tf-erreur { color: var(--wci-tf-erreur); font-weight: 600; margin: 0 0 12px; }

.wci-tf-avis { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; }
.wci-tf-avis th, .wci-tf-avis td { padding: 8px 6px; border-bottom: 1px dotted var(--wci-tf-filet); text-align: left; vertical-align: top; }
.wci-tf-avis td { text-align: right; white-space: nowrap; }
.wci-tf-avis thead th { font-size: .82rem; font-weight: 600; color: var(--wci-tf-doux); border-bottom: 1px solid var(--wci-tf-encre); }
.wci-tf-avis thead th:not(:first-child) { text-align: right; }
.wci-tf-avis th[scope=row] { font-weight: 400; }
.wci-tf-avis__base th, .wci-tf-avis__base td { color: var(--wci-tf-doux); }
.wci-tf-avis__sous th, .wci-tf-avis__sous td { font-weight: 600; border-bottom-style: solid; }
.wci-tf-avis tfoot th, .wci-tf-avis tfoot td { font-weight: 700; color: var(--wci-tf-encre); border-bottom: 0; border-top: 2px solid var(--wci-tf-encre); font-size: 1.05rem; }
.wci-tf-calcul { margin-top: 16px; }
.wci-tf-calcul > summary, .wci-tf-bloc__detail > summary { cursor: pointer; color: var(--wci-tf-encre); font-weight: 600; }

/* Demande de contact */
.wci-tf-contact { background: var(--wci-tf-brume); border-radius: 8px; padding: 24px; }
.wci-tf-contact h2 { margin: 0 0 6px; font-size: 1.25rem; color: var(--wci-tf-encre); }
.wci-tf-contact > p { margin: 0 0 16px; }
.wci-tf-consent label { font-size: .88rem; color: var(--wci-tf-doux); }
.wci-tf-hp { position: absolute; left: -9999px; }
.wci-tf-bouton { justify-self: start; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 6px; background: var(--wci-tf-encre); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.wci-tf-bouton:hover { background: #0f262d; }
.wci-tf-bouton:disabled { opacity: .6; cursor: progress; }
.wci-tf-lead__etat { margin: 0; font-weight: 600; color: var(--wci-tf-encre); }

/* Contenus éditoriaux */
.wci-tf-note { font-size: .85rem; color: var(--wci-tf-doux); margin: 12px 0 0; max-width: 80ch; }
.wci-tf-page__mention { margin-top: 24px; }
.wci-tf-section { margin-top: 56px; max-width: 860px; }
.wci-tf-section h2 { color: var(--wci-tf-encre); font-size: 1.5rem; line-height: 1.25; margin: 0 0 16px; }
.wci-tf-etapes { padding-left: 1.4em; display: grid; gap: 10px; margin: 0; }
.wci-tf-etapes li { padding-left: 4px; max-width: 75ch; }
.wci-tf-etapes--court { font-size: .92rem; margin-top: 12px; }
.wci-tf-defile { max-height: 520px; overflow: auto; border: 1px solid var(--wci-tf-filet); border-radius: 6px; }
.wci-tf-defile .wci-tf-avis thead th { position: sticky; top: 0; background: var(--wci-tf-feuille); }
.wci-tf-defile .wci-tf-avis th, .wci-tf-defile .wci-tf-avis td { padding-left: 12px; padding-right: 12px; }
.wci-tf-taux td:last-child { white-space: normal; text-align: left; }
.wci-tf-taux thead th:last-child { text-align: left; }
.wci-tf-voisines { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 24px; }
.wci-tf-voisines li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--wci-tf-filet); padding: 6px 0; }
.wci-tf-voisines span { color: var(--wci-tf-doux); }
.wci-tf-faq details { border-bottom: 1px solid var(--wci-tf-filet); padding: 14px 0; }
.wci-tf-faq summary { cursor: pointer; font-weight: 600; color: var(--wci-tf-encre); }
.wci-tf-faq p { margin: 10px 0 0; max-width: 75ch; }
.wci-tf a { color: var(--wci-tf-encre); text-underline-offset: 2px; }

/* Bloc fiche lot / programme */
.wci-tf-bloc, .wci-tf-prog { border: 1px solid var(--wci-tf-filet); border-radius: 8px; padding: 20px 22px; background: var(--wci-tf-feuille); margin: 24px 0; }
.wci-tf-bloc__tete { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.wci-tf-bloc__titre { margin: 0; font-size: 1.1rem; color: var(--wci-tf-encre); }
.wci-tf-bloc__montant { margin: 0; font-size: 1.8rem; font-weight: 700; color: var(--wci-tf-encre); line-height: 1; }
.wci-tf-bloc__montant span { font-size: .9rem; font-weight: 400; color: var(--wci-tf-doux); }
.wci-tf-bloc__detail { margin-top: 4px; }
.wci-tf-bloc__detail[open] .wci-tf-avis { margin-top: 12px; }
.wci-tf-bloc__lien { margin: 14px 0 0; font-size: .92rem; }
.wci-tf-prog__table { margin-top: 12px; }

@media (max-width: 560px) {
  .wci-tf-ligne, .wci-tf-ligne--3 { grid-template-columns: 1fr 1fr; }
  .wci-tf-avisbloc { padding: 26px 16px 18px; }
  .wci-tf-avis { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) { .wci-tf * { scroll-behavior: auto; transition: none !important; } }
