/* Calculateurs des pages outils (outils/plafonds-revenus-maprimerenov.html, consommation-pompe-a-chaleur.html,
   puissance-pompe-a-chaleur.html, prix-fioul.html) : carte blanche sur section vert forêt, comme le simulateur.
   S'appuie sur les variables du thème. */

.outil {
  margin-block: var(--e6);
  margin-inline: calc(50% - 50vw);
  padding: var(--e6) calc(50vw - 50%);
  background: var(--sombre-fond);
}
.outil > * { max-width: 720px; margin-inline: auto; }
.prose .outil > * + * { margin-top: var(--e4); }

.ou-carte {
  padding: 22px 18px;
  border-radius: var(--rayon-grand);
  background: var(--carte-fond);
  color: var(--texte);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6);
}
.prose .ou-carte h3 { margin: 0 0 var(--e3); font-size: 24px; line-height: 1.2; }
.ou-carte > * + * { margin-top: var(--e4); }

.ou-grille { display: grid; gap: var(--e4); }
.outil fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.outil legend,
.ou-champ > label {
  display: block;
  margin-bottom: var(--e2);
  font-weight: 700;
  color: var(--titre);
}
.ou-aide { margin: 6px 0 0; font-size: 16px; color: var(--texte-secondaire); }

.outil select,
.outil input[type="number"] {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--fond);
  color: var(--texte);
  font: inherit;
  box-shadow: inset 0 0 0 2px var(--bordure-forte);
}
/* Focus vert ; le rouge est réservé au champ en erreur (aria-invalid), jamais au simple focus */
.outil select:focus-visible,
.outil input[type="number"]:focus-visible { outline: 3px solid var(--lien); outline-offset: 2px; }
.outil :is(select, input[type="number"])[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--cta); }
.ou-erreur { margin: 6px 0 0; color: var(--cta-survol); font-weight: 700; font-size: 16.5px; }
.ou-erreur:empty { display: none; }

.ou-choix { display: flex; flex-wrap: wrap; gap: 10px; }
.ou-choix label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--fond);
  font-weight: 700;
  color: var(--titre);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--bordure-forte);
}
.ou-choix label:has(input:checked) { background: var(--lime); box-shadow: inset 0 0 0 2px var(--sombre-fond); }
.ou-choix label:has(input:focus-visible) { outline: 3px solid var(--lien); outline-offset: 2px; }
.ou-choix input { width: 20px; height: 20px; margin: 0; accent-color: var(--sombre-fond); }

.ou-resultat:focus { outline: none; }
.ou-resultat > * + * { margin-top: var(--e3); }
.ou-resultat[hidden] { display: none; }
.ou-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--vert-profond);
  font-size: 15.5px;
  font-weight: 800;
}
.ou-grand {
  font-family: var(--police-titres);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--titre);
  font-variant-numeric: tabular-nums lining-nums;
}

.ou-lignes {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 6px 18px;
  border-radius: var(--rayon-moyen);
  background: var(--surface);
}
.ou-lignes dt { padding-top: 12px; color: var(--texte); }
.ou-lignes dd {
  margin: 0;
  padding-bottom: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--titre);
  box-shadow: 0 1px 0 var(--bordure);
}
.ou-lignes dd:last-of-type { box-shadow: none; }
.ou-lignes .fort { color: var(--lien); }

.ou-tableau { overflow-x: auto; border-radius: var(--rayon-moyen); box-shadow: inset 0 0 0 1px var(--bordure); }
.ou-tableau table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums lining-nums; }
.ou-tableau caption { padding: 12px 14px 4px; text-align: left; font-weight: 800; color: var(--titre); }
.ou-tableau th, .ou-tableau td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--bordure); }
.ou-tableau th:first-child, .ou-tableau td:first-child { text-align: left; }
.ou-tableau thead th { background: var(--surface); color: var(--titre); font-weight: 800; }
.ou-tableau tbody tr:last-child td { border-bottom: 0; }
.ou-tableau .actif td { background: var(--lime); font-weight: 800; color: var(--titre); }

.ou-pastille { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.ou-bleu { background: #2F5DA8; }
.ou-jaune { background: #F2C230; }
.ou-violet { background: #7B4FA0; }
.ou-rose { background: #E58BA6; }

.ou-note { font-size: 16px; color: var(--texte-secondaire); }
.ou-hypotheses { padding-left: 20px; font-size: 16px; color: var(--texte-secondaire); }
.ou-hypotheses li + li { margin-top: 6px; }

@media (min-width: 560px) {
  .ou-lignes { grid-template-columns: 1fr auto; column-gap: 16px; }
  .ou-lignes dt { padding-block: 14px; box-shadow: 0 1px 0 var(--bordure); }
  .ou-lignes dd { padding-block: 14px; text-align: right; align-self: stretch; }
  .ou-lignes dt:last-of-type { box-shadow: none; }
}

@media (min-width: 48em) {
  .outil { padding-block: var(--e7); }
  .ou-carte { padding: 32px 36px; }
  .ou-grille.deux { grid-template-columns: 1fr 1fr; }
}

.ou-reassurance { text-align: center; font-size: 15.5px; color: var(--sombre-reassurance); }
.prose .ou-reassurance { margin-inline: auto; }
.ou-legende { margin-bottom: var(--e2); font-weight: 800; color: var(--titre); }
