/* ═══════════════════════════════════════════════════════════════
   Page Contact
   ═══════════════════════════════════════════════════════════════ */

/* Bouton secondaire du haut de page (si rempli) */
.contact-btn-ghost:hover {
  background: rgba(255,255,255,.1) !important;
  border-color: #fff !important;
}

/* ── Formulaire : en-tête ───────────────────────────────────────── */
.contact-form-col { min-width: 0; }

.contact-form-title {
  font-size: 32px;
  font-weight: 800;
  color: #141414;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}

.contact-intro {
  font-size: 17px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 10px;
}
.contact-required-note {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 0 0 36px;
}
.contact-intro:last-child { margin-bottom: 36px; }

/* ── Message d'échec (?envoi=erreur) ─────────────────────────────── */
.contact-alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fdecec;
  border: 1.5px solid #e30713;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 0 0 32px;
  color: #b0050f;
  outline: none;
}
.contact-alert__icon { flex-shrink: 0; margin-top: 1px; }
.contact-alert__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #141414;
  font-weight: 600;
}

/* ── Étapes ─────────────────────────────────────────────────────── */
.contact-form { position: relative; }

.contact-step {
  border: 0;
  margin: 0 0 36px;
  padding: 0;
  min-width: 0;
}

.contact-step__legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  margin: 0 0 20px;
  width: 100%;
}
.contact-step__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #141414;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  transition: background .25s;
}
.contact-step__title {
  font-size: 20px;
  font-weight: 800;
  color: #141414;
  letter-spacing: -.01em;
}
/* Étape complète (ajouté par contact.js) : pastille rouge + coche */
.contact-step.is-complete .contact-step__num {
  background: #e30713;
  font-size: 0;
}
.contact-step.is-complete .contact-step__num::before {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: translateY(-2px) rotate(-45deg);
}

/* Contenu de l'étape : léger filet vertical pour lier les champs à leur numéro */
.contact-step > :not(legend) {
  margin-left: 50px;
}

/* ── Champs ─────────────────────────────────────────────────────── */
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.contact-group { margin: 0 0 20px; min-width: 0; }
.contact-step > .contact-group:last-child,
.contact-step > .contact-help:last-child { margin-bottom: 0; }

.contact-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #141414;
  margin: 0 0 8px;
  padding: 0;
}
.contact-optional {
  font-weight: 400;
  color: #666;
  font-size: 14px;
}

.contact-field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1.5px solid #8f8f8f;
  border-radius: 8px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: #141414;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.contact-field::placeholder { color: #666; opacity: 1; }
.contact-field:hover { border-color: #141414; }
.contact-field:focus {
  border-color: #e30713;
  box-shadow: 0 0 0 3px rgba(227,7,19,.16);
}
.contact-field--area {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}

/* Erreur (classe posée par contact.js) */
.contact-field.is-invalid {
  border-color: #c4060f;
  background: #fffafa;
}
.contact-field.is-invalid:focus { box-shadow: 0 0 0 3px rgba(196,6,15,.18); }

.contact-error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: #c4060f;
}
.contact-error::before {
  content: "!";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 50%;
  background: #c4060f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.contact-help {
  font-size: 14px;
  line-height: 1.5;
  color: #595959;
  margin: 0 0 20px;
}
.contact-under {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 8px;
}
.contact-under .contact-help { margin: 0; }
.contact-counter {
  flex-shrink: 0;
  margin: 0 0 0 auto;
  font-size: 14px;
  color: #595959;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.contact-counter.is-near { color: #c4060f; font-weight: 700; }

/* ── Type de projet : cartes radio ──────────────────────────────── */
.contact-choices {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  min-width: 0;
}
.contact-choices__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.contact-choice {
  position: relative;
  display: block;
  cursor: pointer;
}
/* Bouton radio natif conservé (clavier, lecteurs d'écran), rendu invisible */
.contact-choice__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.contact-choice__box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  height: 100%;
  box-sizing: border-box;
  padding: 16px 16px 15px;
  background: #fff;
  border: 1.5px solid #8f8f8f;
  border-radius: 8px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.contact-choice__mark {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid #8f8f8f;
  border-radius: 50%;
  box-sizing: border-box;
  background: #fff;
  transition: border-color .2s;
}
.contact-choice__mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #e30713;
  transform: scale(0);
  transition: transform .15s;
}
.contact-choice__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-choice__title {
  font-size: 16px;
  font-weight: 700;
  color: #141414;
  line-height: 1.3;
}
.contact-choice__desc {
  font-size: 14px;
  color: #595959;
  line-height: 1.4;
}

