:root {
    --primary-color: #d90429; /* Rouge vif automobile */
    --secondary-color: #2b2d42; /* Bleu-noir profond */
    --dark-color: #1a1a1a;
    --light-color: #edf2f4;
    --accent-color: #ef233c; /* Rouge plus clair pour les survols */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--secondary-color);
    background-color: #ffffff;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-dark-custom {
    background-color: var(--dark-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(217, 4, 41, 0.3);
}

.hero-section {
    min-height: 650px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.estimate-card {
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: none;
}

.card-title-badge {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.step-form .step {
    display: none;
}

.step-form .step.active {
    display: block;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.progress {
    height: 6px;
    border-radius: 10px;
    background-color: #f1f3f5;
    margin-bottom: 30px;
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 0.4s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 5px;
    border: 2px solid #f8f9fa;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.step-item.completed .step-number {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

.navbar {
    transition: all 0.3s ease;
    padding: 15px 0;
}

.top-bar {
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.top-bar a {
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.top-bar a:hover {
    opacity: 1;
}

.navbar-brand img {
    height: 50px;
    transition: all 0.3s ease;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

.section-title.left::after {
    left: 0;
    transform: none;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(217, 4, 41, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.card:hover .feature-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

footer {
    background-color: #111;
    color: #999;
}

footer h5 {
    color: white;
}

.grayscale {
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.grayscale:hover {
    filter: grayscale(0%);
}

.accordion-button {
    font-size: 1rem;
    padding: 20px 25px;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: rgba(217, 4, 41, 0.05);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button::after {
    background-size: 1.1rem;
}

.accordion-body {
    padding: 5px 25px 25px;
    line-height: 1.6;
}

.card {
    transition: all 0.3s ease;
}

.card.shadow-sm:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08) !important;
}

/* =========================================
   RESPONSIVE / MOBILE
   ========================================= */

/* Tablettes et petits écrans (<= 991px) */
@media (max-width: 991.98px) {
    .navbar {
        padding: 10px 0;
    }

    .navbar-brand img {
        height: 40px;
    }

    .navbar-collapse {
        background-color: var(--dark-color);
        margin-top: 15px;
        padding: 15px;
        border-radius: 10px;
    }

    .navbar-nav .nav-link {
        padding: 12px 10px !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .navbar-nav li:last-child .nav-link {
        border-bottom: none;
    }

    .navbar-nav .btn {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .hero-section {
        min-height: auto;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .hero-title {
        font-size: 2rem !important;
    }
}

/* Mobile (<= 767px) */
@media (max-width: 767.98px) {
    h1, .display-4 {
        font-size: 1.8rem !important;
    }

    h2, .section-title {
        font-size: 1.5rem !important;
    }

    .display-5 {
        font-size: 2rem !important;
    }

    .lead {
        font-size: 1rem;
    }

    .hero-section .d-flex.gap-3 {
        flex-direction: column;
        gap: 12px !important;
    }

    .hero-section .btn-lg,
    .hero-section .btn-outline-light {
        width: 100%;
        text-align: center;
    }

    .card-body.p-4.p-md-5 {
        padding: 1.5rem !important;
    }

    /* Stepper : masquer les libellés textuels et ne garder que les numéros sur mobile */
    .step-item .small.fw-bold {
        font-size: 0.65rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .step1 .row.g-3 > div,
    .step-form .row.g-3 > div {
        margin-bottom: 5px;
    }

    .form-control-lg,
    .form-select-lg {
        font-size: 1rem;
        padding: 0.6rem 0.9rem;
    }

    .step-form .mt-4.d-flex.justify-content-between,
    .step-form .mt-4.text-end {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .step-form .mt-4.d-flex.justify-content-between .btn,
    .step-form .mt-4.text-end .btn {
        width: 100%;
    }

    /* Bandeau des marques : grille au lieu d'une seule ligne */
    .grayscale {
        height: 22px !important;
    }

    /* Sections en général : réduire le padding vertical */
    section.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .container.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Footer : centrer et espacer les colonnes */
    footer .col-lg-2,
    footer .col-lg-3,
    footer .col-lg-4,
    footer .offset-lg-1 {
        margin-left: 0 !important;
        text-align: left;
        margin-bottom: 2rem;
    }

    /* Top bar masquée proprement sur mobile (déjà d-none d-lg-block) */
    .top-bar {
        display: none !important;
    }
}

/* Très petits écrans (<= 575px) */
@media (max-width: 575.98px) {
    .card-title-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
    }

    .feature-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .accordion-button {
        font-size: 0.9rem;
        padding: 15px 15px;
    }

    .accordion-body {
        padding: 5px 15px 20px;
        font-size: 0.9rem;
    }

    /* Etapes du formulaire : réduire davantage le libellé texte */
    .step-item .small.fw-bold {
        display: block;
        font-size: 0.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
