/* ============================================================
   VARIABLES
============================================================ */
:root {
  --bg:           #F8F7F4;
  --surface:      #FFFFFF;
  --border:       #E4E1D9;
  --text:         #1A1A1A;
  --muted:        #6B6760;
  --accent:       #1B2A4A;
  --accent-hover: #243761;
  --tag-bg:       #EEF0F5;
  --tag-text:     #1B2A4A;
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    14px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.09);
  --nav-height:   60px;
  --max-w:        1080px;
  --pad:          24px;
}

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   CONTAINER
============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}
.navbar__brand {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
}
.navbar__links {
  display: flex;
  gap: 28px;
}
.navbar__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.navbar__links a:hover { color: var(--accent); }

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.navbar__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.navbar__mobile {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px var(--pad);
  gap: 16px;
}
.navbar__mobile.is-open { display: flex; }
.mobile-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid transparent;
  line-height: 1.2;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--solid {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--solid:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--outline:hover {
  background: var(--accent);
  color: #fff;
}
.btn--full { width: 100%; text-align: center; }

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SECTION COMMONS
============================================================ */
.section { padding: 72px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-title {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}
.link--accent { color: var(--accent); font-weight: 500; text-decoration: underline; }

/* ============================================================
   HERO
============================================================ */
.hero {
  background: var(--accent);
  padding: 80px 0;
}
.hero__text {
  max-width: 620px;
}
.hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}
.hero__title {
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
}
.hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero .btn--solid {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}
.hero .btn--solid:hover { background: #eee; border-color: #eee; }
.hero .btn--outline {
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.hero .btn--outline:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   ABOUT
============================================================ */
.about__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: center;
}
.about__image img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  aspect-ratio: 4/5;
}
.about__content p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.about__stats {
  display: flex;
  gap: 32px;
  margin: 28px 0;
}
.stat__number {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
}
.stat__label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============================================================
   VACANCIES
============================================================ */
.vacancies { background: var(--bg); }
.vacancies__count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
}
.vacancies__filters {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filter-input, .filter-select {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.filter-input { flex: 1; min-width: 200px; }
.filter-input:focus, .filter-select:focus { border-color: var(--accent); }

/* ============================================================
   JOBS GRID
============================================================ */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.jobs-state {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.jobs-state--error { color: #c0392b; }

/* ============================================================
   JOBS LIST
============================================================ */
.jobs-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
}


.jobs-state {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.jobs-state--error { color: #c0392b; }

/* ============================================================
   JOB ROW (anciennement job-card)
============================================================ */
.job-card {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 18px 4px;
  cursor: pointer;
  transition: background 0.15s;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 16px;
}
.job-card:last-child {
  border-bottom: none;
}
.job-card:hover {
  background: rgba(0,0,0,0.03);
}


/* Colonne gauche : titre + meta */
.job-card__top {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.job-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.job-card__type {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tag-text);
  background: var(--tag-bg);
  border-radius: 20px;
  padding: 2px 10px;
}

/* Colonne gauche ligne 2 : infos secondaires */
.job-card__meta {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.job-card__location {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.82rem;
  color: var(--muted);
}
.job-card__location svg { flex-shrink: 0; }
.job-card__school {
  font-size: 0.82rem;
  color: var(--muted);
}
.job-card__salary {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}

/* Colonne droite : CTA */
.job-card__cta {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s;
  align-self: center;
}
.job-card:hover .job-card__cta {
  color: var(--accent);
}

/* on masque la desc courte en liste (optionnel, à garder ou supprimer) */
.job-card__desc { display: none; }


/* ============================================================
   CONTACT
============================================================ */
.contact__cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact__card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  min-width: 240px;
}
.contact__card svg { color: var(--accent); flex-shrink: 0; }
.contact__card-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.contact__card-value { font-size: 0.95rem; font-weight: 500; color: var(--accent); }
.contact__card-value:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: var(--accent);
  padding: 24px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer__copy { font-size: 0.82rem; color: rgba(255,255,255,0.85); font-weight: 500; }
.footer__sub  { font-size: 0.78rem; color: rgba(255,255,255,0.5); }

/* ============================================================
   MODAL
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1;
}
.modal__close:hover { color: var(--text); }
.modal__title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.modal__subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Job detail */
.job-detail__header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.job-detail__header h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.job-detail__meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.job-detail__school-row { font-size: 0.85rem; color: var(--muted); display: flex; gap: 10px; }
.job-detail__body { margin-bottom: 24px; }
.job-detail__section-title { font-size: 0.95rem; font-weight: 600; margin: 20px 0 10px; }
.job-detail__text p { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.job-detail__text ul { padding-left: 20px; }

.job-detail__text li { font-size: 0.9rem; color: var(--muted); margin-bottom: 4px; }
.job-detail__footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.job-detail__footer .btn svg {
  flex-shrink: 0;
  margin-right: 6px;
}
/* Success / Error states */
.modal__success, .modal__error {
  text-align: center;
  padding: 40px 20px;
}
.success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #d4edda;
  color: #276749;
  font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.error-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fde8e8;
  color: #c0392b;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.modal__success h3, .modal__error h3 { margin-bottom: 10px; }
.modal__success p, .modal__error p { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }

/* ============================================================
   APPLY FORM
============================================================ */
.apply-form { display: flex; flex-direction: column; gap: 16px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 500; }
.required { color: #c0392b; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.input-error { border-color: #c0392b !important; }
.form-error { font-size: 0.78rem; color: #c0392b; min-height: 16px; }

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] { accent-color: var(--accent); }

/* File upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s;
  overflow: hidden;
}
.file-upload:hover, .file-upload.is-dragging { border-color: var(--accent); }
.file-upload input[type="file"] { display: none; }
.file-upload__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}
.file-upload__hint { font-size: 0.78rem; color: var(--muted); }
.file-upload__preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 0.85rem;
  gap: 12px;
}
.file-upload__remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.file-upload__remove:hover { border-color: #c0392b; color: #c0392b; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .navbar__links { display: none; }
  .navbar__burger { display: flex; }
  .about__inner { grid-template-columns: 1fr; }
  .about__image { max-width: 260px; margin: 0 auto; }
  .hero__title { font-size: 1.7rem; }
  .section-title { font-size: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 24px; }
  .about__stats { gap: 20px; }
}

@media (max-width: 480px) {
  .hero { padding: 56px 0; }
  .section { padding: 48px 0; }
  .hero__ctas { flex-direction: column; }
  .contact__card { width: 100%; }
}
