/* Carrières — compact job offer cards + full offer dialog. */

.careers-offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 25rem));
  justify-content: center;
  gap: clamp(18px, 2vw, 28px);
  margin-top: clamp(28px, 3vw, 44px);
}

.careers-offer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 2.4vw, 32px);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(2, 14, 30, 0.28);
  color: #1c355e;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.careers-offer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #00a3b4, #75e6f3);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.careers-offer:hover,
.careers-offer:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 32px 60px rgba(2, 14, 30, 0.38);
}

.careers-offer:hover::before,
.careers-offer:focus-within::before {
  transform: scaleX(1);
}

.careers-offer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.careers-offer__dept {
  margin: 0 !important;
  color: #00a3b4 !important;
  font-size: 0.72rem !important;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4 !important;
  text-align: left !important;
  text-transform: uppercase;
}

.careers-offer__contract {
  flex: none;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 163, 180, 0.1);
  color: #007f8d;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.careers-offer__title {
  margin: 0 !important;
  font-size: clamp(1.3rem, 1.6vw, 1.55rem) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.careers-offer__open {
  all: unset;
  color: #1c355e;
  cursor: pointer;
}

/* The whole card opens the offer. */
.careers-offer__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.careers-offer__open:focus-visible {
  outline: none;
}

.careers-offer:has(.careers-offer__open:focus-visible) {
  outline: 3px solid #75e6f3;
  outline-offset: 3px;
}

.careers-offer__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.careers-offer__facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 0 !important;
  color: #4d5f7a;
  font-size: 0.92rem;
  line-height: 1.4;
}

.careers-offer__facts li::before {
  content: none !important;
}

.careers-offer__facts svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #00a3b4;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.careers-offer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(28, 53, 94, 0.1);
}

.careers-offer__more {
  color: #1c355e;
  font-weight: 500;
  font-size: 0.95rem;
}

.careers-offer__more span {
  display: inline-block;
  color: #00a3b4;
  transition: transform 0.25s ease;
}

.careers-offer:hover .careers-offer__more span {
  transform: translateX(5px);
}

.careers-offer__apply {
  position: relative;
  z-index: 2;
  padding: 10px 18px;
  border-radius: 8px;
  background: #1c355e;
  color: #ffffff !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
}

.careers-offer__apply:hover,
.careers-offer__apply:focus-visible {
  background: #00a3b4;
}

/* Dialog. */
.careers-offer-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: min(88vh, 900px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 40px 90px rgba(2, 14, 30, 0.45);
  color: #1c355e;
  overflow: hidden;
}

.careers-offer-dialog::backdrop {
  background: rgba(4, 21, 34, 0.72);
  backdrop-filter: blur(4px);
}

.careers-offer-dialog[open] {
  display: flex;
  animation: careers-offer-in 0.28s ease;
}

@keyframes careers-offer-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.careers-offer-dialog__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: inherit;
}

