
:root {
    --black: #111216;
    --dark: #191b20;
    --red: #e32636;
    --white: #ffffff;
    --grey: #777b84;
    --light: #f4f5f7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.topbar {
    background: var(--red);
    color: white;
    text-align: center;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: .5px;
}

.site-header {
    background: var(--black);
    color: white;
    min-height: 85px;
    padding: 15px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 1px;
}

.brand-name strong {
    color: var(--red);
}

.brand-number {
    font-size: 10px;
    color: #aaa;
    letter-spacing: 4px;
    margin-top: 5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    color: #eee;
    font-size: 13px;
    font-weight: 600;
}

.main-nav a:hover {
    color: var(--red);
}

.cart-link {
    border: 1px solid var(--red);
    border-radius: 5px;
    padding: 10px 17px;
    font-size: 13px;
    font-weight: bold;
}

.cart-link:hover {
    background: var(--red);
}

.hero {
    background:
        linear-gradient(90deg, rgba(8,10,13,.82) 0%, rgba(8,10,13,.55) 48%, rgba(8,10,13,.28) 100%),
        url('https://images.pexels.com/photos/12871825/pexels-photo-12871825.jpeg?auto=compress&cs=tinysrgb&w=2000')
        center 48%/cover no-repeat;
    min-height: 540px;
    display: flex;
    align-items: center;
    padding: 65px 8%;
    color: white;
}

.hero-content {
    max-width: 760px;
}

.hero-tag {
    color: #ff6672;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.1;
    margin: 20px 0;
    font-weight: 900;
}

.hero h1 span {
    color: var(--red);
}

.hero p {
    color: #ddd;
    font-size: 17px;
    max-width: 530px;
    margin-bottom: 28px;
}

.btn {
    display: inline-block;
    background: var(--red);
    color: white;
    border-radius: 5px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: bold;
    border: 0;
    cursor: pointer;
}

.btn:hover {
    background: #bd1928;
}

.section {
    padding: 75px 7%;
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h2 {
    font-size: 32px;
    font-weight: 900;
}

.section-heading p {
    color: var(--grey);
    margin-top: 8px;
}

.search-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 35px rgba(0,0,0,.12);
    max-width: 1050px;
    margin: -55px auto 0;
    position: relative;
    z-index: 2;
}

.search-panel h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 7px;
}

.field input,
.field select {
    width: 100%;
    min-height: 46px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
}

