/* ===== WIZARD — Haussmann Sols Résine ===== */

/* ----- Progress bar ----- */
.wizard-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-bottom: 48px;
    padding: 0 20px;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 140px;
}

/* Connecting line between steps */
.wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: var(--border-light);
    transition: background 0.3s ease;
    z-index: 0;
}

.wizard-step.completed:not(:last-child)::after {
    background: var(--accent-gold);
}

.wizard-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    background: var(--bg-secondary);
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: var(--fw-semibold);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.wizard-step-label {
    margin-top: 8px;
    font-size: 12px;
    color: #aaa;
    font-weight: var(--fw-medium);
    letter-spacing: 0.5px;
    text-align: center;
    transition: var(--transition);
}

/* Active step */
.wizard-step.active .wizard-step-num {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: var(--accent-gold-light);
}

.wizard-step.active .wizard-step-label {
    color: var(--accent-gold);
}

/* Completed step */
.wizard-step.completed .wizard-step-num {
    border-color: var(--accent-gold);
    background: var(--accent-gold);
    color: #fff;
    font-size: 0;
}

.wizard-step.completed .wizard-step-num::after {
    content: '';
    display: block;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.wizard-step.completed .wizard-step-label {
    color: var(--accent-gold);
}

/* ----- Panels ----- */
.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
    animation: fadeInPanel 0.25s ease;
}

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

/* ----- Actions (prev/next buttons row) ----- */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 16px;
}

.wizard-actions .wizard-prev {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: var(--fw-medium);
    cursor: pointer;
    transition: var(--transition);
}

.wizard-actions .wizard-prev:hover {
    border-color: var(--accent-dark);
    color: var(--accent-dark);
}

.wizard-actions .wizard-next,
.wizard-actions #submit-btn {
    background: var(--accent-gold);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: var(--radius-btn);
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: var(--fw-medium);
    cursor: pointer;
    transition: var(--transition);
}

.wizard-actions .wizard-next:hover,
.wizard-actions #submit-btn:hover {
    background: #9a7209;
}

.wizard-actions #submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ----- Form overrides ----- */
.form-control,
.form-select {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.12);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: none;
}

.form-label {
    font-size: 14px;
    font-weight: var(--fw-medium);
    color: var(--text-primary);
    margin-bottom: 6px;
}

.field-error {
    font-size: 13px;
    color: #dc3545;
    margin-top: 4px;
}

/* ----- Upload zone ----- */
.upload-zone {
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-card);
    background: #fff;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin-bottom: 16px;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent-gold);
    background: var(--accent-gold-light);
}

.upload-zone-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #aaa;
}

.upload-zone p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.upload-zone label {
    display: inline-block;
    color: var(--accent-gold);
    font-weight: var(--fw-medium);
    font-size: 15px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.upload-zone label:hover {
    color: #9a7209;
}

.upload-zone small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #bbb;
}

/* ----- Upload list ----- */
.upload-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: var(--transition);
}

.upload-item:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

.upload-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.upload-thumb-pdf {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--fw-semibold);
    color: #888;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.upload-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.upload-item-name {
    font-size: 14px;
    font-weight: var(--fw-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.upload-item-size {
    font-size: 12px;
    color: var(--text-secondary);
}

.upload-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: transparent;
    color: #aaa;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    padding: 0;
}

.upload-item-remove:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.06);
}

/* ----- Upload global progress ----- */
.upload-progress-wrap {
    margin-top: 16px;
}

.upload-progress-wrap .progress {
    height: 6px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.upload-progress-wrap .progress-bar {
    background: var(--accent-gold);
    transition: width 0.2s ease;
}

.upload-progress-wrap #progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: center;
}

/* ----- Wizard wrapper ----- */
.wizard-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.wizard-section {
    padding: 120px 40px 0;
}

.wizard-panel-title {
    font-size: 18px;
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

/* ----- Confirmation panel ----- */
.wizard-confirmation {
    text-align: center;
    padding: 60px 20px;
}

.wizard-confirmation .confirm-icon {
    margin: 0 auto 24px;
    display: block;
}

.wizard-confirmation h2 {
    font-weight: var(--fw-semibold);
    margin-bottom: 12px;
}

.wizard-confirmation p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

/* ----- Page header ----- */
.page-header {
    padding: 160px 60px 60px;
    background: var(--bg-primary);
}

.page-header h1 {
    margin-bottom: 8px;
}

/* ----- Responsive ----- */
@media (max-width: 767.98px) {
    .wizard-section {
        padding: 100px 0 0;
    }

    .page-header {
        padding: 100px 20px 40px;
    }

    .wizard-step-label {
        font-size: 11px;
    }

    .wizard-actions {
        flex-direction: column-reverse;
    }

    .wizard-actions .wizard-prev,
    .wizard-actions .wizard-next,
    .wizard-actions #submit-btn {
        width: 100%;
        text-align: center;
    }

    .upload-zone {
        padding: 28px 16px;
        min-height: 160px;
    }
}

@media (max-width: 479.98px) {
    .wizard-progress {
        gap: 0;
    }

    .wizard-step-num {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .wizard-step:not(:last-child)::after {
        top: 16px;
        left: calc(50% + 16px);
        width: calc(100% - 32px);
    }
}
