/* ═══ CANDIDATURE EASYHOME : styles de la fenêtre (/jobs) et du formulaire seul (/jobs-formulaire).
   Partagés par les deux pages avec jobs-candidature.js. Registre sobre depuis le 27/10/2026 (retour du client :
   « trop bold, trop rouge, trop d'emoji ») : bordures fines, rose réservé aux boutons et aux repères, pas de relief.
   Hors /assets/ exprès : ce dossier est servi « immutable » pour un an (vercel.json). ═══ */
#form-modal {
  --c-ink: #1b1b1a; --c-ink-2: #55554f; --c-line: #e3e2de; --c-soft: #f6f6f4;
  --c-pink: #FB455D; --c-pink-dark: #e2384f; --c-pink-soft: #fff2f4; --c-bad: #d92d20; --c-bad-soft: #fef3f2;
  position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; padding: 16px;
  font-family: 'Poppins', system-ui, sans-serif; color: var(--c-ink);
}
#form-modal.open { display: flex; }
#form-modal .backdrop { position: absolute; inset: 0; background: rgba(20,20,19,0.55); animation: am-fade .2s ease; }
#form-modal .am-box {
  position: relative; max-width: 560px; width: 100%; max-height: 92vh; overflow-y: auto; background: #fff;
  border-radius: 16px; box-shadow: 0 24px 64px -24px rgba(0,0,0,0.4); padding: 26px 20px 22px;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; animation: am-rise .3s cubic-bezier(.16,1,.3,1);
}
@media (min-width: 640px) { #form-modal .am-box { padding: 34px 36px 30px; } }
/* Centrée au téléphone aussi, jamais en tiroir collé en bas (doctrine du kit, page-check MODAL_TIROIR). */
@media (max-width: 640px) {
  #form-modal { padding: 10px; }
  #form-modal .am-box { max-height: 94vh; max-height: 94svh; }
}
@keyframes am-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes am-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
html.am-lock { overflow: hidden; }

/* Formulaire posé dans la page (/jobs-formulaire) : pas de fenêtre, rien à fermer. */
#form-modal.am-inline { position: static; display: block; padding: 0; z-index: auto; }
#form-modal.am-inline .am-box { max-width: none; max-height: none; overflow: visible; box-shadow: none; border: 1px solid var(--c-line); border-radius: 16px; animation: none; }
#form-modal.am-inline [data-am-close] { display: none !important; }
@media (max-width: 640px) { #form-modal.am-inline .am-box { padding: 22px 18px 20px; } }

.am-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--c-line); background: #fff; color: var(--c-ink); display: grid; place-items: center; z-index: 2; cursor: pointer; transition: border-color .15s, background .15s; }
.am-close:hover { border-color: var(--c-ink); background: var(--c-soft); }

/* Barre du haut : retour, progression, compteur */
.tf-topbar { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; padding-right: 52px; }
.am-inline .tf-topbar { padding-right: 0; }
.tf-topbar[hidden], .tf-back[hidden] { display: none; }
.tf-back { align-self: flex-start; font: inherit; font-size: 13px; font-weight: 500; color: var(--c-ink-2); background: none; border: 0; cursor: pointer; padding: 0; min-height: 24px; }
.tf-back:hover { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }
.tf-progress-track { height: 4px; border-radius: 999px; background: var(--c-line); overflow: hidden; }
.tf-progress-fill { height: 100%; border-radius: 999px; background: var(--c-ink); transition: width .4s cubic-bezier(.16,1,.3,1); }
.tf-counter { margin: 0; font-size: 12px; font-weight: 500; color: var(--c-ink-2); }

/* Écrans */
.am-step { animation: am-step .3s ease; }
@keyframes am-step { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.am-q { font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; font-size: clamp(1.3rem, 4.8vw, 1.6rem); color: var(--c-ink); margin: 0 0 8px; outline: none; }
.am-help { margin: 0 0 20px; font-size: 14.5px; line-height: 1.5; color: var(--c-ink-2); }

/* Réponses à un tap */
.tf-options { display: flex; flex-direction: column; gap: 10px; }
.tf-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .tf-chips { grid-template-columns: 1fr; } }
.tf-option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; min-height: 52px; border-radius: 12px; border: 1px solid var(--c-line); background: #fff; font: inherit; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .tf-option:hover { border-color: var(--c-ink); } }
.tf-option:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.tf-option.is-selected { border-color: var(--c-ink); background: var(--c-soft); box-shadow: inset 0 0 0 1px var(--c-ink); }
.tf-chips .tf-option { padding: 12px 14px; }
.tf-label { flex: 1; font-weight: 500; font-size: 15px; color: var(--c-ink); line-height: 1.3; }
.tf-chips .tf-label { font-size: 14.5px; }
.tf-label small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 400; color: var(--c-ink-2); }
.tf-key { flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--c-ink-2); background: #fff; }
.tf-check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--c-ink); color: #fff; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; display: none; }
.tf-option.is-selected .tf-key { display: none; }
.tf-option.is-selected .tf-check { display: flex; }

