/* ===================================================================
   HYDREAULYS — Page Recrutement
   Offres filtrables + détail dépliable + modale de candidature
   =================================================================== */

/* ---------- Bandeau « pourquoi nous rejoindre » ---------- */
.rec-intro { padding: 8px 0 0; }
.rec-promise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.rec-promise__card {
  border: 1px solid var(--hy-line);
  border-radius: var(--radius-card, 22px);
  padding: 26px 24px;
  background: var(--hy-paper);
}
.rec-promise__ic {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--hy-cyan);
  color: #fff;
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.rec-promise__t { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; }
.rec-promise__d { font-size: 14.5px; line-height: 1.6; color: var(--hy-muted); margin: 0; }

/* ---------- Section offres ---------- */
.rec { padding: 88px 0 120px; }
.rec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 30px;
}
.rec-head__count {
  font-size: 14px; font-weight: 700; color: var(--hy-blue);
  background: var(--hy-blue-tint); border-radius: var(--radius-pill);
  padding: 9px 18px; white-space: nowrap;
}

/* ---------- Liste des offres ---------- */
.rec-list { display: flex; flex-direction: column; gap: 16px; }

.rec-job {
  border: 1px solid var(--hy-line);
  border-radius: 22px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.rec-job:hover { border-color: var(--hy-cyan); box-shadow: 0 18px 44px rgba(0,38,76,.08); }
.rec-job--open { border-color: var(--hy-blue); box-shadow: 0 18px 44px rgba(0,38,76,.10); }

.rec-job__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 24px 28px;
}
.rec-job__main { min-width: 0; }
.rec-job__tags { display: flex; gap: 8px; align-items: center; margin-bottom: 11px; flex-wrap: wrap; }
.rec-fam {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 11px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 7px;
}
.rec-fam__dot { width: 7px; height: 7px; border-radius: 50%; }
.rec-fam--exploitation { background: #EAF1F8; color: #005098; }
.rec-fam--ingenierie  { background: #E2F2F1; color: #1E7E7A; }
.rec-fam--support     { background: #E9F5EC; color: #3E8F55; }
.rec-contract {
  font-size: 11.5px; font-weight: 700; color: var(--hy-blue-ink);
  border: 1px solid var(--hy-line); border-radius: var(--radius-pill);
  padding: 4px 12px;
}
.rec-job__title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 12px; color: var(--hy-ink); }
.rec-job__meta { display: flex; gap: 22px; flex-wrap: wrap; }
.rec-job__meta span { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--hy-muted); }
.rec-job__meta strong { color: var(--hy-blue-ink); font-weight: 700; }
.rec-job__meta svg { color: var(--hy-cyan); flex: none; }

.rec-job__actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 168px; }

/* Bouton "détail" (ghost) */
.rec-btn-detail {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 700 14px/1 var(--font-sans); color: var(--hy-blue);
  background: #fff; border: 1px solid var(--hy-line); border-radius: var(--radius-pill);
  padding: 12px 18px; transition: background .16s ease, border-color .16s ease;
}
.rec-btn-detail:hover { background: var(--hy-paper); border-color: var(--hy-blue); }
.rec-btn-detail svg { transition: transform .2s ease; }
.rec-job--open .rec-btn-detail svg { transform: rotate(180deg); }

/* Bouton "postuler" (plein) */
.rec-btn-apply {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 700 14px/1 var(--font-sans); color: #fff;
  background: var(--hy-blue); border: 1px solid var(--hy-blue); border-radius: var(--radius-pill);
  padding: 12px 18px; transition: background .16s ease;
}
.rec-btn-apply:hover { background: var(--hy-blue-deep, #003a70); }

/* Panneau de détail dépliable */
.rec-job__detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding: 4px 28px 30px;
  border-top: 1px dashed var(--hy-line);
  margin: 0 0 0;
}
.rec-job__detail-intro {
  grid-column: 1 / -1;
  font-size: 15.5px; line-height: 1.7; color: var(--hy-ink); margin: 22px 0 4px;
}
.rec-detail-col h4 {
  font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--hy-blue); margin: 8px 0 12px;
}
.rec-detail-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.rec-detail-col li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.55; color: var(--hy-ink); }
.rec-detail-col li::before {
  content: ""; position: absolute; left: 2px; top: 7px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--hy-cyan);
}
.rec-job__detail-foot {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--hy-line);
}
.rec-job__detail-foot p { margin: 0; font-size: 13.5px; color: var(--hy-muted); }

