.form-container, .devis-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.form-header h1 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.form-header p {
    color: #6c757d;
    margin: 0;
    font-size: 16px;
}

.form-section {
    margin-bottom: 30px;
}

/* Styles pour le dropdown personnalisé */
.custom-dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.custom-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-dropdown-header:hover {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dropdown-placeholder {
    color: #495057;
    font-size: 16px;
}

.dropdown-arrow {
    color: #6c757d;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.custom-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: #fff;
    border: 0 solid #ced4da;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.custom-dropdown-content.show {
    max-height: 300px;
    opacity: 1;
    border-width: 0 1px 1px 1px;
    overflow-y: auto;
}

.dropdown-search-container {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
}

.dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.dropdown-search:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.categories-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 5px 0;
}

.category-option {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.category-option:hover {
    background-color: #f8f9fa;
}

.category-option input {
    margin-right: 10px;
}

.category-option label {
    flex-grow: 1;
    text-align: left;
}

.no-categories {
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Styles pour les badges de catégories sélectionnées */
.selected-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    min-height: 30px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.remove-badge {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s;
}

.remove-badge:hover {
    color: #ff6b6b;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
}

legend {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    display: block;
    width: 100%;
}

.section-title {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background-color: #007bff;
    margin-right: 10px;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.required {
    color: #dc3545;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.checkbox-item:hover,
.radio-item:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.checkbox-item input,
.radio-item input {
    margin-right: 8px;
    width: auto;
}

.checkbox-item input:checked + span,
.radio-item input:checked + span {
    color: #007bff;
    font-weight: 600;
}

.file-upload {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.file-upload:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-text {
    color: #6c757d;
    font-size: 14px;
}

.file-upload-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 10px;
}

.budget-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.budget-range input {
    flex: 1;
}

.submit-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.btn-submit {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 200px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 123, 255, 0.3);
}

.help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.urgency-indicator {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.urgency-item {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.urgency-item input {
    display: none;
}

.urgency-item.urgent {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.urgency-item.normal {
    border-color: #ffc107;
    background-color: #fffbf0;
}

.urgency-item.flexible {
    border-color: #28a745;
    background-color: #f8fff9;
}

.urgency-item input:checked + .urgency-content {
    font-weight: 600;
}

/* Styles pour le formulaire multi-étapes */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

#wiz-progress {
    height: 100% !important;
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border-radius: 4px !important;
    transition: width 0.3s ease !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
}

#wiz-progress.updating {
    animation: progress-pulse 0.3s ease-in-out;
}

@keyframes progress-pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    list-style: none;
    padding: 0 20px;
    position: relative;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2; /* Assure que le numéro est au-dessus des autres éléments */
    border: 2px solid white;
}

.step-dot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: #dee2e6;
}

/* Style pour l'indicateur d'étape active */
.step-dot.active {
    background-color: #007bff !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3) !important;
    transform: scale(1.1) !important;
}

/* Style pour les indicateurs d'étape complétés */
.step-dot.completed {
    background-color: #28a745 !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3) !important;
}

.step-help-text {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    margin-top: 12px;
    font-style: italic;
    font-weight: 500;
}

/* Style pour les champs requis non remplis */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error.show {
    display: block;
}

/* Styles pour les champs de téléchargement de fichiers */
.file-upload-container {
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    background-color: #f9f9f9;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-upload-container:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
}

.file-upload-container input[type="file"] {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    cursor: pointer;
}

.file-upload-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.step-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #e9ecef;
    top: 50%;
    left: 100%;
    z-index: -1;
    transform: translateY(-50%);
}

.step-dot:last-child::after {
    display: none;
}

.step-dot.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
    font-weight: bold;
    z-index: 3;
}

.step-dot.completed {
    background-color: #28a745;
    color: white;
    z-index: 3;
}

.step-dot.completed::after {
    background-color: #28a745;
}

.step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Styles pour le récapitulatif */
.summary-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
}

.summary-item {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-label {
    font-weight: 600;
    width: 150px;
    color: #495057;
}

.summary-value {
    flex: 1;
    color: #212529;
}

.form-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.form-summary h3 {
    color: #2c3e50;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.form-summary h3:first-child {
    margin-top: 0;
}

.form-summary .summary-item {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.form-summary .summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-summary .summary-label {
    font-weight: 600;
    width: 150px;
    color: #495057;
    margin-right: 10px;
}

.form-summary .summary-value {
    flex: 1;
    color: #212529;
}

.form-summary .summary-item.description {
    flex-direction: column;
}

.form-summary .summary-item.description .summary-label {
    margin-bottom: 8px;
    width: 100%;
}

.form-summary .summary-item.description .summary-value {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    white-space: pre-line;
}

.summary-item.description {
    flex-direction: column;
}

.description-text {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    font-style: italic;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-primary, .next {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline, .prev {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-devis {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover, .next:hover, .btn-success:hover, #submit-devis:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 123, 255, 0.3);
}

.btn-outline:hover, .prev:hover {
    background-color: #f8f9ff;
    box-shadow: 0 8px 15px rgba(0, 123, 255, 0.1);
}

/* Styles pour le résumé du formulaire */
.form-summary {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-summary h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.summary-item {
    display: flex;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-label {
    font-weight: 600;
    min-width: 150px;
    color: #495057;
}

/* Message de statut du formulaire */
.form-status {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.form-status.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-status.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.form-status.info {
    background-color: #e7f5ff;
    border: 1px solid #b8daff;
    color: #004085;
}

/* Styles pour les erreurs de validation */
.error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.is-invalid + .error {
    display: block;
    animation: shake 0.5s ease;
}

.error.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Prévisualisation des photos */
.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-grid img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.preview-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

@media (max-width: 768px) {
    .form-container, .devis-container {
        padding: 10px;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .checkbox-group,
    .radio-group {
        flex-direction: column;
    }
    
    .urgency-indicator {
        flex-direction: column;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-navigation button {
        width: 100%;
    }
    
    .step-indicators {
        display: none;
    }
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    border: 1px solid #ddd;
}

.radio-option:hover {
    background-color: #f5f5f5;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.radio-option label {
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
    flex: 1;
}