

.form-group,
.est-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.form-label,
.est-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-text-secondary);
}
.form-help,
.est-hint {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

input,
select,
textarea,
.est-input,
.est-select,
.est-textarea {
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-input-bg);
  border: var(--border-thin) solid var(--c-input-border);
  border-radius: var(--r-md);
  padding: 0 var(--sp-4);
  height: var(--input-h);
  width: 100%;
  transition: border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
textarea,
.est-textarea {
  height: auto;
  min-height: 140px;
  padding: var(--sp-3) var(--sp-4);
  resize: vertical;
  line-height: var(--lh-normal);
}
input:focus,
select:focus,
textarea:focus,
.est-input:focus,
.est-select:focus,
.est-textarea:focus {
  border-color: var(--c-input-focus);
  box-shadow: var(--shadow-glow);
}
input::placeholder,
textarea::placeholder,
.est-input::placeholder,
.est-textarea::placeholder {
  color: var(--c-text-muted);
}

input[type="file"] { padding: var(--sp-2); }
input[type="checkbox"], input[type="radio"] {
  width: auto;
  height: auto;
  min-width: 20px;
  min-height: 20px;
  accent-color: var(--c-brand);
  margin: 0;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: var(--lh-normal);
  cursor: pointer;
  padding: var(--sp-2) 0;
}
.checkbox input { margin-top: 2px; flex-shrink: 0; }
/* Le texte (et ses liens éventuels) reste un seul bloc qui s'enroule
   normalement - sans ce span, les mots/liens deviennent chacun un item
   flex séparé et se dispersent sur la ligne (bug constaté 2026-07-13). */
.checkbox > span { display: block; }

/* Lien mis en évidence dans un bloc de texte (ex. case CGU) : couleur de
   marque + soulignement pour se distinguer du texte gris environnant,
   au lieu de compter uniquement sur la couleur (RGAA 3.3/10.13). Contrastes
   vérifiés : #5C2E88 sur blanc = 9.54:1, sur --c-brand-tint = 8.06:1 (AA
   texte normal ≥ 4.5:1, largement conforme). */
.link-emphasis {
  color: var(--c-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: var(--fw-medium);
}
.link-emphasis:hover,
.link-emphasis:focus-visible {
  color: var(--c-brand-darker);
}

.hint {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  font-weight: var(--fw-normal);
}

.form-row,
.est-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-4);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4);
  align-items: end;
}

.form-full {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0 var(--sp-4);
}
.checkbox-grid .checkbox {
  padding: var(--sp-1) 0;
}

.hp-field {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form {
  background: var(--c-card-bg);
  border: var(--border-thin) solid var(--c-card-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.contact-form h3 {
  margin-bottom: 0;
  font-size: var(--fs-md);
}
.form-legal {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

/* ── Suggestions d'autocomplétion (villes/adresses) ─────────────
   Liste absolue ancrée sous un champ (le parent est mis en
   position:relative par le JS). Utilisée par la recherche rapide de
   l'accueil (#hero-ville), le filtre de la page recherche (#filt-ville)
   et le module estimation de l'accueil (#estim-adresse) - global.js et
   accueil.js. Anciennement dans pages/accueil.css, déplacée ici car la
   page recherche ne charge pas cette feuille. */
.hero-suggestions,
.est-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--c-card-bg);
  border: var(--border-thin) solid var(--c-card-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: var(--sp-2) 0;
  text-align: left;
}
.hero-suggestion-item {
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
  font-size: var(--fs-base);
  color: var(--c-brand-darker);
  transition: background var(--t-fast);
}
.hero-suggestion-item:hover,
.hero-suggestion-item[aria-selected="true"] {
  background: var(--c-brand-tint);
}

/* ── Affichage/masquage du mot de passe (toggle-password.js) ── */
.pwd-toggle-wrap {
  position: relative;
  display: flex;
}
.pwd-toggle-wrap input[type="password"],
.pwd-toggle-wrap input[type="text"] {
  flex: 1;
  padding-right: calc(var(--sp-5) + 28px);
}
.pwd-toggle-btn {
  position: absolute;
  top: 50%;
  right: var(--sp-2);
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--c-text-secondary);
  cursor: pointer;
  border-radius: var(--r-sm, 6px);
}
.pwd-toggle-btn svg { width: 18px; height: 18px; }
.pwd-toggle-btn:hover { color: var(--c-brand); }
.pwd-toggle-btn:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 1px;
}
