/* HT Diags — Simulateur DPE 2027 / identité visuelle de la page DPE */
.htdpe {
  --htdpe-navy: #0f172a;
  --htdpe-green: #11B981;
  --htdpe-green-dark: #0d9668;
  --htdpe-yellow: #FFCD05;
  --htdpe-ink: #334155;
  --htdpe-muted: #64748b;
  --htdpe-line: #e2e8f0;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  overflow: hidden;
  color: var(--htdpe-ink);
  background: #fff;
  border: 1px solid var(--htdpe-line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .09);
  font-family: Roboto, Arial, sans-serif;
  text-align: left;
}
.htdpe,
.htdpe * { box-sizing: border-box; }
.htdpe [hidden] { display: none !important; }

.htdpe .htdpe-header {
  position: relative;
  padding: clamp(26px, 4.5vw, 42px);
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(17, 185, 129, .23), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #142b3c 100%);
}
.htdpe .htdpe-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--htdpe-green);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}
.htdpe .htdpe-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--htdpe-green);
  box-shadow: 0 0 0 4px rgba(17, 185, 129, .14);
}
.htdpe .htdpe-free {
  margin-left: 5px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
}
.htdpe .htdpe-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}
.htdpe .htdpe-head-copy { min-width: 0; }
.htdpe .htdpe-header h2 {
  max-width: 650px;
  margin: 0 0 12px !important;
  color: #fff !important;
  font-family: Montserrat, Arial, sans-serif !important;
  font-size: clamp(25px, 3.2vw, 36px) !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
  letter-spacing: -.035em;
}
.htdpe .htdpe-header p {
  max-width: 620px;
  margin: 0 !important;
  color: #cbd5e1 !important;
  font-family: Roboto, Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 400;
  line-height: 1.7 !important;
}
.htdpe .htdpe-coef {
  min-width: 158px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  text-align: center;
}
.htdpe .htdpe-coef > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--htdpe-yellow);
  font-family: Montserrat, Arial, sans-serif;
}
.htdpe .htdpe-coef strong {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}
.htdpe .htdpe-coef span { color: var(--htdpe-green); font-size: 21px; }
.htdpe .htdpe-coef small {
  display: block;
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 11px;
}

.htdpe .htdpe-content { padding: clamp(20px, 4vw, 34px); }
.htdpe .htdpe-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid #dbeee6;
  border-radius: 13px;
  background: #f0fdf7;
}
.htdpe .htdpe-info-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d1fae5;
  color: #087c57;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}
.htdpe .htdpe-intro p {
  margin: 0 !important;
  color: #365447;
  font-size: 13px;
  line-height: 1.65;
}
.htdpe .htdpe-intro strong { color: var(--htdpe-navy); }

.htdpe .htdpe-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.htdpe .htdpe-field {
  display: block;
  min-width: 0;
  margin: 0;
  color: var(--htdpe-navy);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.htdpe input,
.htdpe select {
  display: block;
  width: 100%;
  height: 49px;
  margin: 8px 0 0;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--htdpe-navy);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  font-family: Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.htdpe input::placeholder { color: #94a3b8; opacity: 1; }
.htdpe input:focus,
.htdpe select:focus {
  border-color: var(--htdpe-green);
  box-shadow: 0 0 0 3px rgba(17, 185, 129, .15);
}
.htdpe .htdpe-mix {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}
.htdpe .htdpe-mix small {
  display: block;
  margin-top: 7px;
  color: var(--htdpe-muted);
  font-family: Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}
.htdpe .htdpe-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 3px;
}
.htdpe button {
  min-height: 48px;
  margin: 0;
  padding: 12px 19px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.htdpe button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: var(--htdpe-green);
  color: var(--htdpe-navy);
  box-shadow: 0 5px 14px rgba(17, 185, 129, .18);
}
.htdpe button[type="submit"]:hover {
  transform: translateY(-1px);
  background: #0fa875;
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 185, 129, .22);
}
.htdpe button[type="submit"] span { font-size: 17px; }
.htdpe .htdpe-reset {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
}
.htdpe .htdpe-reset:hover { background: #f8fafc; border-color: #94a3b8; }
.htdpe button:focus-visible,
.htdpe a:focus-visible {
  outline: 3px solid rgba(255, 205, 5, .85);
  outline-offset: 3px;
}
.htdpe .htdpe-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.htdpe .htdpe-result {
  margin: 26px 0 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--htdpe-line);
  border-radius: 17px;
  background: #f8fafc;
}
.htdpe .htdpe-result h3 {
  margin: 0 0 17px !important;
  color: var(--htdpe-navy) !important;
  font-family: Montserrat, Arial, sans-serif !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}
