/**
 * Styles personnalisés pour le formulaire d'estimation
 * Bootstrap 5 utilisé comme base
 */

/* Variables CSS */
:root {
    --vdr-primary: #0d6efd;
    --vdr-secondary: #6c757d;
    --vdr-success: #198754;
    --vdr-danger: #dc3545;
    --vdr-spacing: 1.5rem;

    --vdr-btn-primary: #ffd64f;
    --vdr-btn-hover: #ebc548;
}

/* Layout général */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #212529;
    background-color: #f8f9fa;
}

/* Header */
.vdr-header {
    background: #003e80;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.vdr-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vdr-logo img {
    max-height: 50px;
    height: auto;
}

.vdr-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.vdr-nav li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s;
}

.vdr-nav li a:hover,
.vdr-nav li.active a {
    color: var(--vdr-primary);
}

/* Conteneur principal */
.vdr-main-container {
    padding: 2rem 0 4rem;
}

.vdr-content-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.vdr-form-column {
    flex: 1;
    max-width: 600px;
}

.vdr-image-column {
    flex: 1;
    position: sticky;
    top: 2rem;
}

.vdr-image-column img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Formulaire */
.vdr-estimation-form {
    background: #fff;
    padding: 0;
}

.form-section {
    margin-bottom: var(--vdr-spacing);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.form-section .card-header {
    background-color: var(--vdr-primary);
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.form-section .card-body {
    padding: 1.5rem;
}

/* Champs de formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.form-control,
.form-select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--vdr-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Radio et Checkbox */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-check {
    padding-left: 1.75rem;
}

.form-check-input {
    margin-top: 0.25rem;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

.form-check-input:checked {
    background-color: var(--vdr-primary);
    border-color: var(--vdr-primary);
}

/* Bouton de soumission */
.btn-primary {
    background-color: var(--vdr-primary);
    border-color: var(--vdr-primary);
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Champs conditionnels */
.conditional-field {
    transition: opacity 0.3s ease-in-out;
}

/* Modal */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #212529;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Résultat d'estimation */
.estimation-result {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--vdr-success);
}

.estimation-result h5 {
    margin-bottom: 1rem;
    color: #212529;
}

/* Footer */
.vdr-footer {
    background: #212529;
    color: #fff;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 991px) {
    .vdr-content-wrapper {
        flex-direction: column;
    }
    
    .vdr-form-column {
        max-width: 100%;
    }
    
    .vdr-image-column {
        position: relative;
        top: 0;
        width: 100%;
    }
    
    .vdr-nav {
        gap: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .vdr-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vdr-nav {
        justify-content: center;
    }
    
    .form-section .card-body {
        padding: 1rem;
    }
    
    .btn-primary {
        padding: 0.625rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .vdr-main-container {
        padding: 1rem 0 2rem;
    }
    
    .form-section {
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .vdr-nav {
        gap: 0.5rem;
        font-size: 0.9rem;
    }
}

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

.form-section {
    animation: fadeIn 0.5s ease-out;
}

/* États de validation */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: var(--vdr-danger);
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: var(--vdr-success);
}

.invalid-feedback {
    color: var(--vdr-danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Spinner de chargement */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Accessibilité */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible pour l'accessibilité */
*:focus-visible {
    outline: 2px solid var(--vdr-primary);
    outline-offset: 2px;
}

    /* Variables */
        :root {
            --vdr-primary: #0984e3;
            --vdr-primary-dark: #0056ad;
            --vdr-text-dark: #171717;
            --vdr-text-gray: #6e6e6e;
            --vdr-bg-light: #f5f5f5;
        }
        
        body {
            font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            color: var(--vdr-text-dark);
            background-color: #fff;
            margin: 0;
            padding: 0;
        }
        
        /* Header */
        .vdr-header-result {
            background-color: var(--vdr-text-dark);
            padding: 12px 0;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 999;
        }
        
        .vdr-header-result .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .vdr-logo-container {
            display: flex;
            align-items: center;
        }
        
        .vdr-logo-container img {
            width: 35px;
            height: 35px;
            margin-right: 10px;
        }
        
        .vdr-logo-text {
            color: white;
            font-size: 19px;
            font-weight: 800;
            text-decoration: none;
        }
        
        .vdr-logo-text:hover {
            color: white;
        }
        
        .vdr-nav-result {
            display: flex;
            list-style: none;
            margin: 0;
            padding: 0;
            gap: 0;
        }
        
        .vdr-nav-result li {
            height: 74px;
            margin: -12px 0;
        }
        
        .vdr-nav-result li a {
            color: white;
            text-decoration: none;
            font-weight: 600;
            padding: 23px 15px;
            display: block;
            height: 100%;
        }
        
        .vdr-nav-result li a:hover {
            color: white;
            background-color: #2da8ff;
        }
        
        /* Spacer pour header fixe */
        .header-spacer {
            height: 74px;
        }
        
        /* Contenu principal */
        .vdr-main-result {
            padding-top: 50px;
            padding-bottom: 50px;
        }
        
        .vdr-title-section {
            text-align: center;
            margin-bottom: 40px;
        }
        
        .vdr-title-section h1 {
            font-size: 32px;
            margin-bottom: 20px;
        }
        
        /* Cartes d'estimation */
        .vdr-estimation-container {
            display: flex;
            flex-direction: row;
            width: 100%;
            gap: 20px;
        }
        
        .vdr-estimation-row {
            padding: 10px;
            text-align: center;
            font-size: 14px;
            width: 100%;
            border-radius: 10px;
            color: #2f2f2f;
            background-color: #f7f7f7;
            box-shadow: 0 0 20px #bec4d9;
        }
        
        .vdr-estimation-row-result {
            font-weight: 500;
            font-size: 44px;
            margin-bottom: 10px;
        }
        
        .vdr-estimation-row-title {
            font-size: 14px;
            margin-top: -7px;
            margin-bottom: 15px;
        }
        
        .vdr-estimation-row-img img {
            max-width: 100px;
        }
        
        /* Bouton CTA */
        .vdr-cta-button {
            background-color: var(--vdr-btn-primary);
            color: black;
            padding: 15px 40px;
            border-radius: 5px;
            text-decoration: none;
            font-weight: 600;
            display: inline-block;
            margin-top: 30px;
            transition: background-color 0.3s;
        }
        
        .vdr-cta-button:hover {
            background-color: var(--vdr-btn-hover);
            color: black;
        }
        
        /* Section stats */
        .vdr-stats-section {
            padding: 50px 0;
            background-color: #fff;
        }
        
        .vdr-stats-container {
            display: flex;
            flex-direction: row;
            justify-content: center;
            gap: 80px;
            align-items: center;
        }
        
        .vdr-stat-item {
            text-align: center;
        }
        
        .vdr-stat-title {
            color: var(--vdr-primary-dark);
            font-family: "Inter", sans-serif;
            font-weight: 800;
            font-size: 21px;
            margin-bottom: 20px;
        }
        
        .vdr-stat-number {
            font-family: "Inter", sans-serif;
            font-weight: 700;
            font-size: 22px;
        }
        
        .vdr-stat-desc {
            font-weight: 700;
            font-size: 15px;
            text-align: center;
            color: var(--vdr-text-gray);
            margin-top: 10px;
        }
        
        /* Section "À savoir" */
        .vdr-info-section {
            padding: 50px 0;
            position: relative;
        }
        
        .vdr-info-badge {
            background-color: #fd7342;
            padding: 10px 50px;
            color: #ffffff;
            border: 1px solid #972a02;
            border-radius: 5px;
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            font-weight: bold;
        }
        
        .vdr-info-content {
            background-color: rgba(229, 241, 255, 0.8);
            padding: 60px 40px 40px;
            border: 1px solid #c0dcfc;
            border-radius: 30px;
            display: flex;
            gap: 50px;
            align-items: center;
        }
        
        .vdr-info-text {
            flex: 2;
            font-size: 14px;
            color: #222222;
        }
        
        .vdr-info-text ul {
            padding-left: 20px;
        }
        
        .vdr-info-image {
            flex: 1;
            text-align: center;
        }
        
        .vdr-info-image img {
            max-width: 300px;
            width: 100%;
        }
        
        /* Footer */
        .vdr-footer-result {
            background-color: var(--vdr-text-dark);
            color: white;
            padding: 40px 0 20px;
            min-height: 200px;
        }
        
        .vdr-footer-result a {
            color: white;
            text-decoration: none;
        }
        
        .vdr-footer-result a:hover {
            color: #2da8ff;
        }
        
        .vdr-footer-columns {
            display: flex;
            justify-content: space-between;
            gap: 100px;
        }
        
        .vdr-footer-column ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .vdr-footer-column ul li {
            margin: 10px 0;
        }
        
        /* Responsive */
        @media (max-width: 767px) {
            .vdr-estimation-container {
                flex-direction: column;
                gap: 20px;
            }
            
            .vdr-estimation-row {
                margin: 0;
            }
            
            .vdr-stats-container {
                flex-direction: column;
                gap: 30px;
            }
            
            .vdr-info-content {
                flex-direction: column;
                padding: 40px 30px;
            }
            
            .vdr-footer-columns {
                flex-direction: column;
                gap: 30px;
            }
            
            .vdr-title-section h1 {
                font-size: 25px;
            }
        }