/**
 * COJ Tahiti 2027 Offres d'Emploi — Styles Frontend
 * Palette : Marron #302516 · Passion #e6422c→#963396
 */

/* ===================================
   FILTRE
   =================================== */

.coj27-offres-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.coj27-filter-label {
  font-family: 'K2D', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(48, 37, 23, 0.5);
  margin-right: 4px;
  flex-shrink: 0;
}

.coj27-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coj27-job-filter-btn {
  font-family: 'K2D', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 3px;
  border: 1.5px solid #e5e1da;
  background: #fff;
  color: rgba(48, 37, 23, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.coj27-job-filter-btn:hover,
.coj27-job-filter-btn.is-active {
  border-color: #e6422c;
  background: #e6422c;
  color: #fff;
}

/* ===================================
   LISTE DES FICHES
   =================================== */

.coj27-offres-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 60px;
}

/* ===================================
   FICHE — conteneur
   =================================== */

.coj27-job-fiche {
  background: #fff;
  border-radius: 8px;
  border: 1.5px solid #e5e1da;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.coj27-job-fiche:hover {
  border-color: #e6422c;
}

.coj27-job-fiche.open {
  border-color: #e6422c;
  box-shadow: 0 4px 24px rgba(48, 37, 23, 0.08);
}

/* ===================================
   EN-TÊTE (toujours visible)
   =================================== */

.coj27-job-header {
  padding: 24px 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: background 0.2s ease;
  user-select: none;
}

.coj27-job-header:hover {
  background: rgba(230, 66, 44, 0.03);
}

.coj27-job-header-left {
  flex: 1;
  min-width: 0;
}

/* Badges */
.coj27-job-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.coj27-offre-dept {
  display: inline-block;
  font-family: 'K2D', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(230, 66, 44, 0.10);
  color: #302516;
}

.coj27-offre-new {
  font-family: 'K2D', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e6422c;
  background: rgba(230, 66, 44, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Titre */
.coj27-job-title {
  font-family: 'K2D', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #302516;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

/* Meta items (lieu, contrat, date, expérience) */
.coj27-offre-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.coj27-offre-meta-item {
  font-family: 'K2D', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(48, 37, 23, 0.5);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Toggle +/× */
.coj27-job-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #f5f4f2;
  color: rgba(48, 37, 23, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 300;
  transition: all 0.2s ease;
  pointer-events: none;
}

.coj27-job-fiche.open .coj27-job-toggle {
  background: #e6422c;
  color: #fff;
  transform: rotate(45deg);
}

/* ===================================
   DÉTAIL ACCORDÉON
   =================================== */

.coj27-job-detail {
  display: none;
  border-top: 1px solid #e5e1da;
}

.coj27-job-fiche.open .coj27-job-detail {
  display: block;
}

/* Grille 2 colonnes */
.coj27-job-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.coj27-job-section {
  padding: 24px 28px;
  border-right: 1px solid #e5e1da;
  border-bottom: 1px solid #e5e1da;
}

.coj27-job-section:nth-child(2n) {
  border-right: none;
}

.coj27-job-section:nth-last-child(-n+2) {
  border-bottom: none;
}

/* Si section unique ou nombre impair, étaler sur toute la largeur */
.coj27-job-section:only-child,
.coj27-job-section:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: none;
}

/* Titre de section */
.coj27-job-section-title {
  font-family: 'K2D', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6422c;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coj27-job-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(230, 66, 44, 0.2);
}

/* Contenu de section */
.coj27-job-section-content {
  font-family: 'K2D', sans-serif;
  font-size: 0.84rem;
  line-height: 1.7;
  color: rgba(48, 37, 23, 0.7);
}

.coj27-job-section-content p {
  margin-bottom: 10px;
}

.coj27-job-section-content p:last-child {
  margin-bottom: 0;
}

.coj27-job-section-content ul,
.coj27-job-section-content ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.coj27-job-section-content ul li,
.coj27-job-section-content ol li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(48, 37, 23, 0.7);
}

.coj27-job-section-content ul li::before {
  content: '•';
  color: #e6422c;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.75rem;
}

.coj27-job-section-content ol {
  counter-reset: coj27-ol;
}

.coj27-job-section-content ol li::before {
  counter-increment: coj27-ol;
  content: counter(coj27-ol) '.';
  color: #e6422c;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.coj27-job-section-content strong {
  color: #302516;
  font-weight: 600;
}

/* Section Conditions — fond grisé */
.coj27-conditions {
  background: #f5f4f2;
}

.coj27-conditions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.coj27-cond-item {}

.coj27-cond-label {
  font-family: 'K2D', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(48, 37, 23, 0.5);
  display: block;
  margin-bottom: 3px;
}

.coj27-cond-value {
  font-family: 'K2D', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #302516;
}

/* ===================================
   PIED DE FICHE
   =================================== */

.coj27-job-footer {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f5f4f2;
  border-top: 1px solid #e5e1da;
  flex-wrap: wrap;
}

.coj27-job-footer-date {
  font-family: 'K2D', sans-serif;
  font-size: 0.72rem;
  color: rgba(48, 37, 23, 0.5);
}

.coj27-job-footer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Bouton téléchargement fiche */
.coj27-btn-fiche {
  font-family: 'K2D', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 3px;
  border: 1.5px solid #e5e1da;
  color: rgba(48, 37, 23, 0.5);
  background: #fff;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.coj27-btn-fiche::before {
  content: '↓';
  font-size: 0.85rem;
}

.coj27-btn-fiche:hover {
  border-color: #e6422c;
  color: #e6422c;
  background: #fff;
  text-decoration: none;
}

/* Item candidature (pleine largeur dans la grille conditions) */
.coj27-cond-candidature {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #e5e1da;
}

.coj27-cond-candidature .coj27-cond-value a {
  color: #007ee0;
  text-decoration: none;
  font-weight: 700;
}

.coj27-cond-candidature .coj27-cond-value a:hover {
  text-decoration: underline;
}

/* ===================================
   ÉTAT VIDE
   =================================== */

.coj27-no-offres {
  text-align: center;
  padding: 60px 20px;
  background: #f5f4f2;
  border-radius: 8px;
  border: 1.5px solid #e5e1da;
}

.coj27-no-offres p {
  font-family: 'K2D', sans-serif;
  font-size: 0.94rem;
  color: rgba(48, 37, 23, 0.5);
  margin: 0;
}

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

@media (max-width: 768px) {
  .coj27-job-header {
    padding: 20px 20px;
  }

  .coj27-job-sections {
    grid-template-columns: 1fr;
  }

  .coj27-job-section {
    border-right: none;
  }

  .coj27-job-section:nth-last-child(-n+2) {
    border-bottom: 1px solid #e5e1da;
  }

  .coj27-job-section:last-child {
    border-bottom: none;
  }

  .coj27-job-section:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .coj27-conditions-grid {
    grid-template-columns: 1fr;
  }

  .coj27-job-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
  }

  .coj27-job-title {
    font-size: 0.95rem;
  }
}

/* ===================================
   PAGE SINGLE OFFRE
   (conservé pour compatibilité)
   =================================== */

.coj27-single-offre-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0;
}

.coj27-single-content .entry-title {
  font-family: 'K2D', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #302516;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.coj27-offre-meta-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.coj27-single-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: 'K2D', sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.coj27-single-badge-primary {
  background: #007ee0;
  color: #fff;
}

.coj27-single-badge-departement {
  background: #e6422c;
  color: #302516;
}

.coj27-single-badge-secondary {
  background: #f5f4f2;
  color: #302516;
  border: 1px solid #e5e1da;
}

.coj27-offre-section {
  margin-bottom: 24px;
  background: #f5f4f2;
  padding: 32px;
  border-radius: 8px;
  border: 1px solid #e5e1da;
}

.coj27-section-title {
  font-family: 'K2D', sans-serif;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #302516;
  margin: 0 0 20px 0;
}

.coj27-section-title svg {
  color: #e6422c;
  flex-shrink: 0;
}

.coj27-section-content {
  font-family: 'K2D', sans-serif;
  font-size: 0.94rem;
  line-height: 1.8;
  color: rgba(48, 37, 23, 0.7);
}

.coj27-formulaire-candidature {
  background: #f0f9ff;
  border-color: #bfdbfe;
}

.coj27-formulaire-candidature .coj27-section-title {
  color: #007ee0;
}

/* Pagination */
.coj27-pagination {
  margin: 40px 0;
  text-align: center;
}

.coj27-pagination-list {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.coj27-pagination-list a,
.coj27-pagination-list span {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 4px;
  background: #fff;
  color: #302516;
  text-decoration: none;
  border: 1.5px solid #e5e1da;
  transition: all 0.2s ease;
  font-family: 'K2D', sans-serif;
  font-weight: 600;
  min-width: 44px;
  text-align: center;
}

.coj27-pagination-list a:hover {
  background: #e6422c;
  color: #302516;
  border-color: #e6422c;
}

.coj27-pagination-list .current {
  background: #302516;
  color: #fff;
  border-color: #302516;
}