.contact-choice:hover .contact-choice__box { border-color: #141414; }
.contact-choice__input:focus-visible + .contact-choice__box {
  border-color: #e30713;
  box-shadow: 0 0 0 3px rgba(227,7,19,.2);
}
.contact-choice__input:checked + .contact-choice__box {
  border-color: #e30713;
  background: #fff5f5;
  box-shadow: inset 0 0 0 1px #e30713;
}
.contact-choice__input:checked + .contact-choice__box .contact-choice__mark { border-color: #e30713; }
.contact-choice__input:checked + .contact-choice__box .contact-choice__mark::after { transform: scale(1); }

.contact-choices.is-invalid .contact-choice__box { border-color: #c4060f; }

/* ── Envoi ──────────────────────────────────────────────────────── */
.contact-submit-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding-top: 28px;
  border-top: 1px solid #e2e2e2;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  background: #e30713;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 15px 30px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.contact-submit:hover { background: #b8050f; }
.contact-submit:hover .contact-submit__arrow { transform: translateX(3px); }
.contact-submit:focus-visible {
  outline: 3px solid #141414;
  outline-offset: 3px;
}
.contact-submit__arrow { transition: transform .2s; }
.contact-submit__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: contact-spin .7s linear infinite;
}
.contact-submit.is-sending {
  background: #8f0610;
  cursor: progress;
}
.contact-submit.is-sending .contact-submit__arrow { display: none; }
.contact-submit.is-sending .contact-submit__spinner { display: inline-block; }
@keyframes contact-spin { to { transform: rotate(360deg); } }

.contact-small {
  font-size: 14px;
  line-height: 1.55;
  color: #666;
  margin: 0;
}
.contact-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
}
.contact-notes a {
  color: #c4060f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-notes a:hover { color: #141414; }
.contact-small--rgpd {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.contact-small--rgpd svg { flex-shrink: 0; margin-top: 2px; }

/* Texte réservé aux lecteurs d'écran */
.contact-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Confirmation (?envoi=ok) ───────────────────────────────────── */
.contact-done {
  background: #f6f6f6;
  border-radius: 8px;
  padding: 56px 40px;
  text-align: center;
  outline: none;
}
.contact-done__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e30713;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.contact-done__title {
  font-size: 26px;
  font-weight: 800;
  color: #141414;
  letter-spacing: -.02em;
  margin: 0 0 12px;
}
.contact-done__text {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  margin: 0 auto 28px;
  max-width: 420px;
}
.contact-btn-again {
  display: inline-block;
  background: #fff;
  border: 1.5px solid #141414;
  border-radius: 8px;
  color: #141414;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 26px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.contact-btn-again:hover { background: #141414; color: #fff; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .contact-form-title { font-size: 26px; }
  .contact-intro { font-size: 16px; }
  .contact-required-note { margin-bottom: 28px; }
  .contact-row { grid-template-columns: 1fr; }
  .contact-step > :not(legend) { margin-left: 0; }
  .contact-step__title { font-size: 19px; }
  .contact-choices__grid { grid-template-columns: 1fr; gap: 10px; }
  .contact-choice__box { padding: 14px; }
  .contact-under { flex-direction: column; gap: 4px; }
  .contact-counter { margin-left: 0; }
  .contact-submit { width: 100%; }
  .contact-done { padding: 40px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-submit__spinner { animation-duration: 2s; }
  .contact-field, .contact-choice__box, .contact-choice__mark::after { transition: none; }
}

/* Section sous-traitants : marges réduites sur mobile (comme les autres sections) */
@media (max-width: 860px) {
  #contact-sous-traitant { padding-top: 44px !important; padding-bottom: 52px !important; }
}
