/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body.jamt-jobs-page,
body.jamt-job-detail-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
}

/* Page Wrapper */
.jamt-jobs-page-wrapper,
.jamt-job-detail-wrapper {
  min-height: 100vh;
  background-color: #f8fafc;
}

/* Ensure proper spacing */
.jamt-jobs-page-wrapper .jamt-container,
.jamt-job-detail-wrapper .jamt-container {
  padding-top: 20px;
  padding-bottom: 40px;
}

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

/* Header Styles */
.jamt-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.jamt-page-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.jamt-page-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin: 0;
}

/* Filters Section */
.jamt-filters-section {
  background: white;
  padding: 30px;
  margin: -30px 20px 40px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.jamt-filters-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 20px;
  align-items: end;
}

@media (max-width: 768px) {
  .jamt-filters-grid {
    grid-template-columns: 1fr;
  }
}

.jamt-filter-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}

.jamt-filter-group input,
.jamt-filter-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.jamt-filter-group input:focus,
.jamt-filter-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styles */
.jamt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  gap: 8px;
}

.jamt-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.jamt-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.jamt-btn-outline {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.jamt-btn-outline:hover {
  background: #667eea;
  color: white;
}

.jamt-btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

/* Jobs Grid */
.jamt-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.jamt-job-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
  border: 1px solid #e5e7eb;
}

.jamt-job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.jamt-job-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.jamt-job-title a {
  color: #1f2937;
  text-decoration: none;
}

.jamt-job-title a:hover {
  color: #667eea;
}

.jamt-job-company {
  color: #667eea;
  font-weight: 600;
  margin-bottom: 16px;
}

.jamt-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.jamt-job-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 14px;
}

.jamt-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.jamt-job-description {
  color: #4b5563;
  margin-bottom: 20px;
  line-height: 1.6;
}

.jamt-job-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.jamt-job-date {
  color: #9ca3af;
  font-size: 14px;
}

/* No Jobs State */
.jamt-no-jobs {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.jamt-no-jobs-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.jamt-no-jobs h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #374151;
}

.jamt-no-jobs p {
  color: #6b7280;
  max-width: 400px;
  margin: 0 auto;
}

/* Job Detail Page */
.jamt-breadcrumb {
  padding: 20px 0;
}

.jamt-breadcrumb a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.jamt-breadcrumb a:hover {
  text-decoration: underline;
}

.jamt-job-header {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

@media (max-width: 768px) {
  .jamt-job-header {
    flex-direction: column;
    gap: 20px;
  }
}

.jamt-job-header .jamt-job-title {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: #1f2937;
}

.jamt-job-header .jamt-job-company {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.jamt-job-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.jamt-job-meta-list .jamt-job-meta-item {
  font-size: 16px;
  color: #4b5563;
}

.jamt-job-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.jamt-job-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

@media (max-width: 968px) {
  .jamt-job-content {
    grid-template-columns: 1fr;
  }
}

.jamt-job-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.jamt-job-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 1.5rem;
}

.jamt-job-description {
  line-height: 1.8;
  color: #374151;
}

.jamt-job-info-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 20px;
}

.jamt-job-info-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #1f2937;
}

.jamt-job-info-list {
  margin: 0;
}

.jamt-job-info-list dt {
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.jamt-job-info-list dd {
  margin: 0 0 16px 0;
  color: #6b7280;
}

/* Modal Styles */
.jamt-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.jamt-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.jamt-modal-header {
  padding: 30px 30px 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jamt-modal-header h2 {
  margin: 0;
  color: #1f2937;
}

.jamt-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jamt-modal-close:hover {
  color: #374151;
}

.jamt-modal-body {
  padding: 30px;
}

/* Form Styles */
.jamt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .jamt-form-grid {
    grid-template-columns: 1fr;
  }
}

.jamt-form-group {
  margin-bottom: 20px;
}

.jamt-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}

.jamt-form-group input,
.jamt-form-group textarea,
.jamt-form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.jamt-form-group input:focus,
.jamt-form-group textarea:focus,
.jamt-form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.required {
  color: #ef4444;
}

/* File Upload */
.jamt-file-upload {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.jamt-file-upload:hover {
  border-color: #667eea;
}

.jamt-file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.jamt-file-upload-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #6b7280;
}

.jamt-file-upload-text .jamt-icon {
  width: 32px;
  height: 32px;
  color: #9ca3af;
}

.jamt-file-upload-text span {
  font-weight: 600;
}

.jamt-file-upload-text small {
  font-size: 14px;
  color: #9ca3af;
}

.jamt-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

/* Messages */
.jamt-message {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.jamt-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.jamt-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Pagination */
.jamt-pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.jamt-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  margin: 0 4px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s;
}

