/* =========================================================
   VARIABLES GLOBALES
========================================================= */

:root {
  --fma-primary: #022650;
  --fma-primary-dark: #071D66;
  --fma-secondary: #191919;
  --fma-text: #535353;
  --fma-muted: #6b7280;
  --fma-border: #C8C8C8;
  --fma-soft: #F1F1F1;
  --fma-bg: #FFFFFF;
  --fma-accent: #FE7E03;
  --fma-accent-dark: #FA6700;
  --fma-success: #12844B;
  --fma-success-soft: #E7F7EF;
  --fma-danger: #D92D20;
  --fma-danger-soft: #FDECEC;
  --fma-shadow: 0 10px 30px rgba(2, 38, 80, 0.06);
  --fma-shadow-soft: 0 8px 24px rgba(2, 38, 80, 0.04);
}


/* =========================================================
   FRONT GLOBAL
========================================================= */

.fma-jobs,
.fma-job-detail,
.fma-job-not-found {
  font-family: "Encode Sans", sans-serif;
  color: var(--fma-text);
}

.fma-jobs *,
.fma-job-detail *,
.fma-job-not-found * {
  box-sizing: border-box;
}

.fma-jobs p,
.fma-job-detail p,
.fma-job-detail li,
.fma-jobs label,
.fma-jobs select,
.fma-jobs span,
.fma-jobs a,
.fma-job-detail span,
.fma-job-detail a,
.fma-job-detail strong {
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.fma-job-detail h1 {
  font-size: 25px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  margin: 0 0 12px !important;
  color: var(--fma-primary) !important;
}

.fma-job-detail h2,
.fma-job-detail h3,
.fma-jobs h2,
.fma-jobs h3,
.fma-detail-block h2,
.fma-side-card h2 {
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 0 12px !important;
  color: var(--fma-primary) !important;
}

.fma-job-card__head h3 {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  color: var(--fma-primary) !important;
}

/* =========================================================
   FILTRES
========================================================= */

.fma-filters-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.fma-filters-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  width: 100%;
}

.fma-filters-toggle {
  display: none;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--fma-border);
  border-radius: 999px;
  background: var(--fma-share-btn-bg, var(--fma-accent));
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.fma-filters-panel {
  width: 100%;
}

.fma-filters-sort {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fma-filters-sort label {
  font-weight: 600;
  color: var(--fma-primary);
}

.fma-filters-sort select {
  border: 1px solid var(--fma-border);
  border-radius: 5px;
  padding: 8px 10px;
  min-width: 220px;
  background: #fff;
}

.fma-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.fma-filter-box {
  border: 1px solid var(--fma-border);
  border-radius: 5px;
  padding: 10px 10px 8px;
  background: #fff;
  min-width: 0;
}

.fma-filter-box legend {
  padding: 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fma-primary);
}

.fma-filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
  padding-right: 4px;
}

.fma-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  cursor: pointer;
}

.fma-check input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.fma-check span {
  font-size: 13px !important;
  line-height: 1.3 !important;
  color: var(--fma-secondary);
}

.fma-filters-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* =========================================================
   BOUTONS
========================================================= */

.fma-job-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 5px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s;
  text-align: center;
}

.fma-job-btn--primary {
  background: #ea1d1f !important;
  color: #fff !important;
}

.fma-job-btn--primary:hover {
  background: #111;
  color: #fff !important;
}

