:root {
    --primary-color: #007bff; /* Bleu principal */
    --primary-dark: #0056b3; /* Bleu foncé pour hover */
    --secondary-color: #f0f4f8; /* Fond clair */
    --secondary-light: #ffffff; /* Fond clair des cartes/formulaires */
    --accent-color: #36b9cc;
    --success-color: #ffffff; /* Blanc à la place du vert */
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Body Global */
body {
    background: linear-gradient(135deg,
            var(--secondary-color) 0%,
            var(--secondary-light) 100%);
    color: #1e3c42;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 80px;
    transition: background 0.5s ease;
}

/* Boutons généraux */
.btn-contact {
    border: 2px solid rgba(0, 123, 255, 0.3);
    color: var(--primary-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
    background: white;
}

.btn-contact:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-simulator {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: none;
    transition: var(--transition);
}

.btn-simulator:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Container principal */
.main-container {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

/* Formulaire */
.form-container {
    background: white;
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.1);
    overflow: hidden;
    transition: var(--transition);
}

/* Titres */
.page-title {
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0 1rem 0;
    background: linear-gradient(135deg,
            rgba(0, 123, 255, 0.05),
            rgba(0, 86, 179, 0.05));
    position: relative;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg,
            var(--primary-color),
            var(--primary-dark));
    border-radius: 2px;
}

/* Stepper */
.stepper-container {
    padding: 0 2rem 2rem 2rem;
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 1rem;
}

.stepper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    z-index: 1;
    transform: translateY(-50%);
}

.stepper.progress-line::before {
    background: linear-gradient(to right,
            var(--primary-color) 0%,
            var(--primary-color) var(--progress, 0%),
            #e9ecef var(--progress, 0%),
            #e9ecef 100%);
    transition: var(--transition);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 1rem;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    border: 3px solid #e9ecef;
    background: white;
    color: #6c757d;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.step.active .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
    transform: scale(1.1);
}

.step.completed .step-circle {
    background: var(--success-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    transition: var(--transition);
    min-height: 2rem;
    display: flex;
    align-items: center;
}

.step.active .step-label {
    color: var(--primary-color);
}

.step.completed .step-label {
    color: var(--primary-dark);
}

/* Formulaire */
.form-step {
    display: none;
    animation: slideInRight 0.5s ease-out;
}

.form-step.active {
    display: block;
}

.form-step.prev {
    animation: slideInLeft 0.5s ease-out;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Champs de formulaire */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
}

.form-label {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 2px solid rgba(0, 123, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    background: white;
    outline: none;
}

/* Boutons navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: rgba(240, 244, 248, 0.8);
    margin-top: 2rem;
}

.btn-step {
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    min-width: 120px;
}

.btn-prev {
    background: #6c757d;
    color: white;
}

.btn-prev:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-next {
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--primary-dark));
    color: white;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

/* Validation */
.is-invalid {
    border-color: #dc3545;
}

.is-valid {
    border-color: var(--primary-color);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stepper {
        flex-direction: column;
        gap: 1rem;
    }

    .stepper::before {
        display: none;
    }

    .form-container {
        margin: 1rem;
        border-radius: 16px;
    }

    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-step {
        width: 100%;
    }
}
