/* ══════════════════════════════════════════
   POPUP CONTACT & FORMULAIRES
   ══════════════════════════════════════════ */

/* Overlay */
.sj-popup-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.sj-popup-overlay.open {
  display: flex;
  animation: fadeOverlay .2s ease;
}
@keyframes fadeOverlay { from{opacity:0} to{opacity:1} }

/* Popup box */
.sj-popup {
  background: #fff;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:none;opacity:1} }

.sj-popup-header {
  padding: 1.4rem 1.6rem 1rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.sj-popup-title {
  font-size: 15px; font-weight: 700; color: var(--ink);
}
.sj-popup-close {
  width: 32px; height: 32px; background: var(--pale);
  border: none; cursor: pointer; font-size: 18px; color: var(--sub);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.sj-popup-close:hover { background: var(--line); }

.sj-popup-body { padding: 1.4rem 1.6rem 1.8rem; }

/* Formulaire */
.sj-form { display: flex; flex-direction: column; gap: 1rem; }
.sj-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sj-field { display: flex; flex-direction: column; gap: 5px; }
.sj-field label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--sub);
}
.sj-field input,
.sj-field select,
.sj-field textarea {
  border: 1px solid var(--line); padding: 10px 12px;
  font-size: 13px; font-family: var(--f); color: var(--ink);
  background: #fff; outline: none; border-radius: 0;
  transition: border-color .15s;
}
.sj-field input:focus,
.sj-field select:focus,
.sj-field textarea:focus { border-color: var(--ink); }
.sj-field textarea { resize: vertical; min-height: 90px; }
.sj-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* hCaptcha */
.sj-captcha { margin: .4rem 0; }
.sj-captcha-notice {
  font-size: 11px; color: var(--sub); padding: 8px 10px;
  background: var(--pale); border: 1px solid var(--line);
}

/* Submit */
.sj-submit {
  background: var(--ink); color: #fff;
  border: none; padding: 12px 24px;
  font-size: 13px; font-weight: 700; font-family: var(--f);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: opacity .15s; align-self: flex-start;
}
.sj-submit:hover { opacity: .84; }
.sj-submit.e { background: var(--e); }
.sj-submit.c { background: var(--c); }
.sj-submit.l { background: var(--l); }

/* Message succès */
.sj-success {
  display: none; text-align: center; padding: 2rem;
}
.sj-success-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.sj-success-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.sj-success-sub   { font-size: 13px; color: var(--sub); }

/* Bouton déclencheur popup */
.sj-popup-trigger { cursor: pointer; }

@media(max-width:600px) {
  .sj-form-row { grid-template-columns: 1fr; }
  .sj-popup { max-height: 95vh; }
}
