/* form.css - Styles du formulaire dynamique */

/* Assurer que le bouton intro reste visible */
.div-form-intro {
    display: block !important;
    visibility: visible !important;
}

/* Conteneur principal */
#dynamic-form-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Barre de progression */
.form-progress {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fd8337 0%, #f93ea1 100%);
    transition: width 0.4s ease;
    border-radius: 10px;
}

/* Conteneur des étapes */
.form-steps-container {
    position: relative;
    width: 100%;
    min-height: 400px;
}

/* Étapes du formulaire */
.form-step {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: none;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-step.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Animations de glissement */
.form-step.slide-in-right {
    position: absolute;
    visibility: visible;
    animation: slideInRight 0.4s ease forwards;
}

.form-step.slide-out-left {
    position: absolute;
    visibility: visible;
    animation: slideOutLeft 0.4s ease forwards;
}

.form-step.slide-in-left {
    position: absolute;
    visibility: visible;
    animation: slideInLeft 0.4s ease forwards;
}

.form-step.slide-out-right {
    position: absolute;
    visibility: visible;
    animation: slideOutRight 0.4s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 1;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 1;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 1;
    }
}

/* Animation de secousse pour les erreurs */
.form-step.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Titre de l'étape */
.form-step-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.form-step-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: #888;
    margin-top: 5px;
}

/* Contenu de l'étape */
.form-step-content {
    margin: 30px 0;
}

/* Champs du formulaire */
.form-field {
    margin-bottom: 25px;
    position: relative;
}

.form-field label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 10px;
}

.form-field .field-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.form-field input.form-control,
.form-field select.form-control,
.form-field textarea.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px 20px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-field input.form-control:focus,
.form-field select.form-control:focus,
.form-field textarea.form-control:focus {
    border-color: #fd8337;
    box-shadow: 0 0 0 0.2rem rgba(253, 131, 55, 0.25);
    outline: none;
}

.form-field input.error,
.form-field select.error,
.form-field textarea.error {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.form-field.error .field-error {
    display: block;
}

.field-error {
    display: none;
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Unité pour les champs numériques */
.input-unit {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #888;
    font-size: 1.1rem;
    pointer-events: none;
}

/* Options radio */
.radio-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
}

.radio-option label i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fd8337;
}

.radio-option label span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.radio-option label small {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
    display: block;
}

.radio-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #fd8337 0%, #f93ea1 100%);
    border-color: #fd8337;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(253, 131, 55, 0.4);
}

.radio-option input[type="radio"]:checked + label i,
.radio-option input[type="radio"]:checked + label span,
.radio-option input[type="radio"]:checked + label small {
    color: #fff;
}

.radio-option label:hover {
    border-color: #fd8337;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Options checkbox */
.checkbox-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.checkbox-option {
    position: relative;
}

.checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 100px;
}

.checkbox-option label i {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #fd8337;
}

.checkbox-option label span {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.checkbox-option label small {
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
    display: block;
}

.checkbox-option input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, #fd8337 0%, #f93ea1 100%);
    border-color: #fd8337;
    color: #fff;
    box-shadow: 0 5px 15px rgba(253, 131, 55, 0.4);
}

.checkbox-option input[type="checkbox"]:checked + label i,
.checkbox-option input[type="checkbox"]:checked + label span,
.checkbox-option input[type="checkbox"]:checked + label small {
    color: #fff;
}

.checkbox-option label:hover {
    border-color: #fd8337;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Champ range */
.range-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.form-range {
    flex: 1;
    height: 8px;
    border-radius: 10px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fd8337 0%, #f93ea1 100%);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fd8337 0%, #f93ea1 100%);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
}

.range-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fd8337;
    min-width: 80px;
    text-align: center;
}

/* Boutons de navigation */
.form-step-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.form-step-buttons .btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-step-buttons .btn-primary {
    background: linear-gradient(90deg, #fd8337 0%, #f93ea1 100%);
    border: none;
    flex: 1;
}

.form-step-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 131, 55, 0.4);
}

.form-step-buttons .btn-secondary {
    background: #6c757d;
    border: none;
}

.form-step-buttons .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.form-step-buttons .btn-submit {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border: none;
    flex: 1;
}

.form-step-buttons .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Étape de contact */
.form-step-contact .form-field {
    margin-bottom: 20px;
}

/* Étape de détails */
.form-step-details .form-text {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Étape de succès */
.form-step-success {
    text-align: center;
    padding: 40px 20px;
}

.form-step-success img {
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .form-step-title {
        font-size: 1.5rem;
    }

    .radio-options,
    .checkbox-options {
        grid-template-columns: 1fr;
    }

    .form-step-buttons {
        flex-direction: column;
    }

    .form-step-buttons .btn-secondary {
        order: 2;
    }

    .form-step-buttons .btn-primary,
    .form-step-buttons .btn-submit {
        order: 1;
    }
}

/* Ajustements pour le conteneur parent */
.div-outer-slider {
    min-height: 500px !important;
    height: auto !important;
}

#outer_form_container .div-inner-slider {
    height: auto !important;
    min-height: 500px;
}