/* ══════════════════════════════════════════════════════════════════════════════
   RECRUTEMENT — formulaire de candidature
   Même langage visuel que le formulaire d'estimation (carte blanche, champs arrondis)
   ══════════════════════════════════════════════════════════════════════════════ */

#recrutSection {
    --rec-ink: #1d2433;
    --rec-muted: #5f6675;
    --rec-line: #d9dce3;
    --rec-line-strong: #a9aebb;
    --rec-soft: #f4f5f8;
    --rec-primary: #012c69;
    --rec-primary-hover: #164a88;
    --rec-gold: #bba25c;

    padding: 64px 16px 80px;
    background: var(--rec-soft);
}

.recCard {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 44px 40px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 56px rgba(16, 24, 40, .10);
    color: var(--rec-ink);
    text-align: left;
}

/* En-tête */
.recHead {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rec-line);
}

.recKicker {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--rec-gold);
}

.recHead h1 {
    margin: 0 0 10px;
    font-size: clamp(2.6rem, 3vw, 3.4rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--rec-primary);
    text-transform: none;
}

.recHead p:last-child {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--rec-muted);
}

/* Champs */
.recGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
}

.recField {
    min-width: 0;
}

.recField--full {
    grid-column: 1 / -1;
}

.recField > label:not(.recFile),
.recFieldLabel {
    display: block;
    margin: 0 0 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--rec-ink);
}

.recField > label:not(.recFile) span[aria-hidden],
.recFieldLabel span[aria-hidden] {
    color: var(--rec-gold);
}

.recField input,
.recField textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rec-line-strong);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 1.5rem;
    color: var(--rec-ink);
    transition: border-color .15s, box-shadow .15s;
}

.recField input {
    height: 48px;
}

.recField textarea {
    min-height: 140px;
    line-height: 1.55;
    resize: vertical;
}

.recField input::placeholder,
.recField textarea::placeholder {
    color: #9097a5;
}

.recField input:focus,
.recField textarea:focus {
    border-color: var(--rec-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(1, 44, 105, .12);
}

#recForm.is-checked .recField input:invalid,
#recForm.is-checked .recField textarea:invalid {
    border-color: #b42318;
}

/* Zone CV */
.recFile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1.5px dashed var(--rec-line-strong);
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.recFile input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.recFile svg {
    flex: none;
    width: 36px;
    height: 36px;
    color: var(--rec-primary);
}

.recFile-texte {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.recFile-texte strong {
    display: block;
    overflow: hidden;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--rec-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recFile-texte small {
    font-size: 1.3rem;
    color: var(--rec-muted);
}

.recFile:hover,
.recFile.is-over,
.recFile:has(input:focus-visible) {
    border-color: var(--rec-primary);
    background: #f3f6fb;
}

.recFile.is-filled {
    border-style: solid;
    border-color: var(--rec-primary);
    background: #f3f6fb;
}

.recFile.is-invalid {
    border-color: #b42318;
    background: #fef3f2;
}

.recFile-retirer {
    margin-left: auto;
    padding: 6px 4px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 1.35rem;
    color: var(--rec-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.recFile-retirer[hidden] {
    display: none;
}

.recFile-retirer:hover {
    color: var(--rec-ink);
}

/* Mentions, erreur, bouton */
.recRgpd {
    margin: 22px 0 0;
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--rec-muted);
}

.recRgpd a {
    color: var(--rec-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.recErreur {
    margin: 20px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fef3f2;
    font-size: 1.4rem;
    color: #b42318;
}

.recErreur[hidden] {
    display: none;
}

.recNav {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--rec-line);
}

.recBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 30px;
    border: 0;
    border-radius: 999px;
    background: var(--rec-primary);
    font: inherit;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

.recBtn:hover {
    background: var(--rec-primary-hover);
}

.recBtn:disabled {
    opacity: .6;
    cursor: wait;
}

.recBtn:focus-visible {
    outline: 2px solid var(--rec-primary);
    outline-offset: 2px;
}

.recBtn--ghost {
    padding: 0 8px;
    background: transparent;
    color: var(--rec-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.recBtn--ghost:hover {
    background: transparent;
}

/* Confirmation */
#recConfirm {
    padding: 8px 0;
    text-align: center;
}

#recConfirm[hidden] {
    display: none;
}

#recConfirm svg {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    color: #12805c;
}

#recConfirm h2 {
    margin: 0 0 10px;
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--rec-ink);
}

#recMsg {
    max-width: 460px;
    margin: 0 auto 20px;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--rec-muted);
}

@media (max-width: 760px) {
    #recrutSection {
        padding: 32px 12px 56px;
    }

    .recCard {
        padding: 28px 20px;
    }

    .recGrid {
        grid-template-columns: 1fr;
    }

    .recBtn:not(.recBtn--ghost) {
        width: 100%;
    }
}
