/* =========================================
   LÉMAN OFFICE SERVICES — form.css
   Questionnaire 9 étapes — Style raffiné
   ========================================= */

/* =========================================
   QUESTIONNAIRE — Section
   ========================================= */
.questionnaire {
    padding: 8rem 0;
    background: var(--creme-clair);
    position: relative;
}

.questionnaire::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(184, 146, 47, 0.5), transparent);
}

.form-wizard-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: var(--creme);
    border-top: 4px solid var(--dore);
    box-shadow: var(--shadow-xl);
    padding: 0;
    overflow: hidden;
}

/* =========================================
   BARRE DE PROGRESSION
   ========================================= */
.wizard-progress {
    padding: 2rem 3rem 1.5rem;
    background: var(--noir);
    color: var(--creme);
}

.wizard-progress-bar {
    height: 6px;
    background: rgba(245, 241, 232, 0.15);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dore-fonce) 0%, var(--dore) 50%, var(--dore-clair) 100%);
    width: 11.11%; /* 1/9 par défaut */
    transition: width 0.6s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.wizard-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.wizard-progress-text {
    font-size: 0.82rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--dore-clair);
    font-weight: 600;
}

.wizard-progress-text span {
    color: var(--creme);
    font-weight: 700;
    font-family: var(--font-display);
    font-size: 1.05rem;
}

/* =========================================
   ÉTAPES DU WIZARD
   ========================================= */
.wizard-step {
    display: none;
    border: none;
    padding: 3.5rem 3rem 2.5rem;
    animation: stepFadeIn 0.5s var(--ease-out);
}

.wizard-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wizard-step-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--noir);
    margin-bottom: 0.75rem;
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.wizard-step-num {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--dore);
    font-weight: 700;
    letter-spacing: 0.15em;
    background: var(--dore-pale);
    padding: 0.35rem 0.7rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.wizard-step-intro {
    color: var(--gris);
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 2.75rem;
    font-weight: 400;
}

/* =========================================
   CHAMPS DU WIZARD
   ========================================= */
.wizard-field {
    margin-bottom: 2rem;
    animation: fieldFadeIn 0.4s var(--ease-out);
}

@keyframes fieldFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--noir);
    margin-bottom: 0.85rem;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.wizard-label-prominent {
    font-family: var(--font-display);
    font-size: 1.45rem;
    color: var(--dore);
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0;
}

.wizard-subtitle {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--noir);
    margin: 2.5rem 0 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(10, 10, 10, 0.1);
    letter-spacing: -0.005em;
}

.wizard-hint {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--gris);
    line-height: 1.55;
    font-style: italic;
    font-weight: 400;
}

.wizard-hint-prominent {
    margin: 0.5rem 0 1rem;
    font-size: 0.94rem;
    font-style: normal;
    color: var(--noir);
}

.wizard-hint-warning {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(192, 57, 43, 0.06);
    border-left: 3px solid rgba(192, 57, 43, 0.5);
    color: #8a2820;
    font-size: 0.85rem;
    font-style: normal;
}

.wizard-hint-warning strong {
    color: #8a2820;
    font-weight: 700;
}

/* =========================================
   INPUTS, SELECTS, TEXTAREAS
   ========================================= */
.wizard-input,
.wizard-select,
.wizard-textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(10, 10, 10, 0.15);
    background: var(--creme-tres-clair);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--noir);
    transition: all var(--duration-fast) var(--ease);
    border-radius: 0;
}

.wizard-input:focus,
.wizard-select:focus,
.wizard-textarea:focus {
    outline: none;
    border-color: var(--dore);
    background: var(--blanc);
    box-shadow: 0 0 0 3px rgba(184, 146, 47, 0.1);
}

.wizard-input::placeholder,
.wizard-textarea::placeholder {
    color: var(--gris-clair);
    font-weight: 400;
}

.wizard-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8922f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.wizard-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    font-family: var(--font-body);
}

.wizard-textarea-large {
    min-height: 150px;
}

/* =========================================
   RADIOS & CHECKBOXES — GRILLE
   ========================================= */
.wizard-radio-grid,
.wizard-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.wizard-checkbox-grid-2col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.wizard-radio,
.wizard-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: var(--creme-tres-clair);
    border: 1px solid rgba(10, 10, 10, 0.1);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease);
    user-select: none;
    line-height: 1.5;
}

.wizard-radio:hover,
.wizard-checkbox:hover {
    border-color: var(--dore);
    background: var(--blanc);
    transform: translateX(2px);
}

.wizard-radio input[type="radio"],
.wizard-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--dore);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
}

