/* Questionnaire de candidature façon Typeform (thème du Typeform hKm1OYwg) */

:root {
    --jobs-question: #000000;
    --jobs-answer: #FA6B05;
    --jobs-answer-rgb: 250, 107, 5;
    --jobs-button: #000000;
    --jobs-button-text: #FFFFFF;
    --jobs-background: #FFFFFF;
    --jobs-error: #AF0404;
    --jobs-error-background: #F7E6E6;
}

body.jobs {
    background: var(--jobs-background);
    color: var(--jobs-question);
}

.jobs [hidden] {
    display: none !important;
}

/* Barre de progression et logo */

.jobs-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 30;
}

.jobs-progress-bar {
    width: 0;
    height: 100%;
    background: var(--jobs-question);
    transition: width 0.3s ease;
}

.jobs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 24px 16px;
    background: linear-gradient(var(--jobs-background) 70%, rgba(255, 255, 255, 0));
    z-index: 20;
}

/* Écrans */

.jobs-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 88px 24px 104px;
}

.jobs-screen {
    width: 100%;
    max-width: 720px;
    padding: 0;
    border-top: 0;
    animation: jobs-enter 0.4s ease both;
}

@keyframes jobs-enter {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

.jobs-image {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 32px;
}

.jobs-image-small {
    width: 160px;
}

.jobs-title {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    outline: none;
}

.jobs-title-large {
    font-size: 1.75rem;
}

.jobs-title strong {
    font-weight: 700;
}

.jobs-required {
    font-weight: 400;
}

.jobs-description {
    font-size: 1.05rem;
    line-height: 1.45;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 0;
}

.jobs-title a,
.jobs-description a {
    color: inherit;
    text-decoration: underline;
}

.jobs-duration {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.7);
}

/* Champs de saisie */

.jobs-field + .jobs-field {
    margin-top: 8px;
}

.jobs-label {
    display: block;
    margin: 24px 0 8px;
    font-size: 1rem;
}

.jobs-input {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid rgba(var(--jobs-answer-rgb), 0.3);
    border-radius: 0;
    background: transparent;
    color: var(--jobs-answer);
    font-size: 1.5rem;
    line-height: 1.35;
    outline: none;
    transition: box-shadow 0.1s ease-out;
}

.jobs-label + .jobs-input {
    margin-top: 0;
}

.jobs-input:focus {
    border-bottom-color: var(--jobs-answer);
    box-shadow: 0 1px 0 0 var(--jobs-answer);
}

.jobs-input::placeholder {
    color: rgba(var(--jobs-answer-rgb), 0.35);
}

textarea.jobs-input {
    resize: none;
    overflow: hidden;
}

.jobs-counter {
    margin-top: 6px;
    font-size: 0.8rem;
    text-align: right;
    color: rgba(var(--jobs-answer-rgb), 0.8);
}

.jobs-other .jobs-input {
    margin-top: 16px;
    font-size: 1.15rem;
}

/* Choix */

.jobs-choices {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
    margin-top: 24px;
}

.jobs-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    margin: 0;
    padding: 6px 12px 6px 6px;
    border-radius: 4px;
    background: rgba(var(--jobs-answer-rgb), 0.1);
    box-shadow: inset 0 0 0 1px rgba(var(--jobs-answer-rgb), 0.6);
    color: var(--jobs-answer);
    font-size: 1.1rem;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.1s ease-out;
}

.jobs-choice:hover {
    background: rgba(var(--jobs-answer-rgb), 0.2);
}

.jobs-choice:focus-within {
    outline: 2px solid rgba(var(--jobs-answer-rgb), 0.5);
    outline-offset: 2px;
}

.jobs-choice.is-selected {
    background: rgba(var(--jobs-answer-rgb), 0.3);
    box-shadow: inset 0 0 0 2px var(--jobs-answer);
}

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

.jobs-key {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(var(--jobs-answer-rgb), 0.6);
    border-radius: 2px;
    background: var(--jobs-background);
    font-size: 0.75rem;
    font-weight: 700;
}

.jobs-choice.is-selected .jobs-key {
    border-color: var(--jobs-answer);
    background: var(--jobs-answer);
    color: var(--jobs-background);
}

.jobs-check {
    margin-left: auto;
    padding-left: 16px;
    visibility: hidden;
}

.jobs-choice.is-selected .jobs-check {
    visibility: visible;
}

.jobs-choice.is-blinking {
    animation: jobs-blink 0.12s 3 alternate;
}

@keyframes jobs-blink {
    to { background: rgba(var(--jobs-answer-rgb), 0.1); }
}

.jobs-consent .jobs-choice {
    align-items: flex-start;
}

/* Boutons et erreurs */

.jobs-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.jobs-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 14px;
    border: 0;
    border-radius: 4px;
    background: var(--jobs-button);
    color: var(--jobs-button-text);
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

a.jobs-button,
a.jobs-button:hover {
    color: var(--jobs-button-text);
    text-decoration: none;
}

.jobs-button:hover {
    background: #333333;
}

.jobs-button[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.jobs-button strong {
    font-weight: inherit;
}

.jobs-hint {
    font-size: 0.8rem;
}

.jobs-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.jobs-error {
    display: inline-block;
    margin-top: 16px;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--jobs-error-background);
    color: var(--jobs-error);
    font-size: 0.9rem;
}

.jobs-nav {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    gap: 1px;
    z-index: 20;
}

.jobs-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border: 0;
    background: var(--jobs-button);
    color: var(--jobs-button-text);
    cursor: pointer;
}

.jobs-nav button:first-child {
    border-radius: 4px 0 0 4px;
}

.jobs-nav button:last-child {
    border-radius: 0 4px 4px 0;
}

/* Pot de miel anti-robots */
.jobs-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (hover: none) {
    .jobs-hint {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .jobs-header {
        padding: 16px;
    }

    .jobs-stage {
        align-items: flex-start;
        padding: 72px 16px 88px;
    }

    .jobs-title {
        font-size: 1.25rem;
    }

    .jobs-title-large {
        font-size: 1.5rem;
    }

    .jobs-input {
        font-size: 1.25rem;
    }

    .jobs-choices {
        display: flex;
    }

    .jobs-choice {
        min-width: 0;
    }

    .jobs-nav {
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jobs-screen,
    .jobs-choice.is-blinking {
        animation: none;
    }

    .jobs-progress-bar {
        transition: none;
    }
}