.fma-job-btn--apply {
  background: var(--fma-apply-bg, #ea1e1e);
  color: var(--fma-apply-text, #fff);
}

.fma-job-btn--training {
  background: var(--fma-training-bg, #090909);
  color: var(--fma-training-text, #fff);
}

.fma-job-btn--secondary {
  background: #fff;
  color: var(--fma-primary) !important;
  border: 1px solid var(--fma-border);
}

.fma-job-btn--secondary:hover {
  background: #111;
  color: #fff !important;
  border-color: #111;
}


/* =========================================================
   GRILLE DES CARTES
========================================================= */

.fma-job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.fma-job-card {
  background: #fff;
  border: 1px solid var(--fma-border);
  border-radius: 5px;
  padding: 20px;
  box-shadow: var(--fma-shadow-soft);
  display: flex;
  flex-direction: column;
  min-height: 290px;
}

.fma-job-card.is-featured {
  box-shadow: 0 12px 30px rgba(2, 38, 80, 0.08);
  border-color: #d8e1f0;
}

.fma-job-ref,
.fma-card-ref,
.fma-detail-ref {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(2, 38, 80, 0.08);
  color: var(--fma-primary);
  font-size: 12px !important;
  font-weight: 700;
}

.fma-job-card__company,
.fma-job-detail__company-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.fma-company-logo {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #dfe5ec;
  background: #fff;
  align-items: center;
  justify-content: center;
}

.fma-company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  fill: currentColor;
}

.fma-job-card__company-name,
.fma-job-detail__company-name {
  font-size: 14px !important;
  font-weight: 700;
  color: var(--fma-primary);
}

.fma-job-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.fma-job-card__separator {
  height: 1px;
  background: var(--fma-border);
  margin: 16px 0;
}

.fma-job-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: auto;
}

.fma-job-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--fma-secondary);
}


/* =========================================================
   BADGES STATUT
========================================================= */

.fma-badge,
.fma-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 700;
  white-space: nowrap;
}

.fma-badge--active,
.fma-status-badge--online,
.fma-status-badge--active {
  background: var(--fma-success-soft);
  color: var(--fma-success);
}

.fma-badge--expired,
.fma-status-badge--expired {
  background: var(--fma-danger-soft);
  color: var(--fma-danger);
}

.fma-status-badge--offline {
  background: #eef2f7;
  color: #4b5563;
}


/* =========================================================
   PAGINATION
========================================================= */

.fma-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.fma-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #1f3559;
  text-decoration: none;
  font-weight: 700;
  background: transparent;
  font-size: 15px;
}

.fma-page-link:hover {
  background: #eff3f8;
  color: var(--fma-primary);
  border-color: transparent;
}

.fma-page-link.is-active {
  background: #082a58;
  color: #fff;
}

.fma-page-link--nav {
  font-size: 28px;
  line-height: 1;
  min-width: 30px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
}

.fma-page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7b8796;
  font-weight: 700;
  min-width: 24px;
}


/* =========================================================
   DÉTAIL OFFRE / FORMATION
========================================================= */

.fma-job-detail__page-title {
  display: block !important;
  margin: 0 0 12px !important;
  color: var(--fma-primary) !important;
  font-size: 25px !important;
  line-height: 1.3 !important;
  font-weight: 650 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.fma-job-detail__top {
  display: flex;
  justify-content: space-between;
  align-items: center !important;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--fma-detail-top-bg, #090909) !important;
  border-radius: 5px !important;
  padding: 24px 22px !important;
  margin-bottom: 18px !important;
  box-shadow: 0 8px 20px rgba(2, 38, 80, 0.08);
}

.fma-job-detail__top-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.fma-job-detail__title {
  margin: 0;
  color: #fff !important;
  font-size: 25px !important;
  line-height: 1.3;
  font-weight: 650;
  word-break: break-word;
}

.fma-job-detail__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}

.fma-job-detail__chips span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-weight: 600;
  line-height: 1.2 !important;
}

.fma-job-detail__ref {
  background: rgba(255, 255, 255, 0.16) !important;
}

.fma-job-detail__actions {
  display: flex !important;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  margin-left: auto;
}

.fma-job-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 420px;
  grid-template-areas: "main side";
  gap: 24px;
}

.fma-job-detail__main {
  grid-area: main;
}

.fma-job-detail__side {
  grid-area: side;
}

