/* ==========================================================================
   Profilia - Page Candidature spontanée (pfl-candidature.php, candidature.js)
   Habillage du formulaire Fluent Forms LIMITÉ à .pf-cs : les formulaires
   Postuler et fiche d'offre ne changent pas.
   Champs 54 px (rayon 14), cartes 16, pastilles pilule, boutons 54 (rayon 15).
   ========================================================================== */

.pf-cs {
  --pf-c-teal: var(--teal-900);
  --pf-c-ink: var(--text-strong);
  --pf-c-ink-2: var(--ink-72);
  --pf-c-sand: var(--sand-200);
  --pf-c-mist: #E6ECEC;
  --pf-c-soft: var(--cyan-100);
  --pf-c-text: var(--cyan-700);
  --pf-c-hover: var(--cyan-800);
  --pf-c-light: var(--cyan-300);
  --pf-c-line: var(--border-default);
  --pf-c-strong: var(--border-strong);
  --pf-c-err: #B42318;
  --pf-c-g: var(--gutter, 40px);
  display: block; background: #FFFFFF; color: var(--pf-c-ink); font-family: var(--font-sans);
}
.pf-cs *, .pf-cs *::before, .pf-cs *::after { box-sizing: border-box; }
.pf-cs :where(h1, h2, h3, p) { margin: 0; }
.pf-cs :where(ol, ul) { margin: 0; padding: 0; list-style: none; }
:where(.pf-cs) a { color: inherit; text-decoration: none; }
.pf-cs [hidden] { display: none !important; }
.pf-cs svg { flex: none; }
.pf-cs :where(a, button, input, textarea, summary):focus-visible { outline: 3px solid rgba(15, 178, 198, .55); outline-offset: 2px; }
.pf-cs .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pf-cs-wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pf-c-g); }
.pf-page-cs .pf-tabbar { display: none !important; }

/* 1. En-tête */
.pf-cs__hero { position: relative; overflow: hidden; padding: 30px 0 150px; background: var(--pf-c-teal); color: #FFFFFF; }
.pf-cs__hero::before { content: ""; position: absolute; top: -170px; right: -120px; width: 460px; height: 460px; border-radius: 50%; border: 76px solid rgba(15, 178, 198, .14); border-right-color: transparent; border-bottom-color: transparent; pointer-events: none; }
.pf-cs__hero .pf-cs-wrap { position: relative; }
.pf-cs-crumbs ol { display: flex; gap: 8px; font: 500 13px var(--font-sans); color: rgba(255, 255, 255, .75); }
.pf-cs-crumbs li + li::before { content: "/"; margin-right: 8px; }
.pf-cs-crumbs a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.pf-cs-crumbs [aria-current] { color: #FFFFFF; }
.pf-cs__hero h1 { max-width: 780px; margin-top: 22px; font: 600 46px/1.08 var(--font-sans); letter-spacing: -.035em; color: #FFFFFF; text-wrap: balance; }
.pf-cs__lead { max-width: 640px; margin-top: 14px !important; font: 400 16px/1.55 var(--font-sans); color: rgba(255, 255, 255, .82); }
.pf-cs-promises { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 24px !important; }
.pf-cs-promises li { display: flex; align-items: center; gap: 10px; font: 500 14.5px var(--font-sans); }
.pf-cs-promises li > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .08); color: var(--pf-c-light); }
.pf-cs-promises__court { display: none; }

/* 2. Grille */
.pf-cs__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; margin-top: -110px; padding-bottom: 56px; }
.pf-cs__card { position: relative; min-height: 460px; padding: 0 30px 28px; border-radius: 26px; background: #FFFFFF; box-shadow: 0 20px 50px rgba(6, 43, 49, .16); }
.pf-cs__side { display: flex; flex-direction: column; gap: 16px; padding-top: 110px; }
.pf-cs-next { padding: 24px; border: 1px solid var(--pf-c-line); border-radius: 22px; }
.pf-cs-next h2, .pf-cs-talk h2 { margin-bottom: 16px !important; font: 600 18px var(--font-sans); }
.pf-cs-next ol { display: flex; flex-direction: column; gap: 16px; counter-reset: n; }
.pf-cs-next li { display: flex; gap: 14px; counter-increment: n; }
.pf-cs-next li::before { content: counter(n); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--pf-c-teal); color: #FFFFFF; font: 600 13px/30px var(--font-sans); text-align: center; }
.pf-cs-next b { display: block; font: 600 14.5px var(--font-sans); }
.pf-cs-next li span span { font: 400 13px/1.5 var(--font-sans); color: var(--pf-c-ink-2); }
.pf-cs-talk { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px; background: var(--pf-c-sand); }
.pf-cs-talk h2 { margin-bottom: 0 !important; font-size: 16px; }
.pf-cs-talk__st { display: flex; align-items: center; gap: 8px; font: 500 13px var(--font-sans); }
.pf-cs-talk__st i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgba(13, 43, 48, .3); }
.pf-cs-talk.is-open .pf-cs-talk__st i { background: var(--cyan-500); box-shadow: 0 0 0 3px rgba(15, 178, 198, .22); }
.pf-cs-talk p { font: 400 13px/1.5 var(--font-sans); color: var(--pf-c-ink-2); }
.pf-cs-talk__st { color: var(--pf-c-ink) !important; }
.pf-cs-talk a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 13px; border: 1px solid var(--pf-c-strong); background: #FFFFFF; font: 600 14px var(--font-sans); }
.pf-cs-talk a svg { color: var(--pf-c-text); }
.pf-cs-talk a:hover { border-color: var(--pf-c-text); }