.search-grid .btn {
    align-self: end;
    min-height: 46px;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.vehicle-card {
    background: var(--dark);
    color: white;
    border-radius: 12px;
    padding: 35px;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vehicle-card h3 {
    font-size: 27px;
    margin-bottom: 8px;
}

.vehicle-card p {
    color: #c4c4c4;
    margin-bottom: 20px;
}

.vehicle-card a {
    color: #ff6571;
    font-weight: bold;
}

.benefits {
    background: var(--light);
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.benefit {
    background: white;
    padding: 25px;
    border-radius: 10px;
}

.benefit h3 {
    margin-bottom: 10px;
}

.benefit p {
    color: var(--grey);
    font-size: 14px;
}

.site-footer {
    background: var(--black);
    color: white;
    padding: 50px 7% 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 35px;
    padding-bottom: 35px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin-bottom: 12px;
}

.site-footer p,
.site-footer a {
    color: #bfc0c4;
    font-size: 13px;
}

.site-footer a {
    display: block;
    margin: 7px 0;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

@media(max-width: 850px) {
    .site-header {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        gap: 20px;
        padding: 10px 0;
    }

    .main-nav a {
        white-space: nowrap;
    }

    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width: 550px) {
    .hero {
        min-height: 430px;
        padding: 55px 6%;
    }

    .hero p {
        font-size: 15px;
    }

    .section {
        padding: 55px 5%;
    }

    .search-panel {
        margin: -30px 15px 0;
        padding: 22px;
    }

    .search-grid,
    .vehicle-grid,
    .benefit-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-heading h2 {
        font-size: 26px;
    }

    .cart-link {
        padding: 8px 12px;
    }
}


/* CORRECTION DEFINITIVE DE L'EN-TETE */
.site-header {
    width: 100%;
    min-height: 100px;
    padding: 12px 3%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.site-header .brand {
    display: flex;
    flex: 0 0 145px;
    width: 145px;
    min-width: 0;
    max-width: 145px;
    align-items: flex-start;
    overflow: hidden;
}

.site-header .brand-logo {
    display: block;
    width: 100% !important;
    max-width: 145px !important;
    height: 78px !important;
    max-height: 78px !important;
    object-fit: contain;
    object-position: left center;
}

.site-header .main-nav {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(10px, 1.5vw, 24px);
    padding: 0;
}

.site-header .main-nav a {
    display: inline-block;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.35;
}

.site-header .header-actions {
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.site-header .account-link,
.site-header .cart-link {
    display: inline-block;
    white-space: nowrap;
    font-size: 13px;
}

@media (max-width: 900px) {
    .site-header {
        flex-wrap: wrap;
        gap: 12px 18px;
    }

    .site-header .brand {
        flex-basis: 120px;
        width: 120px;
        max-width: 120px;
    }

    .site-header .brand-logo {
        max-width: 120px !important;
        height: 65px !important;
        max-height: 65px !important;
    }

    .site-header .header-actions {
        margin-left: auto;
    }

    .site-header .main-nav {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        justify-content: center;
        overflow: visible;
        gap: 12px 20px;
        padding: 8px 0 2px;
    }
}

@media (max-width: 550px) {
    .site-header {
        padding: 10px 4%;
    }

    .site-header .brand {
        flex-basis: 95px;
        width: 95px;
        max-width: 95px;
    }

    .site-header .brand-logo {
        max-width: 95px !important;
        height: 55px !important;
        max-height: 55px !important;
    }

    .site-header .main-nav {
        justify-content: flex-start;
        gap: 10px 16px;
    }

    .site-header .main-nav a,
    .site-header .account-link,
    .site-header .cart-link {
        font-size: 12px;
    }

    .site-header .header-actions {
        gap: 8px;
    }

    .site-header .cart-link {
        padding: 7px 10px;
    }
}


/* ==========================================================
   CATALOGUE VOITURE / MOTO — MISE EN PAGE RESPONSIVE
   ========================================================== */
.catalog-page {
    padding: 48px 4% 75px;
    background: #f7f8fa;
}

.catalog-heading {
    max-width: 1200px;
    margin: 0 auto 30px;
}

.catalog-heading h1 {
    color: #111216;
    font-size: clamp(27px, 3vw, 38px);
}

.catalog-layout {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}

.catalog-sidebar {
    min-width: 0;
    background: #fff;
    border: 1px solid #e6e7eb;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 18px rgba(17,18,22,.05);
}

.catalog-filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eceef1;
}

.filter-title-row h2 {
    font-size: 18px;
    line-height: 1.3;
}

.filter-title-row a {
    color: #d7192d;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.catalog-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.catalog-field label {
    color: #343740;
    font-size: 12px;
    font-weight: 700;
}

.catalog-field select,
.catalog-field input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #d9dce2;
    border-radius: 7px;
    background: #fff;
    color: #22252b;
    font: inherit;
    font-size: 13px;
}

.catalog-field select:focus,
.catalog-field input:focus,
.sort-form select:focus {
    outline: 2px solid rgba(227,38,54,.18);
    border-color: #e32636;
}

.catalog-field select:disabled {
    background: #f1f2f4;
    color: #92959d;
    cursor: not-allowed;
}

.catalog-apply {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    padding: 11px 14px;
    background: #e32636;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.catalog-apply:hover {
    background: #bd1928;
}

.catalog-results {
    min-width: 0;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 13px 17px;
    background: #fff;
    border: 1px solid #e6e7eb;
    border-radius: 10px;
}

.catalog-toolbar > p {
    color: #666b75;
    font-size: 13px;
}

.catalog-toolbar > p strong {
    color: #111216;
    font-size: 16px;
}

.sort-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.sort-form label {
    color: #555a64;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.sort-form select {
    min-width: 185px;
    min-height: 40px;
    padding: 8px 32px 8px 11px;
    border: 1px solid #d9dce2;
    border-radius: 7px;
    background: #fff;
    color: #22252b;
    font: inherit;
    font-size: 13px;
}

.catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.catalog-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7e8ec;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(17,18,22,.045);
    transition: transform .18s ease, box-shadow .18s ease;
}

.catalog-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 24px rgba(17,18,22,.09);
}

.catalog-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    padding: 18px;
    background: #fff;
    border-bottom: 1px solid #f0f1f3;
    overflow: hidden;
}

.catalog-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.catalog-product-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    min-width: 0;
}