.careers-offer-dialog__head {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(26px, 3.4vw, 40px) clamp(22px, 4vw, 48px) clamp(22px, 2.6vw, 30px);
  padding-right: clamp(64px, 8vw, 88px);
  background:
    repeating-radial-gradient(ellipse at 100% 0%, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, #15365d 0%, #08233d 70%);
  color: #ffffff;
}

.careers-offer-dialog__head .careers-offer__top {
  justify-content: flex-start;
}

.careers-offer-dialog__head .careers-offer__dept {
  color: #75e6f3 !important;
}

.careers-offer-dialog__head .careers-offer__contract {
  background: rgba(117, 230, 243, 0.16);
  color: #c8f6fb;
}

.careers-offer-dialog__title {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: clamp(1.5rem, 2.6vw, 2rem) !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

.careers-offer-dialog__head .careers-offer__facts li {
  color: rgba(255, 255, 255, 0.82);
}

.careers-offer-dialog__head .careers-offer__facts svg {
  stroke: #75e6f3;
}

.careers-offer-dialog__close {
  position: absolute;
  top: clamp(18px, 2.4vw, 26px);
  right: clamp(18px, 2.4vw, 26px);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.careers-offer-dialog__close:hover,
.careers-offer-dialog__close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.careers-offer-dialog__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.careers-offer-dialog__body {
  display: grid;
  gap: clamp(24px, 3vw, 34px);
  padding: clamp(24px, 3.4vw, 40px) clamp(22px, 4vw, 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.careers-offer-dialog__section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px !important;
  color: #1c355e !important;
  font-size: 1.08rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

.careers-offer-dialog__section h4::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: #00a3b4;
}

.careers-offer-dialog__section p {
  margin: 0 0 12px !important;
  color: #3a4a63 !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
  text-align: left !important;
}

.careers-offer-dialog__section ul {
  display: grid;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.careers-offer-dialog__section li {
  position: relative;
  margin: 0 !important;
  padding: 0 0 0 30px !important;
  color: #3a4a63;
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: left;
}

.careers-offer-dialog__section li::before {
  content: "" !important;
  position: absolute;
  top: 0.32em;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 163, 180, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a3b4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.careers-offer-dialog__section--profile {
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: 14px;
  background: #f2f7f9;
}

.careers-offer-dialog__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px clamp(22px, 4vw, 48px);
  border-top: 1px solid rgba(28, 53, 94, 0.1);
  background: #ffffff;
}

.careers-offer-dialog__secondary {
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4d5f7a;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.careers-offer-dialog__secondary:hover,
.careers-offer-dialog__secondary:focus-visible {
  background: #f2f5f8;
  color: #1c355e;
}

.careers-offer-dialog__apply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 8px;
  background: #1c355e;
  color: #ffffff !important;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
}

.careers-offer-dialog__apply:hover,
.careers-offer-dialog__apply:focus-visible {
  background: #00a3b4;
}

html.careers-offer-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .careers-offer-dialog {
    width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }

  .careers-offer-dialog__foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .careers-offer-dialog__apply {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .careers-offer,
  .careers-offer::before,
  .careers-offer-dialog[open] {
    transition: none;
    animation: none;
  }
}

/* Carrières hero — two calls to action (replace the "Rejoignez-nous" block). */
.careers-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(28px, 3.4vw, 44px);
}

.careers-hero-actions__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: min(100%, 15rem);
  padding: 18px 34px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.careers-hero-actions__btn--solid {
  background: #ffffff;
  color: #1c355e !important;
}

.careers-hero-actions__btn--solid:hover,
.careers-hero-actions__btn--solid:focus-visible {
  border-color: #75e6f3;
  background: #75e6f3;
}

.careers-hero-actions__btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.6);
}

.careers-hero-actions__btn--ghost:hover,
.careers-hero-actions__btn--ghost:focus-visible {
  background: #ffffff;
  color: #1c355e !important;
}

.careers-hero-actions__btn span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #00a3b4;
  color: #ffffff;
  font-size: 0.72rem;
  letter-spacing: 0;
}

@media (max-width: 600px) {
  .careers-hero-actions__btn {
    flex: 1 1 100%;
  }
}

/* "Nos offres d'emploi" — light background (inverted from the navy version). */
.careers-page .careers-page__jobs {
  background: #eef7f8 url("../assets/careers-offers-bg.jpg.webp") center / cover no-repeat !important;
  color: #1c355e !important;
}

.careers-page .careers-page__jobs .careers-page__section-head h2 {
  color: #1c355e !important;
}

.careers-page .careers-page__jobs .careers-page__eyebrow {
  color: #00a3b4 !important;
}

.careers-page .careers-page__jobs .careers-page__jobs-empty {
  color: #4d5f7a !important;
}

.careers-page__jobs .careers-offer {
  border: 1px solid rgba(28, 53, 94, 0.08);
  box-shadow: 0 18px 44px rgba(16, 43, 79, 0.1);
}

.careers-page__jobs .careers-offer:hover,
.careers-page__jobs .careers-offer:focus-within {
  border-color: rgba(0, 163, 180, 0.28);
  box-shadow: 0 26px 56px rgba(16, 43, 79, 0.16);
}

.careers-page__jobs .careers-offer:has(.careers-offer__open:focus-visible) {
  outline-color: #00a3b4;
}

/* Application form — CV upload as a drop zone. */
.careers-page #edit-cv {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1.5px dashed rgba(0, 163, 180, 0.45);
  border-radius: 14px;
  background: rgba(0, 163, 180, 0.04);
}

.careers-page #edit-cv::before {
  content: "Votre CV (PDF ou Word)";
  color: #1c355e;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[lang="en"] .careers-page #edit-cv::before {
  content: "Your CV (PDF or Word)";
}

.careers-page #edit-cv input[type="file"] {
  width: 100%;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #4d5f7a;
  font: inherit;
  font-size: 0.9rem;
}

.careers-page #edit-cv input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #1c355e;
  color: #ffffff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* Legal notice folded behind a summary line (js/careers-offers.js). */
.careers-legal {
  margin-top: 14px;
  border-top: 1px solid rgba(28, 53, 94, 0.1);
  padding-top: 12px;
}

.careers-legal summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #00a3b4;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.careers-legal summary::-webkit-details-marker {
  display: none;
}

.careers-legal summary::after {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
}

.careers-legal[open] summary::after {
  content: "−";
}

.careers-legal .career-application-form__notice {
  margin: 10px 0 0 !important;
  font-size: 0.78rem !important;
  line-height: 1.6 !important;
}

@media (max-width: 760px) {
  /* Hero goes under the floating header: no white band on top. */
  main.site-main:has(> * .careers-page),
  main.site-main:has(.careers-page) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .careers-page .careers-page__hero {
    /* main keeps a 120px header clearance: pull the hero under the header. */
    margin-top: -120px !important;
    min-height: 0 !important;
    padding-top: 160px !important;
    padding-bottom: 64px !important;
  }

  .careers-page .careers-page__jobs {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  .careers-page .careers-page__application {
    padding: 52px 18px 56px !important;
  }

  .careers-page .careers-page__application-form > form,
  .careers-page .careers-page__application-form form {
    padding: 22px 18px !important;
    border-radius: 18px !important;
  }

  .careers-page .careers-page__application-copy h2 {
    font-size: 1.9rem !important;
    line-height: 1.15 !important;
  }

  .careers-page .career-application-form__consent span {
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
  }

  .careers-page .careers-page__application textarea {
    min-height: 110px !important;
    height: 110px;
  }
}