/* 3. Barre d'étapes */
.pf-cs-steps { margin: 0 -30px 24px; padding: 22px 30px 16px; border-bottom: 1px solid var(--pf-c-line); }
.pf-cs-steps ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pf-cs-steps li { position: relative; padding-top: 12px; }
.pf-cs-steps li > i { position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--pf-c-mist); overflow: hidden; }
.pf-cs-steps li > i::after { content: ""; position: absolute; inset: 0 100% 0 0; background: var(--pf-c-text); transition: right .3s var(--ease-out); }
.pf-cs-steps li.is-fait > i::after { right: 0; }
.pf-cs-steps li.is-cours > i::after { right: 50%; }
.pf-cs-steps button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; margin: 0; padding: 0; border: 0; background: none; color: var(--pf-c-ink-2); font: 600 14px var(--font-sans); text-align: left; cursor: pointer; }
.pf-cs-steps button:disabled { cursor: default; opacity: 1; }
.pf-cs-steps button, .pf-cs-steps button:hover, .pf-cs-steps button:focus, .pf-cs-steps button:disabled { background: none !important; box-shadow: none !important; }
.pf-cs-nav__prev:hover, .pf-cs-nav__prev:focus { background: #FFFFFF !important; color: var(--pf-c-ink) !important; }
.pf-cs-steps__n { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--pf-c-mist); color: var(--pf-c-ink-2); font: 600 12px var(--font-sans); }
.pf-cs-steps li.is-cours button { color: var(--pf-c-ink); }
.pf-cs-steps li.is-cours .pf-cs-steps__n { background: var(--pf-c-teal); color: #FFFFFF; }
.pf-cs-steps li.is-fait button { color: var(--pf-c-ink); }
.pf-cs-steps li.is-fait .pf-cs-steps__n { background: var(--pf-c-text); color: transparent; position: relative; }
.pf-cs-steps li.is-fait .pf-cs-steps__n::after { content: ""; position: absolute; left: 8px; top: 5px; width: 5px; height: 9px; border: solid #FFFFFF; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pf-cs-steps li.is-fait button:hover .pf-cs-steps__l { text-decoration: underline; text-underline-offset: 3px; }
.pf-cs-steps__mob, .pf-cs-steps__bar { display: none; }

/* 4. Formulaire (habillage Fluent Forms, limité à cette page) */
.pf-cs .fluentform { font-family: var(--font-sans); }
.pf-cs .fluentform fieldset { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pf-cs .fluentform fieldset > * { grid-column: 1 / -1; }
.pf-cs .fluentform fieldset > .pf-half { grid-column: auto; }
.pf-cs .fluentform .ff-el-group { margin-bottom: 18px; }
.pf-cs .fluentform .ff-t-container { gap: 16px; }
.pf-cs .fluentform .ff-t-container .ff-el-group { margin-bottom: 0; }
.pf-cs .fluentform .ff-el-input--label { margin-bottom: 8px; }
.pf-cs .fluentform .ff-el-input--label label { font: 600 14px var(--font-sans); color: var(--pf-c-ink); }
.pf-cs .fluentform .ff-el-input--label.asterisk-right label::after { content: none !important; }
.pf-cs-opt { font-weight: 500; color: var(--pf-c-ink-2); }
.pf-cs .fluentform .ff-el-form-control {
  width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--pf-c-strong); border-radius: 14px; background: #FFFFFF;
  color: var(--pf-c-ink); font: 500 16px var(--font-sans); box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.pf-cs .fluentform textarea.ff-el-form-control { height: auto; min-height: 96px; padding: 14px 16px; line-height: 1.5; }
.pf-cs .fluentform .ff-el-form-control::placeholder { color: var(--pf-c-ink-2); opacity: .8; }
.pf-cs .fluentform .ff-el-form-control:focus { outline: none; border-color: var(--pf-c-text); box-shadow: 0 0 0 3px rgba(15, 178, 198, .22); }
.pf-cs .fluentform [aria-invalid="true"].ff-el-form-control { border-color: var(--pf-c-err); }
.pf-cs-err, .pf-cs .fluentform .text-danger, .pf-cs .fluentform .error { display: block; margin-top: 6px; font: 500 13px/1.4 var(--font-sans); color: var(--pf-c-err); }
.pf-cs .fluentform .pf-step-head { margin-bottom: 22px; }
.pf-cs .pf-step-h { font: 600 24px/1.25 var(--font-sans); letter-spacing: -.02em; color: var(--pf-c-ink); }
.pf-cs .pf-step-h:focus { outline: none; }
.pf-cs .pf-step-p { margin-top: 6px; font: 400 15px/1.5 var(--font-sans); color: var(--pf-c-ink-2); }

/* Cartes de secteurs et pastilles : vraies cases, seul l'aspect change */
.pf-cs .pf-cards .ff-el-input--content { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf-cs .pf-pills .ff-el-input--content { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-cs :is(.pf-cards, .pf-pills) .ff-el-form-check { margin: 0; }
.pf-cs :is(.pf-cards, .pf-pills) .ff-el-form-check-label { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; cursor: pointer; }
.pf-cs .fluentform :is(.pf-cards, .pf-pills) .ff-el-form-check-input { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; opacity: 0 !important; cursor: pointer; z-index: 1; }
.pf-cs .pf-cards .ff-el-form-check-label { justify-content: flex-start; min-height: 70px; padding: 12px 14px !important; border: 1px solid var(--pf-c-strong); border-radius: 16px; background: #FFFFFF; transition: border-color .15s, background .15s; }
.pf-cs .pf-cards .ff-el-form-check-label:hover { border-color: var(--pf-c-text); }
.pf-cs-card__ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--pf-c-sand); color: var(--pf-c-text); }
.pf-cs-card__t { display: flex; flex-direction: column; min-width: 0; }
.pf-cs-card__t b { font: 600 15px/1.3 var(--font-sans); }
.pf-cs-card__t small { font: 400 12.5px/1.35 var(--font-sans); color: var(--pf-c-ink-2); }
.pf-cs .pf-cards .ff-el-form-check-label:has(input:checked) { background: var(--pf-c-teal); border-color: var(--pf-c-teal); color: #FFFFFF; }
.pf-cs .pf-cards .ff-el-form-check-label:has(input:checked) small { color: rgba(255, 255, 255, .8); }
.pf-cs .pf-cards .ff-el-form-check-label:has(input:checked) .pf-cs-card__ico { background: rgba(255, 255, 255, .1); color: var(--pf-c-light); }
.pf-cs .pf-pills .ff-el-form-check-label { min-height: 44px; padding: 0 18px !important; border: 1px solid var(--pf-c-strong); border-radius: var(--radius-pill); background: #FFFFFF; font: 500 14.5px var(--font-sans); color: var(--pf-c-ink); transition: border-color .15s, background .15s; }
.pf-cs .pf-pills .ff-el-form-check-label:hover { border-color: var(--pf-c-text); }
.pf-cs .pf-pills .ff-el-form-check-label:has(input:checked) { background: var(--pf-c-teal); border-color: var(--pf-c-teal); color: #FFFFFF; }
.pf-cs :is(.pf-cards, .pf-pills) .ff-el-form-check-label:has(input:focus-visible) { outline: 3px solid rgba(15, 178, 198, .55); outline-offset: 2px; }
.pf-cs .pf-consent .ff-el-form-check-label, .pf-cs .pf-consent .ff_t_c { font: 400 13.5px/1.55 var(--font-sans); color: var(--pf-c-ink-2); }
.pf-cs .pf-consent input[type="checkbox"] { width: 20px; height: 20px; margin-right: 8px; accent-color: var(--pf-c-text); }
.pf-cs .pf-consent a { color: var(--pf-c-text); text-decoration: underline; }

/* Navigation entre étapes (script) et bouton d'envoi */
.pf-cs-nav { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.pf-cs-nav__temps { flex: 1; font: 500 13.5px var(--font-sans); color: var(--pf-c-ink-2); }
.pf-cs-nav__prev { height: 54px; padding: 0 20px; margin: 0; border: 1px solid var(--pf-c-strong); border-radius: 15px; background: #FFFFFF; color: var(--pf-c-ink); font: 600 15px var(--font-sans); cursor: pointer; }
.pf-cs-nav__prev:hover { border-color: var(--pf-c-text); }
.pf-cs-nav__next, .pf-cs .fluentform .ff-btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 26px; margin: 0; border: 0 !important;
  border-radius: 15px !important; background: var(--pf-c-text) !important; color: #FFFFFF !important; font: 600 16px var(--font-sans) !important; cursor: pointer; box-shadow: none;
}
.pf-cs-nav__next:hover, .pf-cs .fluentform .ff-btn-submit:hover { background: var(--pf-c-hover) !important; }
.pf-cs .fluentform .ff_submit_btn_wrapper { margin: 0; }

/* Confirmation */
.pf-cs .ff-message-success { padding: 40px 0 8px; border: 0; background: none; box-shadow: none; }
.pf-done__ok { position: relative; display: block; width: 64px; height: 64px; border-radius: 18px; background: var(--pf-c-soft); }
.pf-done__ok::after { content: ""; position: absolute; left: 25px; top: 16px; width: 12px; height: 24px; border: solid var(--pf-c-text); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.pf-cs .pf-done h2 { margin-top: 18px; font: 600 28px/1.2 var(--font-sans); letter-spacing: -.02em; color: var(--pf-c-ink); }
.pf-cs .pf-done h2:focus { outline: none; }
.pf-cs .pf-done p { max-width: 520px; margin-top: 8px; font: 400 16px/1.6 var(--font-sans); color: var(--pf-c-ink-2); }
.pf-done__act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pf-done__act a { display: inline-flex; align-items: center; height: 50px; padding: 0 20px; border-radius: 14px; background: var(--pf-c-teal); color: #FFFFFF !important; font: 600 15px var(--font-sans); text-decoration: none !important; }
.pf-done__act a:hover { background: var(--pf-c-hover); }

/* 5. FAQ */
.pf-cs-faq { padding-top: 10px; padding-bottom: 64px; }
.pf-cs-faq h2 { margin-bottom: 16px !important; font: 600 22px var(--font-sans); letter-spacing: -.02em; }
.pf-cs-faq__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pf-cs-faq details { padding: 20px; border: 1px solid var(--pf-c-line); border-radius: 20px; }
.pf-cs-faq summary { list-style: none; font: 600 15px/1.4 var(--font-sans); cursor: default; }
.pf-cs-faq summary::-webkit-details-marker { display: none; }
.pf-cs-faq details p { margin-top: 6px !important; font: 400 14px/1.55 var(--font-sans); color: var(--pf-c-ink-2); }
@media (min-width: 768px) { .pf-cs-faq summary { pointer-events: none; } }

/* Largeurs intermédiaires */
@media (max-width: 1199px) {
  .pf-cs { --pf-c-g: 28px; }
  .pf-cs__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
  .pf-cs .pf-cards .ff-el-input--content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .pf-cs__grid { grid-template-columns: minmax(0, 1fr); }
  .pf-cs__side { padding-top: 0; }
}
/* Mobile : une étape par écran, bouton fixe en bas */
@media (max-width: 767px) {
  .pf-cs { --pf-c-g: 16px; }
  .pf-cs__hero { padding: 14px 0 22px; }
  .pf-cs-crumbs, .pf-cs__lead, .pf-cs-promises { display: none; }
  .pf-cs__hero h1 { margin-top: 4px; font-size: 26px; line-height: 1.15; }
  .pf-cs-promises__court { display: block; margin-top: 8px !important; font: 500 13.5px var(--font-sans); color: var(--pf-c-light); }
  .pf-cs__grid { margin-top: 0; padding-bottom: 28px; gap: 24px; }
  .pf-cs__card { min-height: 0; margin: 0 calc(-1 * var(--pf-c-g)); padding: 0 var(--pf-c-g); border-radius: 0; box-shadow: none; }
  .pf-cs-steps { margin: 0 calc(-1 * var(--pf-c-g)) 20px; padding: 16px var(--pf-c-g) 14px; }
  .pf-cs-steps ol { display: none; }
  .pf-cs-steps__mob { display: flex; justify-content: space-between; font: 600 14px var(--font-sans); color: var(--pf-c-ink-2); }
  .pf-cs-steps__bar { display: block; height: 5px; margin-top: 10px; border-radius: 5px; background: var(--pf-c-mist); overflow: hidden; }
  .pf-cs-steps__bar i { display: block; height: 100%; width: 25%; border-radius: 5px; background: var(--pf-c-text); transition: width .3s var(--ease-out); }
  .pf-cs .fluentform fieldset { grid-template-columns: minmax(0, 1fr); }
  .pf-cs .fluentform fieldset > .pf-half { grid-column: 1 / -1; }
  .pf-cs .fluentform .ff-t-container { flex-direction: column; }
  .pf-cs .pf-cards .ff-el-input--content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-cs .pf-cards .ff-el-form-check-label { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; }
  .pf-cs .pf-step-h { font-size: 22px; }
  .pf-cs.is-js .pf-cs-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 880; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #FFFFFF; border-top: 1px solid var(--pf-c-line); box-shadow: 0 -8px 24px rgba(6, 43, 49, .08);
  }
  .pf-cs.is-js .pf-cs-nav__temps { display: none; }
  .pf-cs.is-js .pf-cs-nav__next, .pf-cs.is-js .fluentform .ff_submit_btn_wrapper { flex: 1; }
  .pf-cs.is-js .fluentform .ff-btn-submit { width: 100%; }
  .pf-cs.is-js .pf-cs-nav__prev { padding: 0 16px; }
  .pf-cs.is-js .pf-cs__card { padding-bottom: 96px; }
  .pf-cs-faq__grid { grid-template-columns: minmax(0, 1fr); }
  .pf-cs-faq summary { display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
  .pf-cs-faq summary::after { content: "+"; font-weight: 500; color: var(--pf-c-text); }
  .pf-cs-faq details[open] summary::after { content: "\2013"; }
}
@media (prefers-reduced-motion: reduce) { .pf-cs *, .pf-cs *::after { transition: none !important; } }