.catalog-brand {
    margin-bottom: 5px;
    color: #d7192d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.catalog-product-info h2 {
    margin: 0 0 8px;
    color: #17191e;
    font-size: 16px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.catalog-dimensions {
    margin-bottom: 12px;
    color: #6d727c;
    font-size: 12px;
}

.catalog-price {
    margin-top: auto;
    margin-bottom: 12px;
    color: #111216;
    font-size: 21px;
    font-weight: 900;
}

.catalog-price-on-request {
    margin-top: auto;
    margin-bottom: 12px;
    color: #22252b;
    font-size: 16px;
    font-weight: 800;
}

.catalog-add-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.catalog-add-form input[type="number"] {
    width: 58px;
    min-height: 39px;
    padding: 7px;
    border: 1px solid #d9dce2;
    border-radius: 6px;
}

.catalog-add-form button,
.catalog-quote {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    border: 0;
    border-radius: 6px;
    padding: 9px 11px;
    background: #e32636;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.catalog-add-form button:hover,
.catalog-quote:hover {
    background: #bd1928;
}

.catalog-empty {
    padding: 45px 25px;
    background: #fff;
    border: 1px solid #e6e7eb;
    border-radius: 12px;
    text-align: center;
}

.catalog-empty h2 {
    margin-bottom: 8px;
    font-size: 21px;
}

.catalog-empty p {
    margin-bottom: 15px;
    color: #6d727c;
}

.catalog-empty a {
    color: #d7192d;
    font-weight: 700;
}

@media (max-width: 1150px) {
    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-layout {
        grid-template-columns: 235px minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 760px) {
    .catalog-page {
        padding: 32px 4% 55px;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .catalog-sidebar {
        padding: 17px;
    }

    .catalog-filter-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .filter-title-row {
        grid-column: 1 / -1;
    }

    .catalog-apply {
        align-self: end;
    }

    .catalog-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .sort-form {
        width: 100%;
        justify-content: space-between;
    }

    .sort-form select {
        flex: 1 1 auto;
        min-width: 0;
    }

    .catalog-product-image {
        height: 170px;
    }
}

@media (max-width: 480px) {
    .catalog-filter-form {
        grid-template-columns: 1fr;
    }

    .filter-title-row {
        grid-column: auto;
    }

    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .catalog-product-image {
        height: 135px;
        padding: 10px;
    }

    .catalog-product-info {
        padding: 11px;
    }

    .catalog-product-info h2 {
        font-size: 14px;
    }

    .catalog-price {
        font-size: 18px;
    }

    .catalog-add-form {
        gap: 6px;
    }

    .catalog-add-form input[type="number"] {
        width: 48px;
    }

    .catalog-add-form button {
        font-size: 11px;
        padding: 8px 6px;
    }

    .sort-form {
        align-items: flex-start;
        flex-direction: column;
    }

    .sort-form select {
        width: 100%;
    }
}
