/* CDL Offres d'emploi. Les polices viennent du thème ; seules les couleurs CDL sont fixées.
   Pour ajuster : redéfinir ces variables dans le thème, sur .cdl-oe. */
.cdl-oe {
  --cdl-oe-vert: #1f4d2c;
  --cdl-oe-orange: #e19a1c;
  --cdl-oe-gris: #f4f4f2;
  --cdl-oe-bord: #e3e3e0;
  --cdl-oe-texte: #1d1d1b;
  --cdl-oe-doux: #5d5d58;
  max-width: 1080px;
  margin: 64px auto;
  padding: 0 16px;
  color: var(--cdl-oe-texte);
}
.cdl-oe *, .cdl-oe *::before, .cdl-oe *::after { box-sizing: border-box; }
.cdl-oe [hidden] { display: none !important; }

.cdl-oe__entete { text-align: center; margin-bottom: 32px; }
.cdl-oe__titre { margin: 0 0 8px; color: var(--cdl-oe-texte); }
.cdl-oe__sous-titre { margin: 0; color: var(--cdl-oe-doux); }

/* Outils */
.cdl-oe__outils { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.cdl-oe__recherche {
  flex: 1 1 280px; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--cdl-oe-bord); border-radius: 999px; background: var(--cdl-oe-gris); font: inherit;
}
.cdl-oe__filtre { position: relative; }
.cdl-oe__filtre summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--cdl-oe-bord); border-radius: 999px; background: #fff; font-weight: 600;
}
.cdl-oe__filtre summary::-webkit-details-marker { display: none; }
.cdl-oe__filtre summary::after { content: " \25BE"; }
.cdl-oe__filtre[open] summary::after { content: " \25B4"; }
.cdl-oe__filtre ul {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 240px; max-height: 320px; overflow: auto;
  margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--cdl-oe-bord);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.cdl-oe__filtre li label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.cdl-oe__filtre li label:hover { background: var(--cdl-oe-gris); }
.cdl-oe__compte { margin: 8px 0 16px; color: var(--cdl-oe-doux); font-size: .9em; }