.wizard-radio span,
.wizard-checkbox span {
    flex: 1;
    font-size: 0.95rem;
    color: var(--noir);
    font-weight: 400;
}

.wizard-radio span strong,
.wizard-checkbox span strong {
    font-weight: 600;
    color: var(--noir);
}

.wizard-checkbox span small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    color: var(--gris);
    line-height: 1.4;
    font-weight: 400;
}

/* État coché : style premium */
.wizard-radio:has(input:checked),
.wizard-checkbox:has(input:checked) {
    border-color: var(--dore);
    background: var(--dore-pale);
    box-shadow: 0 0 0 1px var(--dore);
}

.wizard-checkbox-frontalier {
    border-left: 3px solid var(--dore);
}

/* =========================================
   CONDITIONNELS (branches)
   ========================================= */
.wizard-conditional {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--creme-clair);
    border-left: 3px solid var(--dore);
    animation: conditionalSlide 0.4s var(--ease-out);
}

.wizard-conditional.active {
    display: block;
}

@keyframes conditionalSlide {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        margin-top: 1.5rem;
    }
}

/* =========================================
   INFO BOXES (étape assurance-maladie)
   ========================================= */
.wizard-info-box {
    padding: 1.25rem 1.5rem;
    background: rgba(184, 146, 47, 0.08);
    border-left: 3px solid var(--dore);
    color: var(--noir);
    font-size: 0.95rem;
    line-height: 1.65;
    font-weight: 400;
    margin: 0;
}

.wizard-info-box strong {
    color: var(--dore-fonce);
    font-weight: 700;
}

.wizard-info-warning {
    background: rgba(192, 57, 43, 0.06);
    border-color: rgba(192, 57, 43, 0.6);
}

.wizard-info-warning strong {
    color: #8a2820;
}

/* =========================================
   CHAMP REMARQUE FINALE (mis en valeur)
   ========================================= */
.wizard-field-remarque {
    padding: 2rem;
    background: linear-gradient(135deg, var(--creme-clair), var(--creme));
    border: 2px solid var(--dore);
    border-radius: 0;
    margin-top: 2.5rem;
    position: relative;
}

.wizard-field-remarque::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 6px;
    background: linear-gradient(90deg, var(--dore-fonce), var(--dore-clair), var(--dore-fonce));
}

/* =========================================
   FORM GRID (Étape 9 - coordonnées)
   ========================================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 0;
}

.form-grid .wizard-field {
    margin-bottom: 0;
}

/* =========================================
   CONSENT (RGPD)
   ========================================= */
.form-consent {
    margin: 2rem 0 1rem;
    padding: 1.5rem;
    background: var(--creme-clair);
    border-left: 3px solid var(--gris-clair);
}

/* =========================================
   NAVIGATION DU WIZARD
   ========================================= */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(10, 10, 10, 0.1);
}

.wizard-btn-prev,
.wizard-btn-next,
.wizard-btn-submit {
    flex: 0 0 auto;
}

.wizard-btn-prev:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.wizard-btn-submit {
    flex: 1;
    max-width: 320px;
    margin-left: auto;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .wizard-progress {
        padding: 1.5rem;
    }

    .wizard-step {
        padding: 2rem 1.5rem 1.5rem;
    }

    .wizard-step-title {
        font-size: 1.55rem;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .wizard-step-num {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .wizard-step-intro {
        font-size: 0.93rem;
        margin-bottom: 2rem;
    }

    .wizard-label {
        font-size: 0.9rem;
    }

    .wizard-label-prominent {
        font-size: 1.2rem;
    }

    .wizard-radio,
    .wizard-checkbox {
        padding: 0.85rem 1rem;
        font-size: 0.92rem;
    }

    .wizard-radio span,
    .wizard-checkbox span {
        font-size: 0.93rem;
    }

    .wizard-checkbox-grid-2col {
        grid-template-columns: 1fr;
    }

    .wizard-conditional {
        padding: 1.25rem;
        margin-top: 1.25rem;
    }

    .wizard-info-box {
        padding: 1rem 1.15rem;
        font-size: 0.9rem;
    }

    .wizard-field-remarque {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .wizard-nav {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .wizard-btn-prev,
    .wizard-btn-next,
    .wizard-btn-submit {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .wizard-progress {
        padding: 1.25rem 1rem;
    }

    .wizard-step {
        padding: 1.75rem 1rem 1.25rem;
    }

    .wizard-step-title {
        font-size: 1.35rem;
    }

    .wizard-subtitle {
        font-size: 1.15rem;
        margin: 2rem 0 1rem;
    }
}
