/* GREN ECO — Questionnaire Pub TV : style flat (couleurs reprises du kit Elementor du site) */
#geqtv-root {
  --qtv-navy: #28456b;
  --qtv-navy-dark: #1d3554;
  --qtv-green: #3eaa34;
  --qtv-ink: #1b2733;
  --qtv-muted: #64707d;
  --qtv-line: #dde3ea;
  --qtv-line-strong: #9aa8b8;
  --qtv-soft: #f3f6fa;
  --qtv-error: #c62828;
  font-family: "Montserrat", "Poppins", Arial, sans-serif;
  color: var(--qtv-ink);
}

#geqtv-root[hidden] { display: none !important; }
html.geqtv-open, html.geqtv-open body { overflow: hidden; }

#geqtv-root *, #geqtv-root *::before, #geqtv-root *::after { box-sizing: border-box; }

.geqtv-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* au-dessus de tout le site, sauf le bandeau cookies (voir en bas) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  animation: geqtv-fade 0.15s ease-out;
}

.geqtv-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
}

/* Barre de progression collée en haut de la carte */
.geqtv-progress { height: 3px; background: var(--qtv-line); }
.geqtv-progress span {
  display: block;
  height: 100%;
  width: 6%;
  background: var(--qtv-green);
  transition: width 0.25s ease;
}

.geqtv-header { padding: 26px 64px 0 28px; }

.geqtv-lead {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--qtv-navy);
}

#geqtv-root .geqtv-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--qtv-muted);
  font-size: 26px;
  line-height: 36px;
  cursor: pointer;
}
#geqtv-root .geqtv-close:hover, #geqtv-root .geqtv-close:focus-visible { background: var(--qtv-soft); color: var(--qtv-ink); }

.geqtv-body { padding: 20px 28px 28px; }

.geqtv-counter {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qtv-muted);
}

#geqtv-root .geqtv-title {
  margin: 0 0 4px;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--qtv-ink);
}

.geqtv-hint { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: var(--qtv-muted); }

/* Réponses : lignes de liste avec rond (choix unique) ou case (choix multiple) */
.geqtv-choices { display: grid; gap: 8px; margin-top: 14px; }
.geqtv-choices--grid { grid-template-columns: 1fr 1fr; }

#geqtv-root .geqtv-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--qtv-line);
  border-radius: 6px;
  background: #fff;
  color: var(--qtv-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}
#geqtv-root .geqtv-choice::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--qtv-line-strong);
  border-radius: 50%;
  background: #fff;
}
#geqtv-root .geqtv-choices--grid .geqtv-choice::before { border-radius: 3px; }
#geqtv-root .geqtv-choice:hover { border-color: var(--qtv-line-strong); background: var(--qtv-soft); }
#geqtv-root .geqtv-choice:focus-visible { outline: 2px solid var(--qtv-navy); outline-offset: 1px; }
#geqtv-root .geqtv-choice.is-selected { border-color: var(--qtv-navy); background: var(--qtv-soft); }
#geqtv-root .geqtv-choice.is-selected::before {
  border-color: var(--qtv-navy);
  background: var(--qtv-navy);
  box-shadow: inset 0 0 0 3px #fff;
}
#geqtv-root .geqtv-choices--grid .geqtv-choice.is-selected::before {
  box-shadow: none;
  background: var(--qtv-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Bouton principal */
#geqtv-root .geqtv-cta {
  display: block;
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  padding: 13px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--qtv-navy);
  color: #fff;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.12s;
}
#geqtv-root .geqtv-cta:hover { background: var(--qtv-navy-dark); }
#geqtv-root .geqtv-cta:disabled { background: #c5cdd6; cursor: not-allowed; }
#geqtv-root .geqtv-cta:focus-visible { outline: 2px solid var(--qtv-green); outline-offset: 2px; }
#geqtv-root a.geqtv-cta--link { text-align: center; text-decoration: none; line-height: 24px; }

/* Retour / Ignorer */
.geqtv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--qtv-line);
}
#geqtv-root .geqtv-back,
#geqtv-root .geqtv-skip {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--qtv-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}
#geqtv-root .geqtv-skip { margin-left: auto; color: var(--qtv-navy); font-weight: 600; }
#geqtv-root .geqtv-back:hover, #geqtv-root .geqtv-skip:hover { color: var(--qtv-ink); text-decoration: underline; }

/* Groupes de pastilles (logement, foyer) */
.geqtv-group { margin-bottom: 16px; }
#geqtv-root .geqtv-group-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--qtv-ink);
}
.geqtv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#geqtv-root .geqtv-chip {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--qtv-line);
  border-radius: 6px;
  background: #fff;
  color: var(--qtv-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}