/* ---------- Candidature spontanée ---------- */
.rec-spontaneous {
  margin-top: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: var(--hy-blue); color: #fff;
  border-radius: var(--radius-card, 26px);
  padding: 38px 44px;
  position: relative; overflow: hidden;
}
.rec-spontaneous__wave { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.rec-spontaneous h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; position: relative; }
.rec-spontaneous p { margin: 0; font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.78); max-width: 540px; position: relative; }

.rec-empty {
  text-align: center; padding: 60px 20px; color: var(--hy-muted);
  border: 1px dashed var(--hy-line); border-radius: 22px; font-size: 15px;
}

/* ===================================================================
   Modale de candidature (dialog accessible)
   =================================================================== */
.rec-modal-overlay {
  position: fixed; inset: 0; z-index: 100050;
  background: rgba(8, 26, 48, .55);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 24px;
  animation: recFade .18s ease;
}
@keyframes recFade { from { opacity: 0; } to { opacity: 1; } }

.rec-modal {
  width: 100%; max-width: 620px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 40px 100px rgba(0,20,45,.4);
  animation: recRise .22s cubic-bezier(.2,.7,.3,1);
}
@keyframes recRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.rec-modal__head {
  position: sticky; top: 0; z-index: 2;
  background: #fff; border-bottom: 1px solid var(--hy-line);
  padding: 24px 28px 18px;
  border-radius: 24px 24px 0 0;
}
.rec-modal__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hy-blue); }
.rec-modal__title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 6px 0 0; padding-right: 40px; }
.rec-modal__close {
  position: absolute; top: 20px; right: 22px;
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--hy-line); background: #fff; color: var(--hy-muted);
  display: grid; place-items: center;
}
.rec-modal__close:hover { background: var(--hy-paper); color: var(--hy-ink); }

.rec-modal__body { padding: 24px 28px 28px; }

