/* Jobs List */
.jamt-jobs-container {
  margin: 20px 0;
}

.jamt-job-item {
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.jamt-job-title {
  margin-top: 0;
  margin-bottom: 10px;
}

.jamt-job-title a {
  text-decoration: none;
}

.jamt-job-meta {
  margin-bottom: 15px;
  font-size: 14px;
  color: #666;
}

.jamt-job-location,
.jamt-job-type,
.jamt-job-tenant {
  display: inline-block;
  margin-right: 15px;
}

.jamt-job-location:before {
  content: "\f124";
  font-family: dashicons;
  margin-right: 5px;
  vertical-align: middle;
}

.jamt-job-type:before {
  content: "\f508";
  font-family: dashicons;
  margin-right: 5px;
  vertical-align: middle;
}

.jamt-job-tenant:before {
  content: "\f338";
  font-family: dashicons;
  margin-right: 5px;
  vertical-align: middle;
}

.jamt-job-excerpt {
  margin-bottom: 15px;
}

.jamt-job-actions {
  text-align: right;
}

.jamt-job-view-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.jamt-job-view-button:hover {
  background-color: #005f8b;
  color: #fff;
}

/* ========================================
   FORMULAIRE D'APPLICATION MODERNE
   ======================================== */

/* Container principal */
.jamt-application-form-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--jamt-bg, #f8f9fa) 0%, #e9ecef 100%);
  padding: 40px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.jamt-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.jamt-breadcrumb {
  margin-bottom: 32px;
}

.jamt-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid var(--jamt-border, #e9ecef);
  border-radius: 12px;
  color: #6c757d;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.jamt-breadcrumb a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Container du formulaire */
.jamt-application-form-container {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

/* Messages */
.jamt-application-form-message {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 12px;
  font-weight: 500;
  display: none;
}

.jamt-application-form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.jamt-application-form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Formulaire principal */
.jamt-application-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sections du formulaire */
.jamt-form-section {
  background: var(--jamt-bg, #f8f9fa);
  border-radius: 16px;
  padding: 24px;
  border-left: 4px solid var(--jamt-primary, #ff6b35);
  position: relative;
  overflow: hidden;
}

.jamt-form-section.cover-letter {
  border-left-color: var(--jamt-secondary, #ff8a5c);
}

.jamt-form-section.resume {
  border-left-color: var(--jamt-accent, #e55a2b);
}

/* Titres des sections */
.jamt-form-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--jamt-text, #212529);
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Grille des champs */
.jamt-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.jamt-form-row:last-child {
  margin-bottom: 0;
}

/* Groupes de champs */
.jamt-form-group {
  display: flex;
  flex-direction: column;
}

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

/* Labels */
.jamt-form-group label {
  font-weight: 600;
  color: var(--jamt-text, #495057);
  margin-bottom: 8px;
  display: block;
  font-size: 0.95rem;
}

/* Champs de saisie */
.jamt-form-group input[type="text"],
.jamt-form-group input[type="email"],
.jamt-form-group input[type="tel"],
.jamt-form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--jamt-border, #e9ecef);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--jamt-text, #495057);
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
  min-height: 48px;
}

.jamt-form-group input[type="text"]:hover,
.jamt-form-group input[type="email"]:hover,
.jamt-form-group input[type="tel"]:hover,
.jamt-form-group textarea:hover {
  border-color: #ced4da;
}

.jamt-form-group input[type="text"]:focus,
.jamt-form-group input[type="email"]:focus,
.jamt-form-group input[type="tel"]:focus,
.jamt-form-group textarea:focus {
  outline: none;
  border-color: var(--jamt-primary, #ff6b35);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  background-color: #fff;
}

.jamt-form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Placeholder */
.jamt-form-group input::placeholder,
.jamt-form-group textarea::placeholder {
  color: #adb5bd;
  opacity: 1;
}

/* Zone de téléchargement de fichier */
.jamt-file-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  background: #fff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.jamt-file-upload-area:hover {
  border-color: var(--jamt-accent, #e55a2b);
  background-color: #fff5f2;
}

.jamt-file-upload-area input[type="file"] {
  display: none;
}

.jamt-file-upload-area label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--jamt-accent, #e55a2b) 0%, #d63384 100%);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 0.95rem;
}

.jamt-file-upload-area label:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 90, 43, 0.3);
}

/* Texte du nom de fichier */
#file-name {
  color: #6c757d;
  font-size: 0.9rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  margin-top: 8px;
  line-height: 1.4;
}

/* Quand un fichier est sélectionné */
#file-name.has-file {
  color: #28a745;
  font-weight: 600;
  background: var(--jamt-bg, #f8f9fa);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--jamt-border, #e9ecef);
  margin-top: 12px;
}

/* Bouton de soumission */
.jamt-submit-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--jamt-primary, #ff6b35) 0%, var(--jamt-accent, #e55a2b) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  text-decoration: none;
  font-family: inherit;
}

.jamt-submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
  color: #fff;
}

.jamt-submit-button:active {
  transform: translateY(0);
}

/* Champs requis */
.required {
  color: #dc3545;
}

/* Amélioration de l'accessibilité */
.jamt-form-group input:focus-visible,
.jamt-form-group textarea:focus-visible {
  outline: 2px solid var(--jamt-primary, #ff6b35);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .jamt-container {
    padding: 0 15px;
  }
  
  .jamt-application-form-container {
    padding: 24px;
    border-radius: 16px;
  }
  
  .jamt-form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .jamt-form-section {
    padding: 20px;
  }
  
  .jamt-form-section h3 {
    font-size: 1.1rem;
  }
  
  .jamt-submit-button {
    width: 100%;
    justify-content: center;
  }
  
  .jamt-form-group input[type="text"],
  .jamt-form-group input[type="email"],
  .jamt-form-group input[type="tel"],
  .jamt-form-group textarea {
    font-size: 16px; /* Évite le zoom sur iOS */
  }
}

@media (max-width: 480px) {
  .jamt-application-form-wrapper {
    padding: 20px 0;
  }
  
  .jamt-application-form-container {
    padding: 20px;
  }
  
  .jamt-form-section {
    padding: 16px;
  }
  
  .jamt-file-upload-area {
    padding: 24px 16px;
  }
  
  .jamt-form-group input[type="text"],
  .jamt-form-group input[type="email"],
  .jamt-form-group input[type="tel"],
  .jamt-form-group textarea {
    padding: 10px 14px;
    font-size: 16px;
  }
}