#geqtv-root .geqtv-chip:hover { border-color: var(--qtv-line-strong); background: var(--qtv-soft); }
#geqtv-root .geqtv-chip:focus-visible { outline: 2px solid var(--qtv-navy); outline-offset: 1px; }
#geqtv-root .geqtv-chip.is-selected { border-color: var(--qtv-navy); background: var(--qtv-navy); color: #fff; }

/* Mini-étude */
.geqtv-study {
  margin: 14px 0 18px;
  border: 1px solid var(--qtv-line);
  border-radius: 8px;
  overflow: hidden;
}
.geqtv-kpis { display: grid; grid-template-columns: 1fr 1fr; }
.geqtv-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--qtv-soft);
  color: var(--qtv-ink);
}
.geqtv-kpi--main { background: var(--qtv-navy); color: #fff; }
.geqtv-kpi-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.geqtv-kpi .geqtv-amount { font-family: "Poppins", Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 1.2; }
.geqtv-kpi-unit { font-size: 12px; opacity: 0.8; }

.geqtv-study-sub {
  margin: 0;
  padding: 10px 16px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qtv-muted);
}
#geqtv-root .geqtv-study-list { margin: 0; padding: 0; list-style: none; }
#geqtv-root .geqtv-study-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--qtv-line);
}
.geqtv-study-name { font-size: 14px; font-weight: 500; color: var(--qtv-ink); }
.geqtv-study-name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--qtv-muted); }
.geqtv-study-list .geqtv-amount { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--qtv-navy); white-space: nowrap; }

.geqtv-study.is-locked .geqtv-amount { filter: blur(7px); user-select: none; }
.geqtv-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--qtv-line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--qtv-navy);
}
.geqtv-lock-icon { font-size: 15px; }
.geqtv-disclaimer {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--qtv-line);
  font-size: 11px;
  line-height: 1.5;
  color: var(--qtv-muted);
}

/* Champs de saisie */
.geqtv-form { margin-top: 14px; }
.geqtv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.geqtv-field { margin-bottom: 14px; }
.geqtv-field[hidden] { display: none; }

#geqtv-root .geqtv-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--qtv-ink);
}

#geqtv-root .geqtv-field input,
#geqtv-root .geqtv-field select {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--qtv-line);
  border-radius: 6px;
  background: #fff;
  color: var(--qtv-ink);
  font: inherit;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  box-shadow: none;
}
#geqtv-root .geqtv-field input:focus,
#geqtv-root .geqtv-field select:focus {
  border-color: var(--qtv-navy);
  outline: none;
  box-shadow: inset 0 0 0 1px var(--qtv-navy);
}

#geqtv-root .geqtv-consent {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--qtv-muted);
}
#geqtv-root .geqtv-consent input { width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -3px; accent-color: var(--qtv-navy); }
#geqtv-root .geqtv-consent a { color: var(--qtv-navy); }

.geqtv-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--qtv-green);
  background: var(--qtv-soft);
  font-size: 13px;
  line-height: 1.45;
  color: var(--qtv-ink);
}
.geqtv-note a { color: var(--qtv-navy); font-weight: 600; }

.geqtv-error { min-height: 1em; margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--qtv-error); }
.geqtv-error:empty { margin: 0; min-height: 0; }

.geqtv-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* Écrans de fin (merci, locataire) */
.geqtv-thanks { text-align: center; }
.geqtv-thanks p { margin: 8px 0; font-size: 15px; line-height: 1.55; color: var(--qtv-ink); }
.geqtv-thanks .geqtv-hint { font-size: 13px; color: var(--qtv-muted); }
.geqtv-check {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--qtv-green);
  color: #fff;
  font-size: 24px;
  line-height: 48px;
}

/* Mobile : la carte reste centrée, avec une marge autour */
@media (max-width: 600px) {
  .geqtv-overlay { padding: 10px; }
  .geqtv-dialog {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  .geqtv-header { padding: 20px 56px 0 18px; }
  .geqtv-lead { font-size: 18px; }
  #geqtv-root .geqtv-close { top: 10px; right: 10px; }
  .geqtv-body { padding: 16px 18px 20px; }
  #geqtv-root .geqtv-title { font-size: 16px; }
  #geqtv-root .geqtv-choice { min-height: 48px; font-size: 15px; }
  .geqtv-choices--grid { gap: 6px; }
  #geqtv-root .geqtv-choices--grid .geqtv-choice { gap: 8px; padding: 10px; font-size: 13px; line-height: 1.25; }
}

@media (max-width: 360px) {
  .geqtv-row { grid-template-columns: 1fr; gap: 0; }
  .geqtv-choices--grid { grid-template-columns: 1fr; }
}

@keyframes geqtv-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .geqtv-overlay { animation: none; }
  .geqtv-progress span { transition: none; }
}

