/* ===== DEVIS SECTION STYLES ===== */

.devis-section {
    padding-top: 120px;
    padding-bottom: 80px;
    padding-left: 15px;
    padding-right: 15px;
    background-color: #f8f9fa;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.devis-container {
     max-width: var(--container-width); /* ex. 1300px : même conteneur que le site */
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

@media (min-width: 1200px) {
    .devis-container {
        width: 100%; /* Prend toute la largeur sur les grands écrans */
        max-width: 100%;
    }
}

/* Styles pour le formulaire par étapes */
.devis-form {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.devis-form h3 {
    font-size: 1.6rem;
    margin-bottom: 30px;
    color: #161F3B;
    text-align: center;
}

/* Styles pour les étapes */
.form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.form-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #9D835F;
}

.step.completed .step-number {
    background-color: #161F3B;
}

.step-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.step.active .step-label {
    color: #9D835F;
    font-weight: 600;
}

.step.completed .step-label {
    color: #161F3B;
    font-weight: 600;
}

/* Styles pour les panneaux d'étapes */
.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Styles pour les groupes de formulaires */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #161F3B;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #9D835F;
    outline: none;
    box-shadow: 0 0 0 3px rgba(157, 131, 95, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Styles pour les cases à cocher */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-group h4 {
    margin-bottom: 15px;
    color: #161F3B;
    font-size: 1.1rem;
}

.checkbox-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
}

/* Styles pour les boutons de navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-prev {
    background-color: #e0e0e0;
    color: #333;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next, .btn-submit {
    background-color: #9D835F;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next:hover, .btn-submit:hover {
    background-color: #8a7350;
}

/* Styles pour les messages d'erreur */
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-control.invalid {
    border-color: #e74c3c;
}

/* Style pour le message de succès */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1rem;
    margin: 30px 0;
    animation: fadeIn 0.5s ease;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev:hover {
    background-color: #d0d0d0;
}

.btn-next:hover, .btn-submit:hover {
    background-color: #8a7350;
}

/* Responsive design */
@media (max-width: 768px) {
    .devis-form {
        padding: 30px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .checkbox-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .form-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .form-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        width: 100%;
    }
    
    .step-number {
        margin-bottom: 0;
        margin-right: 15px;
    }
    
    .checkbox-items {
        grid-template-columns: 1fr;
    }
}