.htdpe .htdpe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.htdpe .htdpe-grid > div {
  min-width: 0;
  padding: 17px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
}
.htdpe .htdpe-grid > div > strong {
  display: block;
  margin: 0 0 7px;
  color: #475569;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
}
.htdpe .htdpe-letter {
  margin: 7px 0;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
}
.htdpe .htdpe-grid b {
  display: block;
  margin-top: 8px;
  color: var(--htdpe-navy);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 21px;
  font-weight: 800;
}
.htdpe .htdpe-grid small {
  display: block;
  margin-top: 2px;
  color: var(--htdpe-muted);
  font-size: 11px;
}
.htdpe .htdpe-bar {
  display: flex;
  align-items: center;
  height: 23px;
  margin: 5px 0;
  padding: 2px 9px;
  border-radius: 0 7px 7px 0;
  clip-path: polygon(0 0, 94% 0, 100% 50%, 94% 100%, 0 100%);
  color: #fff;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
}
.htdpe .htdpe-bar:nth-child(3),
.htdpe .htdpe-bar:nth-child(4),
.htdpe .htdpe-bar:nth-child(5) { color: #0f172a; }
.htdpe .htdpe-active {
  outline: 3px solid var(--htdpe-navy);
  outline-offset: 2px;
}
.htdpe .htdpe-gain {
  margin: 16px 0 8px !important;
  padding: 13px 16px;
  border-left: 4px solid var(--htdpe-green);
  border-radius: 9px;
  background: #ecfdf5;
  color: #065f46 !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}
.htdpe .htdpe-result p {
  margin: 9px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}
.htdpe .htdpe-result > small {
  display: block;
  margin-top: 13px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}

.htdpe .htdpe-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 0;
  padding: 20px 22px;
  border: 0;
  border-radius: 15px;
  background: var(--htdpe-navy);
  color: #fff;
}
.htdpe .htdpe-contact-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--htdpe-green);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.htdpe .htdpe-contact h3 {
  margin: 0 0 4px !important;
  color: #fff !important;
  font-family: Montserrat, Arial, sans-serif !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}
.htdpe .htdpe-contact p {
  margin: 0 !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}
.htdpe .htdpe-contact-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.htdpe .htdpe-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 9px;
  color: #fff;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}
.htdpe .htdpe-contact a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); }
.htdpe .htdpe-contact .htdpe-quote {
  border-color: var(--htdpe-yellow);
  background: var(--htdpe-yellow);
  color: var(--htdpe-navy);
}
.htdpe .htdpe-contact .htdpe-quote:hover { background: #f3c400; border-color: #f3c400; }

.htdpe .htdpe-note {
  margin: 16px 2px 0 !important;
  color: #64748b !important;
  font-family: Roboto, Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 400;
  line-height: 1.65 !important;
}
.htdpe .htdpe-note a {
  color: #0d9668;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 680px) {
  .htdpe { border-radius: 18px; }
  .htdpe .htdpe-head-row { grid-template-columns: 1fr; gap: 18px; }
  .htdpe .htdpe-coef { justify-self: start; min-width: 145px; }
  .htdpe .htdpe-form,
  .htdpe .htdpe-grid { grid-template-columns: 1fr; }
  .htdpe .htdpe-mix,
  .htdpe .htdpe-actions,
  .htdpe .htdpe-error { grid-column: 1; }
  .htdpe .htdpe-actions { align-items: stretch; flex-direction: column; }
  .htdpe .htdpe-actions button { width: 100%; }
  .htdpe .htdpe-contact { align-items: flex-start; flex-direction: column; }
  .htdpe .htdpe-contact-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 420px) {
  .htdpe .htdpe-header { padding: 23px 20px; }
  .htdpe .htdpe-content { padding: 18px 15px; }
  .htdpe .htdpe-free { margin-left: 0; }
  .htdpe .htdpe-contact-actions { align-items: stretch; flex-direction: column; }
  .htdpe .htdpe-contact-actions a { width: 100%; }
}