.jamt-pagination .page-numbers:hover,
.jamt-pagination .page-numbers.current {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Loading States */
.jamt-loading {
  opacity: 0.6;
  pointer-events: none;
}

.jamt-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- MODERNISATION DU DESIGN JAMT --- */

/* Selects */
.jamt-filter-group select {
  background: #f9fafb;
  color: #222;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.jamt-filter-group select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px #dbeafe;
}
.jamt-filter-group select:hover {
  border-color: #a5b4fc;
}

/* Inputs */
.jamt-filter-group input[type="text"] {
  background: #f9fafb;
  color: #222;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.jamt-filter-group input[type="text"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px #dbeafe;
}

/* Boutons */
.jamt-btn-primary {
  background: linear-gradient(90deg, #3b82f6 0%, #64748b 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}
.jamt-btn-primary:hover, .jamt-btn-primary:focus {
  background: linear-gradient(90deg, #2563eb 0%, #475569 100%);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.12);
}

.jamt-btn-outline {
  background: #fff;
  color: #3b82f6;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.jamt-btn-outline:hover, .jamt-btn-outline:focus {
  background: #3b82f6;
  color: #fff;
  border-color: #2563eb;
}

.jamt-btn:active {
  transform: scale(0.98);
}

/* Cartes */
.jamt-job-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.06);
  border: 1.5px solid #e5e7eb;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.jamt-job-card:hover {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.10);
  border-color: #c7d2fe;
  transform: translateY(-3px) scale(1.01);
}

/* Pagination */
.jamt-pagination .page-numbers {
  display: inline-block;
  min-width: 38px;
  padding: 8px 14px;
  margin: 0 4px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #334155;
  font-weight: 500;
  text-align: center;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  border: none;
}
.jamt-pagination .page-numbers.current, .jamt-pagination .page-numbers:hover {
  background: #3b82f6;
  color: #fff;
}

/* Formulaire de candidature */
.jamt-application-form-container, .jamt-modal-content {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.10);
  padding: 32px 24px;
}
.jamt-form-group label {
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
}
.jamt-form-group input, .jamt-form-group textarea, .jamt-form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  background: #f9fafb;
  color: #222;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.jamt-form-group input:focus, .jamt-form-group textarea:focus, .jamt-form-group select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px #dbeafe;
}
.jamt-form-actions {
  display: flex;
  gap: 16px;
  margin-top: 18px;
}
.jamt-form-actions .jamt-btn {
  min-width: 140px;
}

/* Effets de survol doux sur tous les champs */
.jamt-form-group input:hover, .jamt-form-group textarea:hover, .jamt-form-group select:hover {
  border-color: #a5b4fc;
}

/* Responsive amélioré */
@media (max-width: 600px) {
  .jamt-job-card, .jamt-application-form-container, .jamt-modal-content {
    padding: 16px 6px;
  }
  .jamt-form-actions {
    flex-direction: column;
    gap: 10px;
  }
}

/* --- FIN MODERNISATION JAMT --- */

/* --- MODERNISATION SUPPLÉMENTAIRE JAMT --- */

/* Header neutre */
.jamt-header {
  background: #f3f4f6;
  color: #222;
  padding: 48px 0 32px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30,41,59,0.03);
}
.jamt-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #222;
  text-shadow: none;
}
.jamt-page-subtitle {
  font-size: 1.1rem;
  color: #555;
  opacity: 1;
  margin: 0;
}

/* Selects et inputs améliorés */
.jamt-filter-group select,
.jamt-filter-group input[type="text"] {
  background: #f9fafb;
  color: #222;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  box-shadow: 0 1px 2px rgba(30,41,59,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.jamt-filter-group select:focus,
.jamt-filter-group input[type="text"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px #dbeafe;
}
.jamt-filter-group select:hover,
.jamt-filter-group input[type="text"]:hover {
  border-color: #a5b4fc;
}

/* Boutons sobres */
.jamt-btn-primary {
  background: linear-gradient(90deg, #3b82f6 0%, #64748b 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}
.jamt-btn-primary:hover, .jamt-btn-primary:focus {
  background: linear-gradient(90deg, #2563eb 0%, #475569 100%);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.12);
}
.jamt-btn-outline {
  background: #fff;
  color: #3b82f6;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.jamt-btn-outline:hover, .jamt-btn-outline:focus {
  background: #3b82f6;
  color: #fff;
  border-color: #2563eb;
}

/* Cartes focus */
.jamt-job-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.06);
  border: 1.5px solid #e5e7eb;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.jamt-job-card:hover, .jamt-job-card:focus-within {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.13);
  border-color: #b6c6e3;
  transform: translateY(-3px) scale(1.01);
}

/* Pagination plus visible */
.jamt-pagination .page-numbers {
  display: inline-block;
  min-width: 38px;
  padding: 8px 14px;
  margin: 0 4px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #334155;
  font-weight: 500;
  text-align: center;
  transition: background 0.2s, color 0.2s;
  border: none;
}
.jamt-pagination .page-numbers.current, .jamt-pagination .page-numbers:hover {
  background: #3b82f6;
  color: #fff;
}

/* Responsive header et filtres */
@media (max-width: 768px) {
  .jamt-header {
    padding: 32px 0 18px 0;
  }
  .jamt-page-title {
    font-size: 1.5rem;
  }
  .jamt-filters-section {
    margin: -20px 0 30px 0;
    padding: 18px 6px;
  }
}

/* --- FIN MODERNISATION SUPPLÉMENTAIRE JAMT --- */

/* Responsive Design */
@media (max-width: 768px) {
  .jamt-page-title {
    font-size: 2rem;
  }

  .jamt-job-header {
    padding: 20px;
  }

  .jamt-job-header .jamt-job-title {
    font-size: 1.75rem;
  }

  .jamt-modal-content {
    margin: 10px;
  }

  .jamt-modal-header,
  .jamt-modal-body {
    padding: 20px;
  }
}

.jamt-pagination-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}
