/* ============================================================================
   GOLFE WATT — Formulaire de devis.
   Feuille commune à la page Contact et aux 4 pages de vente.
   Le formulaire du simulateur n'utilise PAS ces classes : il reste intact.
   ========================================================================== */

.gw-form {
  background: var(--fond-carte);
  border: 1px solid var(--bord-carte);
  border-radius: 16px;
  box-shadow: var(--ombre-carte);
  padding: 32px;
  max-width: 720px;
  color: var(--texte);
}
@media (max-width: 720px) { .gw-form { padding: 20px; } }

/* ---------- En-tête ---------- */
.gw-form__titre { font-family: var(--font-titre); font-size: 26px; font-weight: 800;
  line-height: 1.2; color: var(--texte); margin: 0 0 6px; }
.gw-form__sous { font-size: 16px; color: var(--texte-secondaire); margin: 0 0 16px; }

.gw-form__coches { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px;
  padding: 0; margin: 0 0 20px; }
.gw-form__coches li { display: flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--texte-secondaire); }
.gw-form__coches li::before { content: ""; width: 15px; height: 15px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12l4 4 10-10' stroke='%231D4E89' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/15px no-repeat; }

.gw-form__oblig { font-size: 13px; color: var(--texte-secondaire); margin: 0 0 18px; }

/* ---------- Grille ---------- */
.gw-grille { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .gw-grille { grid-template-columns: 1fr 1fr; } }
.gw-champ--large { grid-column: 1 / -1; }

.gw-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gw-champ label { font-size: 14px; font-weight: 600; color: var(--texte); }
.gw-champ .req { color: #b3261e; }

.gw-champ input, .gw-champ select, .gw-champ textarea {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid #C8D4E5; border-radius: 10px; background: #FBFDFF;
  font-family: var(--font-corps); font-size: 16px; color: var(--texte);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gw-champ textarea { height: auto; min-height: 112px; padding: 12px 14px;
  line-height: 1.5; resize: vertical; }
.gw-champ input::placeholder, .gw-champ textarea::placeholder { color: #8A9AB3; }

.gw-champ input:focus, .gw-champ select:focus, .gw-champ textarea:focus {
  outline: none; border-color: #1D4E89; box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.2);
}

/* liste déroulante : flèche dessinée, pas celle du système */
.gw-champ select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%234A5B75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 18px; }

/* ---------- Erreurs ---------- */
.gw-champ.en-erreur input, .gw-champ.en-erreur select, .gw-champ.en-erreur textarea {
  border-color: #b3261e; background: #fff7f6;
}
.gw-champ.en-erreur input:focus, .gw-champ.en-erreur select:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.18);
}
.gw-err { font-size: 13px; color: #b3261e; margin: 0; min-height: 0; }
.gw-err:empty { display: none; }

/* ---------- Précisions conditionnelles ---------- */
.gw-precisions { grid-column: 1 / -1; border: 1px solid var(--bord-carte);
  background: var(--fond-section-alt); border-radius: 12px; padding: 20px; margin: 4px 0 0; }
/* Un <legend> se place par défaut à cheval sur la bordure et déborde en
   mobile : on le remet dans le flux, identique sur tous les navigateurs. */
.gw-precisions legend { float: left; width: 100%; padding: 0; margin: 0 0 4px;
  font-family: var(--font-titre); font-size: 16px; font-weight: 700; color: var(--texte); }
.gw-precisions::after { content: ""; display: table; clear: both; }
.gw-precisions__q { font-size: 14px; font-weight: 600; color: var(--texte); margin: 14px 0 8px; }
.gw-precisions__q:first-of-type { margin-top: 10px; }

.gw-pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-pastilles button { min-height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #C8D4E5; background: var(--fond-carte); color: var(--texte);
  font-family: var(--font-titre); font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease; }
.gw-pastilles button:hover { border-color: #1D4E89; }
.gw-pastilles button:focus-visible { outline: none;
  box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.2); border-color: #1D4E89; }
.gw-pastilles button[aria-pressed="true"] { background: var(--marine); border-color: var(--marine);
  color: #fff; }

/* ---------- Consentement ---------- */
.gw-consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 11px;
  font-size: 15px; line-height: 1.45; color: var(--texte); cursor: pointer; margin-top: 4px; }
.gw-consent input { width: 20px; height: 20px; flex-shrink: 0; margin: 1px 0 0;
  accent-color: var(--marine); cursor: pointer; }
.gw-consent.en-erreur { color: #b3261e; }

/* ---------- Envoi ---------- */
.gw-envoi { grid-column: 1 / -1; width: 100%; height: 56px; margin-top: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ambre); color: var(--marine); border: none; border-radius: 12px;
  font-family: var(--font-titre); font-weight: 700; font-size: 17px; cursor: pointer;
  transition: background .18s ease; }
.gw-envoi:hover:not(:disabled) { background: var(--ambre-fonce); }
.gw-envoi:disabled { opacity: .72; cursor: progress; }
.gw-envoi__rond { width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(11, 37, 69, .3); border-top-color: var(--marine);
  animation: gw-tourne .7s linear infinite; }
@keyframes gw-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gw-envoi__rond { animation-duration: 2s; } }

.gw-form__prive { grid-column: 1 / -1; font-size: 13px; line-height: 1.45;
  color: var(--texte-secondaire); margin: 12px 0 0; }

/* Résumé d'erreurs annoncé aux lecteurs d'écran */
.gw-resume { grid-column: 1 / -1; font-size: 14px; color: #b3261e; font-weight: 600; margin: 0; }
.gw-resume:empty { display: none; }