/* Formulaire */
.rec-form { display: flex; flex-direction: column; gap: 18px; }
.rec-subject {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--hy-blue-tint);
  border: 1px solid var(--hy-green-soft);
  border-radius: 14px;
  padding: 14px 16px;
}
.rec-subject__ic {
  width: 38px; height: 38px; flex: none;
  border-radius: 10px;
  background: #fff;
  color: var(--hy-blue);
  display: grid; place-items: center;
}
.rec-subject__label {
  display: block;
  font-size: 11px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--hy-blue); margin-bottom: 3px;
}
.rec-subject__value {
  display: block;
  font-size: 14.5px; font-weight: 700; color: var(--hy-blue-ink);
  line-height: 1.35;
}
.rec-success__subject {
  margin-top: 16px !important;
  display: inline-block;
  background: var(--hy-green-tint);
  border: 1px solid var(--hy-green-soft);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px; font-weight: 700; color: var(--hy-blue-ink);
}
.rec-success__subject span { color: var(--hy-blue); font-weight: 800; margin-right: 4px; }
.rec-field { display: flex; flex-direction: column; gap: 7px; }
.rec-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rec-label { font-size: 13.5px; font-weight: 700; color: var(--hy-ink); }
.rec-label .req { color: #C0392B; margin-left: 2px; }
.rec-hint { font-size: 12.5px; color: var(--hy-muted); }

.rec-input, .rec-textarea, .rec-modal select {
  font-family: inherit; font-size: 15px; color: var(--hy-ink);
  border: 1px solid var(--hy-line); border-radius: 12px;
  padding: 12px 14px; background: #fff; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rec-textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.rec-input:focus, .rec-textarea:focus, .rec-modal select:focus {
  outline: none; border-color: var(--hy-blue); box-shadow: 0 0 0 3px rgba(0,80,152,.15);
}
.rec-input[aria-invalid="true"], .rec-textarea[aria-invalid="true"] {
  border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192,57,43,.12);
}
.rec-error { font-size: 12.5px; font-weight: 600; color: #C0392B; display: flex; align-items: center; gap: 6px; }

/* Champ fichier */
.rec-file { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rec-file__btn {
  display: inline-flex; align-items: center; gap: 9px;
  font: 700 13.5px/1 var(--font-sans); color: var(--hy-blue);
  background: var(--hy-blue-tint); border: 1px solid transparent; border-radius: var(--radius-pill);
  padding: 11px 18px; cursor: pointer;
}
.rec-file__btn:hover { background: #dde9f6; }
.rec-file input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.rec-file__name { font-size: 13.5px; color: var(--hy-muted); }
.rec-file input:focus-visible + .rec-file__btn { outline: 3px solid var(--hy-blue); outline-offset: 2px; }

/* Consentement */
.rec-consent { border: none; padding: 0; margin: 0; }
.rec-consent legend { font-size: 13.5px; font-weight: 700; color: var(--hy-ink); margin-bottom: 8px; padding: 0; }
.rec-check { display: flex; gap: 11px; align-items: flex-start; }
.rec-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--hy-blue); flex: none; }
.rec-check label { font-size: 13.5px; line-height: 1.55; color: var(--hy-muted); }
.rec-check a { color: var(--hy-blue); text-decoration: underline; }

/* Résumé d'erreurs */
.rec-errors-summary {
  border: 1px solid #E7B7B1; background: #FCEEEC; border-radius: 14px;
  padding: 14px 18px;
}
.rec-errors-summary p { margin: 0 0 6px; font-size: 14px; font-weight: 800; color: #962B1E; }
.rec-errors-summary ul { margin: 0; padding-left: 18px; }
.rec-errors-summary li { font-size: 13.5px; color: #962B1E; }
.rec-errors-summary a { color: #962B1E; font-weight: 600; text-decoration: underline; }

.rec-form__foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 4px; }
.rec-submit {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 15px/1 var(--font-sans); color: #fff;
  background: var(--hy-blue); border: none; border-radius: var(--radius-pill);
  padding: 15px 28px;
}
.rec-submit:hover { background: var(--hy-blue-deep, #003a70); }
.rec-cancel {
  font: 700 14px/1 var(--font-sans); color: var(--hy-muted);
  background: none; border: none; padding: 14px 16px; border-radius: var(--radius-pill);
}
.rec-cancel:hover { color: var(--hy-ink); background: var(--hy-paper); }

/* Écran de succès */
.rec-success { text-align: center; padding: 26px 12px 14px; }
.rec-success__ic {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--hy-green-tint); color: var(--hy-cyan);
  display: grid; place-items: center; margin: 0 auto 20px;
}
.rec-success h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; }
.rec-success p { font-size: 15px; line-height: 1.6; color: var(--hy-muted); max-width: 420px; margin: 0 auto 22px; }

@media (max-width: 860px) {
  .rec-promise { grid-template-columns: 1fr; }
  .rec-job__detail { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 680px) {
  .rec { padding: 64px 0 90px; }
  .rec-job__row { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .rec-job__actions { flex-direction: row; min-width: 0; }
  .rec-job__actions > * { flex: 1; }
  .rec-job__detail { padding: 4px 22px 26px; }
  .rec-grid-2 { grid-template-columns: 1fr; }
  .rec-spontaneous { padding: 30px 26px; }
  .rec-modal__body { padding: 20px; }
  .rec-modal__head { padding: 20px 20px 16px; }
}