/* Adresse : suggestions sous le champ */
.geqtv-suggest-wrap { position: relative; }
/* Dans le flux (et non en surimpression) : la fenêtre s'agrandit au lieu de couper la liste. */
#geqtv-root .geqtv-suggest {
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--qtv-line);
  border-radius: 6px;
  max-height: 260px;
  overflow-y: auto;
}
#geqtv-root .geqtv-suggest[hidden] { display: none; }
#geqtv-root .geqtv-suggest li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.3;
}
#geqtv-root .geqtv-suggest li span { color: var(--qtv-muted); font-size: 13px; }
#geqtv-root .geqtv-suggest li:hover,
#geqtv-root .geqtv-suggest li.is-active { background: var(--qtv-soft); }

/* Toit : carte satellite */
#geqtv-root .geqtv-map {
  height: 260px;
  margin-bottom: 8px;
  border: 1px solid var(--qtv-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--qtv-soft);
}
#geqtv-root .geqtv-map[hidden] { display: none; }
/* Le thème réduit les images à 100 % de leur conteneur : ça casse les tuiles de la carte. */
#geqtv-root .geqtv-map img { max-width: none !important; max-height: none !important; transition: none !important; }
#geqtv-root .geqtv-map .leaflet-control-zoom a { color: var(--qtv-ink); text-decoration: none; }
#geqtv-root .geqtv-pin {
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--qtv-green);
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* « Analyse en cours… » */
#geqtv-root .geqtv-analysis {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 16px;
  border: 1px solid var(--qtv-line);
  border-radius: 8px;
  background: var(--qtv-soft);
}
#geqtv-root .geqtv-spinner {
  flex: none;
  width: 26px;
  height: 26px;
  border: 3px solid var(--qtv-line);
  border-top-color: var(--qtv-green);
  border-radius: 50%;
  animation: geqtv-spin .8s linear infinite;
}
@keyframes geqtv-spin { to { transform: rotate(360deg); } }
#geqtv-root .geqtv-analysis-list { margin: 0; padding: 0; list-style: none; }
#geqtv-root .geqtv-analysis-list li {
  position: relative;
  padding: 3px 0 3px 24px;
  color: var(--qtv-muted);
  font-size: 14px;
}
#geqtv-root .geqtv-analysis-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--qtv-line-strong);
  border-radius: 50%;
}
#geqtv-root .geqtv-analysis-list li.is-done { color: var(--qtv-ink); }
#geqtv-root .geqtv-analysis-list li.is-done::before {
  border-color: var(--qtv-green);
  background: var(--qtv-green);
}
@media (prefers-reduced-motion: reduce) { #geqtv-root .geqtv-spinner { animation-duration: 2.4s; } }
@media (max-width: 600px) { #geqtv-root .geqtv-map { height: 230px; } }

/* Boutons de l'en-tête (modèle Elementor 19), sur toutes les pages : « J'estime mon projet » (widget a8e50f1)
   en vert GREN ECO, et le bouton téléphone (bfe0cda) dans le même vert au survol.
   Classes doublées pour passer devant le style Elementor. */
.elementor-element.elementor-element-a8e50f1 .elementor-button.elementor-button-link.elementor-size-sm {
  background-color: #3eaa34;
  border-color: #3eaa34;
  color: #fff;
}
.elementor-element.elementor-element-a8e50f1 .elementor-button.elementor-button-link.elementor-size-sm:hover,
.elementor-element.elementor-element-a8e50f1 .elementor-button.elementor-button-link.elementor-size-sm:focus {
  background-color: #34922c;
  border-color: #34922c;
  color: #fff;
}
.elementor-element.elementor-element-bfe0cda .elementor-button.elementor-button-link.elementor-size-sm:hover,
.elementor-element.elementor-element-bfe0cda .elementor-button.elementor-button-link.elementor-size-sm:focus {
  background-color: #3eaa34;
  border-color: #3eaa34;
  color: #fff;
}
.elementor-element.elementor-element-bfe0cda .elementor-button.elementor-button-link.elementor-size-sm:hover svg,
.elementor-element.elementor-element-bfe0cda .elementor-button.elementor-button-link.elementor-size-sm:focus svg {
  fill: #fff;
}

/* Le questionnaire s'ouvre dès l'arrivée : le bandeau cookies (Complianz) reste au-dessus et cliquable. */
.cmplz-cookiebanner.cmplz-show {
  z-index: 2147483100 !important;
}
