/* ---- Polices personnalisées ---- */
@font-face {
    font-family: 'ZabalUltra';
    src: url('../fonts/ZabalDEMO-Ultra.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'ZabalSemi';
    src: url('../fonts/ZabalDEMO-SemiBold.woff2') format('woff2'),
    url('../fonts/ZabalDEMO-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

.footer-ultra {
    font-family: 'ZabalUltra', sans-serif !important;
}

/* ---- Variables de couleurs ---- */
:root {
    --rouge: #FF1822;
    --gris-clair: #EAEAEA;
    --gris-fonce: #2E2E2E;
    --bleu-bouton: #000080;
    --texte-principal: #222222;
    --texte-inverse: #FFFFFF;
}

/* ---- Reset simple ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--gris-clair);
    color: var(--texte-principal);
    font-family: 'ZabalSemi', sans-serif !important;
    line-height: 1.5;
}

/* ---- Liens ---- */
a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ---- Header ---- */
header {
    margin-bottom: 1.5rem;
    position: relative;
}

/* liens cliquables neutres */
.header-link,
.topbar-link {
    color: inherit !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: inherit;
    cursor: pointer;
}

.header-link:hover,
.topbar-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

/* ---- FOND de la TOPBAR (bande grise + liseré) ---- */
.topbar-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;

    height: 50px;
    background-color: var(--gris-fonce);
    border-bottom: 5px solid var(--rouge);

    z-index: 1;
    pointer-events: none;
}

/* ---- TOPBAR : éléments CLIQUABLES ---- */
.topbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;

    position: relative;
    z-index: 30;

    background: transparent;
    border: none;

    padding: 0.8rem 5% 0.8rem 15%;
    font-size: 0.9rem;
    color: var(--texte-inverse);
}

.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    white-space: nowrap;
}

.topbar-item i {
    font-size: 0.9rem;
}

.topbar-button {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
}

/* ---- MAIN HEADER ---- */
.main-header {
    margin-top: -2.5rem;
    position: relative;
    z-index: 20;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-zone {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    width: 12rem;
    height: auto;
    display: block;
}

.brand-title {
    font-family: 'ZabalUltra', sans-serif;
    font-size: 5rem;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: #555555;
}

/* ---- Navigation ---- */
.main-nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.main-nav a {
    position: relative;
    padding-bottom: 0.2rem;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--rouge);
    transition: width 0.2s ease-out;
}

.main-nav a:hover::after {
    width: 100%;
}

/* ---- Layout principal ---- */
main {
    padding: 0 5% 2rem 5%;
    min-height: 60vh;
    padding-top: 1rem;
}

/* Titres */
h1, h2, h3, h4 {
    font-family: 'ZabalSemi', sans-serif !important;
    margin-bottom: 0.8rem;
}

/* Paragraphes */
p {
    margin-bottom: 0.6rem;
}

/* ---- Boutons génériques ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    background-color: var(--bleu-bouton);
    color: var(--texte-inverse);
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ---- Formulaires ---- */
.form-devis,
.form-contact {
    max-width: 600px;
    border-radius: 6px;
}

.form-row {
    margin-bottom: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

label {
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #cccccc;
    font: inherit;
}

/* ---- Cartes véhicules ---- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 0.8rem 1rem 1rem 1rem;
}

.card-title {
    font-family: 'ZabalUltra', sans-serif;
    margin-bottom: 0.3rem;
}

.card-meta {
    font-size: 0.9rem;
    color: #555555;
    margin-bottom: 0.4rem;
}

/* ---- Page contact ---- */
.contact-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-infos {
    background: #ffffff;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.contact-map iframe {
    border-radius: 6px;
    overflow: hidden;
}

/* ---- Footer ---- */
.site-footer {
    background-color: var(--gris-fonce);
    color: var(--texte-inverse);
    border-top: 3px solid var(--rouge);
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-family: 'ZabalSemi', sans-serif;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0 5% 1.5rem 5%;
}

.site-footer h3.footer-ultra {
    font-size: 2rem;
    margin: 0;
    font-family: 'ZabalUltra', sans-serif;
    text-transform: uppercase;
}

.footer-block h4 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.footer-block p {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.footer-baseline {
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
}

.footer-block i {
    margin-right: 0.4rem;
}

.footer-horaires-btn {
    border: none;
    background: none;
    color: var(--texte-inverse);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding: 0.8rem 5%;
    font-size: 0.8rem;
}

/* ---- Modale horaires ---- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 6px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    border: none;
    background: none;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        margin-top: -1.5rem; /* un peu moins de chevauchement sur mobile */
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 1rem;
        padding-top: 0.5rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
}
