/* Contact modal – scoped to avoid side effects */

#contactModal .modal-dialog {
  /* Valeur par défaut (sera surclassée sur desktop) */
  --bs-modal-width: 560px;
}


/* IMPORTANT: connexion.css impose .auth-modal .modal-dialog { max-width: 470px !important; }
   On surclasse ici spécifiquement la modale de contact. Utilise un pourcentage souhaité sur desktop. */
@media (min-width: 576px) {
  #contactModal .modal-dialog {
    --bs-modal-width: 70%;
    width: 50% !important;
    max-width: 70% !important;
  }
}

/* Align contact modal icon with auth modal icon */
#contactModal .auth-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  margin-bottom: 1rem !important;
  background-color: rgba(58, 138, 61, 0.5) !important;
  border-radius: 14px !important;
  color: #2E8338 !important;
  font-size: 1.5rem !important;
}

#contactModal .modal-content {
  background: #F7FAF7;
  border: 1px solid var(--profile-border, #E5EBE5);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

#contactModal .modal-header {
  border: 0;
  padding: 0.5rem 0.25rem 0.5rem; /* align with auth-modal */
  display: block;
  text-align: left; /* title aligned left like auth-modal */
  position: relative;
}

#contactModal .modal-title {
  color: #2c3e2d; /* like auth-modal */
  font-weight: 700;
  font-size: 1.75rem; /* like auth-modal */
}

#contactModal .contact-subtitle {
  margin-top: .25rem;
  color: #566;
  font-size: .95rem;
}

#contactModal .btn-close {
  position: absolute;
  right: 1.25rem; /* like auth-modal */
  top: 1.25rem;  /* like auth-modal */
  width: 36px;
  height: 36px;
  background-color: #f5f5f5;
  border-radius: 50%;
  padding: 0.55rem;
  opacity: 0.9;
}

#contactModal .btn-close:hover,
#contactModal .btn-close:focus {
  opacity: 1;
  background-color: #e8efe8;
  outline: none;
  box-shadow: none;
}

#contactModal .modal-badge {
  position: absolute;
  left: .75rem;
  top: .75rem;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(58,138,61,.12);
  color: var(--secondary-color, #3A8A3D);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

#contactModal .modal-body {
  padding: 0rem 1.25rem .5rem;
}

#contactModal .form-label {
  color: #2c3e2d !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  margin-bottom: 0.5rem !important;
}

#contactModal .form-control {
  background-color: #ffffff !important;
  border: 1px solid #E0E4E0 !important;
  border-radius: 14px !important;
  min-height: 54px !important;
  padding: 0.85rem 1rem !important;
  color: #2c3e2d !important;
  font-size: 1rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

#contactModal .form-control:focus {
  border-color: #2E8338 !important;
  box-shadow: 0 0 0 0.2rem rgba(46, 131, 56, 0.25) !important;
  outline: none !important;
  background-color: #ffffff !important;
}

#contactModal textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

#contactModal .invalid-feedback {
  display: block;
  color: var(--secondary-color, #3A8A3D);
  font-size: .9rem;
}

/* Footer and buttons */
#contactModal .modal-footer {
  border: 0;
  padding: .5rem 1.25rem 1.25rem;
  gap: .5rem;
}

/* Support existing markup that uses .text-end instead of .modal-footer */
#contactModal .text-end {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1.25rem 1.25rem;
}

/* Primary (send) button styles */
#contactModal .btn-send,
#contactModal .btn-primary {
  flex: 1;
  background: var(--secondary-color, #3A8A3D);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: .85rem 1rem;
  font-weight: 600;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}

#contactModal .btn-send:hover,
#contactModal .btn-primary:hover {
  background: var(--secondary-hover, #2d6c2f);
  box-shadow: 0 8px 20px rgba(58,138,61,.18);
  transform: translateY(-1px);
}

/* Secondary (cancel) button styles */
#contactModal .btn-cancel,
#contactModal .btn-secondary {
  background: transparent;
  color: #65707a;
  border: 1px solid #d7dfe0;
  border-radius: 12px;
  padding: .85rem 1rem;
  font-weight: 500;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

#contactModal .btn-cancel:hover,
#contactModal .btn-secondary:hover {
  background: #eef3ef;
  color: #3b5140;
  border-color: #cfd8d9;
}

/* Space between stacked fields */
#contactModal .form-group + .form-group,
#contactModal .mb-3 + .mb-3 {
  margin-top: .75rem;
}

/* Dark theme */
body.dark-theme #contactModal .modal-content {
  background: #2d2d2d;
  border-color: #444;
}
body.dark-theme #contactModal .modal-title { color: #fff; }
body.dark-theme #contactModal .form-label { color: #e0e0e0; }
body.dark-theme #contactModal .form-control {
  background: #3a3a3a;
  border-color: #4a4a4a;
  color: #fff;
}
body.dark-theme #contactModal .form-control::placeholder { color: #cfcfcf; }
body.dark-theme #contactModal .btn-cancel,
body.dark-theme #contactModal .btn-secondary { color: #e0e0e0; border-color: #5a5a5a; }


.form-check.mb-3{
    padding-left: 1.5rem !important;
}