/* Reset rapide */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables de couleurs */
:root {
  --primary: #1E3A8A;
  --secondary: #F59E0B;
  --bg: #F3F4F6;
  --text: #111827;
  --light: #ffffff;
  --muted: #6B7280;
}

/* Corps de page */
body {
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
.site-header {
  background: var(--primary);
  color: var(--light);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Conteneur principal */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Titre de section */
.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--primary);
}

/* Grille de cartes */
.grid-jobs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Carte d'offre */
.job-card {
  background: var(--light);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.job-card input {
  display: none;
}

.job-card.selected {
  border-color: var(--secondary);
  background: #fffbf0;
}

/* Titre de la carte */
.job-card h3 {
  font-size: 1rem;
  flex: 1;
  color: var(--text);
}

/* Bouton principal */
.btn {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--secondary);
  color: var(--light);
}

.btn-primary:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

.btn-primary:not(:disabled):hover {
  background: #d97706;
}
/* Score */
.score {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--primary);
}

/* Tags */
.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.tag {
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.875rem;
}
.tag.found {
  background: #d1fae5;
  color: #065f46;
}
.tag.missing {
  background: #fee2e2;
  color: #991b1b;
}

/* Bouton secondaire */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: var(--light);
}
/* Historique des tests */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.history-table th,
.history-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}
.history-table th {
  background: var(--primary);
  color: var(--light);
}
.contact-form label {
  display: block;
  margin-bottom: 1rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-top: 0.25rem;
}
.feedback {
  margin-top: 1rem;
  text-align: center;
  font-weight: bold;
}
/* Loader caché par défaut */
.loader-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* Quand on veut l’afficher, on ajoute la classe .active */
.loader-overlay.active {
  display: flex;
}

/* Spinner */
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--secondary);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Responsive : pour les écrans ≤ 600px */
@media (max-width: 600px) {
  /* Une seule colonne pour la grille d’offres */
  .grid-jobs {
    grid-template-columns: 1fr !important;
  }

  /* Boutons plein largeur */
  .btn {
    width: 100% !important;
  }

  /* Ajuster le padding général */
  .container {
    padding: 1rem !important;
  }

  /* Table historique plus compacte */
  .history-table th,
  .history-table td {
    font-size: 0.8rem;
    padding: 0.25rem;
  }

  /* Formulaires */
  .upload-form input,
  .contact-form input,
  .contact-form textarea {
    font-size: 1rem !important;
  }

  /* Titres */
  .site-header h1 {
    font-size: 1.25rem !important;
  }
}