/* Champs */
.am-row { display: grid; gap: 0 12px; }
@media (min-width: 520px) { .am-row { grid-template-columns: 1fr 1fr; } }
.am-fld { display: block; margin: 0 0 12px; }
.am-fld > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--c-ink); }
.am-fld input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px; border: 1px solid #cfcec9; background: #fff; font: inherit; font-size: 16px; color: var(--c-ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.am-fld input:focus { border-color: var(--c-ink); box-shadow: 0 0 0 3px rgba(27,27,26,0.08); }
.am-fld.is-bad input { border-color: var(--c-bad); background: var(--c-bad-soft); }
.am-msg { display: block; margin: 6px 0 0; font-size: 12.5px; font-weight: 500; color: var(--c-bad); }
.am-msg:empty { display: none; }
.am-alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid #f3b8b2; background: var(--c-bad-soft); font-size: 13.5px; line-height: 1.45; font-weight: 500; color: #a8231a; }
.am-alert[hidden] { display: none; }

/* Boutons */
.am-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 8px; min-height: 52px; padding: 14px 20px; border: 0; border-radius: 10px; background: var(--c-pink); color: #fff; font: inherit; font-weight: 600; font-size: 15.5px; cursor: pointer; transition: background .15s; }
.am-cta:hover { background: var(--c-pink-dark); }
.am-cta[disabled] { opacity: .65; pointer-events: none; }
.am-ghost { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 12px; min-height: 50px; padding: 12px 16px; border-radius: 10px; border: 1px solid #cfcec9; background: #fff; font: inherit; font-weight: 500; font-size: 14.5px; color: var(--c-ink); cursor: pointer; transition: border-color .15s, background .15s; }
.am-ghost:hover { border-color: var(--c-ink); background: var(--c-soft); }
.am-ghost[disabled] { opacity: .6; pointer-events: none; }
.am-text { display: block; margin: 14px auto 0; background: none; border: 0; padding: 6px; min-height: 32px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--c-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.am-text:hover { color: var(--c-ink); }

/* CV et photo */
.am-hide { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.am-file { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--c-ink); background: #fff; font-weight: 500; font-size: 14.5px; word-break: break-all; }
.am-drop { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 26px 16px; border-radius: 12px; border: 1px dashed #b9b8b2; background: var(--c-soft); color: var(--c-ink); text-align: center; transition: border-color .15s, background .15s; }
@media (hover: hover) { .am-drop:hover { border-color: var(--c-ink); background: #fff; } }
.am-drop:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.am-drop strong { font-size: 16px; font-weight: 600; }
.am-drop span { font-size: 13px; color: var(--c-ink-2); }
.am-drop.is-busy { pointer-events: none; border-style: solid; border-color: var(--c-ink); }
.am-spin { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--c-line); border-top-color: var(--c-ink); animation: am-spin .8s linear infinite; }
@keyframes am-spin { to { transform: rotate(360deg); } }

/* Notes RGPD */
.am-note { margin: 16px 0 0; font-size: 12px; line-height: 1.55; color: var(--c-ink-2); }
.am-note ul { margin: 0; padding-left: 16px; list-style: disc; }
.am-note li { margin: 0 0 6px; }
.am-note a { color: var(--c-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.am-note summary { cursor: pointer; font-weight: 500; color: var(--c-ink); margin-bottom: 8px; }

/* Fins de parcours : envoyée, refus, plus tard */
.am-end { text-align: center; padding: 10px 0 2px; }
.am-ico { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c-pink); }
.am-ico.ink { background: var(--c-ink); }
.am-end .am-q { font-size: clamp(1.35rem, 5.4vw, 1.75rem); }
.am-end p { margin: 0 auto 12px; max-width: 42ch; font-size: 15px; line-height: 1.55; color: var(--c-ink-2); }
.am-end p strong { color: var(--c-ink); font-weight: 600; word-break: break-word; }
.am-link { display: block; margin: 0 0 14px; padding: 12px; border-radius: 10px; background: var(--c-soft); font-size: 12.5px; word-break: break-all; -webkit-user-select: all; user-select: all; text-align: left; }
@media (prefers-reduced-motion: reduce) { .am-step, #form-modal .am-box, #form-modal .backdrop { animation: none; } .am-spin { animation-duration: 2s; } }