.fma-job-detail__bottom-cta {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.fma-job-detail__bottom-cta .fma-job-btn {
  min-width: 220px;
}


/* =========================================================
   BLOCS DÉTAIL
========================================================= */

.fma-detail-block,
.fma-side-card {
  background: #fff;
  border: 1px solid var(--fma-border);
  border-radius: 5px;
  padding: 20px;
  box-shadow: var(--fma-shadow-soft);
}

.fma-detail-block + .fma-detail-block {
  margin-top: 18px;
}

.fma-side-card ul {
  list-style: disc !important;
  padding-left: 18px !important;
  margin: 0 !important;
}

.fma-side-card li {
  display: list-item !important;
  margin-bottom: 10px !important;
  color: #374151;
}

.fma-side-card li:last-child {
  margin-bottom: 0 !important;
}

.fma-side-card__list,
.fma-icon {
  display: none !important;
}


/* =========================================================
   ANNONCE INTROUVABLE
========================================================= */

.fma-job-not-found {
  max-width: 780px;
  margin: 20px auto;
  padding: 34px 28px;
  background: #fff;
  border: 1px solid var(--fma-border);
  border-radius: 8px;
  box-shadow: var(--fma-shadow);
  text-align: center;
}

.fma-job-not-found__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--fma-primary), var(--fma-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}

.fma-job-not-found h2 {
  margin: 0 0 10px;
  color: var(--fma-primary);
  font-size: 22px;
  font-weight: 600;
}

.fma-job-not-found p {
  margin: 0 0 18px;
  color: var(--fma-text);
  font-size: 14px;
  line-height: 1.7;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
  .fma-job-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fma-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fma-job-detail__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "side"
      "main";
  }
}

@media (max-width: 767px) {
  .fma-job-grid {
    grid-template-columns: 1fr;
  }

  .fma-filters-grid {
    grid-template-columns: 1fr;
  }

  .fma-filters-center {
    gap: 12px;
  }

  .fma-filter-options {
    max-height: 108px;
  }

  .fma-filters-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .fma-job-card__foot,
  .fma-job-detail__top {
    align-items: stretch;
  }

  .fma-job-detail__actions {
    flex-wrap: wrap !important;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .fma-job-detail__actions .fma-job-btn,
  .fma-job-card__foot .fma-job-btn,
  .fma-job-detail__bottom-cta .fma-job-btn {
    width: 100%;
    min-width: 0;
  }

  .fma-job-detail__top {
    padding: 18px 14px !important;
  }

  .fma-pagination {
    gap: 8px;
  }

  .fma-page-link {
    min-width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}

/* =========================================================
   PARTAGE & IMPRESSION
========================================================= */

.fma-job-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fma-share-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fma-share-toggle,
.fma-print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--fma-border);
  border-radius: 999px;
  background: var(--fma-share-btn-bg, var(--fma-accent));
  color: #fff !important;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.fma-share-toggle:hover,
.fma-print-btn:hover {
  color: #fff !important;
}

.fma-share-toggle:hover {
  background: var(--fma-share-btn-hover-bg, var(--fma-primary));
}

.fma-print-btn {
  background: var(--fma-print-btn-bg, var(--fma-primary));
  color: #fff !important;
}

.fma-print-btn:hover {
  background: var(--fma-print-btn-hover-bg, var(--fma-accent));
}

.fma-share-toggle svg,
.fma-print-btn svg,
.fma-share-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

.fma-share-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--fma-border);
  border-radius: 999px;
  box-shadow: var(--fma-shadow-soft);
  z-index: 20;
}

.fma-share-menu.is-open .fma-share-dropdown {
  display: inline-flex;
}

.fma-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  text-decoration: none !important;
  color: #fff !important;
}

.fma-share-link--facebook {
  background: #1877f2;
}

.fma-share-link--whatsapp {
  background: #25d366;
}

.fma-job-detail__company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.fma-job-detail__utility {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.fma-share-menu--detail .fma-share-dropdown {
  right: 0;
}

@media (max-width: 767px) {
  .fma-job-card__topline {
    gap: 10px;
  }

  .fma-job-detail__company-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .fma-job-detail__utility {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

.fma-share-toggle svg,
.fma-print-btn svg { color:#fff !important; fill:#fff !important; }
.fma-share-toggle svg path,
.fma-print-btn svg path { fill:#fff !important; }