/* Liste */
.cdl-oe__liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.cdl-oe__offre {
  display: flex; gap: 16px; align-items: center; padding: 16px 20px;
  background: #fff; border: 1px solid var(--cdl-oe-bord); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.cdl-oe__offre:hover { border-color: var(--cdl-oe-vert); box-shadow: 0 4px 16px rgba(0, 0, 0, .05); }
.cdl-oe__photo { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.cdl-oe__corps { flex: 1; min-width: 0; }
.cdl-oe__poste { margin: 0 0 6px; font-size: 1.1em; }
.cdl-oe__poste a { color: inherit; text-decoration: none; }
.cdl-oe__details { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; color: var(--cdl-oe-doux); font-size: .92em; }
.cdl-oe__details li { display: inline-flex; gap: 6px; align-items: center; }
.cdl-oe__icone { color: var(--cdl-oe-orange); flex: none; }
.cdl-oe__vide { text-align: center; color: var(--cdl-oe-doux); padding: 24px 0; }

.cdl-oe__bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px;
  border: 0; border-radius: 999px; background: var(--cdl-oe-vert); color: #fff !important;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.cdl-oe__bouton:hover { filter: brightness(1.15); }
.cdl-oe__bouton:disabled { opacity: .6; cursor: wait; }

.cdl-oe__bouton--contour { background: #fff; color: var(--cdl-oe-vert) !important; box-shadow: inset 0 0 0 2px var(--cdl-oe-vert); }
.cdl-oe__bouton--contour:hover { filter: none; background: var(--cdl-oe-gris); }

/* Détail : une seule colonne, le formulaire sous la description */
.cdl-oe__retour {
  display: inline-block; margin-bottom: 20px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--cdl-oe-vert); text-decoration: none; font: inherit; font-weight: 600;
}
.cdl-oe__fiche { max-width: 820px; margin: 0 auto; }
.cdl-oe__fiche-entete {
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
  padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--cdl-oe-bord);
}
.cdl-oe__texte { line-height: 1.6; }
.cdl-oe__postuler { margin-top: 48px; padding: 32px; background: var(--cdl-oe-gris); border-radius: 12px; scroll-margin-top: 24px; }
.cdl-oe__postuler h3 { margin: 0 0 4px; }
.cdl-oe__poste-cible { margin: 0 0 4px; font-weight: 600; color: var(--cdl-oe-vert); }

/* Étapes (formulaire et jumelage) */
.cdl-oe__progres { display: flex; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: none; }
.cdl-oe__progres li {
  flex: 1; display: flex; gap: 8px; align-items: center; padding-top: 10px;
  border-top: 4px solid var(--cdl-oe-bord); color: var(--cdl-oe-doux); font-size: .9em; font-weight: 600;
}
.cdl-oe__progres li.est-fait { border-color: var(--cdl-oe-vert); }
.cdl-oe__progres li.est-courant { border-color: var(--cdl-oe-orange); color: var(--cdl-oe-texte); }
.cdl-oe__progres-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px;
  border-radius: 50%; background: var(--cdl-oe-bord); color: var(--cdl-oe-texte); font-size: .85em;
}
.cdl-oe__progres li.est-fait .cdl-oe__progres-num { background: var(--cdl-oe-vert); color: #fff; }
.cdl-oe__progres li.est-courant .cdl-oe__progres-num { background: var(--cdl-oe-orange); color: #fff; }
.cdl-oe__nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.cdl-oe__form .cdl-oe__nav .cdl-oe__bouton { width: auto; }

/* Outil de jumelage */
.cdl-oe-jum { margin-bottom: 32px; }
.cdl-oe-jum__app, .cdl-oe-jum__candidature { padding: 32px; background: #fff; border: 1px solid var(--cdl-oe-bord); border-radius: 16px; }
.cdl-oe-jum__question { margin: 0 0 6px; }
.cdl-oe-jum__sous-question { margin: 20px 0 10px; font-size: 1em; }
.cdl-oe-jum__cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.cdl-oe-jum__carte {
  display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; min-height: 150px; padding: 20px 14px;
  border: 1px solid var(--cdl-oe-bord); border-radius: 12px; background: #fff; color: var(--cdl-oe-vert);
  font: inherit; font-weight: 700; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.cdl-oe-jum__carte span { color: var(--cdl-oe-texte); }
.cdl-oe-jum__carte:hover { border-color: var(--cdl-oe-vert); }
.cdl-oe-jum__carte[aria-pressed="true"] { border: 2px solid var(--cdl-oe-vert); background: #eef5f0; padding: 19px 13px; }
.cdl-oe-jum__puces { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cdl-oe-jum__puces label {
  display: inline-flex; gap: 8px; align-items: center; min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--cdl-oe-bord); border-radius: 999px; background: #fff; cursor: pointer;
}
.cdl-oe-jum__puces label:has(input:checked) { border-color: var(--cdl-oe-vert); background: #eef5f0; }
.cdl-oe-jum__etape .cdl-oe__liste { margin: 16px 0 24px; }
.cdl-oe-jum__etape .cdl-oe__poste { margin: 0 0 4px; }
.cdl-oe-jum__candidature.cdl-oe__postuler--envoye { text-align: center; }
.cdl-oe__note, .cdl-oe__petit { margin: 0 0 12px; font-size: .85em; color: var(--cdl-oe-doux); }
.cdl-oe__postuler--envoye { text-align: center; }

.cdl-oe__form fieldset { margin: 0 0 20px; padding: 0; border: 0; }
.cdl-oe__form legend { margin-bottom: 10px; font-weight: 700; }
.cdl-oe__deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cdl-oe__champ { margin: 0 0 12px; }
.cdl-oe__champ label { display: block; margin-bottom: 4px; font-size: .9em; font-weight: 600; }
.cdl-oe__champ input, .cdl-oe__champ select {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit;
  border: 1px solid var(--cdl-oe-bord); border-radius: 8px; background: #fff;
}
.cdl-oe__champ input[type="file"] { padding: 8px; }
.cdl-oe__champ input:focus, .cdl-oe__champ select:focus, .cdl-oe__recherche:focus {
  outline: 2px solid var(--cdl-oe-vert); outline-offset: 1px;
}
.cdl-oe__cases { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 16px; font-size: .92em; }
.cdl-oe__cases label, .cdl-oe__consent { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.cdl-oe__consent { margin-bottom: 16px; font-size: .92em; }
.cdl-oe__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cdl-oe__erreur { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fdecea; color: #8a1c12; }
.cdl-oe__form .cdl-oe__bouton { width: 100%; }

@media (max-width: 560px) {
  .cdl-oe__postuler, .cdl-oe-jum__app, .cdl-oe-jum__candidature { padding: 20px; }
  .cdl-oe__progres li > span:last-child { display: none; }
  .cdl-oe__progres li.est-courant > span:last-child { display: inline; }
  .cdl-oe-jum__cartes { grid-template-columns: 1fr 1fr; }
  .cdl-oe__nav .cdl-oe__bouton { flex: 1 1 100%; }
  .cdl-oe__offre { flex-wrap: wrap; }
  .cdl-oe__offre .cdl-oe__bouton { width: 100%; }
  .cdl-oe__deux, .cdl-oe__cases { grid-template-columns: 1fr; }
  .cdl-oe__filtre { flex: 1 1 calc(50% - 6px); }
  .cdl-oe__filtre summary { text-align: center; }
}
